/* ==========================================================================
   AI文献检索系统 前端设计系统
   AI Literature Search System — Front-end Design System
   配色沿用 i-CSIR 专科临床科研智能辅助平台（蓝天色 · 专业 · 稳重 · 科技感）
   ========================================================================== */

:root {
  /* ---------- 蓝天色主色阶 ---------- */
  --sky-50:  #F0F7FF;
  --sky-100: #E3EFFE;
  --sky-200: #C7DFFC;
  --sky-300: #97C0F8;
  --sky-400: #5E9EF0;
  --sky-500: #3B82F6;
  --sky-600: #1677FF;
  --sky-700: #1259C4;
  --sky-800: #0E3E8C;
  --sky-900: #0B2E66;
  --sky-950: #081F47;

  /* ---------- 中性色 ---------- */
  --ink-900: #14233A;
  --ink-700: #33465E;
  --ink-600: #4B5E74;
  --ink-400: #7C8FA6;
  --ink-300: #A6B6C9;
  --line:    #E3EDFA;
  --line-2:  #EDF4FD;
  --bg:      #F3F8FE;
  --card:    #FFFFFF;

  /* ---------- 语义标识色 ---------- */
  --hot:      #E53935;
  --warm:     #F79009;
  --cool:     #0FA3A3;
  --green:    #16A34A;
  --purple:   #7C3AED;

  /* ---------- 圆角与阴影 ---------- */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(14, 62, 140, .06), 0 4px 12px rgba(14, 62, 140, .06);
  --shadow-md: 0 6px 24px rgba(14, 62, 140, .10);
  --shadow-lg: 0 16px 48px rgba(14, 62, 140, .14);

  /* ---------- 渐变 ---------- */
  --grad-main: linear-gradient(135deg, #1677FF 0%, #4CA9FF 60%, #7AC0FF 100%);
  --grad-soft: linear-gradient(180deg, #F0F7FF 0%, #E9F3FF 100%);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --header-h: 66px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--sky-600); text-decoration: none; }
a:hover { color: var(--sky-700); }
img { max-width: 100%; display: block; }
/* 内联 SVG 兜底：未被具体规则命中时按当前字号收缩，避免图标撑满容器 */
svg { width: 1em; height: 1em; fill: currentColor; vertical-align: middle; flex-shrink: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; color: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; width: 100%; }
.text-muted { color: var(--ink-400); }
.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;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 255, 255, .90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(227, 237, 250, .9);
}
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--grad-main);
  display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(22, 119, 255, .35);
}
.brand-logo svg { width: 24px; height: 24px; fill: #fff; }
.brand-text b { font-size: 17px; letter-spacing: .5px; color: var(--sky-900); display: block; line-height: 1.2; }
.brand-text span { font-size: 11px; color: var(--ink-400); letter-spacing: 1.6px; text-transform: uppercase; }

.nav-menu { display: flex; gap: 2px; align-items: center; }
.nav-menu a {
  padding: 8px 15px; border-radius: 999px;
  color: var(--ink-600); font-size: 14.5px; font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.nav-menu a:hover { color: var(--sky-700); background: var(--sky-50); }
.nav-menu a.active {
  color: #fff; background: var(--grad-main);
  box-shadow: 0 4px 12px rgba(22, 119, 255, .3);
}

.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-org {
  font-size: 13px; color: var(--ink-600); padding-right: 4px;
  display: flex; align-items: center; gap: 6px;
}
.nav-org svg { width: 15px; height: 15px; fill: var(--sky-500); }
.btn-login {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--sky-300); color: var(--sky-700);
  font-weight: 600; font-size: 13.5px; transition: all .2s;
}
.btn-login:hover { background: var(--sky-600); color: #fff; border-color: var(--sky-600); }
.nav-actions .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-main); color: #fff; font-size: 14px; font-weight: 600;
  display: grid; place-items: center; flex-shrink: 0;
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 600; line-height: 1;
  transition: all .2s; border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.btn-primary { background: var(--grad-main); color: #fff; box-shadow: 0 6px 16px rgba(22,119,255,.30); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(22,119,255,.40); }
.btn-ghost { background: #fff; color: var(--sky-700); border-color: var(--sky-300); }
.btn-ghost:hover { background: var(--sky-50); color: var(--sky-700); border-color: var(--sky-400); }
.btn-plain { background: var(--sky-50); color: var(--sky-700); border-color: var(--sky-100); }
.btn-plain:hover { background: var(--sky-100); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 7px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ==========================================================================
   首页 Hero
   ========================================================================== */
.hero {
  position: relative;
  background:
    radial-gradient(820px 320px at 12% -10%, rgba(91, 165, 255, .32), transparent 60%),
    radial-gradient(720px 300px at 88% -20%, rgba(122, 192, 255, .28), transparent 60%),
    var(--grad-soft);
  padding: 48px 0 58px;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before {
  width: 360px; height: 360px; right: -130px; top: -130px;
  border: 1px solid rgba(22, 119, 255, .12);
  box-shadow: 0 0 0 48px rgba(22, 119, 255, .05), 0 0 0 96px rgba(22, 119, 255, .03);
}
.hero::after {
  width: 240px; height: 240px; left: -90px; bottom: -100px;
  background: radial-gradient(circle, rgba(122, 192, 255, .18), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,.75); border: 1px solid var(--sky-200);
  color: var(--sky-700); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sky-500); animation: pulse 2s infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,.5); }
  50%    { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}
.hero h1 { font-size: 34px; font-weight: 700; letter-spacing: .8px; color: var(--sky-950); line-height: 1.35; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #1677FF, #4CA9FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { margin-top: 8px; color: var(--ink-600); font-size: 15.5px; max-width: 720px; }

/* ---------- AI 检索卡片 ---------- */
.ai-card {
  position: relative; z-index: 2;
  max-width: 980px; margin: 28px auto 0;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(227, 237, 250, .9);
  padding: 20px 22px 18px;
}
.ai-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.ai-mode {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink-600); font-weight: 600;
  white-space: nowrap;
}
.ai-mode .ai-icon {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad-main); display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(22,119,255,.3);
}
.ai-mode .ai-icon svg { width: 15px; height: 15px; fill: #fff; }
.ai-mode b { color: var(--sky-800); font-weight: 700; }

.ai-suggest { display: flex; gap: 8px; flex-wrap: wrap; }
.suggest-chip {
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--sky-50);
  color: var(--ink-600); font-size: 12.5px; transition: all .18s;
}
.suggest-chip:hover {
  border-color: var(--sky-400); color: var(--sky-700);
  background: #fff; transform: translateY(-1px);
}

.ai-input-wrap {
  position: relative;
  border: 2px solid var(--sky-200);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.ai-input-wrap:focus-within {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, .10);
}
.ai-input-wrap textarea {
  width: 100%; min-height: 108px; max-height: 260px; resize: vertical;
  border: none; outline: none; background: transparent;
  padding: 16px 18px 8px; font-size: 16px; line-height: 1.85; color: var(--ink-900);
}
.ai-input-wrap textarea::placeholder { color: var(--ink-300); }

.ai-input-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 14px 12px;
}
.ai-input-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scope-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--sky-50); border: 1px solid var(--sky-100);
  color: var(--sky-700); font-size: 12.5px; font-weight: 600;
}
.scope-pill svg { width: 13px; height: 13px; fill: currentColor; }
.ai-input-left .hint { font-size: 12.5px; color: var(--ink-400); }

.ai-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-filter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--sky-300); background: #fff; color: var(--sky-700);
  font-size: 14px; font-weight: 600; transition: all .2s;
}
.btn-filter:hover { background: var(--sky-50); border-color: var(--sky-500); }
.btn-filter svg { width: 16px; height: 16px; fill: currentColor; }
.btn-filter .badge-count, .btn-icon-filter .badge-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--sky-600); color: #fff; font-size: 11px; font-weight: 700;
  display: none; align-items: center; justify-content: center; line-height: 1;
}
.btn-filter.has-filter .badge-count { display: inline-flex; }
.btn-icon-filter.has-filter .badge-count { display: inline-flex; background: #fff; color: var(--sky-700); }

/* 已选条件摘要 */
.filter-summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.filter-summary .fs-label { font-size: 12.5px; color: var(--ink-400); font-weight: 600; }
.fs-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--sky-50); border: 1px solid var(--sky-200);
  color: var(--sky-800); font-size: 12px; font-weight: 600;
}
.fs-chip .x {
  width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sky-200); color: var(--sky-800); font-size: 11px; line-height: 1;
}
.fs-chip .x:hover { background: var(--sky-400); color: #fff; }
.fs-clear { font-size: 12px; color: var(--ink-400); text-decoration: underline; }
.fs-clear:hover { color: var(--hot); }

/* Hero 底部统计条 — 图标 + 数字 + 说明 */
.stat-strip {
  display: flex; align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 6px;
  margin-top: 28px;
  overflow: hidden;
}
.stat-cell {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; gap: 13px;
  padding: 0 20px;
  position: relative;
}
/* 项间分隔线 */
.stat-cell + .stat-cell::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 36px; background: var(--line);
}
.stat-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #F2F7FF 0%, #DFECFF 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}
.stat-icon svg { width: 25px; height: 25px; }
.stat-body { min-width: 0; }
.stat-num {
  font-size: 25px; font-weight: 800; color: var(--ink-900);
  line-height: 1.2; letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-num em {
  font-style: normal; font-size: 14px; font-weight: 700;
  color: var(--ink-600); margin-left: 3px; letter-spacing: 0;
}
.stat-lbl {
  font-size: 12.5px; color: var(--ink-600); line-height: 1.5;
  margin-top: 1px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stat-lbl b { color: var(--sky-700); font-weight: 700; }

/* ==========================================================================
   抽屉式过滤器
   ========================================================================== */
.drawer-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 31, 71, .34);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s;
}
.drawer-mask.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 310;
  width: 400px; max-width: 92vw;
  background: #fff;
  box-shadow: -12px 0 40px rgba(8, 31, 71, .16);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--sky-50));
  flex-shrink: 0;
}
.drawer-head h2 { font-size: 16px; color: var(--sky-950); display: flex; align-items: center; gap: 9px; font-weight: 700; }
.drawer-head h2 .bar { width: 4px; height: 17px; border-radius: 2px; background: var(--grad-main); }
.drawer-close {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ink-400); transition: all .18s;
}
.drawer-close:hover { background: var(--sky-100); color: var(--sky-700); }
.drawer-close svg { width: 17px; height: 17px; fill: currentColor; }

.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; }
.drawer-body::-webkit-scrollbar { width: 8px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--sky-200); border-radius: 4px; }
.drawer-body::-webkit-scrollbar-thumb:hover { background: var(--sky-300); }

.fgroup { padding: 18px 0 4px; border-bottom: 1px solid var(--line-2); }
.fgroup:last-child { border-bottom: none; }
.fgroup-title {
  font-size: 13.5px; font-weight: 700; color: var(--ink-900);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.fgroup-title .reset {
  font-size: 12px; font-weight: 500; color: var(--ink-400); text-decoration: underline;
}
.fgroup-title .reset:hover { color: var(--sky-600); }

.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; color: var(--ink-700); cursor: pointer;
  transition: all .16s;
}
.radio-item:hover { border-color: var(--sky-300); background: var(--sky-50); }
.radio-item input { position: absolute; opacity: 0; pointer-events: none; }
.radio-item .dot {
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--ink-300); display: grid; place-items: center;
  transition: all .16s;
}
.radio-item .dot::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; transform: scale(0); transition: transform .16s;
}
.radio-item.checked { border-color: var(--sky-500); background: var(--sky-50); color: var(--sky-800); font-weight: 600; }
.radio-item.checked .dot { border-color: var(--sky-600); background: var(--sky-600); }
.radio-item.checked .dot::after { transform: scale(1); }
.radio-item .meta { margin-left: auto; font-size: 11.5px; color: var(--ink-400); font-family: var(--mono); }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; color: var(--ink-700); cursor: pointer; transition: all .16s;
}
.check-item:hover { border-color: var(--sky-300); background: var(--sky-50); }
.check-item input { position: absolute; opacity: 0; pointer-events: none; }
.check-item .box {
  width: 15px; height: 15px; border-radius: 4px; flex-shrink: 0;
  border: 1.5px solid var(--ink-300); display: grid; place-items: center;
  transition: all .16s;
}
.check-item .box svg { width: 10px; height: 10px; fill: #fff; opacity: 0; transition: opacity .16s; }
.check-item.checked { border-color: var(--sky-500); background: var(--sky-50); color: var(--sky-800); font-weight: 600; }
.check-item.checked .box { background: var(--sky-600); border-color: var(--sky-600); }
.check-item.checked .box svg { opacity: 1; }

.year-range { display: flex; align-items: center; gap: 10px; }
.year-range .yr-box {
  flex: 1; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 8px 11px; background: #fff; transition: all .16s;
}
.year-range .yr-box:focus-within { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.year-range .yr-box span { font-size: 12px; color: var(--ink-400); flex-shrink: 0; }
.year-range input {
  width: 100%; border: none; outline: none; background: transparent;
  font-size: 13.5px; color: var(--ink-900); font-family: var(--mono);
}
.year-range .sep { color: var(--ink-300); font-size: 13px; }

.if-range { display: flex; align-items: center; gap: 10px; }
.if-range .if-box {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 8px 11px; background: #fff; display: flex; align-items: center; gap: 6px;
  transition: all .16s;
}
.if-range .if-box:focus-within { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.if-range .if-box span { font-size: 12px; color: var(--ink-400); flex-shrink: 0; }
.if-range input { width: 100%; border: none; outline: none; background: transparent; font-size: 13.5px; font-family: var(--mono); }

.quartile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.q-item {
  padding: 9px 0; border-radius: var(--radius-xs); border: 1px solid var(--line);
  background: #fff; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--ink-600); cursor: pointer; transition: all .16s;
}
.q-item:hover { border-color: var(--sky-400); color: var(--sky-700); background: var(--sky-50); }
.q-item.checked { border-color: var(--sky-600); background: var(--sky-600); color: #fff; box-shadow: 0 3px 10px rgba(22,119,255,.28); }
.q-item.q1.checked { background: linear-gradient(135deg,#E53935,#FF6A5E); border-color: transparent; }
.q-item.q2.checked { background: linear-gradient(135deg,#F79009,#FFB443); border-color: transparent; }
.q-item.q3.checked { background: linear-gradient(135deg,#1677FF,#4CA9FF); border-color: transparent; }
.q-item.q4.checked { background: linear-gradient(135deg,#0FA3A3,#34C5C5); border-color: transparent; }

.drawer-foot {
  padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  background: #fff; flex-shrink: 0;
  box-shadow: 0 -4px 16px rgba(14, 62, 140, .05);
}
.drawer-foot .btn { flex: 1; }
.drawer-foot .count-hint { font-size: 12.5px; color: var(--ink-400); text-align: center; width: 100%; margin-bottom: 8px; }

/* ==========================================================================
   检索结果页
   ========================================================================== */
.page-head {
  background: var(--grad-soft);
  border-bottom: 1px solid var(--line);
  padding: 22px 0 24px;
}
.page-head h1 { font-size: 22px; color: var(--sky-950); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-head h1 svg { width: 20px; height: 20px; fill: var(--sky-600); }
.page-head p { font-size: 13.5px; color: var(--ink-600); margin-top: 4px; }

.result-layout {
  display: grid; grid-template-columns: 296px 1fr;
  gap: 24px; align-items: start; padding: 24px 0 56px;
}

/* 左栏固定筛选面板 */
.filter-panel {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--header-h) - 44px);
  display: flex; flex-direction: column; overflow: hidden;
}
.filter-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--sky-50));
  flex-shrink: 0;
}
.filter-panel-head h3 {
  font-size: 14.5px; color: var(--sky-950); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.filter-panel-head h3 .bar { width: 4px; height: 15px; border-radius: 2px; background: var(--grad-main); }
.reset-link {
  font-size: 12px; color: var(--ink-400); text-decoration: underline; transition: color .18s;
}
.reset-link:hover { color: var(--sky-600); }
.filter-panel-body {
  flex: 1; overflow-y: auto; padding: 2px 18px 6px;
}
.filter-panel-body::-webkit-scrollbar { width: 7px; }
.filter-panel-body::-webkit-scrollbar-thumb { background: var(--sky-200); border-radius: 4px; }
.filter-panel-body::-webkit-scrollbar-thumb:hover { background: var(--sky-300); }
.filter-panel-body .fgroup:last-child { border-bottom: none; }
.filter-panel-foot {
  padding: 11px 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; flex-shrink: 0;
}
.filter-panel-foot .count-hint { font-size: 12px; color: var(--ink-400); }

/* 面板内的筛选控件略紧凑，适配较窄的左栏 */
.filter-panel-body .fgroup { padding: 15px 0 3px; }
.filter-panel-body .fgroup-title { margin-bottom: 10px; }

/* 检索条 */
.search-bar {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 12px; margin-bottom: 18px;
}
.sb-row { display: flex; align-items: stretch; gap: 10px; }
.sb-field {
  flex: 1; display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--sky-200); border-radius: var(--radius-xs);
  padding: 0 14px; background: #fff; transition: all .18s; min-width: 0;
}
.sb-field:focus-within { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.sb-field svg { width: 17px; height: 17px; fill: var(--sky-500); flex-shrink: 0; }
.sb-field input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14.5px; padding: 11px 0; min-width: 0; color: var(--ink-900);
}
.sb-field input::placeholder { color: var(--ink-300); }
.sb-field textarea {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14.5px; padding: 11px 0; resize: none; min-height: 44px; color: var(--ink-900);
}
/* 多行检索式输入区：独占整行，图标与首行对齐 */
.sb-field-block { align-items: flex-start; }
.sb-field-block > svg { margin-top: 13px; }
.sb-field-block textarea {
  font-family: var(--mono); font-size: 14px; line-height: 1.85;
  min-height: 104px; height: 104px; padding: 13px 0; resize: vertical;
}
.sb-field-block textarea::placeholder { color: var(--ink-300); font-family: var(--font); }
/* 输入区下方的操作行：过滤器在左，检索在右 */
.sb-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
}
.sb-row .btn { flex-shrink: 0; }

/* ==========================================================================
   检索式编辑面板（结果页点击输入框展开，按检索来源切换样式）
   ========================================================================== */
.query-editor { animation: qeIn .22s ease; }
@keyframes qeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* display 声明会覆盖 UA 的 [hidden]，需显式兜底 */
.query-editor[hidden] { display: none; }
.sb-row[hidden] { display: none; }
.qe-mode[hidden] { display: none; }

.qe-source {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-600);
  padding-bottom: 11px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.qe-source b { color: var(--sky-800); font-weight: 700; }
.qe-hint { color: var(--ink-400); }
.qe-switch { margin-left: auto; display: flex; gap: 6px; }
.qe-switch-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-600);
  font-size: 12.5px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  font-family: inherit; transition: all .18s;
}
.qe-switch-btn:hover { border-color: var(--sky-400); color: var(--sky-700); }
.qe-switch-btn.active { background: var(--sky-600); border-color: var(--sky-600); color: #fff; }

/* 专业检索样式：三行检索式输入框 */
.qe-mode-pro .sb-field-block textarea { height: 104px; min-height: 104px; }

/* 高级检索样式：条件卡片（置于检索条内，去掉外层阴影以免双层卡片） */
.qe-mode-adv .adv-card { box-shadow: none; border-color: var(--sky-100); background: var(--sky-50); }
.qe-mode-adv .adv-row select,
.qe-mode-adv .adv-row input[type="text"] { background: #fff; }
/* 检索条下方的筛选行：年份 / 指南类型 / 语言种类 / 按专科浏览 */
.sb-row-filters {
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
  flex-wrap: wrap; align-items: center; gap: 10px 14px;
}
.sb-filter { display: flex; align-items: center; gap: 8px; }
.sb-filter-label { font-size: 13px; color: var(--ink-600); white-space: nowrap; font-weight: 600; }

/* 指南检索页布局 */
.guide-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start;
}
.guide-meta { margin-bottom: 12px; }

/* 指南详情页 */
.gd-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start;
}
.gd-article {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 22px 26px 26px;
}
.gd-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
}
.gd-top-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-top-meta { font-size: 13px; color: var(--ink-400); }
.gd-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--sky-50); border: 1px solid var(--sky-200);
  color: var(--sky-700); font-size: 12px; font-weight: 700;
}
.gd-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gd-title {
  font-size: 24px; line-height: 1.45; font-weight: 700; color: var(--sky-900);
  margin-bottom: 18px; letter-spacing: -.2px;
}
.gd-meta { display: flex; flex-direction: column; gap: 12px; }
.gd-meta-row { display: flex; gap: 10px; align-items: flex-start; }
.gd-meta-label {
  flex-shrink: 0; width: 74px; font-size: 14px; color: var(--ink-600);
  font-weight: 600; line-height: 1.75;
}
.gd-meta-value {
  flex: 1; min-width: 0; font-size: 14px; color: var(--ink-700); line-height: 1.75;
}
.gd-abs { text-align: justify; }
.gd-link {
  color: var(--sky-700); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--sky-300);
}
.gd-link:hover { color: var(--sky-600); text-decoration-color: var(--sky-600); }
.gd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.gd-tag {
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--sky-50); border: 1px solid var(--sky-200); color: var(--sky-700);
}
.gd-tag-plain {
  background: #fff; border-color: var(--line); color: var(--ink-600); font-weight: 500;
}
.gd-cite {
  margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--sky-50); border: 1px solid var(--sky-100);
}
.gd-cite-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px; font-size: 12.5px; font-weight: 700; color: var(--sky-800);
}
.gd-cite-text {
  font-size: 13px; line-height: 1.85; color: var(--ink-700);
  word-break: break-word;
}
.gd-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.gd-attrs { display: flex; flex-direction: column; gap: 9px; }
.gd-attr { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.gd-attr span { color: var(--ink-400); flex-shrink: 0; }
.gd-attr b { color: var(--ink-900); font-weight: 600; text-align: right; }
/* 指南列表标题可点击 */
.gd-entry-link { color: inherit; text-decoration: none; }
.gd-entry-link:hover { color: var(--sky-600); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1180px) {
  .guide-layout { grid-template-columns: 1fr; }
  .gd-layout { grid-template-columns: 1fr; }
  .gd-side { position: static; }
}
@media (max-width: 720px) {
  .sb-row-filters { gap: 8px 10px; }
  .sb-filter { flex: 1 1 100%; }
  .sb-filter .sb-select { flex: 1; min-width: 0; }
  .gd-article { padding: 18px 16px 20px; }
  .gd-title { font-size: 19px; }
  .gd-meta-row { flex-direction: column; gap: 2px; }
  .gd-meta-label { width: auto; }
}

.btn-icon-filter {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 10px 16px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--sky-300); background: #fff; color: var(--sky-700);
  font-size: 14px; font-weight: 600; transition: all .2s;
}
.btn-icon-filter:hover { background: var(--sky-50); border-color: var(--sky-500); }
.btn-icon-filter svg { width: 16px; height: 16px; fill: currentColor; }
.btn-icon-filter.has-filter { border-color: var(--sky-600); background: var(--sky-600); color: #fff; }

/* 结果中检索提示条 */
.inline-search-bar {
  display: none; align-items: center; gap: 10px;
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-xs);
  background: var(--sky-50); border: 1px dashed var(--sky-300);
  font-size: 13px; color: var(--sky-800);
}
.inline-search-bar.show { display: flex; }
.inline-search-bar .is-label { font-weight: 700; white-space: nowrap; }
.inline-search-bar input {
  flex: 1; border: none; outline: none; background: #fff; border-radius: 6px;
  padding: 6px 10px; font-size: 13px; border: 1px solid var(--sky-200);
}
.inline-search-bar .x-btn { color: var(--ink-400); font-size: 12px; text-decoration: underline; white-space: nowrap; }
.inline-search-bar .x-btn:hover { color: var(--hot); }
/* 结果中检索的「检索」按钮：位于「清除」之前 */
.inline-search-bar .btn { flex-shrink: 0; padding: 5px 16px; }
/* 窄屏：标签独占一行，输入框与按钮另起一行，避免横向溢出 */
@media (max-width: 560px) {
  .inline-search-bar { flex-wrap: wrap; }
  .inline-search-bar .is-label { flex: 1 0 100%; }
  .inline-search-bar input { flex: 1 1 120px; min-width: 0; }
}

/* 已应用筛选条件 */
.applied-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.applied-bar .ab-label { font-size: 12.5px; color: var(--ink-400); font-weight: 600; }

/* 结果概览 */
.result-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.result-meta .rm-left { font-size: 13.5px; color: var(--ink-600); }
.result-meta .rm-left b { color: var(--sky-800); font-weight: 700; font-size: 15px; }
.result-meta .rm-left .q { color: var(--ink-900); font-weight: 600; }
.rm-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rm-left { display: flex; align-items: center; gap: 10px; }
.export-toggle { flex-shrink: 0; }
.export-toggle.active {
  background: var(--sky-600); border-color: var(--sky-600); color: #fff;
}

/* 导出面板：展开时将文献卡片向下推 */
.export-panel {
  background: #fff; border: 1px solid var(--sky-200);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 16px 20px 14px; margin-bottom: 18px;
  animation: epIn .24s cubic-bezier(.4, 0, .2, 1);
}
.export-panel[hidden] { display: none; }
@keyframes epIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ep-row { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 14px; }
.ep-label {
  flex-shrink: 0; width: 68px; padding-top: 8px;
  font-size: 13px; font-weight: 700; color: var(--sky-900);
}
.ep-select {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 8px 12px; font-size: 13.5px; color: var(--ink-900);
  background: #fff; outline: none; max-width: 320px;
}
.ep-select:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22, 119, 255, .08); }
.ep-formats { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-fmt {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: #fff; color: var(--ink-600);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.ep-fmt:hover { border-color: var(--sky-400); color: var(--sky-700); background: var(--sky-50); }
.ep-fmt input { position: absolute; opacity: 0; pointer-events: none; }
.ep-fmt input:checked + span { color: var(--sky-700); }
.ep-fmt:has(input:checked) {
  border-color: var(--sky-600); background: var(--sky-50); color: var(--sky-700);
  box-shadow: 0 2px 8px rgba(22, 119, 255, .16);
}
/* 自定义格式区 */
.ep-custom {
  border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 14px;
}
.ep-custom[hidden] { display: none; }
.ep-sub-label { font-size: 12.5px; color: var(--ink-400); font-weight: 600; margin-bottom: 9px; }
.ep-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ep-field {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #FAFCFF; color: var(--ink-600);
  font-size: 12.5px; cursor: pointer; transition: all .16s;
}
.ep-field:hover { border-color: var(--sky-400); color: var(--sky-700); }
.ep-field input { position: absolute; opacity: 0; pointer-events: none; }
.ep-field:has(input:checked) {
  background: var(--sky-600); border-color: var(--sky-600); color: #fff;
  box-shadow: 0 2px 7px rgba(22, 119, 255, .22);
}
.ep-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-2);
}
.ep-tip { margin-right: auto; font-size: 12.5px; color: var(--ink-400); }
.sort-select {
  border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 7px 12px; font-size: 13px; color: var(--ink-700); background: #fff; outline: none;
}
.sort-select:focus { border-color: var(--sky-500); }
/* 指南检索条中的筛选下拉：自定义箭头 + 统一高度 */
.sb-select {
  min-width: 108px; padding: 0 30px 0 12px; font-size: 13px; height: 38px;
  color: var(--ink-700); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%237C8FA6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 13px;
  transition: border-color .18s, box-shadow .18s;
}
.sb-select:hover { border-color: var(--sky-400); }
.sb-select:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22,119,255,.08); outline: none; }
.sb-filter-wide .sb-select { min-width: 132px; }

/* ==========================================================================
   文献列表
   ========================================================================== */
.lit-list { display: flex; flex-direction: column; gap: 14px; }
.lit-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 18px 20px 0; transition: box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.lit-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-main); opacity: 0; transition: opacity .2s;
}
.lit-card:hover { box-shadow: var(--shadow-md); border-color: var(--sky-200); }
.lit-card:hover::before { opacity: 1; }

.lit-card.is-highlight { border-color: var(--sky-400); box-shadow: 0 0 0 3px rgba(22,119,255,.10), var(--shadow-sm); }

.lit-head { display: flex; gap: 14px; align-items: flex-start; }
/* 序号列：序号在上、勾选框在下 */
.lit-idx-col {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.lit-index {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--sky-50); color: var(--sky-700);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  font-family: var(--mono); border: 1px solid var(--sky-100);
}
.lit-check { cursor: pointer; display: block; line-height: 0; }
.lit-check input { position: absolute; opacity: 0; pointer-events: none; }
.lit-check .box {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.5px solid var(--ink-300); background: #fff;
  display: grid; place-items: center; transition: all .16s;
}
.lit-check .box svg { width: 10px; height: 10px; fill: #fff; opacity: 0; transition: opacity .16s; }
.lit-check:hover .box { border-color: var(--sky-400); }
.lit-check input:checked + .box { background: var(--sky-600); border-color: var(--sky-600); }
.lit-check input:checked + .box svg { opacity: 1; }
.lit-card:has(.lit-check input:checked) { border-color: var(--sky-300); background: #FCFDFF; }
.lit-main { flex: 1; min-width: 0; }

.lit-title {
  font-size: 16px; font-weight: 700; line-height: 1.55; color: var(--sky-800);
  display: block; margin-bottom: 7px;
}
.lit-title:hover { color: var(--sky-600); text-decoration: underline; }

.lit-authors { font-size: 13.5px; color: var(--ink-700); line-height: 1.75; margin-bottom: 5px; }
.lit-authors .au { color: var(--ink-900); font-weight: 600; }
.lit-authors .au:hover { color: var(--sky-600); text-decoration: underline; }
.lit-authors .sep { color: var(--ink-300); margin: 0 4px; }
.lit-authors .corresp { color: var(--sky-600); font-size: 12px; }

.lit-source { font-size: 13.5px; color: var(--ink-600); margin-bottom: 4px; }
.lit-source .journal { font-style: italic; color: var(--ink-900); font-weight: 600; }
.lit-source .vn { color: var(--ink-600); font-family: var(--mono); font-size: 13px; }
.lit-source .db {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--sky-50); border: 1px solid var(--sky-100);
  color: var(--sky-700); font-size: 11px; font-style: normal; font-weight: 600;
}

/* ID 号 */
.lit-ids { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 12px; }
.id-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 6px;
  background: #F7FAFE; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-600);
}
.id-tag b { font-family: var(--font); font-weight: 700; color: var(--sky-700); font-size: 11px; }
.id-tag.doi { border-color: #D6E9D6; background: #F4FBF4; }
.id-tag.doi b { color: #16A34A; }
.id-tag.pmid { border-color: #FCE5CD; background: #FFF9F1; }
.id-tag.pmid b { color: #C2410C; }
.id-tag.wos { border-color: #E3DFFF; background: #F8F6FF; }
.id-tag.wos b { color: #6D28D9; }

/* 期刊分区标签行 */
.lit-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bdg {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600; border: 1px solid transparent;
}
.bdg svg { width: 12px; height: 12px; fill: currentColor; }
.bdg-if { background: #FFF7E6; border-color: #FFE0A3; color: #B45309; }
.bdg-jcr { background: #F0F7FF; border-color: var(--sky-200); color: var(--sky-700); }
.bdg-jcr.q1 { background: #FDECEC; border-color: #F8C4C4; color: #C62828; }
.bdg-jcr.q2 { background: #FFF4E5; border-color: #FFD9A8; color: #C2410C; }
.bdg-jcr.q3 { background: #F0F7FF; border-color: var(--sky-200); color: var(--sky-700); }
.bdg-jcr.q4 { background: #EFFAF9; border-color: #B6E7E4; color: #0E7C7C; }
.bdg-xr { background: #F8F3FF; border-color: #E0D4FB; color: #6D28D9; }
.bdg-core { background: #F4FBF4; border-color: #C7E6C7; color: #15803D; }
.bdg-type { background: #F7FAFE; border-color: var(--line); color: var(--ink-600); }
.bdg-cite { background: #FFF7E6; border-color: #FFE0A3; color: #B45309; }

/* 摘要 */
.lit-abstract {
  display: none; padding: 12px 14px; margin-bottom: 12px;
  background: var(--sky-50); border-left: 3px solid var(--sky-300);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 13.5px; line-height: 1.85; color: var(--ink-700);
}
.lit-abstract.show { display: block; }
.lit-abstract .abs-head {
  font-weight: 700; color: var(--sky-800); font-size: 12.5px;
  margin-bottom: 5px; display: flex; align-items: center; gap: 6px;
}
.lit-abstract .abs-head svg { width: 13px; height: 13px; fill: var(--sky-600); }

/* 底部操作栏 */
.lit-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 0; margin-top: 2px;
  border-top: 1px solid var(--line-2);
}
.act-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: #fff; color: var(--ink-700);
  font-size: 12.5px; font-weight: 600; transition: all .18s;
}
.act-btn svg { width: 14px; height: 14px; fill: currentColor; }
.act-btn:hover { border-color: var(--sky-400); color: var(--sky-700); background: var(--sky-50); }
.act-btn.primary {
  border-color: var(--sky-600); color: #fff;
  background: var(--grad-main); box-shadow: 0 3px 10px rgba(22,119,255,.25);
}
.act-btn.primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,119,255,.35); }
.act-btn .n { font-family: var(--mono); font-size: 12px; }
.act-btn.active { border-color: var(--sky-600); color: var(--sky-700); background: var(--sky-50); }

/* 全文链接：点击「全文链接」后下滑展开的一行 */
.lit-fulltext {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 0 12px; margin-top: -2px;
  border-top: 1px dashed var(--sky-200);
  animation: ftRowIn .24s cubic-bezier(.4, 0, .2, 1);
}
.lit-fulltext[hidden] { display: none; }
@keyframes ftRowIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ft-label {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ink-400);
}
.ft-label::after { content: '：'; }

/* 外文：DOI 超链接 + PubMed LinkOut */
.ft-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: #fff;
  font-size: 12px; color: var(--ink-700); transition: all .18s;
}
.ft-link svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }
.ft-link:hover { border-color: var(--sky-400); color: var(--sky-700); background: var(--sky-50); }
.ft-link .ft-doi-text { font-family: var(--mono); font-size: 11.5px; }
.ft-link.is-doi { border-color: #D6E9D6; background: #F4FBF4; color: #15803D; }
.ft-link.is-doi:hover { border-color: #16A34A; color: #16A34A; background: #EFF9EF; }
.ft-link.is-linkout { border-color: #E3DFFF; background: #F8F6FF; color: #6D28D9; }
.ft-link.is-linkout:hover { border-color: #7C3AED; color: #7C3AED; background: #F3F0FF; }

/* 中文：数据库图标 + 文字（四个库统一黑色字，仅以边框/底色区分） */
.ft-db {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 7px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 600; color: var(--ink-900);
  transition: all .18s;
}
/* 真实数据库图标（32×32 PNG，自带配色，不做 fill 着色） */
.ft-db .ft-db-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  object-fit: contain; display: block;
}
.ft-db:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(22, 119, 255, .14); }
.ft-db.is-cnki { border-color: #F3D3D3; background: #FFF7F7; }
.ft-db.is-cnki:hover { border-color: #B02A2A; }
.ft-db.is-wanfang { border-color: #FCE5CD; background: #FFF9F1; }
.ft-db.is-wanfang:hover { border-color: #C2410C; }
.ft-db.is-cqvip { border-color: #B6E7E4; background: #EFFAF9; }
.ft-db.is-cqvip:hover { border-color: #0E7C7C; }
.ft-db.is-cma { border-color: var(--sky-200); background: var(--sky-50); }
.ft-db.is-cma:hover { border-color: var(--sky-600); }

/* 无可用外链时的提示 */
.ft-empty { font-size: 12px; color: var(--ink-400); }

/* ==========================================================================
   全文链接弹窗（详情页）
   ========================================================================== */
.ftm-group { margin-bottom: 18px; }
.ftm-group:last-child { margin-bottom: 0; }
.ftm-title {
  font-size: 13px; font-weight: 700; color: var(--sky-800);
  margin: 0 0 10px; padding-left: 10px; position: relative;
}
.ftm-title::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3px; border-radius: 2px; background: var(--sky-600);
}
.ftm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ftm-list { display: flex; flex-direction: column; gap: 8px; }

.ftm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff;
  text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.ftm-item:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22, 119, 255, .12); }
.ftm-icon {
  width: 30px; height: 30px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); background: var(--sky-50); border: 1px solid var(--sky-100);
}
.ftm-icon img { width: 18px; height: 18px; object-fit: contain; display: block; }
.ftm-icon svg { width: 15px; height: 15px; fill: var(--sky-600); }
.ftm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ftm-txt b { font-size: 13.5px; font-weight: 700; color: var(--ink-900); line-height: 1.4; }
.ftm-txt span { font-size: 12px; color: var(--ink-400); line-height: 1.4; }
.ftm-txt .mono { font-family: var(--mono); font-size: 11.5px; color: var(--ink-600); word-break: break-all; }
.ftm-go { width: 14px; height: 14px; flex-shrink: 0; fill: var(--ink-300); transition: fill .18s; }
.ftm-item:hover .ftm-go { fill: var(--sky-600); }

/* 各数据库底色/边框区分（与结果页 .ft-db 保持一致） */
.ftm-item.is-cnki    { border-color: #F3D3D3; background: #FFF7F7; }
.ftm-item.is-wanfang { border-color: #FCE5CD; background: #FFF9F1; }
.ftm-item.is-cqvip   { border-color: #B6E7E4; background: #EFFAF9; }
.ftm-item.is-cma     { border-color: var(--sky-200); background: var(--sky-50); }
.ftm-item.is-doi     { border-color: #D6E9D6; background: #F4FBF4; }
.ftm-item.is-doi .ftm-icon svg { fill: #15803D; }
.ftm-item.is-linkout { border-color: #E3DFFF; background: #F8F6FF; }
.ftm-item.is-linkout .ftm-icon svg { fill: #6D28D9; }
.ftm-empty { font-size: 13px; color: var(--ink-400); padding: 16px 0; text-align: center; }

.lit-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cite-count {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 58px; padding: 7px 10px; border-radius: var(--radius-xs);
  background: linear-gradient(180deg, #fff, var(--sky-50));
  border: 1px solid var(--sky-100);
}
.cite-count b { font-size: 17px; color: var(--sky-700); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cite-count span { font-size: 11px; color: var(--ink-400); }

/* 右侧边栏 */
.side-panel { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.side-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.side-card h3 {
  font-size: 14px; color: var(--sky-950); font-weight: 700; margin-bottom: 13px;
  display: flex; align-items: center; gap: 8px;
}
.side-card h3::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--grad-main); }
.side-card h3 .more { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--sky-600); }
.side-card h3 .more:hover { color: var(--sky-700); }

.rank-list { display: flex; flex-direction: column; gap: 11px; }
.rank-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rank-no {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--sky-50); color: var(--sky-700); border: 1px solid var(--sky-100);
}
.rank-item:nth-child(1) .rank-no { background: var(--grad-main); color: #fff; border-color: transparent; }
.rank-item .rk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-700); }
.rank-item .rk-name:hover { color: var(--sky-600); }
.rank-item .rk-val { font-size: 12px; color: var(--ink-400); font-family: var(--mono); }

.word-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.word-cloud a {
  padding: 4px 11px; border-radius: 999px; background: var(--sky-50);
  border: 1px solid var(--sky-100); color: var(--ink-600); font-size: 12.5px; transition: all .18s;
}
.word-cloud a:hover { background: var(--sky-100); border-color: var(--sky-300); color: var(--sky-800); }
.word-cloud a.w1 { font-size: 14px; font-weight: 700; color: var(--sky-800); }
.word-cloud a.w2 { font-size: 13px; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-item { text-align: center; }
.stat-item b { display: block; font-size: 20px; color: var(--sky-800); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-item span { font-size: 11.5px; color: var(--ink-400); }

/* ==========================================================================
   弹窗
   ========================================================================== */
.modal-mask {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(8, 31, 71, .42); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  opacity: 0; visibility: hidden; transition: opacity .24s, visibility .24s;
}
.modal-mask.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 680px; max-height: 88vh;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(14px) scale(.98); transition: transform .26s cubic-bezier(.4,0,.2,1);
}
.modal-mask.open .modal { transform: translateY(0) scale(1); }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(180deg, #fff, var(--sky-50)); flex-shrink: 0;
}
.modal-head h2 { font-size: 16.5px; color: var(--sky-950); font-weight: 700; display: flex; align-items: center; gap: 9px; }
.modal-head h2 svg { width: 19px; height: 19px; fill: var(--sky-600); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #fff; flex-shrink: 0;
}
.modal-foot .mf-hint { font-size: 12.5px; color: var(--ink-400); }

/* 协议文本 */
.agreement {
  font-size: 13.5px; line-height: 2.0; color: var(--ink-700);
  background: #FAFCFF; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; max-height: 420px; overflow-y: auto;
}
.agreement h4 {
  font-size: 13.5px; color: var(--sky-900); font-weight: 700;
  margin: 14px 0 6px; padding-left: 10px; border-left: 3px solid var(--sky-500);
}
.agreement h4:first-child { margin-top: 0; }
.agreement p { margin-bottom: 4px; text-indent: 0; }
.agreement ul { margin: 4px 0 8px; padding-left: 4px; }
.agreement li { margin-bottom: 5px; padding-left: 16px; position: relative; }
.agreement li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--sky-300);
}
.agreement .em { color: var(--hot); font-weight: 600; }

/* 勾选协议 */
.agree-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; padding: 13px 15px;
  border: 1.5px solid var(--sky-200); border-radius: var(--radius-sm);
  background: var(--sky-50); cursor: pointer; transition: all .18s;
}
.agree-check:hover { border-color: var(--sky-400); }
.agree-check input { position: absolute; opacity: 0; pointer-events: none; }
.agree-check .box {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--ink-300); display: grid; place-items: center; transition: all .18s;
}
.agree-check .box svg { width: 11px; height: 11px; fill: #fff; opacity: 0; transition: opacity .18s; }
.agree-check.checked { border-color: var(--sky-600); background: #fff; }
.agree-check.checked .box { background: var(--sky-600); border-color: var(--sky-600); }
.agree-check.checked .box svg { opacity: 1; }
.agree-check .txt { font-size: 13.5px; color: var(--ink-900); line-height: 1.7; }
.agree-check .txt b { color: var(--sky-800); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12.5px; color: var(--ink-600); font-weight: 600; }
.form-item input, .form-item select, .form-item textarea {
  border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 9px 12px; font-size: 13.5px; outline: none; background: #fff;
  transition: all .18s; width: 100%;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22,119,255,.08);
}
.form-item .hint { font-size: 11.5px; color: var(--ink-400); }

.info-box {
  background: var(--sky-50); border: 1px solid var(--sky-100);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px;
  color: var(--ink-600); line-height: 1.8; margin-bottom: 16px;
}
.info-box b { color: var(--sky-800); }

/* 引用文献弹窗：三种引文格式 */
.cite-list { display: flex; flex-direction: column; gap: 18px; }
.cite-item {
  padding: 0 0 16px; border-bottom: 1px dashed var(--line-2);
}
.cite-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ci-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.cite-item .ci-t {
  color: var(--ink-900); font-weight: 700; font-size: 14px; line-height: 1.4;
}
/* 「复制」按钮：紫色描边（参考 SinoMed 引文格式样式） */
.ci-copy {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 12px; border-radius: var(--radius-xs);
  border: 1px solid #5D33BF; background: #fff; color: #5D33BF;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .18s;
  white-space: nowrap;
}
.ci-copy:hover { background: #5D33BF; color: #fff; box-shadow: 0 4px 10px rgba(93, 51, 191, .28); }
.ci-copy:active { transform: translateY(1px); }
/* 引文正文 */
.cite-item .ci-body {
  font-size: 13px; line-height: 1.85; color: var(--ink-700);
  word-break: break-word;
}
.cite-item .ci-body em { font-style: italic; color: var(--ink-900); }

/* Toast */
.toast-wrap {
  position: fixed; top: 82px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--sky-200);
  box-shadow: var(--shadow-md); font-size: 13.5px; color: var(--ink-900);
  animation: toastIn .3s cubic-bezier(.4,0,.2,1);
  font-weight: 500;
}
.toast svg { width: 16px; height: 16px; fill: var(--sky-600); }
.toast.success svg { fill: var(--green); }
.toast.warn svg { fill: var(--warm); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   通用页面区块
   ========================================================================== */
.section { padding: 44px 0; }
.section-head { margin-bottom: 24px; }
.section-head .sh-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--sky-600); font-weight: 700; letter-spacing: 1px; margin-bottom: 6px;
}
.section-head h2 { font-size: 24px; color: var(--sky-950); font-weight: 700; letter-spacing: .5px; }
.section-head p { color: var(--ink-600); font-size: 14px; margin-top: 5px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.entry-card {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm);
  transition: all .2s; color: inherit;
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sky-200); color: inherit; }
.entry-card .ec-icon {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 13px;
  background: var(--grad-main); display: grid; place-items: center;
  box-shadow: 0 5px 12px rgba(22,119,255,.28);
}
.entry-card .ec-icon svg { width: 21px; height: 21px; fill: #fff; }
.entry-card h3 { font-size: 16px; color: var(--sky-950); font-weight: 700; margin-bottom: 6px; }
.entry-card p { font-size: 13px; color: var(--ink-600); line-height: 1.75; }
.entry-card .ec-foot { margin-top: 12px; font-size: 12.5px; color: var(--sky-600); font-weight: 600; display: flex; align-items: center; gap: 5px; }

/* 表格 */
.data-table { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table thead th {
  background: var(--sky-50); color: var(--sky-900); font-size: 13px; font-weight: 700;
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-700); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFCFF; }
.data-table .t-title { color: var(--sky-800); font-weight: 600; }
.data-table .t-title:hover { text-decoration: underline; }

/* 高级检索 */
.adv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* 模式切换 Tab */
.tab-bar {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-sm);
}
.tab-btn {
  padding: 8px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-600);
  transition: all .2s; white-space: nowrap;
}
.tab-btn:hover { color: var(--sky-700); background: var(--sky-50); }
.tab-btn.active {
  background: var(--grad-main); color: #fff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, .3);
}
.tab-panel[hidden] { display: none; }

/* 卡片底部操作栏（检索条件卡片内） */
.adv-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2);
}
.adv-card-foot .foot-right { display: flex; align-items: center; gap: 10px; }
.adv-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.adv-card h3 {
  font-size: 14px; color: var(--sky-950); font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.adv-card h3 .num {
  width: 22px; height: 22px; border-radius: 7px; background: var(--grad-main); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.adv-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.adv-row:last-child { margin-bottom: 0; }
.adv-row select {
  border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 8px 10px;
  font-size: 13px; outline: none; background: #fff; color: var(--ink-700); flex-shrink: 0;
}
.adv-row select:focus { border-color: var(--sky-500); }
.adv-row .op { font-size: 12.5px; color: var(--ink-400); flex-shrink: 0; }
.adv-row input[type="text"] {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 8px 12px; font-size: 13px; outline: none; min-width: 0;
}
.adv-row input[type="text"]:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }

/* 卡片内子标题（用于「运算符说明」内的字段分区） */
.card-sub {
  font-size: 12.5px; font-weight: 700; color: var(--sky-900);
  margin: 16px 0 11px; padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 7px;
}
.card-sub::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--sky-400);
}

/* 运算符两列网格 */
.op-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px;
}
.op-item {
  display: flex; align-items: baseline; gap: 7px;
  padding: 7px 11px; border-radius: var(--radius-xs);
  background: var(--sky-50); border: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--ink-600); line-height: 1.55;
  min-width: 0;
}
.op-item b {
  font-family: var(--mono); font-weight: 700; color: var(--sky-700);
  font-size: 12px; flex-shrink: 0;
}
.op-item span { min-width: 0; }
/* 优先级整条较长，代码字号略收并允许说明换行 */
.op-item-wide { flex-wrap: wrap; }
.op-item-wide b { font-size: 11.5px; }
.op-item-wide span { white-space: normal; }

/* 全宽卡片：运算符 3 列、字段代码 4 列 */
.adv-card-wide .op-grid { grid-template-columns: repeat(3, 1fr); }
.adv-card-wide .field-grid { grid-template-columns: repeat(4, 1fr); }

/* 字段代码两列网格 */
.field-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
}
.field-item {
  display: flex; align-items: baseline; gap: 9px;
  padding: 7px 11px; border-radius: var(--radius-xs);
  background: var(--sky-50); border: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--ink-600); line-height: 1.5;
  min-width: 0;
}
.field-item b {
  font-family: var(--mono); font-weight: 700; color: var(--sky-700);
  font-size: 12px; flex-shrink: 0;
}
.field-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 期刊卡片 */
.journal-layout {
  display: grid; grid-template-columns: 248px 1fr; gap: 22px; align-items: start;
}
.journal-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.journal-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); transition: all .2s;
  padding: 16px 18px; min-width: 0;
}
.journal-card:hover { box-shadow: var(--shadow-md); border-color: var(--sky-200); }
.journal-card .jc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.journal-card h3 { font-size: 15.5px; color: var(--sky-900); font-weight: 700; line-height: 1.5; }
.journal-card .jc-en { font-size: 12.5px; color: var(--ink-400); font-style: italic; margin-top: 2px; }
.journal-card .jc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; padding: 12px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.journal-card .jc-stats .s { text-align: center; }
.journal-card .jc-stats .s b { display: block; font-size: 15px; color: var(--sky-800); font-weight: 700; font-variant-numeric: tabular-nums; }
.journal-card .jc-stats .s span { font-size: 11px; color: var(--ink-400); }
.journal-card .jc-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.journal-card .jc-discipline {
  font-size: 11.5px; color: var(--ink-400); padding-left: 4px;
  border-left: 1px solid var(--line); margin-left: 2px;
}
.bdg-warn { background: #FDECEC; border-color: #F8C4C4; color: #C62828; }

/* 学科分类树 */
.subject-tree {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.subject-tree-head {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--sky-50));
  font-size: 14.5px; font-weight: 700; color: var(--sky-800);
  display: flex; align-items: center; gap: 8px;
}
.subject-tree-head::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--grad-main);
}
.subject-tree-body {
  max-height: calc(100vh - var(--header-h) - 150px);
  overflow-y: auto; padding: 6px 0 10px;
}
.subject-tree-body::-webkit-scrollbar { width: 7px; }
.subject-tree-body::-webkit-scrollbar-thumb { background: var(--sky-200); border-radius: 4px; }
.subject-tree-body::-webkit-scrollbar-thumb:hover { background: var(--sky-300); }

.tree-node {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px 7px 10px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-700);
  border-left: 2px solid transparent;
  transition: background .16s, color .16s;
}
.tree-node:hover { background: var(--sky-50); color: var(--sky-700); }
.tree-node.active {
  background: var(--sky-50); color: var(--sky-700);
  font-weight: 700; border-left-color: var(--sky-600);
}
.tree-node.is-empty { color: var(--ink-300); cursor: default; }
.tree-node.is-empty:hover { background: transparent; color: var(--ink-300); }
.tree-root { padding-left: 14px; }
.tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count {
  font-size: 11.5px; color: var(--ink-400); font-family: var(--mono);
  flex-shrink: 0;
}
.tree-node.active .tree-count { color: var(--sky-600); font-weight: 700; }
.tree-caret {
  width: 15px; height: 15px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--ink-300);
  transition: transform .2s;
}
.tree-caret svg { width: 11px; height: 11px; fill: currentColor; }
.tree-caret.open { transform: rotate(90deg); color: var(--sky-500); }
.tree-caret.leaf { visibility: hidden; }
.tree-children { display: none; }
.tree-children.open { display: block; }
.tree-sub {
  padding-left: 30px; font-size: 13px; color: var(--ink-600);
}
.tree-sub .tree-label { font-weight: 400; }

/* 搜索条内的次级切换（外文 / 中文） */
.sub-tabs {
  display: flex; gap: 4px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
}
.sub-tab {
  padding: 7px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-600);
  font-size: 13.5px; font-weight: 600; transition: all .2s;
}
.sub-tab:hover { border-color: var(--sky-400); color: var(--sky-700); background: var(--sky-50); }
.sub-tab.active {
  background: var(--grad-main); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(22, 119, 255, .28);
}

/* 期刊筛选区块 */
.filter-block {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 6px 20px 14px; margin-bottom: 18px;
}
.fb-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 13px 0; border-bottom: 1px dashed var(--line-2);
}
.fb-row[hidden] { display: none; }
/* 「重置筛选」按钮：贴到所在行最右侧 */
.fb-reset { margin-left: auto; align-self: center; flex-shrink: 0; }
.fb-row:last-child { border-bottom: none; }
.fb-label {
  flex-shrink: 0; width: 72px; padding-top: 6px;
  font-size: 13px; font-weight: 700; color: var(--sky-900);
  white-space: nowrap;
}
.fb-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
/* 分区行内两组标签按内容自适应，不再互相挤压换行 */
.fb-sub > .tag-group { flex: 0 0 auto; }
.fb-sub-label { font-size: 12.5px; color: var(--ink-400); font-weight: 600; }
.tag-group { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.tag-toggle {
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-600);
  font-size: 12.5px; font-weight: 600; transition: all .18s; white-space: nowrap;
}
.tag-toggle:hover { border-color: var(--sky-400); color: var(--sky-700); background: var(--sky-50); }
.tag-toggle.active {
  background: var(--sky-600); border-color: var(--sky-600); color: #fff;
  box-shadow: 0 3px 9px rgba(22, 119, 255, .26);
}
/* 标签内的期刊数量 */
.tag-count {
  margin-left: 7px; font-size: 11px; font-weight: 700;
  color: var(--ink-400); font-family: var(--mono);
}
.tag-toggle.active .tag-count { color: rgba(255, 255, 255, .88); }
.tag-toggle:disabled .tag-count { color: var(--ink-300); }
/* 首字母：紧凑方块 + 无期刊字母弱化（仍可辨认） */
.tag-all { margin-right: 6px; }
#alphaTags { gap: 7px; }
.tag-letter {
  width: 32px; padding: 7px 0; text-align: center; flex-shrink: 0;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--ink-900); letter-spacing: 0;
  border-color: var(--sky-200);
}
.tag-letter:hover:not(:disabled) {
  border-color: var(--sky-500); background: var(--sky-50); color: var(--sky-700);
}
.tag-letter.is-empty,
.tag-letter:disabled {
  color: var(--ink-400); background: #FAFCFF; border-color: var(--line-2);
  cursor: not-allowed; font-weight: 600;
}

/* 临床试验 / 指南条目 */
.entry-row {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 18px; box-shadow: var(--shadow-sm); margin-bottom: 12px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: all .2s;
}
.entry-row:hover { border-color: var(--sky-200); box-shadow: var(--shadow-md); }
.entry-row .er-badge {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  line-height: 1.2; text-align: center;
}
.entry-row .er-badge.phase { background: var(--sky-50); color: var(--sky-700); border: 1px solid var(--sky-200); }
.entry-row .er-badge.guide { background: #F4FBF4; color: #15803D; border: 1px solid #C7E6C7; }
.entry-row .er-main { flex: 1; min-width: 0; }
.entry-row .er-main h3 { font-size: 15px; color: var(--sky-900); font-weight: 700; margin-bottom: 5px; }
.entry-row .er-meta { font-size: 12.5px; color: var(--ink-400); display: flex; flex-wrap: wrap; gap: 12px; }

/* 检索历史 */
.history-item {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 18px; box-shadow: var(--shadow-sm); margin-bottom: 11px; transition: all .2s;
}
.history-item:hover { border-color: var(--sky-200); box-shadow: var(--shadow-md); }
.history-item .hi-time {
  flex-shrink: 0; width: 132px; font-size: 12.5px; color: var(--ink-400); font-family: var(--mono);
}
.history-item .hi-q { flex: 1; font-size: 14px; color: var(--ink-900); min-width: 0; }
.history-item .hi-q .tag { color: var(--sky-700); font-weight: 700; margin-right: 6px; }
.history-item .hi-n { flex-shrink: 0; font-size: 12.5px; color: var(--ink-400); }
.history-item .hi-acts { flex-shrink: 0; display: flex; gap: 6px; }

/* 空状态 */
.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-400); }
.empty-state svg { width: 56px; height: 56px; fill: var(--sky-200); margin-bottom: 14px; }
.empty-state h3 { font-size: 16px; color: var(--ink-700); font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; }
/* 行内翻页：置于结果概览右侧 */
.pagination-inline { margin-top: 0; }
.pagination-inline button {
  min-width: 28px; height: 28px; padding: 0 8px; font-size: 12.5px; border-radius: 6px;
}

/* 分页容器：顶部（排序下拉后）与底部同步渲染同一套控件 */
.pagination-holder {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.pagination-holder-bottom {
  margin-top: 28px; justify-content: center;
}
.pagination-holder button {
  min-width: 30px; height: 30px; padding: 0 10px; font-size: 13px;
  border-radius: 7px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-700); transition: all .18s;
}
.pagination-holder button:hover:not([disabled]) { border-color: var(--sky-400); color: var(--sky-700); }
.pagination-holder button[disabled] { opacity: .4; pointer-events: none; }

/* 跳转指定页 */
.page-jump {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px; padding-left: 12px;
  border-left: 1px solid var(--line);
}
.page-jump-input {
  width: 56px; height: 30px; text-align: center;
  border: 1px solid var(--line); border-radius: 7px; outline: none;
  font-size: 13px; color: var(--ink-900); background: #fff;
  font-family: var(--mono);
}
.page-jump-input:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(22, 119, 255, .08); }
.page-jump-input::-webkit-outer-spin-button,
.page-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.page-jump-total { font-size: 12.5px; color: var(--ink-400); white-space: nowrap; }
.page-jump-btn {
  min-width: auto !important; height: 30px !important; padding: 0 12px !important;
  font-size: 12.5px !important; font-weight: 600;
  border: 1px solid var(--sky-300) !important; color: var(--sky-700) !important;
  background: #fff !important;
}
.page-jump-btn:hover { background: var(--sky-50) !important; border-color: var(--sky-500) !important; }
.pagination button {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-700); font-size: 13px;
  transition: all .18s;
}
.pagination button:hover { border-color: var(--sky-400); color: var(--sky-700); }
.pagination button.active { background: var(--grad-main); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(22,119,255,.26); }
.pagination button[disabled] { opacity: .4; pointer-events: none; }
.pagination .ellipsis { color: var(--ink-300); padding: 0 4px; }

/* ==========================================================================
   文献详情页
   ========================================================================== */
.detail-main { padding: 22px 0 56px; flex: 1; }
.crumb {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--ink-400); margin-bottom: 16px;
}
.crumb a { font-weight: 600; }

.dp-article {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 26px 30px 30px;
}

/* PubMed 风格：期刊条 */
.dp-journal-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.dp-jb-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dp-journal-name { font-size: 17px; font-weight: 700; color: var(--sky-900); }
.dp-journal-year { font-size: 15px; color: var(--ink-400); }
.dp-jb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* SinoMed 风格：中文期刊文献的顶部操作条（申请全文 / 全文链接 / 引用文献） */
.dp-bar-cn {
  background: linear-gradient(180deg, var(--sky-50), #fff);
  border: 1px solid var(--sky-100);
  border-radius: var(--radius-md);
  padding: 12px 16px; margin-bottom: 18px;
}
.dp-bar-cn .dp-journal-year { font-size: 13px; }

.dp-title {
  font-size: 24px; line-height: 1.45; font-weight: 700;
  color: var(--sky-900); letter-spacing: .2px; margin-bottom: 16px;
}
.dp-authors { font-size: 14.5px; color: var(--ink-700); line-height: 1.9; margin-bottom: 14px; }
.dp-authors .au { color: var(--ink-900); }
.dp-authors .sup {
  font-size: 10px; color: var(--sky-700); font-weight: 700;
  vertical-align: super; margin-left: 2px;
}
.dp-authors .corr { color: var(--hot); font-size: 12px; vertical-align: super; margin-left: 2px; }
.dp-affil-hd {
  font-size: 13px; font-weight: 700; color: var(--sky-800);
  margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2);
}
/* 作者单位：默认折叠，点击展开 */
.dp-affil-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--sky-200); background: var(--sky-50);
  color: var(--sky-700); font-size: 13px; font-weight: 600;
  margin-bottom: 12px; transition: all .18s;
}
.dp-affil-toggle:hover { border-color: var(--sky-400); background: var(--sky-100); }
.dp-affil-toggle svg { width: 13px; height: 13px; fill: currentColor; transition: transform .2s; }
.dp-affil-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.dp-affil-panel { margin-bottom: 14px; }
.dp-affil-panel[hidden] { display: none; }
.dp-affil { padding-left: 0; list-style: none; font-size: 13.5px; color: var(--ink-600); }
.dp-affil li { padding: 3px 0; }
.dp-affil .org-no { color: var(--sky-700); font-weight: 700; margin-right: 6px; }

.dp-source { font-size: 14px; color: var(--ink-700); margin-bottom: 8px; }
.dp-source .j-abbr { font-style: italic; font-weight: 600; color: var(--ink-900); }
.dp-source .j-cn { font-weight: 600; color: var(--ink-900); }
.dp-ids { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-600); margin-bottom: 18px; }
.dp-ids b { color: var(--sky-700); font-weight: 700; margin-right: 6px; font-size: 12px; }

.dp-body { display: grid; grid-template-columns: 1fr 286px; gap: 30px; align-items: start; }
.dp-main { min-width: 0; }
.dp-sec { margin-bottom: 26px; }
.dp-sec h2 {
  font-size: 15px; color: var(--sky-900); font-weight: 700;
  margin-bottom: 10px; padding-left: 10px;
  border-left: 3px solid var(--sky-500);
}
.dp-abstract { font-size: 14px; line-height: 1.95; color: var(--ink-700); }
.dp-abstract p { margin-bottom: 9px; }
.dp-abstract .ab-label { color: var(--sky-800); font-weight: 700; }

/* 参考文献 / 被引文献 */
.dp-sec h2 .sec-sub {
  font-size: 12px; font-weight: 500; color: var(--ink-400);
  margin-left: 10px; letter-spacing: 0;
}
.ref-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.ref-list li { display: flex; align-items: flex-start; gap: 10px; }
.ref-no {
  flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--sky-700);
  background: var(--sky-50); border: 1px solid var(--sky-100);
  border-radius: 6px; padding: 1px 7px; line-height: 1.7;
}
.ref-main {
  flex: 1; min-width: 0;
  font-size: 13.5px; line-height: 1.85; color: var(--ink-700);
}
.ref-main a { color: var(--sky-700); font-weight: 600; }
.ref-main a:hover { color: var(--sky-600); text-decoration: underline; }
.ref-main em { font-style: normal; font-weight: 600; color: var(--ink-900); }
.ref-tag {
  display: inline-block; margin-left: 6px; padding: 0 8px;
  font-size: 11.5px; line-height: 1.7; color: var(--sky-700);
  background: var(--sky-50); border: 1px solid var(--sky-200); border-radius: 999px;
}
.dp-sinomed .ref-main { font-size: 13px; }

.dp-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-keywords .kw {
  padding: 4px 12px; border-radius: 999px;
  background: var(--sky-50); border: 1px solid var(--sky-200);
  color: var(--sky-800); font-size: 12.5px; font-weight: 600;
}

.dp-table { width: 100%; font-size: 13.5px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.dp-table th, .dp-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-2); }
.dp-table tr:last-child th, .dp-table tr:last-child td { border-bottom: none; }
.dp-table th {
  width: 150px; background: var(--sky-50); color: var(--sky-900);
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.dp-table td { color: var(--ink-700); }
.dp-table .mono { font-family: var(--mono); }

/* 侧栏 */
.dp-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.dp-side-card {
  background: #FAFCFF; border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 15px 16px;
}
.dp-side-card h4 {
  font-size: 13.5px; color: var(--sky-900); font-weight: 700; margin-bottom: 11px;
  display: flex; align-items: center; gap: 8px;
}
.dp-side-card h4::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--sky-400);
}
.dp-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dp-metrics .m { text-align: center; }
.dp-metrics .m b {
  display: block; font-size: 19px; color: var(--sky-800); font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.dp-metrics .m span { font-size: 11px; color: var(--ink-400); }
.dp-plain { font-size: 13.5px; color: var(--ink-700); }
.dp-ptypes { display: flex; flex-direction: column; gap: 5px; }
.dp-ptypes li {
  font-size: 13px; color: var(--ink-700);
  padding-left: 14px; position: relative;
}
.dp-ptypes li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--sky-400);
}
.dp-mesh { display: flex; flex-wrap: wrap; gap: 7px; }
.dp-mesh span {
  padding: 3px 10px; border-radius: 5px;
  background: #fff; border: 1px solid var(--sky-200);
  color: var(--ink-600); font-size: 12px;
}
.dp-related { display: flex; flex-direction: column; gap: 11px; }
.dp-related li { font-size: 13px; line-height: 1.6; }
.dp-related a {
  display: block; color: var(--sky-800); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dp-related a:hover { color: var(--sky-600); text-decoration: underline; }
.dp-related span { font-size: 11.5px; color: var(--ink-400); }

/* SinoMed 风格差异：更紧凑、标题偏小、侧栏指标在前 */
.dp-sinomed .dp-title { font-size: 21px; }
.dp-sinomed .dp-body { grid-template-columns: 1fr 268px; }
.dp-sinomed .dp-abstract { font-size: 13.5px; line-height: 1.9; }
.dp-sinomed .dp-sec h2 { font-size: 14px; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--sky-950); color: rgba(255,255,255,.72);
  padding: 34px 0 0; font-size: 13px;
}
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; padding-bottom: 26px; }
.footer-brand .fb-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.footer-brand .fb-logo .lg {
  width: 36px; height: 36px; border-radius: 10px; background: var(--grad-main);
  display: grid; place-items: center;
}
.footer-brand .fb-logo .lg svg { width: 20px; height: 20px; fill: #fff; }
.footer-brand .fb-logo b { color: #fff; font-size: 16px; }
.footer-brand p { line-height: 1.9; color: rgba(255,255,255,.6); font-size: 12.5px; }
.footer-col h4 { color: #fff; font-size: 13.5px; margin-bottom: 12px; font-weight: 700; }
.footer-col a { display: block; color: rgba(255,255,255,.6); padding: 4px 0; font-size: 12.5px; }
.footer-col a:hover { color: var(--sky-300); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10); padding: 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,.45);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .result-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .filter-panel { display: none; }
  .stat-strip { flex-wrap: wrap; padding: 10px 6px; }
  .stat-cell { flex-basis: 33.33%; padding: 12px 18px; }
  .stat-cell + .stat-cell::before { display: none; }
}
/* 桌面端筛选面板常驻左栏，无需再从抽屉唤起 */
@media (min-width: 1181px) {
  #resultFilterBtn { display: none; }
}
@media (max-width: 640px) {
  .stat-cell { flex-basis: 50%; padding: 10px 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .stat-icon svg { width: 21px; height: 21px; }
  .stat-num { font-size: 20px; }
  .stat-lbl { font-size: 11.5px; }
  /* 窄屏顶栏：隐藏机构名与登录按钮，避免导航区撑破视口造成横向滚动 */
  .nav-org, .btn-login { display: none; }
  /* 窄屏检索条件行：字段/运算符/删除按钮一行，检索词独占一行 */
  .adv-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "field op del" "term term term";
    gap: 8px; align-items: center;
  }
  .adv-row .f-field { grid-area: field; width: 100%; }
  .adv-row .op { grid-area: op; }
  .adv-row [data-del-row] { grid-area: del; }
  .adv-row input[type="text"] { grid-area: term; width: 100%; }
}
@media (max-width: 1180px) {
  .journal-grid { grid-template-columns: 1fr; }
  .journal-layout { grid-template-columns: 1fr; }
  .subject-tree { position: static; }
  .subject-tree-body { max-height: 320px; }
  .dp-body, .dp-sinomed .dp-body { grid-template-columns: 1fr; }
  .dp-side { position: static; }
}
@media (max-width: 980px) {
  .nav-menu { display: none; }
  .nav-menu.show-mobile {
    display: flex; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 12px 20px 18px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); gap: 4px;
  }
  .nav-menu.show-mobile a { padding: 11px 16px; border-radius: var(--radius-xs); }
  .nav-toggle { display: grid !important; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .adv-grid { grid-template-columns: 1fr; }
  .adv-card-wide .op-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-card-wide .field-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 26px; }
  .fb-row { flex-direction: column; gap: 8px; }
  .fb-label { width: auto; padding-top: 0; }
}
@media (max-width: 720px) {
  .check-grid, .form-grid { grid-template-columns: 1fr; }
  .ftm-grid { grid-template-columns: 1fr; }
  .sb-row { flex-wrap: wrap; }
  .sb-field { width: 100%; flex-basis: 100%; }
  .ai-input-foot { flex-direction: column; align-items: stretch; }
  .ai-actions { justify-content: flex-end; }
  .footer-top { grid-template-columns: 1fr; }
  .quartile-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 16px; }
  .adv-card-wide .op-grid,
  .adv-card-wide .field-grid { grid-template-columns: 1fr 1fr; }
}
.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: 9px;
  place-items: center; border: 1px solid var(--line); color: var(--ink-700);
}
.nav-toggle svg { width: 19px; height: 19px; fill: currentColor; }

/* 打印 */
@media print {
  .site-header, .site-footer, .drawer, .drawer-mask, .lit-actions, .side-panel { display: none !important; }
  .lit-card { break-inside: avoid; box-shadow: none; }
}

/* ==========================================================================
   AISS 真实数据层：加载 / 错误 / 空态（与设计系统一致）
   ========================================================================== */
.aiss-loading,
.aiss-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-400);
  text-align: center;
}
.aiss-loading .spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--sky-600);
  border-radius: 50%;
  animation: aissSpin 0.8s linear infinite;
}
@keyframes aissSpin { to { transform: rotate(360deg); } }
.aiss-error b { color: var(--ink-900); font-size: 15px; }
.aiss-error p { margin: 0; font-size: 13px; }
.aiss-error .btn { margin-top: 4px; }

/* 数据规模条：首页 / 结果页显示真实库容量 */
.aiss-dbstats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-400);
}
.aiss-dbstats b { color: var(--sky-700); font-size: 15px; font-weight: 650; }
.aiss-dbstats .sep { width: 1px; height: 14px; background: var(--line); }

/* 期刊卡片里的真实指标行 */
.jn-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--ink-400); }
.jn-metrics span { background: var(--bg); border-radius: 999px; padding: 2px 8px; }

/* 自然语言检索解析结果提示 */
.parse-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--ink-400);
}
.parse-notes .pn-q { color: var(--ink-900); font-weight: 600; margin-right: 4px; }
.parse-notes .pn-chip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--sky-700);
}

/* ==========================================================================
   检索史：统计条 / 入口筛选 / 日期分组
   ========================================================================== */
.hist-stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px;
  padding: 16px 22px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.hist-stats .hs { display: flex; flex-direction: column; gap: 1px; }
.hist-stats .hs b {
  font-size: 21px; line-height: 1.2; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.hist-stats .hs span { font-size: 12px; color: var(--ink-400); }
.hist-stats .hs-tip {
  margin-left: auto; max-width: 330px; font-size: 12px; line-height: 1.6;
  color: var(--ink-400);
}

.hist-types { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.hist-type {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; font-size: 12.5px; font-family: inherit;
  color: var(--ink-600); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: all .16s;
}
.hist-type em { font-style: normal; font-size: 11px; color: var(--ink-300); }
.hist-type:hover { border-color: var(--sky-300); color: var(--sky-700); }
.hist-type.active {
  background: var(--sky-600); border-color: var(--sky-600); color: #fff;
}
.hist-type.active em { color: rgba(255, 255, 255, .85); }

.hist-day {
  display: flex; align-items: baseline; gap: 10px;
  margin: 20px 0 9px; padding-left: 2px;
  font-size: 12.5px; color: var(--ink-400);
}
.hist-day span { font-size: 13px; font-weight: 700; color: var(--ink-700); }
.hist-day em { font-style: normal; }

/* 日期已分组显示，条目内只留时分 */
.history-item .hi-time { width: 48px; }
.history-item .hi-q { line-height: 1.55; }
.hi-filters { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-400); }
.history-item .hi-acts .btn-xs { white-space: nowrap; }
.history-item .hi-del:hover { color: #C81E1E; border-color: #F8B4B4; }

.hi-tag-ai { color: var(--sky-700) !important; }
.hi-tag-adv { color: #6D48D0 !important; }
.hi-tag-pro { color: #0E9F6E !important; }
.hi-tag-inline { color: #B26A00 !important; }
.hi-tag-jn { color: #0B7285 !important; }

/* 首页数据口径说明 */
.db-scope {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
  margin-top: 14px; font-size: 12.5px; color: var(--ink-400);
}
.db-scope b { color: var(--ink-700); font-weight: 650; }
.db-scope .sep { color: var(--ink-300); }
