/* ==========================================================================
   金融知识图谱 · 设计系统 (Light / Professional Finance)
   FinGraph Design System v1.0
   ========================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Surfaces */
  --bg:            #f4f6f9;
  --surface:       #ffffff;
  --surface-2:     #fafbfc;
  --surface-3:     #f1f4f8;
  --line:          #e7eaef;
  --line-strong:   #d8dde5;

  /* Ink */
  --ink:           #0e1a2b;
  --ink-2:         #45536b;
  --ink-3:         #8593a8;
  --ink-4:         #aab4c4;

  /* Brand — deep navy, restrained */
  --brand:         #143c6e;
  --brand-600:     #1b4f8c;
  --brand-500:     #2563a8;
  --brand-100:     #dde8f5;
  --brand-50:      #eef4fb;

  /* Accent — muted gold, used sparingly */
  --gold:          #b07d1f;
  --gold-50:       #fbf4e4;

  /* Market (China convention: up = red, down = green) */
  --up:            #d92d20;
  --up-soft:       #fdf1f0;
  --down:          #128a5a;
  --down-soft:     #ecfaf3;
  --flat:          #8593a8;

  /* Entity type colors */
  --c-company:     #1b4f8c;
  --c-company-bg:  #e8f0fa;
  --c-institution:    #b07d1f;
  --c-institution-bg: #faf1dd;
  --c-person:      #7a4bbf;
  --c-person-bg:   #f0eafb;
  --c-wiki:        #0f7a6b;
  --c-wiki-bg:     #e3f5f1;
  --c-news:        #b45309;
  --c-news-bg:     #fbf1e3;
  --c-topic:       #b02a5b;
  --c-topic-bg:    #fbeaf0;

  /* Radius / shadow */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --sh-1: 0 1px 2px rgba(16, 26, 43, .04);
  --sh-2: 0 2px 8px rgba(16, 26, 43, .06);
  --sh-3: 0 8px 28px rgba(16, 26, 43, .10);

  /* Type */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
          system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 1240px;
  --gap: 20px;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-500); }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
::selection { background: var(--brand-100); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6e0; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b6bfcd; }

/* ---------- 3. Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.main { padding: 28px 0 72px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 30px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 30px; }
.stack > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-3); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- 4. Topbar (market strip) ---------- */
.topbar {
  background: #0f2440;
  color: #c6d3e6;
  font-size: 12.5px;
  border-bottom: 1px solid #0a1a2f;
}
.topbar .container-wide { display: flex; align-items: center; gap: 22px; height: 38px; }
.topbar-date { color: #7f93b0; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.ticker { display: flex; align-items: center; gap: 20px; overflow: hidden; flex: 1 1 auto; }
.tick { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.tick .n { color: #93a6c1; }
.tick .v { font-family: var(--font-num); color: #e8eef7; font-weight: 600; }
.tick .d { font-family: var(--font-num); font-weight: 600; font-size: 12px; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.topbar .up, .topbar .down { color: #fff !important; }
.topbar .up { color: #ff8a80 !important; }
.topbar .down { color: #6ee7b7 !important; }
.topbar-links { display: flex; align-items: center; gap: 16px; color: #7f93b0; white-space: nowrap; }
.topbar-links a { color: #a9bad2; }
.topbar-links a:hover { color: #fff; }

/* ---------- 5. Header ---------- */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 60;
}
.header-inner {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 340px);
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(150deg, #1b4f8c, #0f2f59);
  display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 6px rgba(15,47,89,.28);
}
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); line-height: 1.15; white-space: nowrap; }
.brand-sub { font-size: 9.5px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.brand-txt { display: flex; flex-direction: column; gap: 1px; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 9px 13px; border-radius: 8px; color: var(--ink-2);
  font-weight: 600; font-size: 14.5px; position: relative; white-space: nowrap;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { color: var(--brand); }
.nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px;
  background: var(--brand); border-radius: 2px;
}

/* search */
.search { position: relative; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-3); border: 1px solid transparent;
  border-radius: 10px; padding: 0 12px; height: 42px; transition: .15s;
}
.search-box:focus-within { background: #fff; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.search-box svg { flex: none; color: var(--ink-3); }
.search-box input { border: 0; background: transparent; outline: none; flex: 1; color: var(--ink); }
.search-box input::placeholder { color: var(--ink-4); }
.search-kbd {
  font-family: var(--font-num); font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; background: #fff;
}
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-3); padding: 6px; display: none;
}
.suggest.open { display: block; }
.suggest-group { padding: 6px 10px 4px; font-size: 11px; color: var(--ink-3); letter-spacing: .08em; }
.suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink);
}
.suggest-item:hover, .suggest-item.hl { background: var(--surface-3); }
.suggest-item .t { font-weight: 600; flex: 1; }
.suggest-item .m { color: var(--ink-3); font-size: 12px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* category strip */
.catbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.catbar .container { display: flex; align-items: center; gap: 6px; height: 44px; overflow-x: auto; }
.catbar a { color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; white-space: nowrap; }
.catbar a:hover { background: var(--surface-3); color: var(--ink); }
.catbar a.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }

/* ---------- 6. Buttons / chips / badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; transition: .15s;
}
.btn:hover { border-color: var(--ink-4); background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
  border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 13px; font-weight: 500;
  border: 1px solid transparent; transition: .15s;
}
.chip:hover { background: var(--brand-50); color: var(--brand); }
.chip.on { background: var(--brand); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px;
  border-radius: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
}
.badge-company { background: var(--c-company-bg); color: var(--c-company); }
.badge-person  { background: var(--c-person-bg);  color: var(--c-person); }
.badge-wiki    { background: var(--c-wiki-bg);    color: var(--c-wiki); }
.badge-news    { background: var(--c-news-bg);    color: var(--c-news); }
.badge-topic   { background: var(--c-topic-bg);   color: var(--c-topic); }
.badge-up      { background: var(--up-soft);      color: var(--up); }
.badge-down    { background: var(--down-soft);    color: var(--down); }
.badge-brand   { background: var(--brand-50);     color: var(--brand); }
.badge-gold    { background: var(--gold-50);      color: var(--gold); }
.badge-gray    { background: var(--surface-3);    color: var(--ink-2); }

/* ---------- 7. Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-size: 17px; display: flex; align-items: center; gap: 9px; }
.panel-head .more { font-size: 13px; color: var(--ink-3); font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
.panel-head .more:hover { color: var(--brand); }
.panel-body { padding: 20px 22px; }
.panel-body.flush { padding: 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px;
}
.section-head .st { display: flex; align-items: baseline; gap: 12px; }
.section-head h2 { font-size: 23px; letter-spacing: -.02em; }
.section-head .desc { color: var(--ink-3); font-size: 13.5px; }
.title-bar { display: flex; align-items: center; gap: 10px; }
.title-bar::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: var(--brand); }
.title-bar.plain::before { background: var(--line-strong); }

/* ---------- 8. News list（全站不使用图片，列表均为纯文字） ---------- */
.ntime { color: var(--brand-500); font-family: var(--font-num); font-size: 12px; font-weight: 600; letter-spacing: .01em; }

.news-row { display: block; padding: 20px 0; }
.news-row + .news-row { border-top: 1px solid var(--line); }
.news-row:first-child { padding-top: 6px; }
.news-row:last-child { padding-bottom: 10px; }
.news-row h3 { font-size: 17.5px; line-height: 1.5; margin-bottom: 8px; font-weight: 700; letter-spacing: -.01em; }
.news-row h3 a { color: var(--ink); }
.news-row h3 a:hover { color: var(--brand); }
.news-row p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 10px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.news-list li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.news-list.tight li + li { margin-top: 12px; padding-top: 12px; }
.news-list h4 { font-size: 15px; line-height: 1.6; font-weight: 600; }
.news-list h4 a { color: var(--ink); }
.news-list h4 a:hover { color: var(--brand); }

.meta { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; flex-wrap: wrap; }
.meta .sep { width: 1px; height: 11px; background: var(--line-strong); }
.meta a { color: var(--ink-3); }
.meta a:hover { color: var(--brand); }

.rank-list li { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-no {
  font-family: var(--font-num); font-weight: 700; font-size: 13px; width: 20px; flex: none;
  color: var(--ink-4); text-align: center; line-height: 1.7;
}
.rank-list li:nth-child(1) .rank-no { color: #d92d20; }
.rank-list li:nth-child(2) .rank-no { color: #e8863b; }
.rank-list li:nth-child(3) .rank-no { color: #b07d1f; }
.rank-list .rt { font-size: 14.5px; font-weight: 600; line-height: 1.55; }
.rank-list .rt a { color: var(--ink); }
.rank-list .rt a:hover { color: var(--brand); }

/* ---------- 9. Entity cards ---------- */
.entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.entity-grid.two { grid-template-columns: repeat(2, 1fr); }
.entity-grid.four { grid-template-columns: repeat(4, 1fr); }

.entity-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 17px 18px; transition: .16s; display: flex; flex-direction: column; gap: 11px; position: relative;
}
.entity-card:hover { border-color: var(--brand-100); box-shadow: var(--sh-2); transform: translateY(-2px); }
.entity-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -.02em;
}
.avatar.round { border-radius: 50%; }
.av-company { background: linear-gradient(150deg, #2563a8, #143c6e); }
.av-bank    { background: linear-gradient(150deg, #b45309, #8a3f06); }
.av-tech    { background: linear-gradient(150deg, #0f7a6b, #0a5a4e); }
.av-person  { background: linear-gradient(150deg, #7a4bbf, #553086); }
.av-liquor  { background: linear-gradient(150deg, #b02a5b, #8a1f46); }
.entity-name { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.entity-name a { color: var(--ink); }
.entity-name a:hover { color: var(--brand); }
.entity-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.entity-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entity-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.entity-stats { display: flex; gap: 14px; }
.entity-stats .s { font-size: 12px; color: var(--ink-3); }
.entity-stats .s b { font-family: var(--font-num); color: var(--ink); font-size: 14px; margin-right: 3px; }
.follow-btn { font-size: 12px; color: var(--brand-600); font-weight: 600; border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.follow-btn:hover { background: var(--brand-100); }
.follow-btn.on { color: var(--ink-3); border-color: var(--line); background: var(--surface-2); }

/* ---------- 10. Answer box (GEO) / prose ---------- */
.answer-box {
  background: linear-gradient(180deg, #f2f7fd, #fbfcfe);
  border: 1px solid var(--brand-100); border-left: 3px solid var(--brand);
  border-radius: var(--r); padding: 16px 18px;
}
.answer-box .lab { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .04em; margin-bottom: 8px; }
.answer-box p { font-size: 15.5px; line-height: 1.75; color: var(--ink); }
.answer-box strong { color: var(--brand); }

.prose { font-size: 16px; line-height: 1.85; color: #22303f; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 19px; margin-top: 30px; padding-left: 12px; border-left: 3px solid var(--brand); line-height: 1.3; }
.prose h3 { font-size: 16.5px; margin-top: 22px; }
.prose p { color: #22303f; }
.prose ul, .prose ol { padding-left: 4px; }
.prose ul li { position: relative; padding-left: 20px; margin-top: 8px; }
.prose ul li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-500); }
.prose ol { counter-reset: n; }
.prose ol li { position: relative; padding-left: 24px; margin-top: 8px; counter-increment: n; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 5px; background: var(--brand-50); color: var(--brand); font-size: 11px; font-weight: 700; display: grid; place-items: center; font-family: var(--font-num); }
.prose blockquote { background: var(--surface-2); border-left: 3px solid var(--line-strong); padding: 12px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink-2); font-size: 14.5px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose table th, .prose table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose table th { background: var(--surface-3); font-weight: 600; }

/* inline entity link inside article text */
.ent {
  color: var(--brand); font-weight: 600; border-bottom: 1px solid var(--brand-100);
  padding-bottom: 0; cursor: pointer;
}
.ent:hover { border-bottom-color: var(--brand); }
.ent.wiki { color: #0f7a6b; border-bottom-color: #cfe9e3; }
.ent.person { color: #7a4bbf; border-bottom-color: #e5dbf5; }

/* ---------- 11. Tables / KV ---------- */
.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th, .kv td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { color: var(--ink-3); font-weight: 500; width: 116px; background: var(--surface-2); }
.kv td { color: var(--ink); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; letter-spacing: .02em;
  padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:last-child { white-space: nowrap; }

/* ---------- 12. Timeline ---------- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50);
}
.tl-item.major::before { border-color: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.tl-date { font-family: var(--font-num); font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.tl-title { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.tl-desc { font-size: 13px; color: var(--ink-2); margin-top: 3px; }

/* ---------- 13. Sidebar widgets ---------- */
.side { position: sticky; top: 88px; }
.side .panel + .panel { margin-top: 18px; }
.kw-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kw {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); transition: .15s;
}
.kw:hover { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand); }
.kw .heat { font-family: var(--font-num); font-size: 11px; color: var(--ink-4); }

/* 百科定义卡（首页） */
.wiki-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wiki-card {
  display: flex; flex-direction: column; gap: 5px; padding: 13px 15px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); transition: .15s;
}
.wiki-card:hover { border-color: #bfe0d9; background: var(--c-wiki-bg); }
.wiki-card .wname { font-size: 14.5px; font-weight: 700; color: var(--c-wiki); display: flex; align-items: center; gap: 7px; }
.wiki-card .wname::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c-wiki); flex: none; }
.wiki-card .wdef { font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 专题卡（首页） */
.topic-card { border-left: 3px solid var(--c-topic); background: linear-gradient(135deg, #fff 55%, #fdf3f7); }
.topic-card:hover { border-color: #f0c3d3; }

.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.quote-cell { background: #fff; padding: 12px 14px; }
.quote-cell .qn { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.quote-cell .qv { font-family: var(--font-num); font-size: 18px; font-weight: 700; }
.quote-cell .qd { font-family: var(--font-num); font-size: 12px; font-weight: 600; }

/* relation chip rows */
.rel-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rel-row:last-child { border-bottom: 0; }
.rel-kind { font-size: 11.5px; color: var(--ink-3); background: var(--surface-3); border-radius: 5px; padding: 2px 8px; flex: none; width: 66px; text-align: center; }
.rel-name { font-weight: 600; font-size: 14px; flex: 1; }
.rel-name a { color: var(--ink); }
.rel-name a:hover { color: var(--brand); }
.rel-conf { font-family: var(--font-num); font-size: 11.5px; color: var(--ink-3); }
.conf-bar { width: 46px; height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.conf-bar i { display: block; height: 100%; background: var(--brand-500); }
.conf-bar.low i { background: #e8863b; }

/* ---------- 14. Breadcrumb ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); padding: 14px 0; flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--brand); }
.crumbs .sepc { color: var(--ink-4); }

/* ---------- 15. Footer ---------- */
.footer { background: #0f2440; color: #93a6c1; margin-top: 48px; padding: 40px 0 24px; font-size: 13px; }
.footer h4 { color: #fff; font-size: 13.5px; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.5fr; gap: 30px; }
.footer a { color: #a9bad2; display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
/* .footer a 的 display:block 会盖过 .brand 的 flex，这里恢复横排并去掉多余内边距 */
.footer a.brand { display: flex; padding: 0; }
.footer .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.foot-about { color: #7f93b0; line-height: 1.9; font-size: 12.5px; }
.footer .brand-name { color: #fff; }
.footer .brand-sub { color: #6f86a5; }
.footer-note { border-top: 1px solid #1c3557; margin-top: 28px; padding-top: 18px; color: #6f86a5; font-size: 12px; line-height: 1.8; }
.disclaimer { background: #0b1c33; border: 1px solid #1c3557; border-radius: var(--r); padding: 12px 14px; margin-top: 16px; color: #7f93b0; font-size: 12px; line-height: 1.7; }

/* ---------- 16. Graph ---------- */
.graph-stage {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background-image: radial-gradient(circle, #e3e8ef 1px, transparent 1px); background-size: 22px 22px;
}
.graph-canvas { width: 100%; height: 580px; display: block; cursor: grab; touch-action: none; }
.graph-canvas:active { cursor: grabbing; }
.graph-legend {
  position: absolute; left: 14px; bottom: 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--sh-1);
}
.graph-legend .li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; color: var(--ink-2); }
.graph-legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.graph-toolbar { position: absolute; right: 14px; top: 14px; display: flex; gap: 8px; }
.graph-detail {
  position: absolute; right: 14px; top: 60px; width: 268px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-3); padding: 16px; display: none;
}
.graph-detail.open { display: block; }
.graph-hint { position: absolute; left: 14px; top: 14px; font-size: 12px; color: var(--ink-3); background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; }
#graphSvg { width: 100%; height: 100%; display: block; }
#graphSvg text { pointer-events: none; user-select: none; }
.gnode circle { transition: stroke-width .15s; }
.graph-filterbox { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.graph-filterbox label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.graph-filterbox input { accent-color: var(--brand); width: 15px; height: 15px; }

/* ---------- 目录表格（大数据量实体库：企业库等） ---------- */
.dir-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dir-search {
  flex: 0 1 290px; height: 38px; padding: 0 14px; font: inherit; font-size: 13.5px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink);
}
.dir-search:focus { outline: none; border-color: var(--brand-500); background: var(--surface); }
.dir-table-wrap { overflow-x: auto; }
.dir-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dir-table th {
  text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; letter-spacing: .04em;
  padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.dir-table td { padding: 11px 18px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.dir-table tr:last-child td { border-bottom: 0; }
.dir-table tbody tr:hover td { background: var(--surface-2); }
.dir-table td.c-code { font-family: var(--font-num); color: var(--ink-3); white-space: nowrap; }
.dir-table td.c-name a { color: var(--ink); font-weight: 600; }
.dir-table td.c-name a:hover { color: var(--brand); }
.dir-table td.c-name .tk { display: block; font-size: 11.5px; color: var(--ink-4); font-family: var(--font-num); margin-top: 2px; }
.dir-table .muted { color: var(--ink-3); }
.dir-empty { padding: 40px 18px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.dir-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dir-pager .pg-info { font-size: 12.5px; color: var(--ink-3); }
.dir-pager .pg-btns { display: flex; align-items: center; gap: 6px; }
.dir-pager button {
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.dir-pager button:hover:not(:disabled) { border-color: var(--brand-500); color: var(--brand); }
.dir-pager button:disabled { opacity: .45; cursor: default; }
.dir-pager button.on { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand); font-weight: 600; }
@media (max-width: 720px) {
  .dir-table th:nth-child(4), .dir-table td:nth-child(4) { display: none; }
}

/* ---------- 17. Admin ---------- */
.admin { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #0f2440; color: #a9bad2; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { padding: 4px 8px 18px; }
.admin-side .brand-name { color: #fff; font-size: 16px; }
.admin-group { margin: 14px 0 6px; padding: 0 10px; font-size: 11px; letter-spacing: .12em; color: #5f7797; }
.admin-side a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; color: #c6d3e6;
  font-size: 13.5px; margin-bottom: 2px; font-weight: 500;
}
.admin-side a:hover { background: #16304f; color: #fff; }
.admin-side a.active { background: #1b4f8c; color: #fff; }
.admin-side a .cnt { margin-left: auto; font-family: var(--font-num); font-size: 11px; background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 5px; }
.admin-main { background: var(--bg); padding: 22px 26px 48px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-top h1 { font-size: 22px; }
.admin-top .sub { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.kpi .kl { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; justify-content: space-between; }
.kpi .kv2 { font-family: var(--font-num); font-size: 27px; font-weight: 700; margin: 8px 0 2px; letter-spacing: -.03em; }
.kpi .kd { font-size: 12px; color: var(--ink-3); }
.kpi .kd b { color: var(--down); }
.spark { height: 30px; margin-top: 8px; }

/* ---------- 18. Misc ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.proto-ribbon {
  background: #fdf6e3; border-bottom: 1px solid #f2e3bb; color: #8a6d1f;
  font-size: 12px; text-align: center; padding: 6px 14px; letter-spacing: .01em;
}
.proto-ribbon strong { color: #7a5c10; }
.cat-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 18px; }
.ind-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 8px; color: var(--ink-2); transition: .14s;
}
.ind-item:hover { background: var(--surface-3); color: var(--brand); }
.ind-item .ind-n { font-weight: 600; font-size: 14px; }
.ind-item .ind-c { color: var(--ink-4); font-size: 12px; }
.tag-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; }
.pager a, .pager span {
  min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13.5px; font-family: var(--font-num); padding: 0 8px;
}
.pager a:hover { border-color: var(--brand-100); color: var(--brand); }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hl-mark { background: linear-gradient(transparent 58%, #fde9b8 58%); padding: 0 1px; }
.hero-band {
  background: linear-gradient(115deg, #10294a 0%, #1b4f8c 100%);
  color: #fff; border-radius: var(--r-lg); padding: 34px 36px; position: relative; overflow: hidden;
}
.hero-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
}
.hero-band h3 { color: #fff; font-size: 22px; margin-bottom: 10px; }
.hero-band p { color: #c6d3e6; font-size: 14px; line-height: 1.8; max-width: 58ch; }
.hero-band .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); color: #fff; }
.hero-band .btn:hover { background: rgba(255,255,255,.2); }

.notice { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.notice svg { flex: none; margin-top: 2px; color: var(--ink-3); }

/* ---------- 19. Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* skeleton / empty states */
.skeleton { background: linear-gradient(90deg, #eef1f5 25%, #f6f8fa 37%, #eef1f5 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty-state .eic { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; margin: 0 auto 14px; color: var(--ink-4); }

/* ---------- 19b. Tabs / filter bar ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tab-btn {
  appearance: none; border: 0; background: transparent; padding: 13px 14px; margin-bottom: -1px;
  font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 7px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab-btn .n { font-family: var(--font-num); font-size: 11px; background: var(--surface-3); color: var(--ink-3); border-radius: 5px; padding: 1px 6px; }
.tab-btn.on .n { background: var(--brand-50); color: var(--brand); }

.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.filter-bar .lb { font-size: 12.5px; color: var(--ink-3); }

/* search results */
.result-group + .result-group { margin-top: 22px; }
.result-group-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.result-group-hd .gt { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.result-group-hd .gc { font-family: var(--font-num); font-size: 12px; color: var(--ink-3); }
.result-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.result-row:last-child { border-bottom: 0; }
.result-row .avatar { width: 42px; height: 42px; }
.result-row .rbody { flex: 1; min-width: 0; }
.result-row .rt { font-size: 16px; font-weight: 700; line-height: 1.4; }
.result-row .rt a { color: var(--ink); }
.result-row .rt a:hover { color: var(--brand); }
.result-row .rd { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.65; }
.result-row .rm { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
mark { background: #fde9b8; color: inherit; padding: 0 1px; border-radius: 3px; }

/* stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.stat-strip .st { background: #fff; padding: 14px 16px; }
.stat-strip .st .sn { font-size: 12.5px; color: var(--ink-3); }
.stat-strip .st .sv { font-family: var(--font-num); font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }

/* timeline horizontal */
.tl-h { display: flex; gap: 0; overflow-x: auto; padding: 8px 0 4px; }
.tl-h .hitem { min-width: 190px; flex: 1; position: relative; padding: 0 18px 0 0; }
.tl-h .hitem::before { content: ""; position: absolute; left: 7px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-500); }
.tl-h .hitem::after { content: ""; position: absolute; left: 17px; right: 0; top: 9px; height: 2px; background: var(--line); }
.tl-h .hitem:last-child::after { display: none; }
.tl-h .ht { padding-left: 24px; }
.tl-h .hd { font-family: var(--font-num); font-size: 12px; color: var(--brand); font-weight: 700; }
.tl-h .hn { font-size: 13.5px; font-weight: 600; margin-top: 4px; line-height: 1.5; }
.tl-h .hs { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 20. Responsive ---------- */
@media (max-width: 1080px) {
  .cols, .cols-3 { grid-template-columns: 1fr; }
  .side { position: static; }
  .header-inner { grid-template-columns: auto 1fr; grid-template-areas: "brand search" "nav nav"; height: auto; padding: 12px 0 10px; gap: 12px 16px; }
  .brand { grid-area: brand; } .nav { grid-area: nav; overflow-x: auto; } .search { grid-area: search; }
  .entity-grid, .entity-grid.four { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-cols { grid-template-columns: repeat(3, 1fr); }
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
}
@media (max-width: 640px) {
  .container, .container-wide { padding: 0 14px; }
  .entity-grid, .entity-grid.two, .entity-grid.four { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-cols { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .tabs { overflow-x: auto; }
  .topbar .container-wide { gap: 12px; }
  .topbar-date, .topbar-links span.hide-sm { display: none; }
  .section-head h2 { font-size: 18px; }
}

/* ---------- 21. Jev 决策层 ---------- */
.jev-note {
  display: flex; gap: 10px; align-items: flex-start; background: var(--brand-50);
  border: 1px solid var(--brand-100); border-radius: var(--r); padding: 14px 16px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
}
.jev-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.jev-layer {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px; position: relative;
}
.jev-layer h4 { font-size: 14px; margin-bottom: 7px; }
.jev-layer p { font-size: 12px; color: var(--ink-3); line-height: 1.65; }
.jev-layer .who {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 600;
  color: var(--ink-4); letter-spacing: .02em;
}
.jev-layer.ai {
  border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50);
  background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
}
.jev-layer.ai h4 { color: var(--brand); }
.jev-layer.ai .who { color: var(--brand-500); }
.jev-flow .jev-layer:not(:last-child)::after {
  content: "\2192"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  color: var(--brand-500); font-size: 15px; font-weight: 700; z-index: 2;
}
.jev-q {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.jev-q.choice { background: #e8f0fa; color: #1b4f8c; }
.jev-q.score  { background: #fbf1e3; color: #b45309; }
.jev-q.noul   { background: #e3f5f1; color: #0f7a6b; }
.gate {
  display: inline-flex; align-items: center; height: 21px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.gate-auto   { background: #ecfaf3; color: #128a5a; }
.gate-flag   { background: #fbf4e4; color: #b07d1f; }
.gate-review { background: #fdf1f0; color: #d92d20; }
.jev-code {
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.85; color: var(--ink); overflow-x: auto; margin: 0;
}
.jev-code .c { color: var(--ink-3); }
.jev-code .k { color: var(--brand-500); }
.jev-code .s { color: var(--c-news); }
.jev-steps { counter-reset: js; display: grid; gap: 12px; }
.jev-steps li { list-style: none; position: relative; padding-left: 38px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.jev-steps li::before {
  counter-increment: js; content: counter(js); position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 12px; display: grid; place-items: center; font-weight: 700;
}
.jev-steps li b { color: var(--ink); }
@media (max-width: 1100px) {
  .jev-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jev-flow .jev-layer::after { display: none; }
}
@media (max-width: 720px) {
  .jev-flow { grid-template-columns: 1fr; }
}
