/* 风机知识库：纯色、少装饰，突出几何与文字 */
:root {
  --bg: #fafaf8;
  --paper: #ffffff;
  --ink: #1f252b;
  --ink2: #4b5560;
  --mute: #8a939c;
  --line: #d9dde1;
  --struct: #3d6b8c;   /* 结构：雾蓝 */
  --aero: #b0603f;     /* 气动：赤陶 */
  --ctrl: #6b7a4f;     /* 控制：橄榄灰 */
  --wind: #7d8794;     /* 入流：灰 */
  --soft: #eef2f5;
  --plan: #9aa1a8;    /* 规划中 */
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px; line-height: 1.7;
}
a { color: var(--struct); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.top {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0; z-index: 10;
}
.top .brand { font-weight: 600; letter-spacing: .5px; color: var(--ink); }
.top nav { display: flex; gap: 20px; font-size: 14px; }
.top nav a { color: var(--ink2); }
.top nav a.on { color: var(--ink); font-weight: 600; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
h1 { font-size: 26px; font-weight: 600; margin: 34px 0 6px; }
.lead { color: var(--ink2); max-width: 760px; margin: 0 0 18px; }
.kicker { font-size: 13px; color: var(--mute); letter-spacing: 1px; }

/* 首页整机图 */
.hero svg { width: 100%; height: auto; display: block; }
#hero { --hc: var(--ink); }
#hero .o { fill: #fff; stroke: #2b3138; stroke-width: 1.4; stroke-linejoin: round; transition: stroke .2s; }
#hero .o.thin { fill: none; stroke: #6b747d; stroke-width: 1; }
#hero line.o { fill: none; }
#hero .hatch { stroke: #b9c0c6; stroke-width: 1; }
#hero .frame { fill: none; stroke: #c5cbd1; stroke-width: 1; }
#hero .detail { fill: none; stroke: #9aa3ab; stroke-width: 1; stroke-dasharray: 2 3; }
#hero .gnd { stroke: #9aa3ab; stroke-width: 1.2; }
#hero .lab { font-size: 12px; fill: #4b5560; font-style: italic; }
#hero .lab2 { font-size: 11px; fill: #8a939c; }
#hero .p-wind .o, #hero .p-wind line.o { fill: none; stroke: #7d8794; }
#hero .part { cursor: pointer; transition: opacity .2s; }
#hero.dim .part { opacity: .18; }
#hero.dim .part.hl { opacity: 1; }
#hero .part.hl .o { stroke: var(--hc); stroke-width: 1.8; }
#hero .part.hl .o.thin { stroke: var(--hc); stroke-width: 1.3; }
.callout { cursor: pointer; outline: none; }
.callout rect { fill: var(--paper); stroke: var(--line); transition: stroke .2s; }
.callout:hover rect, .callout.hl rect { stroke: currentColor; stroke-width: 1.4; }
.callout .t1 { font-size: 15px; font-weight: 600; fill: var(--ink); }
.callout .t2 { font-size: 12px; fill: var(--ink2); }
.callout .t3 { font-size: 11px; fill: var(--mute); }
.callout.planned .t1 { fill: var(--ink2); font-weight: 500; }
.leader { fill: none; stroke-dasharray: 4 3; stroke-width: 1.1; }

/* 研究主线条 */
.strip { display: flex; gap: 0; margin: 10px 0 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); overflow: hidden; }
.strip .st { flex: 1; padding: 12px 14px; border-right: 1px solid var(--line); cursor: pointer; }
.strip .st:last-child { border-right: none; }
.strip .st:hover { background: var(--soft); }
.strip .no { font-size: 12px; color: var(--mute); }
.strip .nm { font-weight: 600; }
.strip .ds { font-size: 12.5px; color: var(--ink2); }

/* 模块页：两条故事线 */
.tracks { position: relative; margin: 8px 0 60px; }
.track { margin: 26px 0 8px; }
.track h2 { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.track .sub { color: var(--ink2); font-size: 13.5px; margin: 0 0 14px; }
.nodes { display: grid; gap: 14px; position: relative; z-index: 2; }
.nodes.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nodes.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nodes.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.node {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 12px 12px; cursor: pointer; transition: border-color .2s, transform .2s;
}
.node:hover, .node.hl { border-color: var(--struct); transform: translateY(-2px); }
.node .no { font-size: 12px; color: var(--mute); }
.node .nm { font-weight: 600; font-size: 15px; margin: 2px 0 2px; }
.node .ds { font-size: 12.5px; color: var(--ink2); line-height: 1.55; }
.node svg { width: 100%; height: 118px; display: block; margin: 4px 0 6px; }
.links { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.links path { fill: none; stroke: var(--mute); stroke-width: 1.1; stroke-dasharray: 4 3; transition: stroke .2s, opacity .2s; }
.links path.hl { stroke: var(--struct); stroke-width: 1.8; }
.links text { font-size: 12px; fill: var(--struct); opacity: 0; transition: opacity .2s; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.links text.hl { opacity: 1; }
.gap { height: 78px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(25, 30, 35, .38);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.mask.on { display: flex; }
.modal {
  width: min(880px, 100%); max-height: 88vh; overflow: auto;
  background: var(--paper); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.18);
  display: grid; grid-template-columns: 1fr;
}
.modal .fig { background: var(--soft); padding: 18px 22px 8px; border-radius: 14px 14px 0 0; }
.modal .fig svg { width: 100%; height: auto; max-height: 330px; display: block; }
.modal .cap { font-size: 12px; color: var(--ink2); text-align: center; padding: 4px 0 6px; }
.modal .body { padding: 16px 26px 22px; }
.modal .kk { font-size: 12px; color: var(--mute); letter-spacing: 1px; }
.modal h3 { font-size: 20px; margin: 2px 0 8px; font-weight: 600; }
.modal p { margin: 6px 0; }
.modal ul { margin: 6px 0; padding-left: 20px; }
.modal li { margin: 3px 0; }
.modal .eq { background: var(--bg); border-left: 3px solid var(--struct); padding: 4px 12px; margin: 8px 0; overflow-x: auto; }
.modal .nums { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.modal .num { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; min-width: 120px; }
.modal .num b { display: block; font-size: 18px; color: var(--struct); }
.modal .num span { font-size: 12px; color: var(--ink2); }
.modal .docs { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.modal .docs a { display: block; padding: 3px 0; }
.modal .docs a::before { content: "→ "; color: var(--mute); }
.modal .bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.btn { display: inline-block; border: 1px solid var(--ink); color: var(--ink); border-radius: 8px; padding: 6px 16px; font-size: 14px; background: var(--paper); cursor: pointer; }
.btn.pri { background: var(--ink); color: #fff; }
.btn:hover { text-decoration: none; opacity: .85; }
.x { border: none; background: none; font-size: 22px; color: var(--mute); cursor: pointer; float: right; line-height: 1; }

/* 文档库 */
.lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 60px; }
.lib .grp { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.lib h3 { font-size: 15px; margin: 0 0 6px; }
.lib a { display: block; font-size: 13.5px; padding: 2px 0; }
.lib .tag { font-size: 11px; color: var(--mute); margin-left: 6px; }

/* 文档阅读页 */
.reader { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 54px); }
.reader aside { border-right: 1px solid var(--line); padding: 16px; font-size: 13px; background: var(--paper); overflow: auto; }
.reader aside a { display: block; padding: 2px 0; color: var(--ink2); }
.reader aside a.on { color: var(--struct); font-weight: 600; }
.reader aside h4 { margin: 12px 0 4px; font-size: 12px; color: var(--mute); }
.reader iframe { width: 100%; height: calc(100vh - 54px); border: none; background: #fff; }
.reader .md { padding: 20px 40px 60px; max-width: 900px; background: #fff; }
.reader .md table { border-collapse: collapse; }
.reader .md td, .reader .md th { border: 1px solid var(--line); padding: 3px 8px; }
.reader .md pre { background: var(--bg); padding: 10px; overflow: auto; }

/* 几何图通用 */
.g-ink { stroke: var(--ink); fill: none; stroke-width: 1.4; }
.g-thin { stroke: var(--ink2); fill: none; stroke-width: 1; }
.g-mute { stroke: var(--mute); fill: none; stroke-width: 1; }
.g-dash { stroke: var(--mute); fill: none; stroke-width: 1; stroke-dasharray: 4 3; }
.g-acc { stroke: var(--struct); fill: none; stroke-width: 2; }
.g-accf { fill: var(--struct); }
.g-txt { font-size: 12px; fill: var(--ink2); }
.g-txs { font-size: 10.5px; fill: var(--mute); }
.g-txa { font-size: 12px; fill: var(--struct); font-weight: 600; }

@media (max-width: 900px) {
  .nodes.n5, .nodes.n4, .nodes.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .links { display: none; }
  .gap { height: 10px; }
  .lib { grid-template-columns: 1fr; }
  .strip { flex-direction: column; }
  .strip .st { border-right: none; border-bottom: 1px solid var(--line); }
  .top { padding: 12px 16px; gap: 14px; }
  .wrap { padding: 0 16px; }
  .reader { grid-template-columns: 1fr; }
  .reader aside { display: none; }
}

/* 撰写中、文章列表 */
.wip { font-size: 11px; color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 8px; }
.node.todo .nm { color: var(--ink2); }
.btn.off { border-color: var(--line); color: var(--mute); cursor: default; }
.arts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 10px 0 26px; }
.art { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink); font-size: 14px; }
.art .kk { display: block; font-size: 11.5px; color: var(--mute); }
a.art:hover { border-color: var(--struct); text-decoration: none; }
.art.off { color: var(--ink2); }
h2.sec { font-size: 17px; font-weight: 600; margin: 26px 0 4px; }
@media (max-width: 900px) { .arts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
