/* DataScope Research Terminal — плотная тёмная витрина данных.
   Ориентир: профессиональные терминалы (LSEG/Eikon): максимум данных на экран,
   моноширинные числа, тонкая сетка, янтарный акцент. */

:root {
  --bg: #080b0f;
  --bg-panel: #0e141b;
  --bg-panel-2: #121a23;
  --bg-row: #0b1117;
  --bg-row-alt: #0e151d;
  --bg-hover: #16212c;
  --bg-sel: #1b2a38;
  --line: #1b2731;
  --line-soft: #141d26;
  --text: #c9d8e6;
  --text-dim: #7d93a6;
  --text-faint: #5b6e7f;
  --accent: #ffb000;
  --accent-dim: #8a6208;
  --up: #37d67a;
  --down: #ff5d5d;
  --cyan: #41c9e8;
  --violet: #b78cff;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --row-h: 26px;
  --head-h: 44px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body { display: flex; flex-direction: column; overflow: hidden; }

b, strong { font-weight: 600; }
.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--head-h);
  min-height: var(--head-h);
  padding: 0 12px;
  background: linear-gradient(180deg, #121b24, #0c1319);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 8px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #121212;
  font: 700 12px/1 var(--mono);
  letter-spacing: .5px;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 13px; letter-spacing: 2px; }
.brand-text i { font-style: normal; font-size: 9px; letter-spacing: 1.6px; color: var(--text-faint); }

.ticker {
  display: flex;
  flex: 1;
  gap: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  height: 100%;
}

.tick {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 14px;
  border-right: 1px solid var(--line-soft);
  white-space: nowrap;
}

.tick span { font-size: 9px; letter-spacing: 1.2px; color: var(--text-faint); }
.tick b { font: 600 13px/1 var(--mono); font-variant-numeric: tabular-nums; }
.tick b.up { color: var(--up); }
.tick b.accent { color: var(--accent); }
.tick b.cyan { color: var(--cyan); }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.clock b { font: 600 13px/1 var(--mono); color: var(--text); }
.clock i { font-style: normal; font-size: 9px; color: var(--text-faint); letter-spacing: 1px; }

.btn {
  height: 26px;
  padding: 0 10px;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font: 600 10px/1 var(--sans);
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}

.btn:hover { background: var(--bg-hover); color: var(--text); border-color: #273845; }
.btn:disabled { opacity: .35; cursor: default; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #141414; }
.btn-accent:hover { background: #ffc233; color: #141414; }
.btn.on { background: var(--bg-sel); color: var(--accent); border-color: var(--accent-dim); }

/* ----------------------------------------------------------------- каркас */

.shell { display: flex; flex: 1; min-height: 0; }

.sidebar {
  width: 196px;
  min-width: 196px;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 8px;
}

.nav-group { padding: 10px 0 6px; border-bottom: 1px solid var(--line-soft); }
.nav-title { margin: 0 10px 6px; font-size: 9px; letter-spacing: 1.5px; color: var(--text-faint); }

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 5px 10px 5px 12px;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--text-dim);
  font: 500 11px/1.3 var(--sans);
  letter-spacing: .6px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-sel); border-left-color: var(--accent); color: var(--accent); }
.nav-item em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--text-faint); }
.nav-item.active em { color: var(--accent-dim); }

.sidebar-foot { margin-top: auto; padding: 10px; font-size: 10px; color: var(--text-faint); line-height: 1.5; }
.sidebar-foot p { margin: 0 0 3px; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

.view { display: none; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.view.active { display: flex; }
#view-overview.active { overflow-y: auto; padding-bottom: 20px; }

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.eyebrow { margin: 0 0 3px; font-size: 9px; letter-spacing: 1.8px; color: var(--accent); }
.view-head h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.view-head-meta { font-family: var(--mono); font-size: 11px; color: var(--text-dim); text-align: right; }
.view-head-meta b { color: var(--text); font-size: 14px; }

/* ------------------------------------------------------------------ сводка */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}

.kpi { background: var(--bg-panel); padding: 10px 12px; }
.kpi span { display: block; font-size: 9px; letter-spacing: 1.3px; color: var(--text-faint); }
.kpi strong { display: block; margin: 4px 0 2px; font: 600 22px/1 var(--mono); font-variant-numeric: tabular-nums; }
.kpi small { font-size: 10px; color: var(--text-dim); }
.kpi.accent strong { color: var(--accent); }
.kpi.cyan strong { color: var(--cyan); }
.kpi.up strong { color: var(--up); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  padding: 10px 10px 0;
}

.card { background: var(--bg-panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card + .card { margin: 0; }
#view-overview > .card { margin: 10px 10px 0; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel-2);
}

.card-head h2 { margin: 0; font-size: 10px; font-weight: 600; letter-spacing: 1.3px; color: var(--text); }
.card-head span { font-size: 9px; letter-spacing: 1.1px; color: var(--text-faint); }
.card-body { padding: 10px; }
.card-body.no-pad { padding: 0; }

.bar-row { display: grid; grid-template-columns: 94px 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row span { font-size: 10px; letter-spacing: .6px; color: var(--text-dim); text-transform: uppercase; }
.bar-track { height: 10px; background: var(--bg-row); border: 1px solid var(--line-soft); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.bar-row b { font: 600 11px/1 var(--mono); min-width: 54px; text-align: right; }
.bar-row b i { font-style: normal; color: var(--text-faint); font-size: 10px; }

.metric-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.metric-row:last-child { border-bottom: 0; }
.metric-row span { font-size: 10px; color: var(--text-dim); letter-spacing: .4px; }
.metric-row b { font: 600 11px/1 var(--mono); }
.metric-row b.up { color: var(--up); }
.metric-row b.warn { color: var(--accent); }
.metric-row b.down { color: var(--down); }

.series { display: flex; align-items: flex-end; gap: 2px; height: 140px; }
.series-col { flex: 1; min-width: 4px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.series-bar { background: linear-gradient(180deg, var(--cyan), #1d6a85); min-height: 1px; }
.series-cite { background: var(--accent-dim); min-height: 0; opacity: .8; }
.series-col em { position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); font-style: normal; font: 9px/1 var(--mono); color: var(--text-faint); }
.series-col:hover .series-bar { background: var(--accent); }
.series-col::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #05080b;
  border: 1px solid var(--line);
  color: var(--text);
  font: 10px/1.4 var(--mono);
  padding: 4px 6px;
  white-space: pre;
  opacity: 0;
  pointer-events: none;
  transition: opacity .1s;
  z-index: 5;
}
.series-col:hover::after { opacity: 1; }
.series-legend { display: flex; gap: 14px; margin-top: 20px; font-size: 10px; color: var(--text-dim); }
.series-legend i { display: inline-block; width: 10px; height: 8px; margin-right: 5px; }

.mini-table { width: 100%; border-collapse: collapse; }
.mini-table td { padding: 5px 10px; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table tr:hover td { background: var(--bg-hover); }
.mini-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--accent); width: 72px; }
.mini-table td.sub { color: var(--text-faint); font-size: 10px; }
.mini-table td.name { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-table td.tight, .mini-table td.sub, .mini-table td.num { width: 1%; white-space: nowrap; }

.job-state { font: 600 12px/1 var(--mono); letter-spacing: 1.4px; margin-bottom: 8px; }
.job-state.ok { color: var(--up); }
.job-state.wait { color: var(--accent); }
.job-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.job-grid div { background: var(--bg-row); border: 1px solid var(--line-soft); padding: 6px 8px; }
.job-grid b { display: block; font: 600 16px/1.1 var(--mono); }
.job-grid span { font-size: 9px; letter-spacing: .8px; color: var(--text-faint); }

/* ----------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
}

.field { display: flex; align-items: center; gap: 6px; }
.field-label { font-size: 9px; letter-spacing: 1.2px; color: var(--text-faint); }
.field.search { flex: 1; min-width: 220px; max-width: 420px; }

input[type="search"], select {
  height: 26px;
  width: 100%;
  background: var(--bg-row);
  border: 1px solid var(--line);
  color: var(--text);
  font: 11px/1 var(--mono);
  padding: 0 8px;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

select { padding-right: 20px; background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%); background-position: calc(100% - 11px) 11px, calc(100% - 7px) 11px; background-size: 4px 4px; background-repeat: no-repeat; }
input[type="search"]:focus, select:focus { border-color: var(--accent-dim); background: #0d1620; }
input[type="range"] { width: 92px; accent-color: var(--accent); }

.facets { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.facets .field select { width: auto; min-width: 104px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ------------------------------------------------------------------ таблица */

.table-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--bg); position: relative; }

table.grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }

table.grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-panel-2);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line-soft);
  padding: 0 8px;
  height: 28px;
  font: 600 9px/1 var(--sans);
  letter-spacing: 1.1px;
  color: var(--text-dim);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

table.grid thead th:hover { color: var(--text); background: var(--bg-hover); }
table.grid thead th.num { text-align: right; }
table.grid thead th.sorted { color: var(--accent); }
table.grid thead th i { font-style: normal; margin-left: 4px; font-size: 8px; opacity: .9; }
table.grid thead th.nosort { cursor: default; }

table.grid tbody td {
  height: var(--row-h);
  max-width: 460px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.grid tbody tr { background: var(--bg-row); }
table.grid tbody tr:nth-child(even) { background: var(--bg-row-alt); }
table.grid tbody tr:hover { background: var(--bg-hover); }
table.grid tbody tr.sel { background: var(--bg-sel); box-shadow: inset 2px 0 0 var(--accent); }
table.grid tbody td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.grid tbody td.strong { color: #e4eef7; font-weight: 500; }
table.grid tbody td.id { font-family: var(--mono); font-size: 10px; color: var(--text-dim); }
table.grid tbody td.zero { color: var(--text-faint); }
table.grid tbody td.hot { color: var(--accent); }

.chip {
  display: inline-block;
  margin-right: 3px;
  padding: 1px 5px;
  border: 1px solid currentColor;
  font: 600 9px/14px var(--mono);
  letter-spacing: .4px;
  text-transform: uppercase;
  opacity: .95;
}

.chip.src-orcid { color: #6ee7a8; }
.chip.src-openalex { color: #5aa9ff; }
.chip.src-scopus { color: #ffa94d; }
.chip.src-crossref { color: #c084fc; }
.chip.src-repec { color: #ff6b81; }
.chip.src-semantic_scholar { color: #2dd4bf; }
.chip.src-web_of_science { color: #f472b6; }
.chip.src-primary_seed, .chip.ok { color: var(--up); }
.chip.src-external_coauthor, .chip.neutral { color: var(--text-dim); }
.chip.src-unclassified, .chip.warn { color: var(--accent); }
.chip.bad { color: var(--down); }

a.doi { color: var(--cyan); text-decoration: none; font-family: var(--mono); font-size: 10px; }
a.doi:hover { text-decoration: underline; }

.table-empty { padding: 30px; text-align: center; font: 600 11px/1 var(--mono); letter-spacing: 1.4px; color: var(--text-faint); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
}

.pager-controls { display: flex; align-items: center; gap: 4px; }
.pager-pos { font: 11px/1 var(--mono); color: var(--text-dim); padding: 0 6px; }
.pager-pos b { color: var(--text); }
#pager-info { font-family: var(--mono); font-size: 11px; }

/* -------------------------------------------------------------------- граф */

.graph-layout { flex: 1; min-height: 0; display: flex; }
.graph-stage { flex: 1; min-width: 0; position: relative; background: radial-gradient(ellipse at 50% 40%, #0d161f 0%, #070a0e 70%); }
#graph-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#graph-canvas.dragging { cursor: grabbing; }

.graph-hud {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  font: 10px/1 var(--mono);
  color: var(--text-dim);
  pointer-events: none;
}

.graph-hud .muted { font-family: var(--sans); font-size: 10px; }

.graph-legend {
  position: absolute;
  right: 10px;
  top: 10px;
  background: rgba(8, 12, 16, .88);
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.7;
  pointer-events: none;
  max-width: 190px;
}

.graph-legend h4 { margin: 0 0 4px; font-size: 9px; letter-spacing: 1.2px; color: var(--text-faint); font-weight: 600; }
.graph-legend div { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
.graph-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.graph-legend i.line { width: 14px; height: 2px; border-radius: 0; }

.graph-tip {
  position: absolute;
  z-index: 6;
  max-width: 300px;
  background: #05080b;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
}

.graph-tip b { display: block; color: #e8f1f8; margin-bottom: 3px; }
.graph-tip small { display: block; color: var(--text-dim); font-family: var(--mono); font-size: 10px; }

.graph-side {
  width: 320px;
  min-width: 320px;
  background: var(--bg-panel);
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

.graph-side-empty { padding: 16px; font-size: 11px; line-height: 1.6; color: var(--text-faint); }

.side-block { border-bottom: 1px solid var(--line-soft); padding: 10px 12px; }
.side-block h3 { margin: 0 0 7px; font-size: 9px; letter-spacing: 1.3px; color: var(--text-faint); font-weight: 600; }
.side-name { font-size: 14px; font-weight: 600; color: #e8f1f8; margin: 0 0 3px; }
.side-sub { font-size: 11px; color: var(--text-dim); margin: 0 0 6px; }
.side-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.side-stats div { background: var(--bg-row); border: 1px solid var(--line-soft); padding: 5px 6px; }
.side-stats b { display: block; font: 600 14px/1.1 var(--mono); }
.side-stats span { font-size: 9px; color: var(--text-faint); letter-spacing: .7px; }
.side-list { margin: 0; padding: 0; list-style: none; font-size: 11px; }
.side-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line-soft); }
.side-list li:last-child { border-bottom: 0; }
.side-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list li b { font-family: var(--mono); color: var(--accent); flex: none; }
.side-list li.link { cursor: pointer; }
.side-list li.link:hover span { color: var(--accent); }

/* ------------------------------------------------------------------ drawer */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(840px, 94vw);
  background: var(--bg-panel);
  border-left: 1px solid var(--accent-dim);
  box-shadow: -20px 0 40px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel-2);
}

.drawer-head h2 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.drawer-body { flex: 1; overflow-y: auto; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 0; }
.kv > div { padding: 5px 12px; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.kv > div:nth-child(odd) { color: var(--text-faint); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; background: var(--bg-row); }
.kv > div:nth-child(even) { font-family: var(--mono); word-break: break-word; }

.drawer-section { padding: 10px 12px 2px; }
.drawer-section h3 { margin: 0 0 6px; font-size: 9px; letter-spacing: 1.3px; color: var(--accent); font-weight: 600; }
.drawer-abstract { padding: 0 12px 12px; font-size: 11px; line-height: 1.6; color: var(--text-dim); }

/* ------------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #05080b;
  border: 1px solid var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 8px 14px;
  font: 11px/1.4 var(--mono);
  color: var(--text);
  z-index: 60;
}

/* ----------------------------------------------------------------- scroll */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #223140; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2e4252; }
::-webkit-scrollbar-corner { background: var(--bg); }

/* ---------------------------------------------------------------- адаптив */

@media (max-width: 1100px) {
  .graph-side { width: 250px; min-width: 250px; }
  .ticker .tick:nth-child(n+5) { display: none; }
}

@media (max-width: 860px) {
  .sidebar { width: 150px; min-width: 150px; }
  .graph-side { display: none; }
  .ticker { display: none; }
  .view-head h1 { font-size: 15px; }
}

/* Типы контактов */
.chip.src-email { color: var(--accent); }
.chip.src-homepage { color: var(--cyan); }
.chip.src-social { color: var(--violet); }
.chip.src-profile { color: var(--text-dim); }

/* Списки записей в карточке и боковой панели: название занимает всю ширину
   и переносится, служебные поля уходят вниз и вправо. */
.records { margin: 0; padding: 0; list-style: none; }

.rec {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.rec:last-child { border-bottom: 0; }
.rec:hover { background: var(--bg-hover); }
.rec-main { flex: 1; min-width: 0; }

.rec-title {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
  color: #dbe8f4;
  overflow-wrap: anywhere;
}

a.rec-title { color: var(--cyan); text-decoration: none; }
a.rec-title:hover { text-decoration: underline; }

.rec-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-faint);
}

.rec-meta i { font-style: normal; }
.rec-num {
  flex: none;
  min-width: 42px;
  text-align: right;
  font: 600 12px/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.rec-empty { margin: 0; padding: 8px 12px 12px; font-size: 11px; color: var(--text-faint); }
.rec-goto { cursor: pointer; }
.rec-goto:hover .rec-title { color: var(--accent); }

.drawer-section h3 i { font-style: normal; color: var(--text-faint); margin-left: 4px; }

.side-block .rec { padding: 5px 0; }
.side-block .rec:hover { background: none; }

/* Всплывающее пояснение к терминам и заголовкам колонок. */
.hint-tip {
  position: fixed;
  z-index: 80;
  max-width: 320px;
  padding: 7px 10px;
  background: #05080b;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  color: var(--text);
  font: 11px/1.5 var(--sans);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
  pointer-events: none;
}

[data-term] { cursor: help; }

table.grid thead th[data-hint] { cursor: help; }
table.grid thead th u {
  margin-left: 3px;
  font-size: 8px;
  text-decoration: none;
  color: var(--text-faint);
  vertical-align: super;
}
table.grid thead th:hover u { color: var(--accent); }

.kpi[data-hint], .metric-row[data-hint], .field-label[data-hint] { cursor: help; }
.field-label[data-hint] { border-bottom: 1px dotted var(--line); }
.kpi[data-hint]:hover, .metric-row[data-hint]:hover { background: var(--bg-hover); }

/* Чип-ссылка: тот же вид, но ведёт на страницу записи в базе-источнике. */
a.chip-link { text-decoration: none; cursor: pointer; }
a.chip-link::after { content: '↗'; margin-left: 3px; font-size: 7px; vertical-align: top; opacity: .7; }
a.chip-link:hover { color: var(--accent); box-shadow: inset 0 0 0 1px currentColor; }
