/* ==========================================================================
   RC3 · Paper & Ink / Lab Graphite
   视觉重做：纸墨浅色默认 + 石墨深色变体；编辑式排版；论文地图三视图
   ========================================================================== */

/* ------------------------------------------------------------ base / shell --- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.6;
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); color: var(--text); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -0.01em; }
.mono, .hash { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.app-shell { background: transparent; }
.sidebar {
  width: var(--sidebar-w);
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 62%, var(--bg));
  padding: 0 12px 18px;
}
.brand { padding: 20px 10px 16px; gap: 11px; }
.brand-mark svg { filter: none; }
.brand-name { font-family: var(--font-serif); font-size: 16.5px; font-weight: 700; letter-spacing: 0; color: var(--text); }
.brand-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: var(--text-4); text-transform: uppercase; }
.nav { gap: 2px; }
.nav-group { margin-bottom: 14px; }
.nav-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 6px 10px 5px;
}
.nav-link {
  position: relative;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 500;
  gap: 10px;
}
.nav-link svg { width: 15px; height: 15px; opacity: 0.85; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 650;
}
.nav-link.is-active::before {
  content: "";
  position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-count { min-width: 20px; height: 17px; padding: 0 5px; font-size: 9.5px; }
.sidebar-foot {
  margin: 12px 4px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 10.5px;
  color: var(--text-4);
}
.sidebar-foot .row { min-height: 21px; gap: 7px; }
.sidebar-foot strong { color: var(--text-2); font-weight: 600; }
.sidebar-foot .mono { color: var(--text-2); }
.sidebar-foot .sep { margin: 7px 0; background: var(--line-soft); }

.topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 0 26px;
}
.crumbs { font-size: 11.5px; color: var(--text-4); }
.crumbs strong { color: var(--text-2); font-weight: 600; }
.search-trigger {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-4);
  font-size: 12px;
}
.search-trigger:hover { border-color: var(--accent-line); color: var(--text-3); }
.mode-pill { height: 24px; border-radius: 999px; font-size: 10px; }
.mode-pill.is-live { background: var(--green-soft); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }
.mode-pill.is-mock { background: var(--amber-soft); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 25%, transparent); }
.icon-btn { border-radius: var(--radius-sm); color: var(--text-3); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.user-chip { padding: 4px 9px 4px 5px; border-radius: 999px; border: 1px solid transparent; }
.user-chip:hover { border-color: var(--line); background: var(--surface); }
.avatar { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); font-weight: 650; }
.user-name { color: var(--text-2); font-weight: 600; }
.user-role { color: var(--text-4); }

.content { padding: 26px 28px 46px; max-width: var(--content-max); }
.content-inner { max-width: var(--content-max); }

/* 编辑式页头 */
.page-head { margin-bottom: 20px; align-items: flex-end; gap: 16px; }
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 5px 0 4px;
  color: var(--text);
}
.page-desc { font-size: 12.5px; line-height: 1.7; color: var(--text-3); max-width: 860px; margin: 0; }
.page-actions { gap: 7px; }

/* --------------------------------------------------------------- 基础控件 --- */
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
  box-shadow: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { border-color: var(--text-3); background: var(--surface); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
[data-theme="dark"] .btn-primary { color: #06211d; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--surface); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-3); }
.btn-ghost:hover { border-color: var(--line); background: var(--surface); }
.btn-sm { height: 27px; padding: 0 9px; font-size: 11px; }
.icon-btn { width: 30px; height: 30px; border-radius: var(--radius-sm); }

.input, .select, .textarea {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
}
.input::placeholder { color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.select { color: var(--text-2); }
.field-hint { font-size: 10.5px; color: var(--text-4); line-height: 1.6; }

.badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-3);
}
.badge .dot { width: 5px; height: 5px; }
.badge-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); }
.badge-green { color: var(--green); border-color: color-mix(in srgb, var(--green) 28%, transparent); background: var(--green-soft); }
.badge-amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 28%, transparent); background: var(--amber-soft); }
.badge-violet { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 28%, transparent); background: var(--violet-soft); }
.badge-rose { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 28%, transparent); background: var(--rose-soft); }
.badge-teal { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 28%, transparent); background: var(--teal-soft); }
.badge-lg { height: 23px; font-size: 10.5px; }
.origin-badge { font-weight: 600; }
.route-badge { height: 20px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); font-size: 9.5px; color: var(--text-2); }
.route-badge .swatch { width: 6px; height: 6px; }
.mini-evidence { font-size: 10.5px; }
.status-badge { border-radius: 4px; }
.status-badge[data-status="admitted"] { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 28%, transparent); background: var(--teal-soft); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-hover:hover { border-color: var(--text-4); box-shadow: var(--shadow); transform: none; }
.card-head { padding: 14px 16px 10px; align-items: flex-start; }
.card-title { font-family: var(--font-sans); font-size: 13px; font-weight: 650; letter-spacing: -0.005em; color: var(--text); }
.card-title svg { width: 14px; height: 14px; color: var(--text-4); }
.card-sub { font-size: 10.5px; line-height: 1.55; color: var(--text-4); margin-top: 2px; }
.card-body { padding: 0 16px 16px; }
.card-foot { padding: 9px 16px; border-top: 1px solid var(--line-soft); background: var(--surface-2); font-size: 10.5px; color: var(--text-4); }
.card-foot a { color: var(--text-3); }
.card-foot a:hover { color: var(--accent); }

.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat::after { display: none; }
.stat-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); gap: 5px; }
.stat-value { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 10px; color: var(--text-4); }
.stat[class*="stat-"] { background: var(--surface); }

.table-scroll { border: 1px solid var(--line); border-radius: var(--radius); }
.data { width: 100%; border-collapse: collapse; font-size: 12px; }
.data thead th {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 9px 11px;
  font-weight: 600;
}
.data tbody td { padding: 10px 11px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.data .t { font-size: 12.5px; font-weight: 550; color: var(--text); line-height: 1.45; }
.data .m { font-size: 10px; color: var(--text-4); margin-top: 2px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 12px 13px; }
.panel-title { font-family: var(--font-sans); font-size: 11.5px; font-weight: 650; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.panel-title svg { width: 13px; height: 13px; color: var(--text-4); }
.quote {
  border-left: 2px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}
.list { display: flex; flex-direction: column; gap: 7px; }
.list-item { font-size: 12px; color: var(--text-3); line-height: 1.65; gap: 8px; }
.list-item svg { color: var(--text-4); }
.list-dot { background: var(--text-4); }

.chart-grid-line { stroke: var(--line-soft); }
.chart-axis-text { fill: var(--text-4); font-size: 9px; }
.chart-legend, .legend { font-size: 10px; color: var(--text-4); }
.chart-legend .lg .sw, .legend .sw { border-radius: 2px; }
.chart-wrap svg { overflow: visible; }
.chart-bar:hover rect { opacity: 1; }

.segmented { padding: 3px; gap: 1px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.segmented button {
  height: 26px; padding: 0 10px; border-radius: calc(var(--radius) - 2px);
  font-size: 11px; color: var(--text-3); border: 0; background: transparent;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

.toolbar { gap: 8px; padding: 0; margin-bottom: 14px; background: transparent; border: 0; }
.toolbar-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); }
.search-box { height: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-4); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box .input { border: 0; height: 30px; padding: 0; background: transparent; box-shadow: none; }
.search-box .input:focus { box-shadow: none; }
.chip { height: 22px; padding: 0 8px; font-size: 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); }
.chip .dot { width: 5px; height: 5px; }
.check { font-size: 11.5px; color: var(--text-3); }
.check .box { border-radius: 3px; border-color: var(--line); }
.check input:checked ~ .box { background: var(--accent); border-color: var(--accent); }
.kv { font-size: 11.5px; }
.kv dt { color: var(--text-4); }
.kv dd { color: var(--text-2); }
.pagination { font-size: 11px; }
.pagination button { border-radius: var(--radius-sm); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state { padding: 30px 16px; }
.empty-title { font-size: 13px; color: var(--text-2); }
.empty-desc { font-size: 11px; color: var(--text-4); }
.notice { border-radius: var(--radius); padding: 10px 12px; font-size: 11.5px; line-height: 1.65; }
.notice-info { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text-2); }
.notice-warn { background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 25%, transparent); color: var(--text-2); }
.notice-success { background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); color: var(--text-2); }
.notice-danger { background: var(--rose-soft); border: 1px solid color-mix(in srgb, var(--rose) 25%, transparent); color: var(--text-2); }
.notice svg { color: var(--text-3); }
.modal, .drawer, .search-overlay-panel { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.modal-head, .drawer-head { border-bottom: 1px solid var(--line); }
.modal-title, .drawer-title { font-family: var(--font-serif); font-size: 17px; }
.modal-backdrop, .drawer-backdrop { background: rgba(20, 24, 22, 0.42); }
.toast { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
.toast-title { font-family: var(--font-sans); font-weight: 650; }
.job-progress, .code-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.progress { background: var(--surface-3); }
.progress span { background: var(--accent); }
.loading-bar { background: linear-gradient(90deg, transparent, var(--accent-soft), transparent); }

/* --------------------------------------------------------------- 登录浮层 --- */
.login-screen, .login-backdrop { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.login-card, .login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 28px 24px;
}
.login-title { font-family: var(--font-serif); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.login-sub { font-size: 11.5px; color: var(--text-4); }
.login-hint { font-size: 10.5px; color: var(--text-4); }

/* ---------------------------------------------------------------- 首页 v3 --- */
.ov-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.ov-kicker { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.ov-title { font-family: var(--font-serif); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; margin: 8px 0 8px; }
.ov-title em { font-style: italic; font-family: var(--font-serif); color: var(--accent); }
.ov-sub { max-width: 760px; font-size: 12.5px; line-height: 1.75; color: var(--text-3); }
.ov-sub strong { color: var(--text-2); font-weight: 600; }
.ov-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.ov-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 14px;
}
.ov-hero-main { padding: 24px 26px 18px; }
.ov-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); }
.ov-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ov-total-row { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin-top: 14px; }
.ov-total { display: flex; align-items: baseline; gap: 9px; }
.ov-total b {
  font-family: var(--font-mono);
  font-size: clamp(54px, 7vw, 82px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ov-total span { font-size: 12px; color: var(--text-4); }
.ov-total .up { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); font-size: 10px; font-weight: 650; }
.ov-breakdown { display: flex; gap: 18px; flex-wrap: wrap; padding-bottom: 4px; }
.ov-bd { display: flex; flex-direction: column; gap: 1px; min-width: 70px; border-left: 2px solid var(--line-strong); padding-left: 10px; }
.ov-bd b { font-family: var(--font-mono); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-bd span { font-size: 9.5px; color: var(--text-4); }
.ov-bd.is-base { border-color: var(--route-r1); }
.ov-bd.is-maint { border-color: var(--route-r3); }
.ov-bd.is-maint b { color: var(--route-r3); }
.ov-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ov-hs { display: flex; flex-direction: column; gap: 1px; }
.ov-hs span { font-size: 9.5px; color: var(--text-4); letter-spacing: 0.02em; }
.ov-hs b { font-family: var(--font-mono); font-size: 19px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-hs a { font-size: 9.5px; color: var(--text-4); display: inline-flex; gap: 2px; align-items: center; }
.ov-hs a:hover { color: var(--accent); }
.ov-side { border-left: 1px solid var(--line); padding: 20px 20px 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.ov-side-title { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); display: flex; justify-content: space-between; align-items: center; }
.ov-side-num { font-family: var(--font-mono); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: var(--route-r3); line-height: 1; }
.ov-side-sub { font-size: 10px; color: var(--text-4); margin-top: 2px; }
.ov-side-spark svg { width: 100%; height: 42px; }
.ov-side-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ov-side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 10.5px; color: var(--text-4); }
.ov-side-row b { font-family: var(--font-mono); font-weight: 600; color: var(--text-2); font-size: 10px; text-align: right; }
.ov-side-foot { margin-top: auto; display: flex; gap: 6px; }
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ov-kpis .stat-value { font-size: 24px; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ov-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* 漏斗 */
.ov-funnel { display: flex; flex-direction: column; gap: 9px; }
.ov-funnel-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 90px; align-items: center; gap: 10px; }
.ov-funnel-label { font-size: 10.5px; color: var(--text-3); display: flex; flex-direction: column; gap: 0; }
.ov-funnel-label b { font-family: var(--font-mono); font-size: 15px; color: var(--text); font-weight: 700; line-height: 1.1; }
.ov-funnel-label span { font-size: 9px; color: var(--text-4); }
.ov-funnel-track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.ov-funnel-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.ov-funnel-row[data-tone="muted"] .ov-funnel-fill { background: var(--text-4); opacity: 0.45; }
.ov-funnel-row[data-tone="amber"] .ov-funnel-fill { background: var(--amber); }
.ov-funnel-row[data-tone="violet"] .ov-funnel-fill { background: var(--violet); }
.ov-funnel-row[data-tone="accent"] .ov-funnel-fill { background: var(--route-r3); }
.ov-funnel-pct { text-align: right; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-4); }
.ov-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 10px; color: var(--text-4); line-height: 1.6; }
.ov-note svg { flex: none; margin-top: 1px; }

/* 路线 */
.ov-routes { display: flex; flex-direction: column; }
.ov-route { display: grid; grid-template-columns: 142px minmax(0, 1fr) 54px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.ov-route:last-child { border-bottom: 0; }
.ov-route-name { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ov-route-name b { font-family: var(--font-mono); font-size: 10.5px; color: var(--rc); font-weight: 700; }
.ov-route-name span { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-route-bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; background: var(--surface-3); gap: 1.5px; }
.ov-route-bar .base { background: color-mix(in srgb, var(--rc) 34%, transparent); }
.ov-route-bar .maint { background: var(--rc); }
.ov-route-count { text-align: right; }
.ov-route-count b { display: block; font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-route-count span { font-size: 9px; color: var(--text-4); }
.ov-route-meta { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -3px; font-size: 9.5px; color: var(--text-4); }
.ov-route-meta .maint { color: var(--route-r3); font-weight: 600; }
.ov-route-meta .maps { display: inline-flex; gap: 3px; margin-left: auto; }
.ov-route-meta .maps a { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); border: 1px solid var(--line-soft); border-radius: 3px; padding: 0 4px; }
.ov-route-meta .maps a:hover { color: var(--accent); border-color: var(--accent-line); text-decoration: none; }
.ov-legend { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line-soft); font-size: 9.5px; color: var(--text-4); }
.ov-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.ov-legend .sw { width: 10px; height: 6px; border-radius: 1px; background: var(--c); }

/* 证据 */
.ov-ev { display: flex; flex-direction: column; gap: 9px; }
.ov-ev-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.ov-ev-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-2); }
.ov-ev-label .sw { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.ov-ev-track { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.ov-ev-base { height: 100%; }
.ov-ev-maint { height: 100%; background: repeating-linear-gradient(45deg, var(--route-r3), var(--route-r3) 2.5px, color-mix(in srgb, var(--route-r3) 45%, transparent) 2.5px, color-mix(in srgb, var(--route-r3) 45%, transparent) 5px); }
.ov-ev-count { text-align: right; font-family: var(--font-mono); font-size: 10px; color: var(--text-2); }
.ov-ev-count em { font-style: normal; color: var(--text-4); font-size: 9px; margin-left: 3px; }
.ov-ev-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 9px; color: var(--text-4); }
.ov-ev-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.ov-ev-legend .sw { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }

/* 最近准入 + 活动 */
.ov-recent { display: flex; flex-direction: column; }
.ov-recent-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.ov-recent-item:last-child { border-bottom: 0; }
.ov-recent-item:hover .r-title { color: var(--accent); }
.r-route { display: inline-grid; place-items: center; width: 24px; height: 20px; border-radius: 3px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 30%, transparent); background: color-mix(in srgb, var(--rc) 8%, transparent); }
.r-main { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.r-title { font-size: 11px; color: var(--text); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub { font-size: 9px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-time { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); white-space: nowrap; }
.ov-activity { display: flex; flex-direction: column; }
.ov-act { display: grid; grid-template-columns: 6px minmax(0,1fr) auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.ov-act:last-child { border-bottom: 0; }
.ov-act i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-top: 6px; opacity: .55; }
.ov-act span { font-size: 10.5px; color: var(--text-3); line-height: 1.5; min-width: 0; }
.ov-act b { color: var(--text-2); font-weight: 600; }
.ov-act em { display: block; font-style: normal; font-size: 9px; color: var(--text-4); }
.ov-act time { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); white-space: nowrap; }
.ov-integrity { display: flex; flex-direction: column; gap: 7px; }
.ov-int-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface-2); }
.ov-int-row .i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; background: var(--green-soft); color: var(--green); }
.ov-int-row .i.warn { background: var(--amber-soft); color: var(--amber); }
.ov-int-row b { display: block; font-size: 10.5px; color: var(--text-2); font-weight: 600; }
.ov-int-row em { display: block; font-style: normal; font-size: 9px; color: var(--text-4); }
.ov-int-row .v { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); white-space: nowrap; }
.ov-footnote { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.7; color: var(--text-4); }
.ov-footnote svg { flex: none; margin-top: 1px; }
.ov-years svg { display: block; width: 100%; }

/* ------------------------------------------------------------- 地图 v3 --- */
.map3-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.map3-views { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 2px; }
.map3-views button {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px;
  border: 0; background: transparent; border-radius: calc(var(--radius) - 2px);
  font-size: 11.5px; color: var(--text-3);
}
.map3-views button.is-active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.map3-views button svg { width: 13px; height: 13px; }
.map3-filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map3-filterbar .search-box { min-width: 210px; flex: 1 1 220px; max-width: 340px; }
.map3-condstrip { display: flex; gap: 7px; overflow-x: auto; padding: 10px 0; margin-bottom: 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.map3-cond {
  flex: 0 0 172px; display: flex; flex-direction: column; gap: 3px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  text-align: left; transition: border-color var(--dur) var(--ease);
}
.map3-cond:hover { border-color: var(--accent); }
.map3-cond-code { font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.map3-cond-title { font-size: 10.5px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 30px; }
.map3-cond-foot { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; margin-top: auto; font-size: 8.5px; color: var(--text-4); }
.map3-cond-foot i { font-style: normal; font-family: var(--font-mono); border: 1px solid var(--line-soft); border-radius: 3px; padding: 0 3px; }
.map3-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.map3-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.map3-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.map3-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.map3-panel-title { font-size: 12.5px; font-weight: 650; color: var(--text); }
.map3-panel-sub { font-size: 10px; color: var(--text-4); margin-top: 1px; }
.map3-panel-body { padding: 14px 16px 16px; }
.map3-aside { position: sticky; top: calc(var(--topbar-h) + 14px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.map3-aside-head { padding: 13px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.map3-aside-list { max-height: calc(100vh - 250px); overflow: auto; }
.map3-listcount { font-family: var(--font-mono); font-size: 10px; color: var(--text-4); }
.map3-footbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 9.5px; color: var(--text-4); }
.map3-footbar b { font-family: var(--font-mono); color: var(--text-2); font-weight: 600; }
.map3-legend { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-size: 9.5px; color: var(--text-4); }
.map3-legend .lg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.map3-legend .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.map3-legend .sw { width: 9px; height: 6px; border-radius: 1px; background: var(--c); }

/* 矩阵 */
.mx-head, .mx-row { display: grid; grid-template-columns: 120px repeat(10, minmax(54px, 1fr)); gap: 3px; }
.mx-head { margin-bottom: 5px; }
.mx-head span { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); text-align: center; letter-spacing: 0.02em; white-space: nowrap; }
.mx-row { margin-bottom: 3px; }
.mx-label { display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 6px 8px; border-radius: 4px; background: var(--surface-2); border-left: 2px solid var(--rc); }
.mx-label b { font-family: var(--font-mono); font-size: 10px; color: var(--text); font-weight: 700; }
.mx-label span { font-size: 9px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-cell {
  position: relative; min-height: 42px; border: 1px solid var(--line-soft); border-radius: 4px;
  background: color-mix(in srgb, var(--rc) calc(var(--d, 4) * 1%), var(--surface));
  text-align: left; padding: 5px 6px; overflow: hidden;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.mx-cell:hover { border-color: var(--rc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent); }
.mx-cell[data-n="0"] { opacity: .32; background: var(--surface-2); }
.mx-cell .n { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; }
.mx-split { display: flex; height: 2px; border-radius: 2px; overflow: hidden; margin-top: 4px; background: var(--surface-3); }
.mx-split .base { background: color-mix(in srgb, var(--rc) 32%, transparent); }
.mx-split .maint { background: var(--rc); }
.mx-cell.is-sel { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.mx-cell.is-dim { opacity: .18; }
.mx-scale { display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--text-4); }
.mx-scale i { width: 12px; height: 12px; border-radius: 2px; background: var(--surface-3); }
.mx-scale i.l1 { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.mx-scale i.l2 { background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.mx-scale i.l3 { background: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.mx-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 9px; color: var(--text-4); }
.mx-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.mx-legend .sw { width: 9px; height: 6px; border-radius: 1px; background: var(--c); }

/* 星座 */
.cs-stage {
  position: relative; height: calc(100vh - var(--topbar-h) - 250px); min-height: 520px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  overflow: hidden;
}
[data-theme="light"] .cs-stage { background: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px), var(--surface); background-size: 40px 40px; }
[data-theme="dark"] .cs-stage { background: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px), var(--surface); background-size: 44px 44px; }
.cs-stage svg { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.cs-stage svg.is-panning { cursor: grabbing; }
.cs-hint { position: absolute; left: 14px; top: 12px; z-index: 3; max-width: min(380px, 60%); padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); font-size: 9.5px; line-height: 1.55; color: var(--text-4); }
.cs-legend { position: absolute; left: 14px; bottom: 12px; z-index: 3; display: flex; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); }
.cs-zoom { position: absolute; right: 14px; bottom: 12px; z-index: 3; display: flex; flex-direction: column; gap: 4px; }
.cs-zoom .icon-btn { border: 1px solid var(--line); background: var(--surface); }
.cs-tip { position: absolute; z-index: 6; display: none; max-width: 300px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); pointer-events: none; font-size: 10.5px; line-height: 1.5; }
.cs-tip b { display: block; font-size: 11.5px; color: var(--text); margin-bottom: 2px; }
.cs-tip span { color: var(--text-4); font-size: 9.5px; }
.cs-node { cursor: pointer; }
.cs-node .halo { transition: opacity .12s; }
.cs-node:hover .halo { opacity: 1 !important; }
.cs-node-label { font-family: var(--font-serif); font-weight: 700; fill: var(--text); pointer-events: none; }
.cs-node-sub { fill: var(--text-4); font-family: var(--font-mono); font-size: 8.5px; pointer-events: none; }
.cs-topic-label { fill: var(--text-2); font-size: 9px; font-weight: 600; pointer-events: none; }
.cs-dot { cursor: pointer; transition: r .1s; }
.cs-dot:hover { r: 6; }

/* 列表视图 */
.lv-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lv-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.lv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lv-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); white-space: nowrap; }
.lv-table thead th[data-sort] { cursor: pointer; }
.lv-table thead th[data-sort]:hover { color: var(--accent); }
.lv-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.lv-table tbody tr:last-child td { border-bottom: 0; }
.lv-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.lv-table tbody tr.is-sel { background: var(--accent-soft); }
.lv-title { font-size: 12px; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-sub { font-size: 9px; color: var(--text-4); margin-top: 2px; }
.lv-more { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.lv-empty { padding: 30px 16px; text-align: center; font-size: 11.5px; color: var(--text-4); }
.lv-route { display: inline-grid; place-items: center; min-width: 24px; height: 18px; padding: 0 5px; border-radius: 3px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 28%, transparent); background: color-mix(in srgb, var(--rc) 7%, transparent); }

/* 地图右侧列表 */
.ml-list { display: flex; flex-direction: column; }
.ml-item { display: grid; grid-template-columns: 34px minmax(0,1fr) 24px; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; background: transparent; border-left: 0; border-right: 0; border-top: 0; }
.ml-item:hover { background: var(--surface-2); }
.ml-item.is-sel { background: var(--accent-soft); }
.ml-year { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-4); padding-top: 1px; }
.ml-main { min-width: 0; }
.ml-title { font-size: 11px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ml-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.ml-meta .badge { height: 17px; font-size: 8.5px; padding: 0 5px; }
.ml-meta .muted { font-size: 8.5px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-id { font-family: var(--font-mono); font-size: 8px; color: var(--text-4); text-align: right; }
.ml-empty { padding: 26px 14px; text-align: center; font-size: 11px; color: var(--text-4); }

/* 地图详情侧栏 */
.map3-detail {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 94vw; z-index: 60;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 22px 22px 30px; overflow: auto;
}
.map3-detail h2 { font-family: var(--font-serif); font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; margin: 10px 0 8px; }
.map3-detail .meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.map3-detail dl { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; margin: 14px 0; font-size: 11.5px; }
.map3-detail dt { color: var(--text-4); }
.map3-detail dd { margin: 0; color: var(--text-2); }
.map3-detail .close { position: absolute; top: 13px; right: 13px; }
.map3-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(20, 24, 22, 0.42); backdrop-filter: blur(2px); }

/* ------------------------------------------------------- 其它页面微调 --- */
.about-hero { padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.ah-title { font-family: var(--font-serif); font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing: -0.02em; }
.ah-desc { font-size: 12.5px; line-height: 1.8; color: var(--text-3); max-width: 920px; margin-top: 8px; }
.ah-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.route-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rs-code, .rs-name { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.detail-title { font-family: var(--font-serif); font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.detail-sub { font-size: 11.5px; color: var(--text-4); }
.detail-hero { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 4px; }
.detail-section { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.sec-head { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); display: flex; align-items: center; gap: 5px; margin-bottom: 9px; }
.finding-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 11px 13px; }
.fc-idx { font-family: var(--font-mono); font-size: 8.5px; color: var(--accent); }
.related-item { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface); }
.related-item:hover { border-color: var(--line-strong); text-decoration: none; }
.recent-list, .related-list { gap: 0; }
.audit-row, .integrity-row { border-color: var(--line-soft); }
.setting-row { border-color: var(--line-soft); }
.admin-grid, .grid-dash { gap: 14px; }
.action-tile { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.action-tile:hover { border-color: var(--accent-line); }
.action-tile .at-icon { background: var(--surface-2); color: var(--accent); }
.export-path, .count-rule .cr { border-color: var(--line-soft); background: var(--surface); }
.step-list .step { border-color: var(--line-soft); }
.boundary-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tech-row { border-color: var(--line-soft); }

/* ------------------------------------------------------------ responsive --- */
@media (max-width: 1280px) {
  .ov-hero { grid-template-columns: minmax(0, 1fr); }
  .ov-side { border-left: 0; border-top: 1px solid var(--line); }
  .ov-grid { grid-template-columns: minmax(0, 1fr); }
  .map3-layout { grid-template-columns: minmax(0, 1fr); }
  .map3-aside { position: static; }
  .map3-aside-list { max-height: 420px; }
}
@media (max-width: 1024px) {
  .content { padding: 20px 20px 40px; }
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sidebar { width: 232px; }
}
@media (max-width: 760px) {
  .content { padding: 16px 14px 34px; }
  .topbar { padding: 0 14px; }
  .page-title { font-size: 24px; }
  .page-desc { font-size: 11.5px; }
  .ov-title { font-size: 28px; }
  .ov-hero-main { padding: 18px 16px 14px; }
  .ov-total b { font-size: 52px; }
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ov-funnel-row { grid-template-columns: 82px minmax(0, 1fr); }
  .ov-funnel-pct { display: none; }
  .ov-route { grid-template-columns: 104px minmax(0, 1fr) 46px; gap: 8px; }
  .ov-grid { gap: 10px; }
  .mx-head, .mx-row { grid-template-columns: 64px repeat(10, minmax(38px, 1fr)); }
  .mx-cell { min-height: 34px; padding: 4px; }
  .mx-cell .n { font-size: 10px; }
  .mx-label { padding: 4px 5px; }
  .mx-label span { font-size: 8px; }
  .mx-label b { font-size: 9px; }
  .map3-toolbar { gap: 6px; }
  .map3-views { width: 100%; justify-content: space-between; }
  .map3-views button { flex: 1; justify-content: center; padding: 0 6px; font-size: 10.5px; }
  .map3-filterbar .search-box { min-width: 0; max-width: none; flex: 1 1 100%; }
  .map3-condstrip { gap: 5px; }
  .map3-cond { flex-basis: 150px; }
  .cs-stage { height: 420px; min-height: 0; }
  .map3-detail { width: 100%; }
  .lv-table thead th:nth-child(5), .lv-table tbody td:nth-child(5) { display: none; }
  .lv-table thead th:nth-child(4), .lv-table tbody td:nth-child(4) { display: none; }
}

.map3-layout.no-aside { grid-template-columns: minmax(0, 1fr); }
.mx-tip { position: fixed; z-index: 70; }

.map3-condstrip { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.map3-condstrip::-webkit-scrollbar { height: 6px; }
.map3-condstrip::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.map3-condstrip::-webkit-scrollbar-track { background: transparent; }
.ov-funnel-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }

/* 管理页准入块（复用旧 class 名，RC3 重新定义） */
.admission-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.ac { padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface-2); }
.ac span { display: block; font-size: 9px; color: var(--text-4); }
.ac b { display: block; margin-top: 1px; font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.admission-form { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.admission-form .field { display: flex; flex-direction: column; gap: 2px; font-size: 9px; color: var(--text-4); }
.admission-form .field .input { width: 92px; height: 30px; }
.admission-form .check { height: 30px; font-size: 11px; }
.admission-counts { display: flex; gap: 13px; flex-wrap: wrap; font-size: 10px; color: var(--text-3); }
.admission-counts b { color: var(--text); font-family: var(--font-mono); }
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { text-decoration: none; }
.recent-item:hover .ri-title { color: var(--accent); }
.ri-route { display: inline-grid; place-items: center; width: 24px; height: 20px; border-radius: 3px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 28%, transparent); background: color-mix(in srgb, var(--rc) 8%, transparent); }
.ri-main { min-width: 0; display: flex; flex-direction: column; }
.ri-title { font-size: 11px; color: var(--text); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-sub { font-size: 9px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-time { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); white-space: nowrap; }
@media (max-width: 760px) { .admission-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.map3-condstrip { scrollbar-width: none; }
.map3-condstrip::-webkit-scrollbar { display: none; }

@media (max-width: 760px) {
  .topbar { padding: 0 10px; gap: 4px; }
  .crumbs, .topbar-spacer { display: none !important; }
  .search-trigger { width: 32px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .search-trigger .placeholder, .search-trigger .kbd { display: none; }
  .mode-pill { width: 22px; height: 22px; padding: 0; justify-content: center; border: 0; background: transparent; }
  .mode-pill .mode-text { display: none; }
  .user-chip { padding: 2px; }
  .user-chip .user-meta { display: none; }
  .menu-btn { width: 30px; }
}

/* 依 Lead 约束：衬线仅用于页面主标题 / 首页 / 关于；内容与浮层标题回到无衬线 */
.detail-title { font-family: var(--font-sans); font-weight: 720; letter-spacing: -0.02em; }
.map3-detail h2 { font-family: var(--font-sans); font-weight: 680; }
.login-title { font-family: var(--font-sans); font-weight: 720; letter-spacing: -0.02em; }
.modal-title, .drawer-title { font-family: var(--font-sans); font-weight: 650; }

/* ==========================================================================
   RC4 · 问题详情（双语 / 论文链 / 趋势）与相关论文
   ========================================================================== */
.question-card.q-item { display: block; }
.qc-en {
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-4);
  margin-top: 4px;
  font-style: italic;
}
.qc-en.is-empty { font-style: normal; color: var(--text-4); opacity: .75; }
.qc-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line-soft);
  font-size: 9.5px; color: var(--text-4);
}
.qc-foot .qc-chain { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.qc-foot .go { margin-left: auto; color: var(--text-4); }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 2px; gap: 1px; }
.lang-switch button {
  border: 0; background: transparent; color: var(--text-3);
  height: 24px; padding: 0 9px; border-radius: 3px; font-size: 10px;
}
.lang-switch button.is-active { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: var(--shadow-sm); }

.q-detail-top { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: stretch; }
.q-detail-hero {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  padding: 20px 24px 16px; box-shadow: var(--shadow-sm);
}
.q-hero-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-hero-meta .lang-switch { margin-left: auto; }
.q-hero-title {
  font-family: var(--font-sans); font-size: clamp(22px, 2.4vw, 30px); font-weight: 720;
  line-height: 1.3; letter-spacing: -0.02em; margin: 12px 0 4px; color: var(--text);
}
.q-hero-en { font-size: 14px; line-height: 1.55; color: var(--text-3); font-style: italic; margin: 2px 0 6px; }
.q-hero-answer { font-size: 12.5px; line-height: 1.75; color: var(--text-2); margin: 10px 0 0; max-width: 880px; }
.q-hero-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 9.5px; color: var(--text-4); }
.q-hero-foot span { display: inline-flex; align-items: center; gap: 4px; }
.q-detail-side { display: flex; flex-direction: column; gap: 10px; }
.q-side-card { flex: 1; }
.q-side-card .card-body { padding: 12px 13px; }
.q-side-num { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

.q-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; margin-top: 12px; align-items: start; }
.q-detail-main, .q-detail-aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.q-detail-card .card-body { padding: 4px 16px 16px; }
.bi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.bi-col { min-width: 0; }
.bi-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); margin-bottom: 4px; }
.bi-text { font-size: 12px; line-height: 1.75; color: var(--text-2); white-space: pre-line; }
.bi-missing { font-size: 10.5px; color: var(--text-4); font-style: italic; padding: 4px 0; }

/* 论文链 */
.q-chain-card .card-body { padding-top: 8px; }
.paper-chain { display: flex; flex-direction: column; }
.chain-row { display: flex; flex-direction: column; }
.chain-start { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding: 2px 0 4px; }
.chain-connector {
  position: relative; display: flex; align-items: center; gap: 5px;
  min-height: 18px; padding-left: 32px;
  font-size: 8.5px; color: var(--text-4);
}
.chain-connector::before {
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 1px;
  background: var(--line);
}
.chain-connector span { display: inline-flex; align-items: center; gap: 3px; background: var(--surface); position: relative; z-index: 1; padding: 1px 6px; border: 1px solid var(--line-soft); border-radius: 999px; }
.chain-connector.is-cited span { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.chain-connector.is-cited::before { background: var(--accent-line); width: 1.5px; }
.chain-node {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 22px; gap: 10px; align-items: start;
  text-align: left; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 9px 11px; margin: 2px 0;
  position: relative; transition: border-color .12s, background .12s;
}
.chain-node::before {
  content: ""; position: absolute; left: 14px; top: -10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); z-index: 2;
}
.chain-row:first-child .chain-node::before { display: none; }
.chain-node:hover { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.chain-year { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text); padding-top: 2px; font-variant-numeric: tabular-nums; }
.chain-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chain-title { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.45; }
.chain-title-en { font-size: 10.5px; line-height: 1.45; color: var(--text-4); }
.chain-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.chain-meta .badge { height: 17px; font-size: 8.5px; padding: 0 5px; }
.chain-role { font-size: 9.5px; color: var(--text-4); }
.chain-go { color: var(--text-4); padding-top: 2px; }
.chain-node:hover .chain-go { color: var(--accent); }
.chain-cites { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.chain-cites .chip { font-family: var(--font-mono); font-size: 8.5px; height: 20px; }

/* 相关论文 */
.q-related-filters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.q-related-filters .chip { height: 20px; font-size: 9px; padding: 0 6px; }
.q-related-list { display: flex; flex-direction: column; max-height: 620px; overflow: auto; }
.q-related-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.q-related-item:last-child { border-bottom: 0; }
.q-related-item:hover { text-decoration: none; }
.q-related-item:hover .qr-title { color: var(--accent); }
.qr-year { font-family: var(--font-mono); font-size: 10px; color: var(--text-4); padding-top: 1px; }
.qr-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qr-title { font-size: 11.5px; line-height: 1.45; color: var(--text); font-weight: 550; }
.qr-en { font-size: 9px; color: var(--text-4); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.qr-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.qr-meta .badge { height: 17px; font-size: 8.5px; padding: 0 5px; }

/* 证据对象 */
.qs-evidence { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 11px 13px; }
.qs-ev-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.qs-ev-title:hover { color: var(--accent); }
.qs-finding { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.qs-finding p { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--text-2); }

.q-scope-note { align-items: flex-start; }
.q-scope-text { white-space: pre-line; line-height: 1.7; margin-top: 3px; color: var(--text-2); }

@media (max-width: 1180px) {
  .q-detail-top { grid-template-columns: minmax(0, 1fr); }
  .q-detail-side { flex-direction: row; }
  .q-detail-side .q-side-card { flex: 1; }
  .q-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .q-detail-hero { padding: 16px 15px 13px; }
  .q-hero-title { font-size: 21px; }
  .q-hero-meta .lang-switch { margin-left: 0; }
  .q-detail-side { flex-direction: column; }
  .bi-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .chain-node { grid-template-columns: 44px minmax(0, 1fr); }
  .chain-go { display: none; }
  .q-related-list { max-height: none; }
  .q-related-filters .chip { font-size: 8.5px; }
}

/* ==========================================================================
   RC4 · 关系脉络视图 + 矩阵年代覆盖
   ========================================================================== */
.mx-era {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 9px 12px 8px; margin-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.mx-era-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); margin-right: 2px; }
.mx-era-chip {
  display: inline-flex; align-items: baseline; gap: 5px; height: 23px;
  padding: 0 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text-2); font-size: 9.5px;
}
.mx-era-chip b { font-family: var(--font-mono); font-size: 10px; color: var(--text); font-variant-numeric: tabular-nums; }
.mx-era-chip:hover { border-color: var(--accent-line); }
.mx-era-chip.is-old { border-color: color-mix(in srgb, var(--route-r4) 55%, var(--line)); background: color-mix(in srgb, var(--route-r4) 8%, var(--surface)); }
.mx-era-chip.is-old b { color: var(--route-r4); }
.mx-era-note { margin-left: auto; font-size: 9px; color: var(--text-4); }
.mx-era-note b { color: var(--text-2); font-family: var(--font-mono); }

.lin-panel { min-height: 560px; }
.lin-head { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.lin-form { display: flex; gap: 6px; align-items: center; }
.lin-form .input { width: 240px; height: 30px; }
.lin-body { padding: 0 14px 14px; }
.lin-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 0 8px; border-bottom: 1px solid var(--line-soft); }
.lin-toolbar .chip { height: 22px; font-size: 9px; }
.lin-focus-strip { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10px 0 6px; }
.lin-focus-title { font-size: 12.5px; font-weight: 620; color: var(--text); }
.lin-stage { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background:
  linear-gradient(var(--surface) 1px, transparent 1px) 0 0 / 100% 34px,
  linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 34px 100%,
  var(--surface); }
.lin-svg { display: block; width: 100%; min-width: 980px; height: auto; }
.lin-svg .lin-node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1; transition: fill .12s, stroke .12s; }
.lin-svg .lin-node:hover rect { stroke: var(--accent); fill: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.lin-svg .lin-node.is-focus rect { stroke: var(--accent); stroke-width: 1.6; fill: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.lin-svg .lin-node.is-maint rect { stroke-dasharray: 3 2; }
.lin-svg .lin-node.is-external rect { stroke-dasharray: 5 3; opacity: .92; }
.lin-svg .lin-node-title { fill: var(--text); font-family: var(--font-sans); font-size: 9px; font-weight: 560; }
.lin-svg .lin-node-year { fill: var(--text-4); font-family: var(--font-mono); font-size: 8.5px; }
.lin-svg .lin-maint-dot { fill: var(--route-r3); }
.lin-svg .lin-edge { fill: none; stroke: var(--text-3); stroke-width: 1.25; opacity: .7; }
.lin-svg .lin-edge.is-dim { opacity: .16; }
.lin-svg .lin-col-label { fill: var(--text-3); font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.lin-svg .lin-axis-label { fill: var(--text-4); font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; }
.lin-svg .is-dim { opacity: .32; }
.lin-legend { display: flex; gap: 12px; flex-wrap: wrap; padding: 7px 0 2px; font-size: 8.5px; color: var(--text-4); }
.lin-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.lin-legend .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; background: var(--text-4); }
.lin-legend .sw.maint { background: var(--route-r3); }
.lin-legend .sw.base { background: var(--line); border: 1px solid var(--text-4); }
.lin-legend .sw.dim { opacity: .3; }
.lin-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 10px; }
.lin-list-head { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 650; color: var(--text-2); padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.lin-list-col { min-width: 0; max-height: 300px; overflow: auto; }
.lin-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 7px; width: 100%; text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line-soft); background: transparent; border-left: 0; border-right: 0; border-top: 0; }
.lin-item:hover .lin-item-title { color: var(--accent); }
.lin-item-year { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-4); padding-top: 1px; }
.lin-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lin-item-title { font-size: 10.5px; line-height: 1.4; color: var(--text); font-weight: 550; }
.lin-item-en { font-size: 8.5px; color: var(--text-4); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.lin-item-meta { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.lin-item-meta .badge { height: 16px; font-size: 8px; padding: 0 5px; }
.lin-empty { padding: 18px 6px; }
.lin-loading { padding: 12px 0; }

@media (max-width: 980px) {
  .lin-head { flex-direction: column; }
  .lin-form { width: 100%; }
  .lin-form .input { flex: 1; min-width: 0; width: auto; }
  .lin-lists { grid-template-columns: minmax(0, 1fr); }
  .mx-era-note { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
  .lin-body { padding: 0 10px 10px; }
  .lin-form .input { width: auto; }
  .lin-focus-title { font-size: 11.5px; }
  .lin-svg { min-width: 860px; }
  .lin-toolbar { gap: 5px; }
  .mx-era { padding: 8px 8px 7px; }
  .mx-era-chip { font-size: 8.5px; height: 21px; }
}

/* ==========================================================================
   RC4 · 首页年代覆盖 / 记录双语 / 检索中文题名
   ========================================================================== */
.ov-dec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 9.5px; color: var(--text-4); margin-bottom: 8px; }
.ov-dec-head b { font-family: var(--font-mono); font-size: 10px; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-cit { display: inline-flex; align-items: center; gap: 4px; color: var(--text-4); }
.ov-cit.is-ok { color: var(--accent); }
.ov-dec { display: flex; align-items: flex-end; gap: 3px; height: 118px; padding: 4px 2px 0; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.ov-dec-col { flex: 1 1 0; min-width: 20px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.ov-dec-col b { font-family: var(--font-mono); font-size: 8px; font-weight: 500; color: var(--text-4); font-variant-numeric: tabular-nums; }
.ov-dec-col.is-old b { color: var(--text-2); font-weight: 650; }
.ov-dec-bar { width: 100%; max-width: 26px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 2px 2px 0 0; overflow: hidden; }
.ov-dec-bar .b { background: var(--chart-baseline); display: block; }
.ov-dec-bar .m { background: var(--accent); display: block; }
.ov-dec-col.is-old .ov-dec-bar { box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-4) 38%, transparent); }
.ov-dec-col span { font-family: var(--font-mono); font-size: 8px; color: var(--text-4); white-space: nowrap; }
.ov-dec-col.is-old span { color: var(--text-2); font-weight: 600; }

.rec-title-en { font-family: var(--font-sans); font-size: 13px; line-height: 1.5; color: var(--text-4); font-style: italic; margin: 5px 0 0; }
.rec-abstract .bi-text { font-size: 11.5px; line-height: 1.7; color: var(--text-2); }
.t-en { font-size: 9px; line-height: 1.35; color: var(--text-4); margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 760px) {
  .ov-dec { gap: 2px; height: 104px; }
  .ov-dec-col span { font-size: 7px; }
  .ov-dec-col b { display: none; }
  .ov-dec-head { gap: 8px; }
}

/* RC4 fix · 英文题面缺失时回退英文综述首段（不标 pending） */
.qc-en.is-summary { font-style: normal; color: var(--text-3); }
.q-hero-en.is-summary { font-style: normal; color: var(--text-2); }
.q-en-src {
  display: inline-block; margin-left: 6px; font-family: var(--font-mono);
  font-size: 8.5px; color: var(--text-4); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 0 6px; vertical-align: 2px;
}

/* RC4 search · 中文题名命中提示与高亮 */
.hit-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.hit-badge { height: 17px !important; font-size: 8.5px !important; padding: 0 5px !important; }
.cell-title mark, .search-hit-badges mark {
  background: color-mix(in srgb, var(--amber) 22%, transparent);
  color: var(--text); border-radius: 2px; padding: 0 1px;
}
.search-hit-badges {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 7px 10px; margin-bottom: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line-soft));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
.search-hit-badges .field-hint { margin-left: 2px; }

/* ==========================================================================
   RC4 · 60 候选研究问题（问题导航 / 详情 / 抽屉）
   ========================================================================== */
.subq-mini { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.subq-mini span { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); border: 1px solid var(--line-soft); border-radius: 999px; padding: 1px 6px; }
.subq-mini b { color: var(--text-2); font-weight: 650; }

.subq-section { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.subq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.subq-title { font-family: var(--font-serif); font-size: 21px; font-weight: 650; color: var(--text); letter-spacing: -0.01em; }
.subq-sub { font-size: 10px; line-height: 1.6; color: var(--text-4); margin-top: 3px; max-width: 760px; }
.subq-filters { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface-2); }
.subq-filter-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); margin-right: 2px; }
.subq-filters .chip { height: 22px; font-size: 9px; }
.subq-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.subq-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.subq-group-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); border-left: 3px solid var(--route-color, var(--accent)); }
.subq-group-id { font-size: 9px; color: var(--text-4); }
.subq-group-q { font-size: 11px; font-weight: 600; color: var(--text); min-width: 0; flex: 1; }
.subq-group-head .badge { height: 17px; font-size: 8px; padding: 0 5px; }
.subq-rows { display: flex; flex-direction: column; }
.subq-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; align-items: start; text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; }
.subq-row:last-child { border-bottom: 0; }
.subq-row:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.subq-id { font-size: 8.5px; color: var(--text-4); padding-top: 1px; }
.subq-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.subq-row-title { font-size: 11.5px; line-height: 1.45; font-weight: 560; color: var(--text); }
.subq-row:hover .subq-row-title { color: var(--accent); }
.subq-row-trend { font-size: 9px; line-height: 1.4; color: var(--text-4); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.subq-row-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.subq-row-badges .badge { height: 16px; font-size: 8px; padding: 0 5px; }
.qc-subq { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); cursor: pointer; }
.qc-subq:hover { text-decoration: underline; }

/* 详情页折叠区 */
.q-subq-block { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.q-subq-block > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; cursor: pointer; list-style: none; border-bottom: 1px solid transparent; }
.q-subq-block[open] > summary { border-bottom-color: var(--line-soft); }
.q-subq-block > summary::-webkit-details-marker { display: none; }
.q-subq-summary { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.q-subq-sum-icon { color: var(--accent); margin-top: 2px; }
.q-subq-summary b { font-size: 12.5px; color: var(--text); }
.q-subq-summary .field-hint { display: block; margin-top: 2px; }
.q-subq-list { display: flex; flex-direction: column; }
.q-subq-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 8px; align-items: start; text-align: left; padding: 9px 15px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; }
.q-subq-row:last-child { border-bottom: 0; }
.q-subq-row:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.q-subq-id { font-size: 8.5px; color: var(--text-4); padding-top: 1px; }
.q-subq-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-subq-title { font-size: 12px; line-height: 1.45; font-weight: 560; color: var(--text); }
.q-subq-row:hover .q-subq-title { color: var(--accent); }
.q-subq-trend { font-size: 9px; color: var(--text-4); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.q-subq-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.q-subq-badges .badge { height: 16px; font-size: 8px; padding: 0 5px; }

/* 候选详情抽屉 */
.sq-detail { display: flex; flex-direction: column; gap: 11px; }
.sq-detail-head { border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.sq-detail-title { font-family: var(--font-serif); font-size: 22px; line-height: 1.35; color: var(--text); margin: 8px 0 0; }
.sq-trend { display: flex; align-items: flex-start; gap: 5px; font-size: 10.5px; line-height: 1.6; color: var(--accent); margin-top: 6px; }
.sq-field { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.sq-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-4); padding-top: 2px; }
.sq-value { font-size: 11.5px; line-height: 1.7; color: var(--text-2); white-space: pre-line; }
.sq-hypotheses { display: flex; flex-direction: column; gap: 7px; }
.sq-hyp { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; font-size: 11.5px; line-height: 1.65; color: var(--text-2); }
.sq-hyp-idx { font-family: var(--font-mono); font-size: 9px; color: var(--accent); font-weight: 700; }
.sq-sources { margin: 0; padding-left: 16px; }
.sq-sources li { font-size: 10.5px; line-height: 1.6; overflow-wrap: anywhere; }
.sq-frq { font-size: 9px; color: var(--text-4); }

@media (max-width: 1100px) {
  .subq-groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .subq-section { margin-top: 18px; padding-top: 14px; }
  .subq-title { font-size: 19px; }
  .subq-filters { padding: 7px 8px; }
  .subq-row { grid-template-columns: 68px minmax(0, 1fr); }
  .subq-row-badges { grid-column: 2; }
  .q-subq-row { grid-template-columns: 70px minmax(0, 1fr); }
  .q-subq-badges { grid-column: 2; }
  .sq-field { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .sq-label { padding-top: 0; }
  .sq-detail-title { font-size: 19px; }
}

.toast-msg .toast-link { color: inherit; text-decoration: underline; font-weight: 650; margin-left: 4px; }

/* ==========================================================================
   RC5 · 管理页问题导航编辑（nav-admin）
   ========================================================================== */
.nav-admin-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.nav-admin-sec-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.nav-admin-sec-head .nav-section-label { width: 210px; height: 28px; font-size: 11px; }
.nav-admin-sec-head .field-hint { margin-left: auto; }
.nav-admin-list { display: flex; flex-direction: column; }
.nav-admin-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 92px 84px auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); }
.nav-admin-row:last-child { border-bottom: 0; }
.nav-admin-row.is-hidden { opacity: .58; background: repeating-linear-gradient(135deg, transparent, transparent 8px, color-mix(in srgb, var(--text-4) 4%, transparent) 8px, color-mix(in srgb, var(--text-4) 4%, transparent) 9px); }
.nav-admin-id { font-size: 8.5px; color: var(--text-4); }
.nav-admin-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nav-admin-main b { font-size: 11px; color: var(--text); font-weight: 560; line-height: 1.4; }
.nav-admin-main span { font-size: 9px; color: var(--text-4); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-admin-meta { font-size: 9px; color: var(--text-4); font-family: var(--font-mono); }
.nav-admin-flags { display: flex; gap: 3px; flex-wrap: wrap; }
.nav-admin-flags .badge { height: 16px; font-size: 8px; padding: 0 4px; }
.nav-admin-actions { display: flex; gap: 3px; justify-content: flex-end; flex-wrap: wrap; }
.nav-admin-actions .btn { height: 22px; font-size: 9px; padding: 0 6px; }
@media (max-width: 900px) {
  .nav-admin-row { grid-template-columns: 82px minmax(0, 1fr); }
  .nav-admin-meta, .nav-admin-flags, .nav-admin-actions { grid-column: 2; }
  .nav-admin-actions { justify-content: flex-start; }
}
