/* ═══════════════════════════════════════════════════════════════════════
   DNA Lab Space 蛋白分析工具 · 科研级报告样式（2026-08-16）
   对应 JS：tpl_AIjiyingongju_danbaiyouhua2.js（PTM 区块 / 方法引用区 / 提示横幅）
   类名一律 sci- 前缀，避免与工具页现有样式冲突
   深色体系对齐现有工具页：卡片 rgba(7,20,40,.78) / 主色 #2563eb / 文字 #F3F4F6/#6B7280
   浅色联动 body.light：#FAF5EE 底 / #374151 正文 / 主色 #0D9488 / 次要 #8B7355
   铁律：新样式一律外置本文件，禁止内联；背景用 CSS 变量，禁止硬编码深色背景
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1) 科研诚信横幅（可溶性/Tm 经验参考提示）── */
.sci-banner{
  background:rgba(245,158,11,.08);
  border:1px solid rgba(245,158,11,.3);
  border-radius:12px;
  padding:12px 16px;
  margin-bottom:20px;
  font-size:.82rem;
  color:#F59E0B;
  line-height:1.7;
}
.sci-banner b{font-weight:600}

/* ── 2) 模块卡片容器 ── */
.sci-card{
  --card:rgba(7,20,40,.78);
  --bdr:rgba(37,99,235,.1);
  --t1:#F3F4F6;
  --t2:#6B7280;
  --cyan:#2563eb;
  --cyan-dim:rgba(37,99,235,.08);
  --amber:#F59E0B;
  --amber-dim:rgba(245,158,11,.1);
  --purple:#8B5CF6;
  --purple-dim:rgba(139,92,246,.1);
  background:var(--card);
  border:1px solid var(--bdr);
  border-radius:16px;
  padding:20px;
  margin-bottom:20px;
}
.sci-card-head{margin-bottom:14px}
.sci-card-title{margin:0 0 4px;color:var(--t1);font-size:.95rem}
.sci-note{font-size:.76rem;color:var(--purple);line-height:1.5;margin-top:4px}
.sci-empty{font-size:.82rem;color:var(--t2);padding:8px 0;line-height:1.6}

/* ── 3) 预测模块小节 ── */
.sci-mod{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--bdr)}
.sci-mod:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}
.sci-method-line{font-size:.8rem;color:var(--t1);margin-bottom:10px;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.sci-th{font-size:.7rem;color:var(--amber);border:1px solid rgba(245,158,11,.3);border-radius:999px;padding:1px 8px;background:var(--amber-dim)}
.sci-cnt{font-size:.72rem;color:var(--t2)}

/* ── 4) 方法标签 pill ── */
.sci-pill{
  display:inline-block;
  padding:2px 9px;
  border-radius:999px;
  background:var(--cyan-dim);
  border:1px solid rgba(37,99,235,.25);
  color:var(--cyan);
  font-size:.7rem;
  font-weight:600;
  line-height:1.5;
}
.sci-pill.warn{background:var(--amber-dim);border-color:rgba(245,158,11,.3);color:var(--amber)}

/* ── 5) 位点标记（圆点 + 位置，可点击高亮）── */
.sci-site{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:2px 9px 2px 7px;
  border-radius:999px;
  background:var(--purple-dim);
  border:1px solid rgba(139,92,246,.25);
  color:#C4B5FD;
  font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;
  font-size:.75rem;
  line-height:1.5;
  white-space:nowrap;
}
.sci-site::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--purple);flex:0 0 auto}
.sci-site.clickable{cursor:pointer;transition:all .15s}
.sci-site.clickable:hover{background:rgba(139,92,246,.22);border-color:var(--purple);transform:translateY(-1px)}

/* ── 6) 位点表格（紧凑 / 深色表头 / 斑马纹）── */
.sci-table{width:100%;border-collapse:collapse;font-size:.78rem;min-width:560px}
.sci-table th{
  background:rgba(7,20,40,.96);
  color:#9CA3AF;
  text-align:left;
  padding:8px 12px;
  border-bottom:1px solid rgba(48,54,61,.6);
  font-weight:500;
  white-space:nowrap;
}
.sci-table td{padding:7px 12px;border-bottom:1px solid rgba(37,99,235,.05);color:#D1D5DB;vertical-align:middle}
.sci-table tbody tr:nth-of-type(even){background:rgba(255,255,255,.015)}
.sci-table.has-detail tbody tr.clickable:nth-of-type(4n+1){background:rgba(255,255,255,.03)}
.sci-table.has-detail tbody tr:nth-of-type(even){background:transparent}
.sci-table tr.clickable{cursor:pointer}
.sci-table tr.clickable:hover td{background:rgba(37,99,235,.06)}
.sci-table .sci-td-ctx{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:.73rem;color:#A7F3D0}
.sci-table .sci-td-kin{font-weight:600;color:var(--cyan)}
.sci-table .sci-td-score{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;color:var(--t1)}
.sci-table .sci-td-jury{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;color:var(--t2)}

/* ── 7) 判定徽章 ── */
.sci-badge{
  display:inline-block;
  padding:1px 9px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:700;
  line-height:1.6;
  vertical-align:middle;
}
.sci-badge.pos{background:rgba(37,99,235,.12);color:var(--cyan);border:1px solid rgba(37,99,235,.3)}
.sci-badge.neg{background:rgba(255,255,255,.04);color:#6B7280;border:1px solid rgba(48,54,61,.4)}

/* ── 8) 磷酸化 17 激酶展开详情 ── */
.sci-kin-row td{background:transparent !important;padding:0 !important;border-bottom:none}
.sci-kin-detail{
  display:none;
  background:rgba(2,8,18,.6);
  border:1px solid rgba(37,99,235,.12);
  border-radius:10px;
  padding:14px;
  margin:6px 12px 10px;
}
.sci-kin-detail.open{display:block}
.sci-kin-title{font-size:.76rem;color:var(--t2);margin-bottom:8px}
.sci-kin-table{width:100%;border-collapse:collapse;font-size:.72rem}
.sci-kin-table th{background:transparent;color:var(--t2);text-align:left;padding:5px 8px;border-bottom:1px solid rgba(48,54,61,.5);font-weight:500}
.sci-kin-table td{padding:4px 8px;border-bottom:1px solid rgba(48,54,61,.15);color:#D1D5DB}
.sci-kin-bar{height:7px;background:rgba(48,54,61,.35);border-radius:4px;overflow:hidden;min-width:60px}
.sci-kin-bar-fill{display:block;height:100%;background:linear-gradient(90deg,rgba(37,99,235,.4),var(--cyan));border-radius:4px}

/* ── 9) 无序区统计卡 + 曲线图 ── */
.sci-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:14px}
.sci-stat{background:rgba(10,14,23,.5);border:1px solid rgba(48,54,61,.5);border-radius:10px;padding:12px;text-align:center}
.sci-stat-num{display:block;font-size:1.25rem;font-weight:700;color:var(--cyan);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;margin-bottom:3px}
.sci-stat-lab{font-size:.7rem;color:var(--t2)}

.sci-chart{margin-top:6px}
.sci-chart-legend{display:flex;gap:16px;flex-wrap:wrap;align-items:center;margin-bottom:8px;font-size:.72rem;color:var(--t2)}
.sci-legend-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.sci-lg-dot{width:14px;height:3px;border-radius:2px;background:var(--cyan);display:inline-block}
.sci-lg-dot.anchor{background:var(--amber)}
.sci-lg-dash{width:14px;height:0;border-top:2px dashed var(--amber);display:inline-block}
.sci-lg-rect{width:14px;height:10px;background:rgba(245,158,11,.18);border:1px solid rgba(245,158,11,.4);border-radius:2px;display:inline-block}
.sci-chart svg{
  width:100%;
  height:auto;
  display:block;
  border:1px solid rgba(48,54,61,.4);
  border-radius:10px;
  background:rgba(2,8,18,.45);
}
.sci-chart-line{fill:none;stroke:var(--cyan);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.sci-chart-anchor{fill:none;stroke:var(--amber);stroke-width:1.2;stroke-dasharray:3 3;opacity:.8}
.sci-chart-area{fill:var(--cyan);fill-opacity:.12}
.sci-chart-threshold{stroke:var(--amber);stroke-width:1.4;stroke-dasharray:6 4}
.sci-chart-grid{stroke:rgba(255,255,255,.06);stroke-width:1}
.sci-chart-axis{fill:var(--t2);font-size:11px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.sci-chart-region{fill:rgba(245,158,11,.10)}

/* ── 10) 旧规则模块（序列基序）── */
.sci-mod-legacy .sci-method-line{color:var(--t2)}
.sci-legacy-sites{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.sci-legacy-yes{font-size:.78rem;color:var(--t1);display:flex;align-items:center;gap:8px}

/* ── 11) 方法引用区 ── */
.sci-refs{
  --card:rgba(7,20,40,.78);
  --bdr:rgba(37,99,235,.1);
  --t1:#F3F4F6;
  --t2:#6B7280;
  --cyan:#2563eb;
  background:var(--card);
  border:1px solid var(--bdr);
  border-left:3px solid var(--cyan);
  border-radius:16px;
  padding:18px 20px;
  margin-top:20px;
}
.sci-refs-title{margin:0 0 4px;color:var(--t1);font-size:.95rem}
.sci-refs-sub{font-size:.74rem;color:var(--t2);margin-bottom:12px}
.sci-ref-item{padding:9px 0;border-bottom:1px solid var(--bdr)}
.sci-ref-item:last-child{border-bottom:none;padding-bottom:2px}
.sci-ref-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:2px}
.sci-ref-name{color:var(--cyan);font-weight:700;font-size:.84rem}
.sci-ref-type{font-size:.66rem;color:var(--t2);background:rgba(255,255,255,.05);border:1px solid rgba(48,54,61,.4);border-radius:999px;padding:0 8px;line-height:1.5}
.sci-ref-cite{font-size:.76rem;color:var(--t1);font-style:italic;line-height:1.5}
.sci-ref-note{font-size:.72rem;color:var(--t2);line-height:1.5;margin-top:2px}

/* ═══════════════════════════════════════════════════════════════════════
   ── 全站浅色主题联动 body.light（对齐 tpl_var_页面头部.css 体系）──
   通过局部 CSS 变量覆盖自动适配所有使用 var() 的后代元素
   ═══════════════════════════════════════════════════════════════════════ */
body.light .sci-card,
body.light .sci-refs{
  --card:rgba(255,252,247,.94);
  --bdr:rgba(180,140,80,.2);
  --t1:#1F2937;
  --t2:#8B7355;
  --cyan:#0D9488;
  --cyan-dim:rgba(13,148,136,.1);
  --amber:#EA580C;
  --amber-dim:rgba(234,88,12,.08);
  --purple:#7C3AED;
  --purple-dim:rgba(124,58,237,.08);
  background:var(--card);
  box-shadow:0 4px 24px rgba(120,90,40,.08);
}

/* 横幅 */
body.light .sci-banner{background:rgba(234,88,12,.06);border-color:rgba(234,88,12,.25);color:#9A3412}

/* 表格 */
body.light .sci-table th{background:rgba(255,252,247,.97);color:#8B7355;border-bottom-color:rgba(180,140,80,.3)}
body.light .sci-table td{color:#374151;border-bottom-color:rgba(180,140,80,.12)}
body.light .sci-table tbody tr:nth-of-type(even){background:rgba(0,0,0,.02)}
body.light .sci-table.has-detail tbody tr.clickable:nth-of-type(4n+1){background:rgba(0,0,0,.025)}
body.light .sci-table.has-detail tbody tr:nth-of-type(even){background:transparent}
body.light .sci-table tr.clickable:hover td{background:rgba(13,148,136,.06)}
body.light .sci-table .sci-td-ctx{color:#065F46}
body.light .sci-table .sci-td-kin{color:#0D9488}
body.light .sci-table .sci-td-score{color:#1F2937}

/* 位点 / 徽章 */
body.light .sci-site{background:rgba(124,58,237,.07);border-color:rgba(124,58,237,.3);color:#6D28D9}
body.light .sci-site::before{background:#7C3AED}
body.light .sci-site.clickable:hover{background:rgba(124,58,237,.14);border-color:#7C3AED}
body.light .sci-badge.neg{background:rgba(0,0,0,.04);color:#8B7355;border-color:rgba(180,140,80,.3)}
body.light .sci-badge.pos{background:rgba(13,148,136,.12);color:#0D9488;border-color:rgba(13,148,136,.35)}

/* 激酶展开面板 */
body.light .sci-kin-detail{background:#fff;border-color:rgba(180,140,80,.25)}
body.light .sci-kin-table th{color:#8B7355;border-bottom-color:rgba(180,140,80,.3)}
body.light .sci-kin-table td{color:#374151;border-bottom-color:rgba(180,140,80,.12)}
body.light .sci-kin-bar{background:rgba(180,140,80,.2)}

/* 统计卡 / 图表 */
body.light .sci-stat{background:#fff;border-color:rgba(180,140,80,.25)}
body.light .sci-stat-num{color:#0D9488}
body.light .sci-stat-lab{color:#8B7355}
body.light .sci-chart svg{background:rgba(255,255,255,.6);border-color:rgba(180,140,80,.3)}
body.light .sci-chart-grid{stroke:rgba(120,90,40,.12)}
body.light .sci-chart-region{fill:rgba(234,88,12,.10)}
body.light .sci-legend-item{color:#8B7355}

/* 旧规则模块 / 引用区 */
body.light .sci-ref-type{background:rgba(0,0,0,.04);border-color:rgba(180,140,80,.3);color:#8B7355}
body.light .sci-ref-cite{color:#1F2937}

/* 智能解读框（沿用 .ai-box，浅色适配） */
body.light .ai-box{background:rgba(124,58,237,.05);border-color:rgba(124,58,237,.18);color:#374151}
