:root {
  color-scheme: dark;
  --bg-0: #05070d;
  --bg-1: #080c16;
  --bg-2: #0d1320;
  --panel: rgba(14, 20, 34, 0.72);
  --panel-solid: rgba(12, 18, 30, 0.96);
  --panel-hover: rgba(20, 28, 46, 0.86);
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #eaf1fb;
  --muted: #8fa2bd;
  --faint: #56637b;

  --green: #1fe6a8;
  --green-dim: rgba(31, 230, 168, 0.14);
  --red: #ff5470;
  --red-dim: rgba(255, 84, 112, 0.14);
  --amber: #ffc857;
  --amber-dim: rgba(255, 200, 87, 0.14);
  --blue: #4d9dff;
  --blue-dim: rgba(77, 157, 255, 0.14);
  --purple: #b18cff;
  --gold: #f4c948;

  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 30px 90px rgba(0, 0, 0, 0.5);
  --glow-green: 0 0 0 1px rgba(31, 230, 168, 0.25), 0 0 26px rgba(31, 230, 168, 0.16);
  --glow-red: 0 0 0 1px rgba(255, 84, 112, 0.25), 0 0 26px rgba(255, 84, 112, 0.16);
  --glow-gold: 0 0 0 1px rgba(244, 201, 72, 0.28), 0 0 30px rgba(244, 201, 72, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 340px;
  background:
    radial-gradient(circle at 10% -6%, rgba(31, 230, 168, 0.14), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(77, 157, 255, 0.16), transparent 34%),
    radial-gradient(circle at 50% 120%, rgba(177, 140, 255, 0.1), transparent 40%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 46%, var(--bg-0) 100%);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------- */
/* Ticker tape                        */
/* ---------------------------------- */

.ticker-tape {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  height: 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(90deg, #060a12, #0a1120 50%, #060a12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.ticker-tape .tt-label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-right: 1px solid var(--line-strong);
  background: rgba(31, 230, 168, 0.08);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tt-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 230, 168, 0.18);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.tt-track-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.tt-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  height: 100%;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 55s linear infinite;
  will-change: transform;
}

.tt-track:hover {
  animation-play-state: paused;
}

.tt-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.tt-item b {
  color: var(--text);
  font-weight: 700;
}

.tt-item .tt-tag {
  color: var(--faint);
  font-size: 10.5px;
  text-transform: uppercase;
}

.tt-item.up {
  color: var(--green);
}

.tt-item.down {
  color: var(--red);
}

.tt-item .arrow {
  font-size: 10px;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(31, 230, 168, 0.18);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(31, 230, 168, 0.05);
  }
}

/* ---------------------------------- */
/* Shell layout                       */
/* ---------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 40px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.7);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(31, 230, 168, 0.4);
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, rgba(31, 230, 168, 0.2), rgba(77, 157, 255, 0.08));
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14.5px;
  letter-spacing: 0.01em;
}

.brand small,
.sidebar-card small,
.panel-head span,
.terminal-line {
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 4px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

nav a .nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.5;
}

nav a.active,
nav a:hover {
  border-color: rgba(31, 230, 168, 0.22);
  background: rgba(31, 230, 168, 0.07);
  color: var(--text);
}

nav a.active .nav-dot {
  background: var(--green);
  opacity: 1;
  box-shadow: 0 0 8px rgba(31, 230, 168, 0.7);
}

.nav-group-label {
  display: block;
  margin: 12px 4px 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.sidebar-card + .sidebar-card {
  margin-top: 10px;
}

.sidebar-card span,
.sidebar-card strong,
.sidebar-card small {
  display: block;
}

.sidebar-card strong {
  margin: 7px 0;
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 21px;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-chip.pass {
  background: var(--green-dim);
  color: var(--green);
}

.status-chip.fail {
  background: var(--red-dim);
  color: var(--red);
}

.status-chip.warn {
  background: var(--amber-dim);
  color: var(--amber);
}

.status-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.clock {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}

.sidebar-foot {
  flex: none;
  margin-top: 10px;
  padding: 4px 2px 0;
}

.sidebar-foot small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--faint);
}

.workspace {
  max-width: 1520px;
  margin: 0 auto;
  padding: 22px 24px 60px;
  overflow: hidden;
}

/* ---------------------------------- */
/* Hero                               */
/* ---------------------------------- */

.hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(14, 22, 38, 0.96), rgba(10, 15, 26, 0.7)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, rgba(31, 230, 168, 0.14), transparent 55%);
  pointer-events: none;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero p {
  max-width: 740px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.hero-actions,
.segmented {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  position: relative;
  z-index: 1;
  flex-direction: column;
  align-items: flex-end;
}

button,
.ghost-button,
select,
input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
}

button,
.ghost-button,
select {
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

button:hover,
.ghost-button:hover,
select:hover {
  border-color: var(--line-strong);
}

button.primary {
  background: linear-gradient(135deg, rgba(31, 230, 168, 0.32), rgba(77, 157, 255, 0.2));
  border-color: rgba(31, 230, 168, 0.4);
  color: #06110f;
}

button.primary span {
  color: #06140f;
}

button:active {
  transform: translateY(1px);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.kbd-hint {
  display: inline-flex;
  gap: 3px;
  margin-left: 8px;
  opacity: 0.7;
}

.kbd-hint kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ---------------------------------- */
/* Dashboard Header - Terminal Style  */
/* ---------------------------------- */

.dashboard-header {
  margin-bottom: 24px;
  border: 1px solid rgba(31, 230, 168, 0.15);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 25, 40, 0.95), rgba(8, 15, 28, 0.98));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.dh-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(31, 230, 168, 0.03);
}

.dh-title h1 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #e6edf7;
}

.dh-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dh-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dh-btn-search,
.dh-btn-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}

.dh-btn-search:hover,
.dh-btn-refresh:hover {
  border-color: rgba(31, 230, 168, 0.4);
  background: rgba(31, 230, 168, 0.08);
  transform: translateY(-1px);
}

.dh-btn-search svg,
.dh-btn-refresh svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: color 0.15s;
}

.dh-btn-search:hover svg,
.dh-btn-refresh:hover svg {
  color: var(--green);
}

.dh-btn-search .kbd-hint {
  display: flex;
  gap: 4px;
}

.dh-btn-search kbd {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
}

/* Dashboard Metrics - Data Bands */
.dashboard-metrics {
  padding: 18px 24px;
}

.dm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dm-row:first-child {
  padding-top: 0;
}

.dm-section {
  display: flex;
  align-items: center;
  gap: 32px;
}

.dm-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dm-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dm-hint-inline {
  color: var(--faint);
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}

.dm-info-icon {
  color: var(--faint);
  font-size: 11px;
  font-weight: 400;
  cursor: help;
  margin-left: 2px;
}

.dm-info-icon:hover {
  color: var(--muted);
}

.dm-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.dm-value.large {
  font-size: 28px;
}

.dm-value.green {
  color: var(--green);
}

.dm-value.red {
  color: var(--red);
}

.dm-value.blue {
  color: var(--blue);
}

.dm-value.gold {
  color: var(--gold);
}

.dm-hint {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
}

.dm-separator {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 8px;
}

/* Flow Lists (Top Inflow/Outflow) */
.dm-flow-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.dm-flow-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(12, 20, 34, 0.88), rgba(9, 14, 24, 0.78));
  font-size: 12px;
}

.dm-flow-item.inflow {
  border-left: 3px solid var(--green);
}

.dm-flow-item.outflow {
  border-left: 3px solid var(--red);
}

.dm-flow-ticker {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

.dm-flow-name {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-flow-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  text-align: right;
}

.dm-flow-item.inflow .dm-flow-value {
  color: var(--green);
}

.dm-flow-item.outflow .dm-flow-value {
  color: var(--red);
}

/* Expandable Detail Panel */
.dm-expandable {
  position: relative;
}

.dm-expand-btn {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.dm-expand-btn:hover {
  border-color: rgba(31, 230, 168, 0.4);
  background: rgba(31, 230, 168, 0.08);
  color: var(--green);
}

.dm-detail-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(12, 20, 34, 0.88), rgba(9, 14, 24, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.dm-detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.dm-detail-section strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.dm-detail-section div {
  color: var(--text);
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dm-detail-section div:last-child {
  border-bottom: none;
}

.dm-detail-section .green {
  color: var(--green);
  font-weight: 700;
}

.dm-detail-section .red {
  color: var(--red);
  font-weight: 700;
}

/* Consensus Grid */
.dm-consensus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dm-consensus-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(12, 20, 34, 0.88), rgba(9, 14, 24, 0.78));
  transition: all 0.15s;
  cursor: default;
}

.dm-consensus-item.clickable {
  cursor: pointer;
}

.dm-consensus-item.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dm-consensus-item.buy.clickable:hover,
.dm-consensus-item.buy.active {
  border-color: rgba(31, 230, 168, 0.5);
  background: rgba(31, 230, 168, 0.1);
  box-shadow: 0 0 0 2px rgba(31, 230, 168, 0.15);
}

.dm-consensus-item.sell.clickable:hover,
.dm-consensus-item.sell.active {
  border-color: rgba(255, 80, 80, 0.4);
  background: rgba(255, 80, 80, 0.1);
  box-shadow: 0 0 0 2px rgba(255, 80, 80, 0.1);
}

.dm-consensus-item.buy {
  border-color: rgba(31, 230, 168, 0.25);
  background: rgba(31, 230, 168, 0.04);
}

.dm-consensus-item.sell {
  border-color: rgba(255, 80, 80, 0.2);
  background: rgba(255, 80, 80, 0.04);
}

.dm-cons-ticker {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.dm-consensus-item.buy .dm-cons-ticker {
  color: var(--green);
}

.dm-consensus-item.sell .dm-cons-ticker {
  color: var(--red);
}

.dm-cons-name {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-cons-count {
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  align-self: flex-start;
}

/* Consensus Detail Panel */
.dm-consensus-detail {
  margin-top: 16px;
  padding: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dm-consensus-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-consensus-detail-header strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.dm-consensus-detail-header span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dm-manager-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dm-manager-badge {
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.dm-ticker-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.dm-ticker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.dm-ticker.buy {
  border-color: rgba(31, 230, 168, 0.3);
  background: rgba(31, 230, 168, 0.06);
  color: var(--green);
}

.dm-ticker.sell {
  border-color: rgba(255, 80, 80, 0.25);
  background: rgba(255, 80, 80, 0.05);
  color: var(--red);
}

.dm-ticker-count {
  opacity: 0.7;
  font-size: 11px;
}

@media (max-width: 1024px) {
  .dm-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .dm-section {
    width: 100%;
    gap: 20px;
  }

  .dm-separator {
    display: none;
  }

  .dm-consensus-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .dm-detail-panel {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------- */
/* KPI grid (deprecated, kept for compatibility) */
/* ---------------------------------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.kpi {
  position: relative;
  min-height: 112px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 32, 50, 0.92), rgba(8, 13, 24, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.kpi small {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 11.5px;
}

.kpi.accent-green strong {
  color: var(--green);
}

.kpi.accent-red strong {
  color: var(--red);
}

.kpi.accent-gold strong {
  color: var(--gold);
}

.kpi.accent-blue strong {
  color: var(--blue);
}

.kpi .kpi-spark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  opacity: 0.5;
}

.value-flash {
  animation: flash-up 0.9s ease;
}

.value-flash.down {
  animation: flash-down 0.9s ease;
}

@keyframes flash-up {
  0% {
    text-shadow: 0 0 0 rgba(31, 230, 168, 0);
  }
  25% {
    color: var(--green);
    text-shadow: 0 0 14px rgba(31, 230, 168, 0.7);
  }
  100% {
    text-shadow: 0 0 0 rgba(31, 230, 168, 0);
  }
}

@keyframes flash-down {
  0% {
    text-shadow: 0 0 0 rgba(255, 84, 112, 0);
  }
  25% {
    color: var(--red);
    text-shadow: 0 0 14px rgba(255, 84, 112, 0.7);
  }
  100% {
    text-shadow: 0 0 0 rgba(255, 84, 112, 0);
  }
}

input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 38px;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(31, 230, 168, 0.55);
}

/* Command palette overlay */

/* ---------------------------------- */
/* Modal Overlay                      */
/* ---------------------------------- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-box {
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  background: linear-gradient(180deg, rgba(15, 25, 40, 0.98), rgba(8, 15, 28, 0.98));
  border: 1px solid rgba(31, 230, 168, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(31, 230, 168, 0.04);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  border-color: rgba(255, 80, 80, 0.5);
  background: rgba(255, 80, 80, 0.1);
  color: var(--red);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Modal Content Styles */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.modal-section h4 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal-row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
}

.modal-row:last-child {
  border-bottom: none;
}

.modal-row .green {
  color: var(--green);
  font-weight: 700;
  margin-left: 8px;
}

.modal-row .red {
  color: var(--red);
  font-weight: 700;
  margin-left: 8px;
}

.modal-empty {
  color: var(--faint);
  font-size: 12px;
  font-style: italic;
  padding: 12px 0;
}

/* Stock Holdings Modal */
.modal-stock-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 20, 34, 0.88), rgba(9, 14, 24, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.flow-company-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(320px, 1fr);
  gap: 20px 28px;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid rgba(77, 157, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 36, 62, 0.92), rgba(8, 15, 26, 0.96) 62%),
    var(--panel);
}

.flow-company-copy {
  min-width: 0;
}

.flow-company-eyebrow {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.flow-company-copy h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
  text-transform: none;
  letter-spacing: 0;
}

.flow-company-copy h4 span {
  margin-left: 8px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 14px;
}

.flow-company-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.flow-company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 11px;
}

.flow-price-panel {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.flow-price-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.flow-price-head div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-price-head span,
.flow-fundamental-grid span {
  color: var(--faint);
  font-size: 11px;
}

.flow-price-head strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 22px;
}

.flow-price-head > span {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.flow-price-sparkline {
  display: block;
  width: 100%;
  height: 92px;
  margin-top: 7px;
  color: var(--green);
}

.flow-price-sparkline.negative {
  color: var(--red);
}

.flow-price-axis {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.flow-price-empty {
  display: grid;
  height: 92px;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
}

.flow-fundamental-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.flow-fundamental-grid > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  min-height: 66px;
  padding: 13px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.flow-fundamental-grid > div:nth-child(3n) {
  border-right: 0;
}

.flow-fundamental-grid > div:nth-child(-n + 3) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.flow-fundamental-grid strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.flow-fundamental-note {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 10px;
}

@media (max-width: 980px) {
  .flow-company-overview {
    grid-template-columns: 1fr;
  }

  .flow-price-panel {
    padding-left: 0;
    border-left: 0;
  }

}

@media (max-width: 620px) {
  .flow-company-overview {
    padding: 16px;
  }

  .flow-fundamental-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-fundamental-grid > div:nth-child(3) {
    border-right: 1px solid rgba(255, 255, 255, 0.07);
  }

  .flow-fundamental-grid > div:nth-child(even) {
    border-right: 0;
  }

  .flow-fundamental-grid > div:nth-child(-n + 4) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
}

.modal-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-stat-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.modal-stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.modal-stat-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.modal-stat-delta.green {
  color: var(--green);
}

.modal-stat-delta.red {
  color: var(--red);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.modal-tab {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(12, 20, 34, 0.88), rgba(9, 14, 24, 0.78));
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-tab:hover {
  border-color: rgba(31, 230, 168, 0.3);
  background: rgba(31, 230, 168, 0.06);
  color: var(--text);
}

.modal-tab.active {
  border-color: rgba(31, 230, 168, 0.5);
  background: rgba(31, 230, 168, 0.12);
  color: var(--green);
}

.modal-tab-content {
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-table-sum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Modal Table */
.modal-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.modal-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}

.modal-table-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modal-table-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-table-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.modal-table-meta {
  color: var(--faint);
  font-size: 11px;
  font-family: var(--font-mono);
}

.modal-table-right {
  align-items: flex-end;
  text-align: right;
}

.modal-table-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.modal-table-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.modal-table-delta.green {
  color: var(--green);
}

.modal-table-delta.red {
  color: var(--red);
}

.modal-note {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.modal-load-more {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(31, 230, 168, 0.3);
  border-radius: 6px;
  background: rgba(31, 230, 168, 0.06);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-load-more:hover {
  border-color: rgba(31, 230, 168, 0.5);
  background: rgba(31, 230, 168, 0.12);
  transform: translateY(-1px);
}

.ownership-load-more-history {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(31, 230, 168, 0.3);
  border-radius: 6px;
  background: rgba(31, 230, 168, 0.06);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.ownership-load-more-history:hover {
  border-color: rgba(31, 230, 168, 0.5);
  background: rgba(31, 230, 168, 0.12);
}

.dm-inline-btn {
  margin-left: 10px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.dm-inline-btn:hover {
  border-color: rgba(31, 230, 168, 0.4);
  background: rgba(31, 230, 168, 0.08);
  color: var(--green);
}

@media (max-width: 768px) {
  .modal-stock-header {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-tabs {
    flex-wrap: wrap;
  }
}

/* ---------------------------------- */
/* Footer                             */
/* ---------------------------------- */

.page-footer {
  margin-top: 60px;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 24, 0.6);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-disclaimer {
  margin-bottom: 20px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}

.footer-disclaimer p {
  margin: 0 0 8px;
}

.footer-disclaimer strong {
  color: var(--muted);
  font-weight: 700;
}

.footer-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--faint);
  font-size: 11px;
}

/* ---------------------------------- */
/* Cmdk                               */
/* ---------------------------------- */

.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(6px);
}

.cmdk-overlay.open {
  display: flex;
  animation: fade-in 0.14s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cmdk-box {
  width: min(640px, 92vw);
  max-height: 66vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  animation: slide-down 0.16s ease;
}

@keyframes slide-down {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.cmdk-input-row svg {
  width: 17px;
  height: 17px;
  color: var(--green);
  flex: none;
}

#cmdk-input {
  flex: 1;
  min-height: auto;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 15px;
}

.cmdk-esc {
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.cmdk-results {
  overflow-y: auto;
  padding: 8px;
}

.cmdk-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.cmdk-row:hover,
.cmdk-row.active {
  background: rgba(31, 230, 168, 0.09);
}

.cmdk-row .cmdk-main {
  min-width: 0;
}

.cmdk-row .cmdk-main strong {
  display: block;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-row .cmdk-main small {
  color: var(--muted);
  font-size: 11.5px;
}

.cmdk-row .cmdk-val {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12.5px;
}

.cmdk-empty {
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.cmdk-footer {
  display: flex;
  gap: 14px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.cmdk-footer span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---------------------------------- */
/* Section headers                    */
/* ---------------------------------- */

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 2px 12px;
}

.section-heading h2 {
  font-size: 19px;
}

.section-heading .tag {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.section-divider {
  margin: 44px 2px 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.section-divider span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-divider p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------- */
/* Trump watch - feature panel        */
/* ---------------------------------- */

.trump-layout {
  margin-top: 6px;
}

.trump-panel {
  position: relative;
  border-color: rgba(244, 201, 72, 0.28);
  background:
    linear-gradient(160deg, rgba(244, 201, 72, 0.07), transparent 45%),
    var(--panel);
  box-shadow: var(--glow-gold), var(--shadow);
}

.trump-panel .panel-head {
  border-bottom-color: rgba(244, 201, 72, 0.22);
}

.trump-panel .panel-head span {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trump-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 201, 72, 0.4);
  background: rgba(244, 201, 72, 0.1);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.trump-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid rgba(244, 201, 72, 0.16);
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat,
.trump-note {
  min-height: 100px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(9, 14, 24, 0.7);
  transition: border-color 0.15s ease;
}

.mini-stat:hover {
  border-color: rgba(244, 201, 72, 0.4);
}

.mini-stat span,
.trump-note span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mini-stat strong,
.trump-note strong {
  display: block;
  margin-top: 9px;
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 23px;
  line-height: 1;
}

.trump-note p {
  margin: 9px 0 11px;
  color: var(--muted);
  font-size: 11.5px;
}

.category-donut-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(9, 14, 24, 0.7);
}

.donut-legend {
  display: grid;
  gap: 6px;
  font-size: 11.5px;
}

.donut-legend .legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.donut-legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}

.category-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-badge.crypto {
  border-color: rgba(255, 200, 87, 0.4);
  background: var(--amber-dim);
  color: var(--amber);
}

.category-badge.stock_or_security {
  border-color: rgba(31, 230, 168, 0.36);
  background: var(--green-dim);
  color: var(--green);
}

.empty-row td {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------- */
/* Panels + tables                    */
/* ---------------------------------- */

.dashboard-grid {
  /* 单列纵向堆叠：宽表格（min-width: 880px）挤进窄列会被迫内部横向滚动，
     体验很差。改为单列后表格始终能拿到工作区全宽，只有在视口本身很窄
     （移动端）时才需要横滑，这是内容本身决定的、无法避免的横滑，
     而不是布局硬拗出来的横滑。 */
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.panel.tall {
  min-height: 600px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin-top: 3px;
  font-size: 17px;
  letter-spacing: 0;
}

.segmented button {
  min-height: 32px;
  padding: 0 11px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--muted);
  font-size: 12.5px;
}

.segmented button.active {
  color: #06110f;
  background: var(--green);
  border-color: var(--green);
}

.matrix-table {
  max-height: 620px;
  overflow: auto;
}

.matrix-table.compact {
  max-height: 500px;
}

.trump-table {
  max-height: 560px;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12.8px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(9, 14, 24, 0.97);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: rgba(148, 163, 184, 0.05);
}

td strong {
  display: block;
}

td.num,
td.mono {
  font-family: var(--font-mono);
}

a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.green {
  color: var(--green);
  font-weight: 900;
}

.red {
  color: var(--red);
  font-weight: 900;
}

.amber {
  color: var(--amber);
  font-weight: 900;
}

.trend-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
}

.trend-cell .arrow {
  font-size: 10px;
}

/* ---------------------------------- */
/* 变化强调：金额徽章 + 动作徽章        */
/* ---------------------------------- */

.delta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12.5px;
  white-space: nowrap;
}

.delta-chip .arrow {
  font-size: 10px;
}

.delta-chip.green {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(31, 230, 168, 0.35);
}

.delta-chip.red {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(255, 84, 112, 0.35);
}

.delta-chip.amber {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(255, 200, 87, 0.35);
}

.shares-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  background: rgba(148, 163, 184, 0.1);
}

.shares-chip.green {
  background: var(--green-dim);
  color: var(--green);
}

.shares-chip.red {
  background: var(--red-dim);
  color: var(--red);
}

.change-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.change-pill.new_position,
.change-pill.purchase {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(31, 230, 168, 0.4);
}

.change-pill.increased {
  background: rgba(31, 230, 168, 0.08);
  color: var(--green);
  border-color: rgba(31, 230, 168, 0.3);
}

.change-pill.decreased,
.change-pill.partial_sale {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(255, 200, 87, 0.4);
}

.change-pill.closed_position,
.change-pill.sale,
.change-pill.full_sale {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(255, 84, 112, 0.4);
}

.change-pill.value_changed {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.change-pill.unchanged {
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.change-pill.exchange {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(77, 157, 255, 0.4);
}

.change-pill.holding {
  background: rgba(244, 201, 72, 0.12);
  color: var(--gold);
  border-color: rgba(244, 201, 72, 0.35);
}

.source-pill {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.source-pill.fund {
  background: var(--blue-dim);
  color: var(--blue);
}

.source-pill.official {
  background: rgba(244, 201, 72, 0.14);
  color: var(--gold);
}

/* 行左侧色条：增持/买入=绿，减持=琥珀，清仓/卖出=红，一眼扫描变化方向 */
td.row-accent {
  box-shadow: inset 3px 0 0 var(--line);
}

td.row-accent.acc-green {
  box-shadow: inset 3px 0 0 var(--green);
}

td.row-accent.acc-red {
  box-shadow: inset 3px 0 0 var(--red);
}

td.row-accent.acc-amber {
  box-shadow: inset 3px 0 0 var(--amber);
}

/* ---------------------------------- */
/* Sector / theme tracker              */
/* ---------------------------------- */

.sector-panel {
  border-color: rgba(77, 157, 255, 0.2);
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 157, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(77, 157, 255, 0.05), rgba(7, 12, 22, 0.02) 28%, rgba(7, 12, 22, 0.02) 100%),
    var(--panel);
  box-shadow: 0 0 0 1px rgba(77, 157, 255, 0.14), 0 20px 48px rgba(0, 0, 0, 0.3);
}

.sector-panel .panel-head {
  border-bottom-color: rgba(77, 157, 255, 0.14);
  background: linear-gradient(180deg, rgba(77, 157, 255, 0.04), rgba(9, 14, 24, 0.18));
}

.sector-stats-inline {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 22px;
  min-width: 0;
}

.sector-stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.sector-stat-item b {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sector-stat-item strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  white-space: nowrap;
}

.sector-tickers {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(9, 14, 24, 0.22), rgba(9, 14, 24, 0.08));
}

.sector-compact-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 340px);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(77, 157, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 14, 26, 0.66), rgba(5, 12, 24, 0.58));
}

.sector-picker-copy {
  min-width: 0;
}

.sector-picker-copy span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sector-picker-copy strong {
  display: inline-block;
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 18px;
}

.sector-picker-copy em {
  margin-left: 10px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.sector-etf-note select {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(77, 157, 255, 0.2);
  background: rgba(77, 157, 255, 0.08);
  color: var(--text);
  color-scheme: dark;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.sector-etf-note select option {
  background: #101827;
  color: #e9f2ff;
}

.sector-compact-picker button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.sector-compact-picker button:hover {
  border-color: rgba(77, 157, 255, 0.18);
  color: var(--text);
}

.sector-picker-control {
  position: relative;
}

.sector-picker-control > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  color: var(--text);
  background: rgba(77, 157, 255, 0.08);
  border-color: rgba(77, 157, 255, 0.22);
}

.sector-ticker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: min(360px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid rgba(77, 157, 255, 0.24);
  border-radius: 8px;
  background: #0b1423;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.sector-ticker-menu[hidden] {
  display: none;
}

.sector-ticker-menu input[type="search"] {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(77, 157, 255, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-family: var(--font-mono);
  outline: none;
}

.sector-ticker-options {
  max-height: 320px;
  margin-top: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sector-ticker-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.sector-ticker-option:hover {
  background: rgba(77, 157, 255, 0.09);
}

.sector-ticker-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.sector-ticker-option > span {
  min-width: 0;
}

.sector-ticker-option strong {
  display: block;
  color: var(--text);
}

.sector-ticker-option em {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-ticker-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 11px;
}

.sector-ticker-menu-footer button {
  min-height: 30px;
}

.sector-ticker-selected {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.sector-ticker-selected:empty {
  display: none;
}

.sector-compact-picker .sector-selected-chip {
  min-height: 28px;
  padding: 0 8px;
  border-color: rgba(77, 157, 255, 0.3);
  background: rgba(77, 157, 255, 0.1);
  color: #78b7ff;
  font-family: var(--font-mono);
}

.sector-selected-chip span {
  margin-left: 4px;
  color: var(--muted);
}

.section-subhead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 16px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.section-subhead .muted {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.sector-etf-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 14, 24, 0.34);
  color: var(--muted);
  font-size: 12px;
}

.sector-etf-note strong {
  display: none;
}

.sector-etf-inline-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.sector-etf-note select {
  width: min(220px, 100%);
  padding: 0 10px;
}

.sector-flow {
  margin: 0 16px 16px;
  border: 1px solid rgba(77, 157, 255, 0.18);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(77, 157, 255, 0.06), transparent 34%),
    rgba(7, 12, 22, 0.7);
  overflow: hidden;
}

.flow-subhead {
  padding-top: 14px;
}

.flow-toolbar {
  display: grid;
  gap: 10px;
  padding: 0 16px 14px;
}

.flow-toolbar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#sector-flow-range {
  align-self: flex-start;
}

.flow-toolbar-inline {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.flow-toolbar-inline input,
.flow-toolbar-inline select {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.flow-toolbar-inline input {
  padding: 0 14px;
}

.flow-toolbar-inline select {
  width: 100%;
  padding: 0 30px 0 12px;
  color-scheme: dark;
}

.flow-toolbar-inline select option {
  background: #101827;
  color: #e9f2ff;
}

.flow-toolbar-inline select option:checked,
.flow-toolbar-inline select option:hover {
  background: #1d5f9f;
  color: #ffffff;
}

.flow-advanced {
  border: 1px solid rgba(77, 157, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.42);
  overflow: hidden;
}

.flow-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  list-style: none;
  cursor: pointer;
}

.flow-advanced summary::-webkit-details-marker {
  display: none;
}

.flow-advanced summary span {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-advanced summary small {
  color: var(--muted);
  font-size: 11px;
}

.flow-advanced[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flow-filter-row-advanced {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  padding: 12px 14px 14px;
}

.flow-filter-row-advanced select {
  width: 100%;
  min-height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 30px 0 12px;
  color-scheme: dark;
  font-size: 12px;
}

.flow-filter-row-advanced select option {
  background: #101827;
  color: #e9f2ff;
}

.flow-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 10px;
}

.flow-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.flow-toolbar-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
}

.flow-toolbar-count strong {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--green);
}

.flow-toolbar-note {
  color: var(--muted);
  font-size: 11px;
}

.flow-clear-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(31, 230, 168, 0.18);
  border-radius: 999px;
  background: rgba(31, 230, 168, 0.07);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.flow-clear-button:hover {
  border-color: rgba(31, 230, 168, 0.32);
  background: rgba(31, 230, 168, 0.11);
}

.flow-clear-button:disabled {
  opacity: 0.42;
  cursor: default;
  filter: saturate(0.8);
}

.flow-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.flow-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(77, 157, 255, 0.2);
  border-radius: 999px;
  background: rgba(77, 157, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.flow-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(77, 157, 255, 0.34);
  background: rgba(77, 157, 255, 0.13);
}

.flow-filter-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flow-filter-chip strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.flow-filter-chip em {
  margin-left: 2px;
  color: var(--green);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.flow-filter-chip.empty {
  cursor: default;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.flow-filter-chip.empty:hover {
  transform: none;
}

.flow-filter-chip.empty em {
  display: none;
}

.flow-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.flow-filter-row input,
.flow-filter-row select {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.flow-filter-row input {
  grid-column: 1 / -1;
  padding: 0 14px;
}

.flow-filter-row select {
  width: 100%;
  padding: 0 30px 0 12px;
  color-scheme: dark;
}

.flow-filter-row select option {
  background: #101827;
  color: #e9f2ff;
}

.flow-filter-row select option:checked,
.flow-filter-row select option:hover {
  background: #1d5f9f;
  color: #ffffff;
}

.flow-period-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 22px;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.flow-period-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.flow-period-item b {
  color: var(--muted);
  font-weight: 900;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flow-period-value {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.flow-map {
  margin: 0 16px 16px;
  border: 1px solid rgba(77, 157, 255, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 157, 255, 0.06), transparent 52%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(4, 8, 16, 0.72);
  background-size: auto, 36px 36px, 36px 36px, auto;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 42px rgba(0, 0, 0, 0.22);
}

.flow-graph {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.flow-graph svg {
  display: block;
  width: 100%;
  min-height: 320px;
}

/* Capital-flow map: direction first, decoration second. */
.flow-graph {
  background: rgba(2, 7, 15, 0.3);
}

.flow-candidate-row {
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.flow-candidate-row.is-muted {
  opacity: 0.13;
}
.flow-candidate-list { display: grid; gap: 6px; padding: 10px; }

.flow-candidate-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid rgba(144, 177, 221, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.flow-candidate-row:hover,
.flow-candidate-row:focus-visible,
.flow-candidate-row.is-focused {
  border-color: rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.08);
  outline: none;
}

.flow-candidate-rank { color: rgba(162, 187, 222, 0.62); font-family: var(--font-mono); font-size: 9px; }
.flow-candidate-name { min-width: 0; overflow: hidden; }
.flow-candidate-name strong { display: block; overflow: hidden; color: var(--text); font-family: var(--font-mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.flow-candidate-name em { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-family: var(--font-sans); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.flow-candidate-score { color: #ffc857; font-family: var(--font-mono); font-size: 15px; font-weight: 900; }

.pulse-quadrant-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(133, 165, 205, 0.11);
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.92), rgba(6, 12, 22, 0.88));
}

.pulse-quadrant-grid > .pulse-graph-toolbar-side {
  position: absolute;
  top: -27px;
  right: 16px;
  z-index: 4;
}

.pulse-quadrant-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.pulse-quadrant-card:hover,
.pulse-quadrant-card:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.pulse-quadrant-card.in { border-color: rgba(31, 230, 168, 0.22); }
.pulse-quadrant-card.out { border-color: rgba(255, 84, 112, 0.22); }

.pulse-quadrant-card.active {
  background: rgba(77, 157, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(126, 191, 255, 0.34);
}

.pq-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pq-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.pulse-quadrant-card.in .pq-top { color: var(--green); }
.pulse-quadrant-card.out .pq-top { color: var(--red); }

.pq-amount {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.3vw, 19px);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-quadrant-card.in .pq-amount { color: #7dffdc; }
.pulse-quadrant-card.out .pq-amount { color: #ffb3c0; }

.pq-meta {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-graph-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 54px;
  padding: 11px 14px 12px;
  border-bottom: 1px solid rgba(133, 165, 205, 0.11);
  background: linear-gradient(180deg, rgba(9, 19, 33, 0.96), rgba(7, 16, 28, 0.94));
}

.pulse-graph-toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pulse-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(139, 174, 219, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.pulse-filter-tabs button {
  min-height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #7f93ad;
  font-size: 10.5px;
  font-weight: 850;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.pulse-filter-tabs button:hover,
.pulse-filter-tabs button:focus-visible {
  color: #dce9f8;
  background: rgba(108, 155, 218, 0.1);
  outline: none;
}

.pulse-filter-tabs button.active {
  color: #eff8ff;
  background: #173453;
  box-shadow: inset 0 0 0 1px rgba(126, 191, 255, 0.24), 0 4px 14px rgba(0, 0, 0, 0.22);
}

.pulse-graph-toolbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #7890ab;
  font-size: 9.5px;
  font-weight: 800;
}

.pulse-graph-toolbar-side > span:not(.pulse-legend-info) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pulse-graph-toolbar-side > span:not(.pulse-legend-info)::before {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  content: "";
  box-shadow: 0 0 8px currentColor;
}

.pulse-graph-toolbar-side .in { color: #37dfad; }
.pulse-graph-toolbar-side .out { color: #ff657d; }
.pulse-graph-toolbar-side .predict { color: #9acbff; }

.pulse-legend-info {
  position: relative;
  display: inline-flex;
  outline: none;
  cursor: pointer;
}

.pulse-legend-info:focus-visible .pulse-legend-glyph {
  box-shadow: 0 0 0 2px rgba(77, 157, 255, 0.5);
}

.pulse-legend-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #9bb0ca;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.pulse-legend-info.is-open .pulse-legend-glyph {
  border-color: rgba(126, 191, 255, 0.5);
  background: rgba(77, 157, 255, 0.14);
  color: #eaf1fb;
}

.pulse-legend-tooltip {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: -6px;
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 220px;
  padding: 10px 11px;
  border: 1px solid rgba(126, 191, 255, 0.24);
  border-radius: 8px;
  background: #0b1626;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  color: #cddcf0;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
  cursor: default;
}

.pulse-legend-info.is-open .pulse-legend-tooltip {
  display: flex;
}

.pulse-legend-tooltip b {
  margin-right: 3px;
  color: var(--text);
}

.pulse-legend-tooltip span:nth-child(1) b { color: #37dfad; }
.pulse-legend-tooltip span:nth-child(2) b { color: #ff657d; }
.pulse-legend-tooltip span:nth-child(3) b { color: #9acbff; }

.pulse-graph-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(77, 157, 255, 0.12), transparent 44%),
    radial-gradient(circle at 50% 52%, rgba(31, 230, 168, 0.06), transparent 56%),
    linear-gradient(rgba(128, 159, 197, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 159, 197, 0.035) 1px, transparent 1px),
    #030810;
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  user-select: none;
}

.pulse-graph-stage::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(121, 158, 201, 0.08);
  border-radius: 14px;
  content: "";
  pointer-events: none;
}

.pulse-graph-stage::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 86px rgba(0, 0, 0, 0.62);
}

.pulse-graph-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  min-height: 560px;
  aspect-ratio: 5 / 3;
  touch-action: none;
  /* Own compositor layer: the surge animation repaints every frame, and this
     keeps that repaint from also invalidating the stage's gradient backdrop. */
  will-change: transform;
}

.pulse-edge {
  transition: opacity 190ms ease, filter 190ms ease;
}

.pulse-edge path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pulse-edge-bed {
  stroke: rgba(124, 151, 184, 0.08);
  stroke-width: calc(var(--pulse-width) * 2.45);
}

.pulse-edge-path {
  stroke-width: var(--pulse-width);
  opacity: var(--pulse-opacity, 0.68);
}

/* The moving surge dash used to carry filter:url(#pulse-soft-glow); a Gaussian
   blur re-rendered on every animation frame (stroke-dashoffset repaints) was
   the dominant jank source. The glow is now faked by -halo: a wider, faint
   copy of the same dash animating in lockstep underneath — same look, plain
   stroke painting, no per-frame filter work. */
.pulse-edge-surge,
.pulse-edge-surge-halo {
  fill: none;
  stroke-dasharray: 20 190;
  stroke-linecap: round;
  animation: pulseEdgeSurge var(--pulse-speed) linear infinite;
  animation-delay: var(--pulse-delay);
}

.pulse-edge-surge {
  stroke-width: calc(var(--pulse-width) * 1.38);
  opacity: var(--pulse-opacity, 0.92);
}

.pulse-edge-surge-halo {
  stroke-width: calc(var(--pulse-width) * 3.4);
  opacity: calc(var(--pulse-opacity, 0.92) * 0.3);
}

.pulse-edge.is-static .pulse-edge-surge,
.pulse-edge.is-static .pulse-edge-surge-halo { display: none; }

.pulse-edge.in .pulse-edge-path { stroke: rgba(43, 223, 169, 0.68); }
.pulse-edge.out .pulse-edge-path { stroke: rgba(255, 92, 117, 0.68); }
.pulse-edge.in .pulse-edge-surge,
.pulse-edge.in .pulse-edge-surge-halo { stroke: #62f5c7; }
.pulse-edge.out .pulse-edge-surge,
.pulse-edge.out .pulse-edge-surge-halo { stroke: #ff7189; }
.pulse-edge.in .pulse-edge-bed { stroke: rgba(31, 218, 162, 0.1); }
.pulse-edge.out .pulse-edge-bed { stroke: rgba(255, 83, 111, 0.1); }
.pulse-edge.institution .pulse-edge-surge,
.pulse-edge.institution .pulse-edge-surge-halo { stroke-dasharray: 30 180; }
.pulse-edge.big_trade .pulse-edge-surge,
.pulse-edge.big_trade .pulse-edge-surge-halo { stroke-dasharray: 42 168; }
.pulse-edge.is-muted { opacity: 0.045; }
.pulse-edge.is-focused { filter: brightness(1.45) saturate(1.18); }
.pulse-edge.is-focused .pulse-edge-bed { opacity: 0.8; }

.pulse-node {
  outline: none;
  cursor: pointer;
  transition: opacity 180ms ease, filter 180ms ease;
}

.pulse-node.is-muted { opacity: 0.12; }
.pulse-node.stock { cursor: grab; }
.pulse-node.stock.is-dragging { cursor: grabbing; filter: brightness(1.3); }
.pulse-node.stock.is-focused .pulse-node-core {
  filter: url(#pulse-node-glow) drop-shadow(0 14px 20px rgba(0, 0, 0, 0.42));
}
.pulse-node text {
  pointer-events: none;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(5, 9, 16, 0.72);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.pulse-node-orbit,
.pulse-node-ring {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.pulse-node-orbit {
  stroke: rgba(133, 169, 210, 0.09);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.pulse-node-ring {
  stroke: rgba(141, 177, 219, 0.3);
  stroke-width: 1.2;
}

.pulse-node-core {
  fill: #0b1828;
  stroke: rgba(146, 181, 224, 0.26);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Pre-rendered stand-in for the old always-on core glow + drop-shadow filters:
   a slightly offset radial-gradient disc behind the core. Node filters had
   340% effect regions that re-rendered whenever an animated surge dash swept
   past; the gradient paints once and costs nothing per frame. */
.pulse-node-shadow {
  fill: url(#pulse-node-shadow-grad);
  pointer-events: none;
}

.pulse-node:hover .pulse-node-orbit,
.pulse-node:focus-visible .pulse-node-orbit,
.pulse-node.is-focused .pulse-node-orbit {
  stroke: rgba(159, 201, 249, 0.5);
  animation: pulseOrbit 4s linear infinite;
}

.pulse-node.stock.in .pulse-node-ring { stroke: rgba(42, 223, 169, 0.72); }
.pulse-node.stock.out .pulse-node-ring { stroke: rgba(255, 91, 117, 0.72); }
.pulse-node.stock.flat .pulse-node-ring { stroke: rgba(147, 177, 215, 0.45); }
.pulse-node.stock.in .pulse-node-core { fill: #0b2725; }
.pulse-node.stock.out .pulse-node-core { fill: #2a151e; }

.pulse-node.stock.resonance .pulse-node-orbit {
  stroke: rgba(154, 203, 255, 0.55);
  stroke-width: 1.4;
  animation: pulseOrbit 2.6s linear infinite;
}

/* Filter-free: with the blur gone the scale/opacity keyframes are cheap to
   paint; the glow lives in the -halo circle pulsing in sync underneath. */
.pulse-resonance-dot {
  fill: #9acbff;
  stroke: rgba(5, 9, 16, 0.85);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulseResonance 1.3s ease-in-out infinite;
}

.pulse-resonance-halo {
  fill: #9acbff;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulseResonanceHalo 1.3s ease-in-out infinite;
}

.pulse-stock-label {
  fill: #f6fbff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.pulse-stock-amount {
  fill: #93a9c7;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pulse-node.stock.in .pulse-stock-label,
.pulse-node.stock.in .pulse-stock-amount { fill: #dcfff1; }
.pulse-node.stock.out .pulse-stock-label,
.pulse-node.stock.out .pulse-stock-amount { fill: #ffe0e6; }
.pulse-node.stock.flat .pulse-stock-label,
.pulse-node.stock.flat .pulse-stock-amount { fill: #e5eef9; }

.pulse-stock-score {
  fill: #85a0be;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pulse-node.stock.in .pulse-stock-score { fill: #69f0c6; }
.pulse-node.stock.out .pulse-stock-score { fill: #ff94a8; }
.pulse-node.stock.flat .pulse-stock-score { fill: #9eb4cf; }

.pulse-node.hub { cursor: pointer; }
.pulse-hub-panel {
  fill: rgba(6, 18, 30, 0.96);
  stroke: rgba(142, 176, 218, 0.26);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.pulse-hub-accent { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.pulse-node.hub.in .pulse-hub-panel { stroke: rgba(42, 223, 169, 0.62); }
.pulse-node.hub.out .pulse-hub-panel { stroke: rgba(255, 91, 117, 0.62); }
.pulse-node.hub.in .pulse-hub-accent { stroke: #2adfa9; }
.pulse-node.hub.out .pulse-hub-accent { stroke: #ff5b75; }
.pulse-node.hub:hover .pulse-hub-panel,
.pulse-node.hub:focus-visible .pulse-hub-panel,
.pulse-node.hub.is-focused .pulse-hub-panel { filter: brightness(1.28); }
.pulse-hub-source {
  fill: #9bb0ca;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pulse-hub-amount {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 900;
}
.pulse-node.hub.in .pulse-hub-amount { fill: #6ce8bf; }
.pulse-node.hub.out .pulse-hub-amount { fill: #ff90a1; }
.pulse-hub-count { fill: #728ba7; font-size: 9px; font-weight: 800; letter-spacing: 0.02em; }

@keyframes pulseEdgeSurge {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -210; }
}

@keyframes pulseOrbit {
  to { stroke-dashoffset: -48; }
}

@keyframes pulseResonance {
  0%,
  100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes pulseResonanceHalo {
  0%,
  100% { opacity: 0.12; transform: scale(0.82); }
  50% { opacity: 0.34; transform: scale(1.3); }
}

/* Everything animated in the pulse graph pauses while scrolled out of view
   (class toggled by an IntersectionObserver in app.js). */
.pulse-graph-stage.is-offscreen .pulse-edge-surge,
.pulse-graph-stage.is-offscreen .pulse-edge-surge-halo,
.pulse-graph-stage.is-offscreen .pulse-node-orbit,
.pulse-graph-stage.is-offscreen .pulse-resonance-dot,
.pulse-graph-stage.is-offscreen .pulse-resonance-halo {
  animation-play-state: paused;
}

.flow-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.flow-summary-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(12, 20, 34, 0.88), rgba(9, 14, 24, 0.78));
}

.flow-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flow-summary-card strong {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 15px;
  white-space: nowrap;
}

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

.flow-leader-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 18, 31, 0.86), rgba(8, 12, 20, 0.76));
  overflow: hidden;
}

.flow-leader-card.green {
  border-color: rgba(31, 230, 168, 0.22);
}

.flow-leader-card.red {
  border-color: rgba(255, 84, 112, 0.22);
}

.flow-leader-card.blue {
  border-color: rgba(77, 157, 255, 0.22);
}

.flow-leader-card.amber {
  border-color: rgba(255, 200, 87, 0.24);
}

.flow-leader-title {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-leader-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.flow-leader-row:first-of-type {
  border-top: 0;
}

.flow-leader-row span {
  min-width: 0;
}

.flow-leader-row strong {
  display: inline;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.flow-leader-row em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-leader-row b {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.flow-leader-empty,
.flow-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
}

.flow-retry-button {
  margin-left: 10px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 84, 112, 0.35);
  border-radius: 6px;
  background: rgba(255, 84, 112, 0.1);
  color: #ffb3c0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.flow-retry-button:hover,
.flow-retry-button:focus-visible {
  background: rgba(255, 84, 112, 0.2);
  outline: none;
}

.flow-table-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 540px;
  overflow: auto;
}

.flow-row {
  cursor: pointer;
}

.flow-row:hover {
  background: rgba(77, 157, 255, 0.045);
}

.flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(77, 157, 255, 0.18);
  background: rgba(77, 157, 255, 0.06);
  color: #cfe3ff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.flow-tag.active {
  border-color: rgba(31, 230, 168, 0.26);
  background: rgba(31, 230, 168, 0.1);
  color: #bfffee;
}

.flow-tag.muted {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.flow-detail-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.flow-detail-refresh {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(77, 157, 255, 0.18);
  border-radius: 8px;
  background: rgba(77, 157, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.flow-detail-grid {
  gap: 12px;
  margin-bottom: 14px;
}

.flow-detail-window h4 {
  color: var(--blue);
}

.flow-detail-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flow-detail-kv:last-child {
  border-bottom: 0;
}

.flow-detail-kv span {
  color: var(--muted);
  font-size: 12px;
}

.flow-detail-kv strong {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
}

.flow-score {
  position: relative;
  width: min(130px, 100%);
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.flow-score span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.flow-score b {
  position: absolute;
  right: 0;
  top: -18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ---------------------------------- */
/* Institutional ownership table       */
/* ---------------------------------- */

.ownership-search-head {
  padding: 12px 18px;
}

.ownership-search {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
}

.ownership-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s;
}

.ownership-search:focus-within .ownership-search-icon {
  color: var(--green);
}

.ownership-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 48px 0 46px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ownership-search input:focus {
  outline: none;
  border-color: rgba(31, 230, 168, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 230, 168, 0.08);
  background: rgba(31, 230, 168, 0.03);
}

.ownership-search-kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
  pointer-events: none;
  transition: opacity 0.15s;
}

.ownership-search:focus-within .ownership-search-kbd {
  opacity: 0;
}

.ownership-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
}

.ownership-meta .muted {
  font-size: 12px;
}

.ownership-meta .tag {
  flex: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.ownership-sort {
  padding: 0 18px 14px;
}

.ownership-table-wrap {
  max-height: 760px;
  overflow: auto;
}

.ownership-table {
  min-width: 980px;
}

.ownership-table th:nth-child(n + 3),
.ownership-table td:nth-child(n + 3) {
  text-align: right;
}

.ownership-main {
  cursor: pointer;
}

.ownership-main td {
  padding-top: 14px;
  padding-bottom: 14px;
  vertical-align: middle;
}

.ownership-main:hover,
.ownership-main.expanded {
  background: rgba(255, 255, 255, 0.036);
}

.own-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-expander {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  line-height: 1;
}

.ownership-main.expanded .row-expander {
  color: var(--green);
  border-color: rgba(31, 230, 168, 0.36);
  background: rgba(31, 230, 168, 0.1);
}

.own-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.own-symbol {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.own-company {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.own-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.own-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.own-badge-up {
  background: rgba(31, 230, 168, 0.12);
  color: var(--green);
  border: 1px solid rgba(31, 230, 168, 0.25);
}

.own-badge-down {
  background: rgba(255, 80, 80, 0.1);
  color: var(--red);
  border: 1px solid rgba(255, 80, 80, 0.2);
}

.own-badge-neutral {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sector-chip {
  display: inline-flex;
  max-width: 230px;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #e6edf7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.delta-inline {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ownership-history-row td {
  padding: 0;
  background: rgba(255, 255, 255, 0.022);
}

.ownership-history-card {
  max-width: 980px;
  margin: 12px 0 18px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(8, 13, 23, 0.92);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ownership-quarter + .ownership-quarter {
  border-top: 1px solid var(--line-strong);
}

.ownership-quarter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background:
    linear-gradient(90deg, rgba(31, 230, 168, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.018);
}

.ownership-quarter-head strong,
.ownership-quarter-head .muted {
  display: block;
}

.ownership-quarter-head strong {
  font-size: 14px;
}

.ownership-quarter-head .muted {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.ownership-quarter-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.ownership-quarter-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  white-space: nowrap;
}

.ownership-manager-table {
  overflow-x: auto;
}

.ownership-manager-table table {
  min-width: 880px;
}

.ownership-manager-table th,
.ownership-manager-table td {
  padding: 11px 16px;
}

.ownership-manager-table th {
  background: rgba(10, 15, 25, 0.97);
}

.ownership-manager-table td:nth-child(3),
.ownership-manager-table td:nth-child(4),
.ownership-manager-table th:nth-child(3),
.ownership-manager-table th:nth-child(4) {
  text-align: right;
}

.ownership-manager-table td strong {
  display: block;
}

.ownership-manager-table td .muted {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.ownership-empty-detail {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.top-holder-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.top-holder-strip strong {
  margin-right: 4px;
  font-size: 12px;
}

.top-holder-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  font-size: 11.5px;
}

.top-holder-strip b {
  color: var(--text);
  font-family: var(--font-mono);
}

/* ---------------------------------- */
/* Ticker / party badges              */
/* ---------------------------------- */

.ticker-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid rgba(77, 157, 255, 0.35);
  border-radius: 5px;
  background: var(--blue-dim);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.party-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.party-badge.party-R {
  border: 1px solid rgba(255, 84, 112, 0.4);
  background: var(--red-dim);
  color: var(--red);
}

.party-badge.party-D {
  border: 1px solid rgba(77, 157, 255, 0.4);
  background: var(--blue-dim);
  color: var(--blue);
}

.party-badge.party-I {
  border: 1px solid rgba(177, 140, 255, 0.4);
  background: rgba(177, 140, 255, 0.14);
  color: var(--purple);
}

.party-badge.party-none {
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.08);
  color: var(--faint);
}

/* ---------------------------------- */
/* Politician leaderboard              */
/* ---------------------------------- */

.leaderboard-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 28, 0.78);
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.leaderboard-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.lb-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
}

.leaderboard-row:nth-child(1) .lb-rank {
  background: var(--glow-gold);
  background: rgba(244, 201, 72, 0.18);
  color: var(--gold);
}

.leaderboard-row:nth-child(2) .lb-rank {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.leaderboard-row:nth-child(3) .lb-rank {
  background: rgba(217, 119, 6, 0.18);
  color: #e0a458;
}

.lb-who strong {
  display: block;
  font-size: 14px;
}

.lb-who .lb-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.lb-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.lb-stats .lb-volume {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.lb-tickers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

/* ---------------------------------- */
/* Compliance monitor                  */
/* ---------------------------------- */

.compliance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.compliance-stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 28, 0.78);
}

.compliance-stat span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.compliance-stat strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 22px;
}

.compliance-stat.ok strong {
  color: var(--green);
}

.compliance-stat.warn strong {
  color: var(--red);
}

.lag-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.lag-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.lag-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
}

.lag-days-late {
  font-family: var(--font-mono);
  font-weight: 800;
}

.lag-days-late.ok {
  color: var(--green);
}

.lag-days-late.late {
  color: var(--red);
}

/* ---------------------------------- */
/* Manager cards                      */
/* ---------------------------------- */

.manager-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.manager-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 28, 0.78);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.manager-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.manager-card .mc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.manager-card .mc-top strong {
  display: block;
  font-size: 13.5px;
}

.manager-card .mc-top small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
}

.manager-card .mc-period {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.mc-bar {
  display: flex;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.mc-bar i {
  display: block;
  height: 100%;
}

.mc-bar .seg-add {
  background: var(--green);
}

.mc-bar .seg-reduce {
  background: var(--amber);
}

.mc-bar .seg-exit {
  background: var(--red);
}

.mc-legend {
  display: flex;
  gap: 12px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
}

.mc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mc-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.mc-value {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------------------------------- */
/* Heatmap                            */
/* ---------------------------------- */

.heatmap-wrap {
  padding: 16px 16px 18px;
}

.heatmap-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 11px;
}

.heatmap-scale .bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red) 0%, rgba(148, 163, 184, 0.2) 50%, var(--green) 100%);
}

.heatmap-grid {
  position: relative;
  width: 100%;
  aspect-ratio: 2.15 / 1;
  min-height: 360px;
}

.heat-cell {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 8px 10px;
  overflow: hidden;
  cursor: pointer;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.16s ease, box-shadow 0.16s ease;
  will-change: transform;
}

.heat-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(5, 8, 15, 0.55);
  pointer-events: none;
}

.heat-cell:hover,
.heat-cell.heat-cell-active {
  z-index: 6;
  filter: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 10px 24px rgba(0, 0, 0, 0.34);
  transform: scale(1.04);
}

.heat-cell strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.22;
  color: #eaf1fb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.heat-cell .heat-value {
  display: block;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.heat-cell .heat-meta {
  display: block;
  color: rgba(234, 241, 251, 0.78);
  font-size: 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.heat-cell .heat-mover {
  display: block;
  margin-top: 2px;
  color: rgba(234, 241, 251, 0.9);
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* small/micro cells only ever get a <strong>ticker</strong> + value in the
   markup (see heatmapCellContent) -- no separate name/meta/mover text, so
   there's nothing left to truncate or overlap. */
.heat-cell.small,
.heat-cell.micro {
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.heat-cell.small strong,
.heat-cell.micro strong {
  -webkit-line-clamp: 1;
  font-family: var(--font-mono);
  font-weight: 800;
}

.heat-cell.small strong {
  font-size: 12.5px;
}

.heat-cell.micro {
  padding: 4px 6px;
}

.heat-cell.micro strong {
  font-size: 10.5px;
}

.heat-cell.micro .heat-value {
  font-size: 10px;
}

.heat-cell.large strong {
  font-size: 14px;
}

.heat-cell.large .heat-mover {
  font-size: 10.5px;
}

/* ---------------------------------- */
/* Heatmap hover tooltip               */
/* ---------------------------------- */

.heat-tooltip {
  position: fixed;
  z-index: 200;
  display: none;
  width: 300px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow-lift);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.heat-tooltip.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.heat-tooltip .ht-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.heat-tooltip .ht-head strong {
  font-size: 14.5px;
}

.heat-tooltip .ht-head .ticker-badge {
  margin-left: 6px;
}

.heat-tooltip .ht-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
  font-size: 11.5px;
}

.heat-tooltip .ht-stats span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.heat-tooltip .ht-stats strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.heat-tooltip .ht-movers-label {
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.heat-tooltip .ht-mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
  border-top: 1px dashed var(--line);
}

.heat-tooltip .ht-mover-row:first-of-type {
  border-top: none;
}

.heat-tooltip .ht-mover-row .ht-mover-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-tooltip .ht-mover-row .ht-mover-value {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 800;
}

/* ---------------------------------- */
/* Donut / sparkline svg helpers      */
/* ---------------------------------- */

.spark-svg {
  display: block;
}

.donut-svg circle {
  transition: stroke-dasharray 0.5s ease;
}

/* ---------------------------------- */
/* Skeleton loading                   */
/* ---------------------------------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 6px;
  color: transparent !important;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-edge-surge,
  .pulse-edge-surge-halo {
    animation-duration: calc(var(--pulse-speed) * 1.25) !important;
  }
}

@media (max-width: 760px) {
  .pulse-graph-toolbar {
    align-items: stretch;
    gap: 8px;
  }

  .pulse-graph-toolbar-main {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .pulse-filter-tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pulse-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .pulse-filter-tabs button {
    flex: 0 0 auto;
  }

  .pulse-graph-toolbar-side {
    align-self: flex-end;
  }

  .pulse-graph-stage {
    min-height: 456px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .pulse-graph-svg {
    width: 760px;
    min-width: 760px;
    min-height: 456px;
  }
}

/* ---------------------------------- */
/* Responsive                         */
/* ---------------------------------- */

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar-spacer {
    display: none;
  }

  nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .dashboard-grid,
  .trump-summary,
  .command-panel {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .manager-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compliance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sector-compact-picker {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 240px);
  }

  .sector-compact-picker button {
    grid-column: 2;
  }

  .flow-toolbar-top {
    flex-direction: column;
  }

  .flow-toolbar-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .flow-toolbar-inline input {
    grid-column: 1 / -1;
  }

  .flow-filter-row-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .flow-clear-button {
    align-self: flex-start;
  }

  .pulse-quadrant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ownership-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ownership-search {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 14px;
  }

  .hero {
    display: block;
    padding: 20px;
  }

  .hero-actions {
    align-items: flex-start;
    margin-top: 18px;
  }

  h1 {
    font-size: 27px;
  }

  .kpi-grid,
  .mini-stat-grid,
  .result-grid,
  .manager-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sector-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sector-compact-picker {
    grid-template-columns: 1fr;
  }

  .sector-compact-picker button {
    grid-column: auto;
    width: 100%;
  }

  .sector-picker-copy em {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }

  .flow-toolbar {
    gap: 8px;
  }

  .flow-toolbar-top {
    gap: 8px;
  }

  .flow-toolbar-inline {
    grid-template-columns: 1fr;
  }

  .flow-toolbar-inline input,
  .flow-toolbar-inline select {
    width: 100%;
  }

  .flow-filter-row-advanced {
    grid-template-columns: 1fr;
  }

  .flow-status-row {
    gap: 8px;
  }

  .flow-clear-button {
    width: 100%;
  }

  .flow-active-filters {
    padding-bottom: 12px;
  }

  .flow-summary-grid,
  .flow-leaders,
  .pulse-quadrant-grid {
    grid-template-columns: 1fr;
  }

  .flow-candidate-list {
    grid-template-columns: 1fr;
  }

  .flow-summary-grid,
  .flow-leaders {
    gap: 8px;
  }

  .leaderboard-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lb-tickers {
    justify-content: flex-start;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticker-tape .tt-label span:last-child {
    display: none;
  }

  .ownership-history-card {
    margin-left: 10px;
    margin-right: 10px;
  }
}

/* ===== 2026 UI 精修：导航与顶栏排版（品牌统一 + 层级细化） ===== */
/* 侧边栏 · 品牌标识 */
.brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand small {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 侧边栏 · 导航排版 */
nav a {
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
}
nav a.active {
  box-shadow: inset 0 0 0 1px rgba(31, 230, 168, 0.22);
}

/* 侧边栏 · 站点链接 */
.site-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  padding: 12px 4px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-links a:hover {
  color: var(--green);
}
.site-links .sep {
  color: var(--faint);
}

/* 顶栏 · 返回首页按钮 */
.dh-btn-home {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.dh-btn-home:hover {
  border-color: rgba(31, 230, 168, 0.4);
  background: rgba(31, 230, 168, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

/* 顶栏 · 标题排版 */
.dh-title h1 {
  font-size: 23px;
  letter-spacing: -0.015em;
}
.dh-label {
  letter-spacing: 0.12em;
}
