/* ==========================================================================
   ScholarKG · 学术圈人物百科
   零依赖手写样式：单文件、无字体外链，小主机上首屏渲染极快
   ========================================================================== */

:root{
  --brand:        #12315c;
  --brand-2:      #1d4ed8;
  --accent:       #2563eb;
  --accent-soft:  #e8f0fe;
  --ink:          #16202e;
  --ink-2:        #46566b;
  --ink-3:        #7b8a9e;
  --line:         #e3e9f1;
  --line-2:       #eef2f7;
  --bg:           #f5f8fc;
  --card:         #ffffff;
  --danger:       #d92d20;
  --warn:         #d97706;
  --ok:           #059669;
  --gold:         #b8860b;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 2px rgba(16,32,64,.05), 0 4px 16px rgba(16,32,64,.05);
  --shadow-lg:    0 4px 12px rgba(16,32,64,.08), 0 16px 40px rgba(16,32,64,.10);
  --maxw:         1240px;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Source Han Sans SC",sans-serif;
  -webkit-font-smoothing:antialiased;
  display:flex; flex-direction:column; min-height:100vh;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
button,input,select,textarea{font:inherit; color:inherit}
h1,h2,h3,h4{margin:0; font-weight:650; letter-spacing:-.01em; line-height:1.3}
p{margin:0 0 .8em}
ul{margin:0; padding:0; list-style:none}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 20px; width:100%}

/* ------------------------------------------------------------ 头部 */
.site-header{
  position:sticky; top:0; z-index:50; background:#fff;
  border-bottom:1px solid var(--line);
}
.header-inner{display:flex; align-items:center; gap:18px; height:62px}
.brand{display:flex; align-items:center; gap:10px; color:var(--brand); flex:0 0 auto}
.brand-mark{width:30px; height:30px}
.brand-text{display:flex; flex-direction:column; line-height:1.15}
.brand-text strong{font-size:16px; letter-spacing:-.02em}
.brand-text em{font-size:11px; font-style:normal; color:var(--ink-3); letter-spacing:.02em}

.header-search{position:relative; flex:1 1 auto; max-width:460px; margin-left:auto}
.header-search .hs-icon{
  position:absolute; left:11px; top:50%; transform:translateY(-50%);
  width:17px; height:17px; color:var(--ink-3); pointer-events:none;
}
.header-search input{
  width:100%; height:38px; padding:0 14px 0 34px;
  border:1px solid var(--line); border-radius:999px; background:var(--bg);
  outline:none; transition:border-color .15s, background .15s, box-shadow .15s;
}
.header-search input:focus{
  background:#fff; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.suggest-box{
  position:absolute; top:44px; left:0; right:0; background:#fff; z-index:60;
  border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-lg); overflow:hidden; max-height:380px; overflow-y:auto;
}
.suggest-item{display:flex; align-items:center; gap:10px; padding:9px 13px; cursor:pointer; border-bottom:1px solid var(--line-2)}
.suggest-item:last-child{border-bottom:none}
.suggest-item:hover,.suggest-item.on{background:var(--accent-soft)}
.suggest-item img{width:32px; height:32px; border-radius:50%; object-fit:cover; background:var(--line-2)}
.suggest-item .sg-av{width:32px; height:32px; border-radius:50%; background:var(--brand); color:#fff; display:grid; place-items:center; font-size:13px; font-weight:600}
.suggest-item .sg-txt{min-width:0; flex:1}
.suggest-item .sg-name{font-weight:600; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.suggest-item .sg-sub{font-size:12px; color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

.header-nav{display:flex; gap:2px; flex:0 0 auto}
.header-nav a{
  padding:7px 11px; border-radius:var(--radius-sm); font-size:14px;
  color:var(--ink-2); white-space:nowrap; transition:background .15s,color .15s;
}
.header-nav a:hover{background:var(--bg); color:var(--brand)}
.header-nav a.on{color:var(--accent); font-weight:600; background:var(--accent-soft)}
.header-nav .nav-admin{color:var(--ink-3); font-size:13px}
.nav-toggle{display:none; background:none; border:1px solid var(--line); border-radius:8px; width:38px; height:34px; padding:8px 9px; flex-direction:column; justify-content:space-between; cursor:pointer}
.nav-toggle span{display:block; height:1.5px; background:var(--ink-2); border-radius:2px}

.site-main{flex:1 1 auto}

/* ------------------------------------------------------------ Hero */
.hero{
  background:
    radial-gradient(1200px 380px at 12% -10%, rgba(37,99,235,.28), transparent 60%),
    radial-gradient(900px 320px at 88% 0%, rgba(14,165,233,.20), transparent 60%),
    linear-gradient(160deg,#0e2a52 0%,#12315c 45%,#173e73 100%);
  color:#fff; padding:54px 0 62px; position:relative; overflow:hidden;
}
.hero::after{
  content:""; position:absolute; inset:0; opacity:.5;
  background-image:radial-gradient(circle at 1px 1px, rgba(255,255,255,.14) 1px, transparent 0);
  background-size:26px 26px;
}
.hero .wrap{position:relative; z-index:1}
.hero h1{font-size:38px; margin-bottom:12px; letter-spacing:-.025em}
.hero p.lead{font-size:16px; color:rgba(255,255,255,.78); max-width:620px; margin-bottom:26px}

.hero-search{
  display:flex; gap:8px; max-width:640px; background:rgba(255,255,255,.1);
  padding:7px; border-radius:14px; backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.18);
}
.hero-search input{
  flex:1; height:46px; padding:0 16px; border:none; border-radius:10px;
  background:#fff; outline:none; font-size:15px;
  color:#1a2b45;
}
.hero-search input::placeholder{color:#8a97ab}
.hero-search button{
  height:46px; padding:0 26px; border:none; border-radius:10px; cursor:pointer;
  background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; font-weight:600;
  transition:filter .15s, transform .1s;
}
.hero-search button:hover{filter:brightness(1.08)}
.hero-search button:active{transform:translateY(1px)}

.hero-stats{display:flex; gap:34px; margin-top:30px; flex-wrap:wrap}
.hero-stats .hs-item strong{display:block; font-size:26px; letter-spacing:-.02em}
.hero-stats .hs-item span{font-size:13px; color:rgba(255,255,255,.65)}

.hero-tags{display:flex; gap:8px; margin-top:22px; flex-wrap:wrap; align-items:center}
.hero-tags span.hl{font-size:13px; color:rgba(255,255,255,.6)}
.hero-tags a{
  font-size:13px; padding:5px 12px; border-radius:999px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.16);
  transition:background .15s;
}
.hero-tags a:hover{background:rgba(255,255,255,.22)}

/* ------------------------------------------------------------ 通用区块 */
.section{padding:34px 0}
.section-head{display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:16px}
.section-head h2{font-size:20px}
.section-head .sh-sub{font-size:13px; color:var(--ink-3)}
.section-head .more{font-size:13px; color:var(--accent); white-space:nowrap}
.section-head .more:hover{text-decoration:underline}

.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow)}
.pad{padding:18px}
.grid{display:grid; gap:16px}

/* ------------------------------------------------------------ 首页布局 */
.home-grid{display:grid; grid-template-columns:1fr 380px; gap:22px; align-items:start}

/* 图谱预览 */
.graph-preview{position:relative; height:430px; border-radius:var(--radius); overflow:hidden;
  background:radial-gradient(circle at 50% 40%, #14325e 0%, #0a1a33 100%);}
.graph-preview .gp-overlay{
  position:absolute; left:16px; bottom:16px; z-index:5; color:#fff;
  text-shadow:0 1px 6px rgba(0,0,0,.5);
}
.graph-preview .gp-overlay strong{display:block; font-size:15px}
.graph-preview .gp-overlay span{font-size:12px; opacity:.75}
.graph-preview .gp-enter{
  position:absolute; right:14px; top:14px; z-index:5;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.25);
  color:#fff; padding:7px 14px; border-radius:999px; font-size:13px;
  backdrop-filter:blur(6px); transition:background .15s;
}
.graph-preview .gp-enter:hover{background:rgba(255,255,255,.26)}

/* 资讯列表 */
.news-list{display:flex; flex-direction:column}
.news-item{
  display:flex; gap:12px; padding:13px 0; border-bottom:1px solid var(--line-2);
  align-items:flex-start;
}
.news-item:last-child{border-bottom:none}
.news-item:hover .ni-title{color:var(--accent)}
.ni-badge{
  flex:0 0 auto; margin-top:2px; font-size:11px; padding:3px 8px; border-radius:6px;
  font-weight:600; white-space:nowrap;
}
.ni-body{min-width:0; flex:1}
.ni-title{
  font-size:14.5px; font-weight:550; line-height:1.5; color:var(--ink);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  transition:color .15s;
}
.ni-meta{display:flex; gap:10px; margin-top:5px; font-size:12px; color:var(--ink-3); flex-wrap:wrap; align-items:center}
.ni-sum{
  margin-top:6px; font-size:13px; color:var(--ink-2); line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

.badge{font-size:11px; padding:2px 7px; border-radius:5px; font-weight:600; white-space:nowrap}
.badge-funding{background:#fef3f2; color:#b42318}
.badge-news{background:#eff8ff; color:#175cd3}
.badge-policy{background:#f4f3ff; color:#5925dc}
.badge-notice{background:#fff6ed; color:#c4320a}
.badge-conference{background:#ecfdf3; color:#027a48}
.badge-job{background:#fdf2fa; color:#a11043}
.badge-other{background:#f2f4f7; color:#475467}

.deadline-chip{
  font-size:11.5px; padding:2px 8px; border-radius:999px; font-weight:600;
  display:inline-flex; align-items:center; gap:4px;
}
.dl-danger{background:#fef3f2; color:#b42318; border:1px solid #fecdca}
.dl-warn{background:#fffaeb; color:#b54708; border:1px solid #fedf89}
.dl-normal{background:#f2f4f7; color:#475467; border:1px solid var(--line)}

/* 侧栏卡 */
.side-card{margin-bottom:18px}
.side-card h3{font-size:15px; padding:14px 16px; border-bottom:1px solid var(--line-2); display:flex; align-items:center; gap:8px}
.side-card h3 .dot{width:7px; height:7px; border-radius:50%; background:var(--accent)}
.side-card .sc-body{padding:6px 16px 12px}

/* 榜单 */
.rank-list li{display:flex; align-items:center; gap:11px; padding:9px 0; border-bottom:1px solid var(--line-2)}
.rank-list li:last-child{border-bottom:none}
.rank-num{
  flex:0 0 22px; height:22px; border-radius:6px; display:grid; place-items:center;
  font-size:12px; font-weight:700; background:var(--line-2); color:var(--ink-2);
}
.rank-list li:nth-child(1) .rank-num{background:#fff7e6; color:#b54708}
.rank-list li:nth-child(2) .rank-num{background:#f2f4f7; color:#475467}
.rank-list li:nth-child(3) .rank-num{background:#fef0e7; color:#9a3412}
.rank-body{min-width:0; flex:1}
.rank-name{font-size:14px; font-weight:550; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rank-name:hover{color:var(--accent)}
.rank-sub{font-size:12px; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rank-val{font-size:12px; color:var(--ink-3); font-variant-numeric:tabular-nums}

/* ------------------------------------------------------------ 人物卡 */
.person-grid{grid-template-columns:repeat(auto-fill,minmax(232px,1fr))}
.person-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; display:flex; flex-direction:column; gap:10px;
  transition:transform .16s, box-shadow .16s, border-color .16s;
}
.person-card:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:#cfdcef}
.pc-top{display:flex; gap:12px; align-items:center}
.pc-av{
  width:52px; height:52px; border-radius:50%; object-fit:cover; flex:0 0 auto;
  background:linear-gradient(135deg,#1d4ed8,#0ea5e9); color:#fff;
  display:grid; place-items:center; font-size:19px; font-weight:600;
}
.pc-name{font-size:15.5px; font-weight:650; line-height:1.3}
.pc-name:hover{color:var(--accent)}
.pc-org{font-size:12.5px; color:var(--ink-3); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.pc-headline{
  font-size:13px; color:var(--ink-2); line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; min-height:2.4em;
}
.pc-tags{display:flex; flex-wrap:wrap; gap:5px; margin-top:auto}
.tag{font-size:11.5px; padding:2.5px 8px; border-radius:6px; background:var(--bg); color:var(--ink-2); border:1px solid var(--line-2)}
.tag-blue{background:var(--accent-soft); color:var(--accent); border-color:#cfe0fd}
.pc-foot{display:flex; gap:12px; font-size:12px; color:var(--ink-3); border-top:1px solid var(--line-2); padding-top:9px}

/* ------------------------------------------------------------ 人物详情 */
.person-hero{background:linear-gradient(170deg,#0e2a52,#173e73); color:#fff; padding:30px 0 26px}
.person-hero .ph-inner{display:flex; gap:22px; align-items:flex-start}
.ph-av{
  width:112px; height:112px; border-radius:18px; object-fit:cover; flex:0 0 auto;
  background:rgba(255,255,255,.14); border:2px solid rgba(255,255,255,.2);
  display:grid; place-items:center; font-size:40px; font-weight:600; overflow:hidden;
}
.ph-main{flex:1; min-width:0}
.ph-name{font-size:29px; letter-spacing:-.02em; display:flex; align-items:center; gap:11px; flex-wrap:wrap}
.ph-name .ph-en{font-size:15px; font-weight:400; color:rgba(255,255,255,.6)}
.ph-headline{color:rgba(255,255,255,.85); margin-top:8px; font-size:15px; max-width:760px}
.ph-meta{display:flex; gap:20px; margin-top:16px; flex-wrap:wrap}
.ph-meta div span{display:block; font-size:11.5px; color:rgba(255,255,255,.55); margin-bottom:2px}
.ph-meta div strong{font-size:14.5px; font-weight:600}

.detail-grid{display:grid; grid-template-columns:1fr 320px; gap:22px; align-items:start; padding:26px 0 40px}
.block{margin-bottom:20px}
.block h3{
  font-size:16px; margin-bottom:12px; display:flex; align-items:center; gap:8px;
  padding-bottom:9px; border-bottom:1px solid var(--line-2);
}
.block h3::before{content:""; width:3px; height:14px; background:var(--accent); border-radius:2px}
.block p{color:var(--ink-2); line-height:1.75}

/* 师承树 */
.tree{position:relative; padding-left:4px}
.tree-node{
  display:flex; align-items:center; gap:10px; padding:7px 10px; border-radius:9px;
  transition:background .14s; border-left:2px solid transparent;
}
.tree-node:hover{background:var(--bg)}
.tree-node.is-root{background:var(--accent-soft); border-left-color:var(--accent); font-weight:600}
.tree-lvl{font-size:11px; color:var(--ink-3); flex:0 0 34px; font-variant-numeric:tabular-nums}
.tree-dot{width:7px; height:7px; border-radius:50%; background:var(--accent); flex:0 0 auto}
.tree-node.is-root .tree-dot{background:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.18)}
.tree-av{width:30px; height:30px; border-radius:50%; object-fit:cover; background:var(--line-2); flex:0 0 auto}
.tree-name{font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tree-name:hover{color:var(--accent)}
.tree-year{font-size:12px; color:var(--ink-3); flex:0 0 auto; margin-left:auto}
.tree-empty{color:var(--ink-3); font-size:13.5px; padding:8px 0}

/* 关系分组 */
.rel-group{margin-bottom:16px}
.rel-group h4{font-size:13px; color:var(--ink-2); margin-bottom:9px; display:flex; align-items:center; gap:7px}
.rel-group h4 .rg-count{font-size:11.5px; color:var(--ink-3); font-weight:400}
.rel-chips{display:flex; flex-wrap:wrap; gap:8px}
.rel-chip{
  display:inline-flex; align-items:center; gap:7px; padding:6px 12px 6px 7px;
  border:1px solid var(--line); border-radius:999px; background:#fff; font-size:13.5px;
  transition:border-color .15s, box-shadow .15s;
}
.rel-chip:hover{border-color:var(--accent); box-shadow:0 2px 8px rgba(37,99,235,.12)}
.rel-chip img{width:24px; height:24px; border-radius:50%; object-fit:cover}
.rel-chip .rc-av{width:24px; height:24px; border-radius:50%; background:var(--brand); color:#fff; display:grid; place-items:center; font-size:11px; font-weight:600}
.rel-chip .rc-label{color:var(--ink-3); font-size:11.5px}

/* 侧栏信息 */
.info-row{display:flex; padding:9px 0; border-bottom:1px solid var(--line-2); font-size:14px; gap:12px}
.info-row:last-child{border-bottom:none}
.info-row .ir-k{color:var(--ink-3); flex:0 0 84px; font-size:13.5px}
.info-row .ir-v{flex:1; min-width:0; word-break:break-word}

/* ------------------------------------------------------------ 图谱页 */
.graph-page{display:flex; flex-direction:column; height:calc(100vh - 62px)}
.graph-toolbar{
  display:flex; gap:14px; align-items:center; padding:10px 18px; background:#fff;
  border-bottom:1px solid var(--line); flex-wrap:wrap;
}
.gt-group{display:flex; align-items:center; gap:7px}
.gt-group > label{font-size:12.5px; color:var(--ink-3); white-space:nowrap}
.gt-sep{width:1px; height:22px; background:var(--line)}
.gt-search{position:relative}
.gt-search input{
  height:34px; padding:0 12px 0 32px; border:1px solid var(--line);
  border-radius:8px; background:var(--bg); outline:none; width:210px;
}
.gt-search input:focus{background:#fff; border-color:var(--accent)}
.gt-search svg{position:absolute; left:10px; top:50%; transform:translateY(-50%); width:15px; height:15px; color:var(--ink-3)}
.gt-search .suggest-box{top:38px; width:300px}

.chip-toggle{
  padding:5px 11px; border:1px solid var(--line); border-radius:999px; background:#fff;
  font-size:12.5px; cursor:pointer; transition:all .14s; user-select:none;
}
.chip-toggle:hover{border-color:var(--accent)}
.chip-toggle.on{background:var(--accent); border-color:var(--accent); color:#fff}

.btn{
  height:34px; padding:0 15px; border:1px solid var(--line); border-radius:8px;
  background:#fff; cursor:pointer; font-size:13.5px; transition:all .14s;
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
.btn:hover{border-color:var(--accent); color:var(--accent)}
.btn-primary{background:var(--accent); border-color:var(--accent); color:#fff}
.btn-primary:hover{background:var(--brand-2); border-color:var(--brand-2); color:#fff}
.btn-sm{height:30px; padding:0 11px; font-size:12.5px}
.btn-danger:hover{border-color:var(--danger); color:var(--danger)}

.graph-body{flex:1; display:flex; min-height:0; position:relative}
#cy{flex:1; background:radial-gradient(circle at 50% 45%, #10294d 0%, #071426 100%); min-height:0}
.graph-side{
  width:0; overflow:hidden; background:#fff; border-left:1px solid var(--line);
  transition:width .22s ease; flex:0 0 auto;
}
.graph-side.open{width:330px; overflow-y:auto}
.gs-inner{padding:16px; width:330px}
.gs-close{position:absolute; right:12px; top:12px; background:none; border:none; cursor:pointer; color:var(--ink-3); font-size:20px; line-height:1}

.graph-legend{
  position:absolute; left:14px; bottom:14px; z-index:6; background:rgba(255,255,255,.94);
  border:1px solid var(--line); border-radius:10px; padding:10px 13px; font-size:12px;
  backdrop-filter:blur(8px); box-shadow:var(--shadow);
}
.graph-legend h5{margin:0 0 7px; font-size:12px; color:var(--ink-2)}
.gl-row{display:flex; align-items:center; gap:7px; margin:4px 0; color:var(--ink-2)}
.gl-line{width:22px; height:2px; border-radius:2px; flex:0 0 auto}

.graph-hint{
  position:absolute; right:14px; bottom:14px; z-index:6; font-size:11.5px;
  color:rgba(255,255,255,.45); text-align:right; line-height:1.7; pointer-events:none;
}

.cy-loading{
  position:absolute; inset:0; display:grid; place-items:center; z-index:10;
  color:rgba(255,255,255,.65); font-size:14px; background:rgba(7,20,38,.55);
}
.spinner{
  width:26px; height:26px; border:2.5px solid rgba(255,255,255,.2);
  border-top-color:#fff; border-radius:50%; animation:spin .8s linear infinite; margin:0 auto 10px;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ------------------------------------------------------------ 搜索页 */
.search-head{padding:26px 0 6px}
.search-head h1{font-size:22px; margin-bottom:6px}
.search-head .sh-meta{font-size:13.5px; color:var(--ink-3)}
.result-tabs{display:flex; gap:4px; margin:16px 0 4px; border-bottom:1px solid var(--line); flex-wrap:wrap}
.result-tabs a{
  padding:9px 15px; font-size:14px; color:var(--ink-2); border-bottom:2px solid transparent;
  margin-bottom:-1px; transition:color .15s, border-color .15s;
}
.result-tabs a:hover{color:var(--brand)}
.result-tabs a.on{color:var(--accent); font-weight:600; border-bottom-color:var(--accent)}

.result-item{padding:15px 0; border-bottom:1px solid var(--line-2); display:flex; gap:13px}
.result-item:last-child{border-bottom:none}
.ri-av{width:46px; height:46px; border-radius:50%; object-fit:cover; flex:0 0 auto; background:var(--line-2)}
.ri-body{flex:1; min-width:0}
.ri-title{font-size:16px; font-weight:600; margin-bottom:4px}
.ri-title:hover{color:var(--accent)}
.ri-title mark{background:#fff3bf; color:inherit; padding:0 2px; border-radius:3px}
.ri-desc{font-size:13.5px; color:var(--ink-2); line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.ri-meta{display:flex; gap:12px; margin-top:6px; font-size:12px; color:var(--ink-3); flex-wrap:wrap}

.empty-state{text-align:center; padding:60px 20px; color:var(--ink-3)}
.empty-state .es-icon{font-size:44px; margin-bottom:12px; opacity:.35}
.empty-state h3{font-size:17px; color:var(--ink-2); margin-bottom:8px}
.empty-state p{font-size:14px; margin-bottom:18px}

/* ------------------------------------------------------------ 分页 */
.pager{display:flex; gap:6px; justify-content:center; align-items:center; padding:26px 0; flex-wrap:wrap}
.pager a,.pager span{
  min-width:36px; height:36px; padding:0 11px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:8px; background:#fff; font-size:13.5px; color:var(--ink-2);
}
.pager a:hover{border-color:var(--accent); color:var(--accent)}
.pager .on{background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}
.pager .gap{border:none; background:none}

/* ------------------------------------------------------------ 后台 */
.admin-wrap{display:grid; grid-template-columns:190px 1fr; gap:24px; padding:24px 0 50px; align-items:start}
.admin-nav{position:sticky; top:78px}
.admin-nav a{
  display:block; padding:9px 13px; border-radius:8px; font-size:14px; color:var(--ink-2);
  margin-bottom:2px; transition:background .14s;
}
.admin-nav a:hover{background:#fff}
.admin-nav a.on{background:var(--brand); color:#fff; font-weight:600}
.admin-nav .an-title{font-size:11.5px; color:var(--ink-3); padding:12px 13px 6px; text-transform:uppercase; letter-spacing:.06em}

.stat-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); margin-bottom:20px}
.stat-box{background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:16px}
.stat-box .sb-label{font-size:12.5px; color:var(--ink-3); margin-bottom:5px}
.stat-box .sb-value{font-size:25px; font-weight:650; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.stat-box .sb-sub{font-size:12px; color:var(--ink-3); margin-top:3px}

table.tbl{width:100%; border-collapse:collapse; font-size:13.5px}
table.tbl th{
  text-align:left; padding:10px 12px; background:var(--bg); color:var(--ink-2);
  font-weight:600; font-size:12.5px; border-bottom:1px solid var(--line); white-space:nowrap;
}
table.tbl td{padding:10px 12px; border-bottom:1px solid var(--line-2); vertical-align:middle}
table.tbl tr:last-child td{border-bottom:none}
table.tbl tr:hover td{background:#fafcff}
.tbl-actions{display:flex; gap:6px; justify-content:flex-end}

.form-row{margin-bottom:15px}
.form-row label{display:block; font-size:13.5px; font-weight:550; margin-bottom:6px; color:var(--ink-2)}
.form-row .hint{font-size:12px; color:var(--ink-3); font-weight:400; margin-top:4px}
.form-row input[type=text],.form-row input[type=url],.form-row input[type=number],
.form-row select,.form-row textarea{
  width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:8px;
  background:#fff; outline:none; transition:border-color .15s, box-shadow .15s;
}
.form-row input:focus,.form-row select:focus,.form-row textarea:focus{
  border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.1);
}
.form-row textarea{min-height:110px; resize:vertical; line-height:1.65}
.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 16px}
.form-actions{display:flex; gap:10px; padding-top:6px}

.alert{padding:11px 14px; border-radius:9px; font-size:13.5px; margin-bottom:16px; border:1px solid}
.alert-ok{background:#ecfdf3; color:#05603a; border-color:#a6f4c5}
.alert-err{background:#fef3f2; color:#912018; border-color:#fecdca}
.alert-warn{background:#fffaeb; color:#93370d; border-color:#fedf89}
.alert-info{background:#eff8ff; color:#175cd3; border-color:#b2ddff}

.status-dot{display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:6px}
.sd-ok{background:var(--ok)}
.sd-err{background:var(--danger)}
.sd-warn{background:var(--warn)}
.sd-idle{background:var(--ink-3)}

.code-block{
  background:#0f1c2e; color:#d5e2f0; padding:13px 15px; border-radius:9px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:12.5px;
  overflow-x:auto; line-height:1.65; white-space:pre;
}

/* ------------------------------------------------------------ 响应式 */
@media (max-width:1080px){
  .home-grid{grid-template-columns:1fr}
  .detail-grid{grid-template-columns:1fr}
  .side-card:last-child{margin-bottom:0}
}
@media (max-width:900px){
  .header-nav{
    position:absolute; top:62px; left:0; right:0; background:#fff; flex-direction:column;
    padding:8px; border-bottom:1px solid var(--line); box-shadow:var(--shadow);
    display:none; gap:1px;
  }
  .header-nav.open{display:flex}
  .nav-toggle{display:flex}
  .header-search{max-width:none; order:3; flex-basis:100%; margin:0 0 8px}
  .header-inner{flex-wrap:wrap; height:auto; padding-top:10px; padding-bottom:10px}
  .brand{flex:1}
  .hero{padding:38px 0 44px}
  .hero h1{font-size:27px}
  .hero-stats{gap:22px}
  .graph-side.open{width:100%; position:absolute; right:0; top:0; bottom:0; z-index:20}
  .admin-wrap{grid-template-columns:1fr}
  .admin-nav{position:static; display:flex; overflow-x:auto; gap:6px; padding-bottom:6px}
  .admin-nav a{white-space:nowrap; margin-bottom:0}
  .admin-nav .an-title{display:none}
  .form-grid{grid-template-columns:1fr}
  .person-hero .ph-inner{flex-direction:column; align-items:center; text-align:center}
  .ph-meta{justify-content:center}
}
@media (max-width:560px){
  .wrap{padding:0 14px}
  .hero h1{font-size:23px}
  .hero-search{flex-direction:column; border-radius:12px}
  .hero-search button{width:100%}
  .person-grid{grid-template-columns:1fr 1fr}
  .person-card{padding:12px}
  .pc-av{width:42px; height:42px; font-size:16px}
  .section-head h2{font-size:17px}
}

/* ==========================================================================
   首页 v2：图谱主视觉版（桌面优先）
   ========================================================================== */

/* -- 紧凑居中 hero -- */
.hero-v2{padding:52px 0 34px}
.hero-v2-inner{text-align:center; max-width:760px; margin:0 auto}
.hero-v2 h1{font-size:36px; margin-bottom:10px; letter-spacing:-.025em}
.hero-v2 .lead{margin:0 auto 24px; font-size:15px}
.hero-v2 .lead strong{color:#fff; font-weight:700}
.hero-v2 .hero-search{max-width:620px; margin:0 auto; display:flex}
.hero-v2 .hero-tags{justify-content:center}
.hsearch-icon{position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:18px; height:18px; color:rgba(255,255,255,.55); pointer-events:none}
.hero-v2 .hero-search{position:relative}
.hero-v2 .hero-search input{padding-left:42px}

/* -- 全宽图谱主视觉卡 -- */
.graph-hero-card{
  background:linear-gradient(180deg,#0b1c33 0%,#0e2340 100%);
  border:1px solid rgba(255,255,255,.08);
  border-radius:calc(var(--radius) + 4px);
  overflow:hidden;
  box-shadow:0 20px 50px -18px rgba(4,16,34,.55);
}
.gh-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; border-bottom:1px solid rgba(255,255,255,.07);
}
.gh-title{display:flex; align-items:baseline; gap:10px; color:#e7effb}
.gh-title strong{font-size:16px}
.gh-sub{font-size:12.5px; color:rgba(231,239,251,.55)}
.gh-pulse{
  width:8px; height:8px; border-radius:50%; background:#34d399;
  align-self:center; box-shadow:0 0 0 0 rgba(52,211,153,.5);
  animation:ghPulse 2.2s infinite;
}
@keyframes ghPulse{
  0%{box-shadow:0 0 0 0 rgba(52,211,153,.45)}
  70%{box-shadow:0 0 0 9px rgba(52,211,153,0)}
  100%{box-shadow:0 0 0 0 rgba(52,211,153,0)}
}
.gh-more{
  font-size:13px; color:#93c5fd; text-decoration:none; white-space:nowrap;
}
.gh-more:hover{color:#bfdbfe; text-decoration:underline}

.graph-hero{
  position:relative; height:600px; background:
    radial-gradient(1200px 500px at 50% -10%, rgba(59,130,246,.14), transparent 60%),
    #081527;
}
.graph-hero .gh-overlay{
  position:absolute; left:50%; top:18px; transform:translateX(-50%);
  background:rgba(8,21,39,.72); border:1px solid rgba(255,255,255,.1);
  color:rgba(231,239,251,.75); font-size:12.5px;
  padding:6px 14px; border-radius:999px; pointer-events:none; backdrop-filter:blur(4px);
}
.graph-hero .gh-overlay strong{font-weight:500}

.gh-legend{
  display:flex; gap:20px; align-items:center;
  padding:10px 20px; border-top:1px solid rgba(255,255,255,.07);
  font-size:12.5px; color:rgba(231,239,251,.6);
}
.gh-legend span{display:inline-flex; align-items:center; gap:6px}
.lg-dot{width:10px; height:10px; border-radius:50%; display:inline-block}
.lg-blue{background:#3b82f6}
.lg-amber{background:#f59e0b}
.lg-red{background:#ef4444}
.lg-line{color:rgba(231,239,251,.45)}

/* -- 次级三栏 -- */
.home-cols{display:grid; grid-template-columns:1fr 1fr 1fr; gap:20px; align-items:start}
.home-cols .sc-more{
  display:block; margin-top:12px; padding-top:10px;
  border-top:1px dashed var(--line); font-size:13px; color:var(--brand);
  text-decoration:none;
}
.home-cols .sc-more:hover{text-decoration:underline}

@media (max-width:1020px){
  .home-cols{grid-template-columns:1fr}
  .graph-hero{height:440px}
  .hero-v2 h1{font-size:28px}
}

/* 来源彩色圆点：每个资讯源一个固定色相，方便区分不同来源 */
.src-dot{
  display:inline-block; width:7px; height:7px; border-radius:50%;
  margin-right:2px; vertical-align:1px; flex:none;
}

/* ===== 人物页：五维画像 / 代表作 / 名言 ===== */
.radar-wrap{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}
.radar-wrap svg{width:320px;max-width:100%;height:auto;flex:0 0 auto}
.radar-note{flex:1 1 180px;min-width:170px}
.radar-note .info-row{border-bottom:1px dashed var(--line,#e5ecf5);padding:4px 0}
.radar-note-txt{font-size:12.5px;color:var(--ink-3);margin:8px 0 0;line-height:1.6}
.work-list{margin:0;padding:0;list-style:none;counter-reset:wk}
.work-item{padding:10px 0;border-bottom:1px dashed var(--line,#e5ecf5)}
.work-item:last-child{border-bottom:0}
.work-title{font-weight:600;font-size:14.5px}
.work-title a{color:var(--accent)}
.work-meta{display:flex;gap:10px;font-size:12.5px;color:var(--ink-3);margin-top:3px}
.work-desc{font-size:13px;color:var(--ink-2);margin:5px 0 0;line-height:1.6}
.quote-list{display:flex;flex-direction:column;gap:12px}
.quote-item{margin:0;padding:12px 16px;background:var(--panel-2,#f6f9fd);
  border-left:3px solid var(--accent,#2563eb);border-radius:0 8px 8px 0}
.quote-item p{margin:0;font-size:14px;line-height:1.75;color:var(--ink-1)}
.quote-item footer{margin-top:6px;font-size:12.5px;color:var(--ink-3)}

/* ==================== 页脚 ==================== */
.site-footer{
  margin-top:56px;
  background:linear-gradient(180deg,#0d2240 0%,#0b1c33 100%);
  color:#c3d2e6;
  border-top:1px solid rgba(255,255,255,.08);
}
.footer-inner{
  display:grid;
  grid-template-columns:1.4fr 1fr 1.4fr;
  gap:40px;
  padding:40px 0 30px;
}
.footer-brand{display:flex; align-items:flex-start; gap:12px}
.footer-brand .brand-mark{width:34px; height:34px; color:#8fb3e8; flex:none}
.footer-brand strong{display:block; font-size:18px; color:#fff; letter-spacing:.02em}
.footer-brand em{display:block; font-style:normal; font-size:13px; color:#8fa5c2; margin-top:4px}
.footer-col h4{
  margin:0 0 12px; font-size:13.5px; color:#fff;
  letter-spacing:.06em; font-weight:600;
}
.footer-col a{
  display:block; padding:4px 0; font-size:13.5px; color:#b6c8de;
  text-decoration:none; transition:color .15s;
}
.footer-col a:hover{color:#fff}
.footer-note{font-size:12.5px; line-height:1.7; color:#8fa5c2; margin:0 0 10px}
.footer-bottom{
  display:flex; flex-wrap:wrap; gap:6px 18px; justify-content:space-between;
  padding:16px 0 22px; border-top:1px solid rgba(255,255,255,.08);
  font-size:12.5px; color:#7f95b3;
}
@media (max-width:760px){
  .footer-inner{grid-template-columns:1fr; gap:24px; padding:32px 0 20px}
  .footer-bottom{flex-direction:column; gap:4px}
}

/* ==================== 大众评分 ==================== */
.rate-stars .rate-star,
.rate-widget .rate-star{font-size:16px;color:#c9d3e0;cursor:default;line-height:1}
.rate-stars .rate-star.on{color:#f5a623}
.rate-widget{margin-top:6px}
.rate-widget .rate-input{cursor:pointer;font-size:22px;transition:transform .1s,color .1s;margin-right:2px}
.rate-widget .rate-input:hover{transform:scale(1.15)}
.rate-widget.done .rate-input{cursor:default;opacity:.75}
.rate-row{display:flex;align-items:center;gap:6px;padding:3px 0}
.rate-row-label{font-size:12.5px;color:var(--ink-2);width:76px;flex:none}
.rate-row .rate-msg{margin-left:auto;white-space:nowrap}
.rate-panel{margin-top:14px;padding:14px 14px 12px;border-radius:12px;
  background:linear-gradient(160deg,#f6f9ff 0%,#fdf8ef 100%);
  border:1px solid #e3ecfa}
.rate-panel-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px}
.rate-panel-title{font-size:14px;font-weight:600;color:#1a2b45}
.rate-panel-title::before{content:'✦';color:#f5a623;margin-right:5px;font-size:12px}
.rate-panel-sub{font-size:12px;color:#98a5b8}
.rate-panel .rate-row-label{color:#41506b}
.rate-panel .rate-star.rate-input{font-size:24px;margin-right:1px}
