/* HF-Met 样式：白底 + 深海军蓝主色，亚型色只用于数据（与论文图一致） */
:root {
  --navy: #0B1F3A; --navy-2: #13305A; --accent: #2F5D9E;
  --ink: #142033; --ink-2: #4A5568; --ink-3: #7A8699;
  --line: #E3E8EF; --bg: #F5F7FA; --card: #FFFFFF;
  --ms1: #3C5488; --ms2: #00A087; --ms3: #E64B35;
  --a1: #E64B35; --a2: #E3A13A; --a3: #00A087;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,32,56,.06), 0 8px 24px rgba(16,32,56,.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 15px;
  -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; }
p { margin: 0 0 .8em; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.num, .kpi b, .tbl td, .prob-val { font-variant-numeric: tabular-nums; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(11,31,58,.97); backdrop-filter: blur(8px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-mark { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 17px; letter-spacing: .04em; }
.brand-text small { font-size: 11px; color: #A9B8D0; letter-spacing: .08em; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: #C9D4E5; padding: 8px 14px; border-radius: 8px; font-size: 14px; white-space: nowrap; transition: .15s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.active { color: #fff; background: rgba(255,255,255,.14); }

/* 首页主视觉 */
.hero { background: radial-gradient(1200px 500px at 85% 20%, #1B3F73 0%, var(--navy) 60%); color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #8FB3E8; margin-bottom: 14px; }
.hero h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; margin-bottom: 18px; }
.lead { font-size: 16px; color: #C9D4E5; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-art svg { width: 100%; height: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border-radius: 10px;
  font: 600 14px var(--font); cursor: pointer; border: 1px solid transparent; transition: .15s; }
.btn-primary { background: #fff; color: var(--navy); }
.page:not(#page-home) .btn-primary, .calc .btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.page:not(#page-home) .btn-ghost { color: var(--accent); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: currentColor; }

/* 指标条 */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); margin-top: -36px; position: relative; }
.kpi { background: #fff; padding: 20px 22px; }
.kpi b { display: block; font-size: 28px; color: var(--navy); font-weight: 700; }
.kpi span { font-size: 13px; color: var(--ink-3); }

/* 通用 */
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 48px 0 18px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head p { margin: 0; color: var(--ink-3); font-size: 14px; }
.page-title { padding: 40px 0 22px; }
.page-title h1 { font-size: 28px; margin-bottom: 6px; }
.page-title p { color: var(--ink-2); margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card-title { font-size: 16px; margin-bottom: 14px; }
.card-title small { font-weight: 400; color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.note { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.feat-no { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .1em; margin-bottom: 8px; }
.feat h3 { font-size: 17px; }
.feat p { color: var(--ink-2); font-size: 14px; margin: 0; }
main { padding-bottom: 48px; }

/* 亚型卡片 */
.st-card { border-top: 4px solid var(--c); }
.st-card .st-head { display: flex; align-items: baseline; justify-content: space-between; }
.st-card .st-code { font-size: 26px; font-weight: 800; color: var(--c); }
.st-card .st-n { color: var(--ink-3); font-size: 13px; }
.st-card h3 { font-size: 16px; margin: 4px 0 12px; }
.st-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.st-card li { margin-bottom: 4px; }
.st-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.st-detail .card { margin: 0; }
.st-block { margin-top: 14px; }
.st-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 10%, white); color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 25%, white); }

/* 表格 */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-transform: none; border-bottom: 2px solid var(--line); }
.tbl tbody tr:hover { background: #F8FAFD; }

/* 分型计算 */
.calc { display: grid; grid-template-columns: 400px 1fr; gap: 20px; align-items: start; }
.calc-in { position: sticky; top: 82px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 12px; }
.tab { border: 0; background: transparent; padding: 9px 8px; border-radius: 8px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; }
.tab.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hint { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.examples { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.ex-btn { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 11px; font: 600 12.5px var(--font); cursor: pointer; color: var(--c); }
.ex-btn:hover { border-color: var(--c); }
.link { border: 0; background: none; color: var(--ink-3); font: 12.5px var(--font); cursor: pointer; text-decoration: underline; margin-left: auto; }
.field { margin-bottom: 12px; }
.field label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink); margin-bottom: 5px; }
.field label .tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; color: #fff; background: var(--c, var(--ink-3)); white-space: nowrap; height: 18px; }
.field label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-row { display: grid; grid-template-columns: 1fr 86px; gap: 10px; align-items: center; }
.field input[type=number] { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: 14px var(--font);
  text-align: right; font-variant-numeric: tabular-nums; }
.field input[type=number]:focus { outline: 2px solid color-mix(in srgb, var(--accent) 30%, white); border-color: var(--accent); }
.field input[type=range] { width: 100%; accent-color: var(--accent); }
.unit { font-size: 12px; color: var(--ink-3); }
.form-sep { font-size: 12px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; margin: 16px 0 10px; border-top: 1px dashed var(--line); padding-top: 12px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.form-foot .btn { min-width: 140px; }
.err { color: #C0392B; font-size: 13px; }

.empty { text-align: center; padding: 70px 24px; color: var(--ink-3); }
.empty svg { width: 80px; margin-bottom: 10px; }
.result-head { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; border-left: 6px solid var(--c); }
.rh-label { font-size: 12px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.rh-sub { font-size: 44px; font-weight: 800; color: var(--c); line-height: 1.1; }
.rh-name { font-size: 15px; font-weight: 600; margin: 4px 0 10px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.badge.clear { background: #E6F6F1; color: #0B7A5C; }
.badge.leaning { background: #FFF4E0; color: #9A6200; }
.badge.borderline { background: #FDECEA; color: #B03A2E; }
.prob { display: grid; grid-template-columns: 44px 1fr 62px; gap: 12px; align-items: center; margin: 8px 0; }
.prob-name { font-weight: 700; color: var(--c); }
.prob-bar { height: 12px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.prob-bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.prob-val { text-align: right; font-weight: 600; }
.map { width: 100%; height: auto; display: block; }
.contrib-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 64px 1fr; gap: 12px; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #F0F3F7; }
.contrib-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contrib-row .cv { color: var(--ink-3); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.cbar { position: relative; height: 14px; }
.cbar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px solid #C9D2DE; }
.cbar i { position: absolute; top: 2px; height: 10px; border-radius: 3px; }
.nb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.nb { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.nb span { display: block; font-size: 12px; color: var(--ink-3); }
.nb b { font-size: 20px; color: var(--navy); }
.nb em { font-style: normal; font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.nb-mix { grid-column: span 4; display: flex; height: 26px; border-radius: 8px; overflow: hidden; font-size: 12px; color: #fff; font-weight: 600; }
.nb-mix div { display: flex; align-items: center; justify-content: center; min-width: 0; }
.interp p { color: var(--ink-2); }
.actions { margin-top: 10px; }

/* 代谢轴 */
.axes { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.axes-map { margin: 0; }
.seg { display: inline-flex; background: var(--bg); padding: 4px; border-radius: 10px; gap: 2px; flex-wrap: wrap; margin-bottom: 8px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: 600 13px var(--font); color: var(--ink-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.axis-card { border-left: 4px solid var(--c); }
.axis-card .axis-tag { font-weight: 800; color: var(--c); font-size: 13px; letter-spacing: .1em; }
.axis-card h3 { font-size: 16px; margin: 2px 0 8px; }
.axis-card h3 small { color: var(--ink-3); font-weight: 400; font-size: 12.5px; margin-left: 4px; }
.axis-card p { color: var(--ink-2); font-size: 13.5px; margin: 0; }

/* 研究证据 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 12px; }
.step > b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 13px; }
.step h4 { font-size: 15px; margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--ink-2); margin: 0; }
.fig { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.fig h3 { font-size: 17px; }
.fig p { color: var(--ink-2); font-size: 14px; }
.fig .fig-no { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--accent); margin-bottom: 6px; }
.fig img { width: 100%; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: #fff; }
.plain { margin: 0; padding-left: 18px; color: var(--ink-2); }
.prose h3 { font-size: 16px; margin-top: 18px; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); }
.lightbox { position: fixed; inset: 0; background: rgba(8,16,30,.86); z-index: 50; display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 6px; }

.foot { border-top: 1px solid var(--line); background: #fff; }
.foot-inner { display: flex; justify-content: space-between; padding: 18px 24px; font-size: 13px; color: var(--ink-3); }

/* 响应式 */
@media (max-width: 1080px) {
  .calc, .axes { grid-template-columns: 1fr; }
  .calc-in { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-inner, .grid2, .grid3, .st-detail, .fig { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .hero-art { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis .kpi:last-child { grid-column: span 2; }
  .result-head { grid-template-columns: 1fr; gap: 12px; }
  .nb-grid { grid-template-columns: 1fr 1fr; }
  .nb-mix { grid-column: span 2; }
  .brand-text small { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .steps { grid-template-columns: 1fr; }
  .topbar-inner { height: 56px; gap: 12px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
}
@media print {
  .topbar, .foot, .calc-in, .actions, .page:not(#page-calc) { display: none !important; }
  .calc { grid-template-columns: 1fr; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}
.nowrap { display: inline-block; }
