/* 聚合站样式。期次色：--p1 蓝、--p2 青绿、--p3 琥珀、--p4 紫，全站徽章、路线图、矩阵共用。 */
:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --sunk: #F8F9FA;
  --ink: #17202B; --ink-2: #47515E; --ink-3: #7B8491;
  --line: #E1E4E9; --line-2: #ECEEF1;
  --link: #1D4FB0; --ok: #12805C; --warn: #A15C00; --bad: #B4232C;
  --p1: #2F62D0; --p1-t: #EAF0FC; --p2: #0F7F6B; --p2-t: #E4F4F0; --p3: #B5650B; --p3-t: #FBF0E2; --p4: #8340B0; --p4-t: #F3EAF9;
  --nav-w: 256px; --radius: 6px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.75 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; }
code { font: 0.92em/1.4 "SF Mono", Menlo, Consolas, monospace; background: var(--sunk); border: 1px solid var(--line-2); padding: 0 4px; border-radius: 4px; color: #2B3440; }

/* ---------- 外壳 ---------- */
.nav { position: fixed; inset: 0 auto 0 0; width: var(--nav-w); background: #FBFBFC; border-right: 1px solid var(--line); overflow-y: auto; padding: 18px 12px 40px; z-index: 20; }
.brand { display: block; padding: 4px 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.brand:hover { text-decoration: none; }
.brand b { display: block; font-size: 15px; line-height: 1.4; }
.brand span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.brand .ver { display: inline-block; margin-top: 6px; font-size: 11.5px; padding: 0 6px; border-radius: 3px; background: #EEF1F5; color: var(--ink-2); }
.brand .ver.int { background: #FDECEC; color: var(--bad); }
.nav h4 { margin: 16px 10px 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.02em; }
.nav a.it { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 5px; color: var(--ink-2); font-size: 14px; line-height: 1.5; border-left: 2px solid transparent; }
.nav a.it:hover { background: #F0F2F5; text-decoration: none; color: var(--ink); }
.nav a.it.on { background: #EDF1F8; color: var(--ink); font-weight: 600; border-left-color: var(--link); border-radius: 0 5px 5px 0; }
.nav a.it .n { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.nav a.it .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.main { margin-left: var(--nav-w); min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 32px; background: rgba(244, 245, 247, 0.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.crumb { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb a { color: var(--ink-2); }
.crumb i { font-style: normal; margin: 0 6px; color: #B6BCC5; }
.top .sp { flex: 1; }
.sbtn { display: flex; align-items: center; gap: 8px; min-width: 260px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; }
.sbtn:hover { border-color: #C9CED6; }
.sbtn kbd { margin-left: auto; font: 11px/1 var(--font); border: 1px solid var(--line); border-radius: 3px; padding: 3px 5px; color: var(--ink-3); }
.menu-btn { display: none; border: 0; background: none; padding: 6px; cursor: pointer; }
.content { max-width: 1160px; padding: 28px 32px 80px; }
.content.narrow { max-width: 900px; }
.foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }

/* ---------- 页头 ---------- */
.ph-head { margin-bottom: 22px; }
.ph-head h1 { margin: 0 0 6px; font-size: 27px; line-height: 1.35; font-weight: 650; letter-spacing: 0.005em; }
.ph-head .lead { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; max-width: 46em; }
.ph-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
h2.sec { margin: 40px 0 12px; font-size: 19px; line-height: 1.4; font-weight: 650; display: flex; align-items: baseline; gap: 10px; }
h2.sec .sub { font-size: 13px; font-weight: 400; color: var(--ink-3); }
h3.sub { margin: 26px 0 8px; font-size: 16px; font-weight: 600; }
.prose > p, .prose > ul, .prose > ol, .prose > blockquote, .prose > h1, .prose > h2, .prose > h3, .prose > h4, .prose > h5 { max-width: 50em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { line-height: 1.45; font-weight: 620; }
.prose h1 { font-size: 22px; margin: 30px 0 10px; }
.prose h2 { font-size: 19px; margin: 34px 0 10px; }
.prose h3 { font-size: 16.5px; margin: 26px 0 8px; }
.prose h4 { font-size: 15.5px; margin: 22px 0 6px; }
.prose h5 { font-size: 15px; margin: 18px 0 6px; color: var(--ink-2); }
.prose p { margin: 8px 0; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 6px 0; }
.prose li { margin: 3px 0; }
.prose blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid #CBD2DC; background: var(--sunk); color: var(--ink-2); }
.prose blockquote p { margin: 4px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.prose .tbl, .tbl { max-width: none; }

/* ---------- 表格 ---------- */
.tbl { overflow-x: auto; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.65; }
.tbl th, .tbl td { padding: 7px 11px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.tbl th { background: #F6F7F9; font-weight: 600; color: var(--ink-2); white-space: nowrap; position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBFC; }
.tbl td.nw, .tbl th.nw { white-space: nowrap; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl td.wide { min-width: 320px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.filters input[type=search] { height: 32px; min-width: 240px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13.5px; background: var(--surface); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-right: 1px solid var(--line); background: none; padding: 4px 11px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: #EDF1F8; color: var(--ink); font-weight: 600; }
.fcount { font-size: 12.5px; color: var(--ink-3); margin-left: 4px; }

/* ---------- 徽章 ---------- */
.rid { display: inline-block; font-weight: 600; font-size: 12.5px; line-height: 1.55; padding: 0 6px; border-radius: 4px; white-space: nowrap; letter-spacing: 0.01em; }
.rid:hover { text-decoration: none; filter: brightness(0.95); }
.rid.p1 { color: var(--p1); background: var(--p1-t); } .rid.p2 { color: var(--p2); background: var(--p2-t); }
.rid.p3 { color: var(--p3); background: var(--p3-t); } .rid.p4 { color: var(--p4); background: var(--p4-t); }
.rid.big { font-size: 15px; padding: 2px 9px; }
.ph { display: inline-block; font-size: 12px; line-height: 1.6; padding: 0 7px; border-radius: 10px; color: #fff; font-weight: 500; white-space: nowrap; }
.ph.p1 { background: var(--p1); } .ph.p2 { background: var(--p2); } .ph.p3 { background: var(--p3); } .ph.p4 { background: var(--p4); }
.tag { display: inline-block; font-size: 12px; line-height: 1.6; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.tag.must { border-color: #F0C9CC; color: var(--bad); background: #FEF6F6; }
.tag.should { border-color: #F1D9B5; color: var(--warn); background: #FFF9F0; }
.tag.opt { color: var(--ink-3); }
.tag.capA { border-color: #BFE3D4; color: var(--ok); background: #F2FAF6; }
.tag.capB { border-color: #CFDAF1; color: var(--link); background: #F4F7FD; }
.tag.capC { border-color: #E6D3F0; color: var(--p4); background: #FAF5FD; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; font-size: 13px; line-height: 1.5; padding: 2px 8px; border-radius: 5px; background: var(--sunk); border: 1px solid var(--line-2); color: var(--ink-2); margin: 2px 4px 2px 0; }
.chip b { color: var(--ink); font-weight: 600; }
.chip.pre { border-style: dashed; background: transparent; }
a.chip:hover { text-decoration: none; border-color: #C9CED6; }
.cid, .qid { white-space: nowrap; }
.proto-link code { border-color: #D6DEEC; background: #F3F6FB; color: var(--link); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* ---------- 卡片、提示框 ---------- */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.box > :first-child { margin-top: 0; } .box > :last-child { margin-bottom: 0; }
.note { border-left: 3px solid #9AA6B6; background: var(--surface); padding: 10px 14px; margin: 12px 0; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: var(--ink-2); }
.note.warn { border-left-color: #D99A3C; background: #FFFBF4; }
.note.bad { border-left-color: var(--bad); background: #FFF7F7; }
.note.ok { border-left-color: var(--ok); background: #F5FBF8; }
.note b.t { color: var(--ink); margin-right: 6px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; color: var(--ink); }
.lcard:hover { text-decoration: none; border-color: #BFC7D2; }
.lcard b { display: block; font-size: 14.5px; }
.lcard span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; line-height: 1.55; }
.stat { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat > div { flex: 1 1 140px; padding: 12px 16px; border-right: 1px solid var(--line-2); }
.stat > div:last-child { border-right: 0; }
.stat b { display: block; font-size: 22px; line-height: 1.3; font-weight: 650; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 首页路线图 ---------- */
.road { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 18px 0 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.road a.st { display: block; padding: 0 0 16px; color: var(--ink); border-right: 1px solid var(--line-2); position: relative; }
.road a.st:last-child { border-right: 0; }
.road a.st:hover { text-decoration: none; background: #FBFCFD; }
.road .bar { height: 6px; }
.road .st.p1 .bar { background: var(--p1); } .road .st.p2 .bar { background: var(--p2); } .road .st.p3 .bar { background: var(--p3); } .road .st.p4 .bar { background: var(--p4); }
.road .hd { padding: 12px 16px 0; display: flex; align-items: baseline; gap: 8px; }
.road .hd b { font-size: 18px; }
.road .st.p1 .hd b { color: var(--p1); } .road .st.p2 .hd b { color: var(--p2); } .road .st.p3 .hd b { color: var(--p3); } .road .st.p4 .hd b { color: var(--p4); }
.road .hd span { font-size: 12.5px; color: var(--ink-3); }
.road .nm { padding: 2px 16px 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.road .see { padding: 8px 16px 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.road .ft { padding: 10px 16px 0; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 绑定轨道 ---------- */
.rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 18px 0 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 8px 12px; }
.rail a.node { position: relative; display: block; text-align: center; color: var(--ink); padding: 0 6px; }
.rail a.node:hover { text-decoration: none; }
.rail a.node::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.rail a.node:first-child::before { display: none; }
.rail .dotc { position: relative; z-index: 1; display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.rail .node.ok .dotc { background: var(--phc); border-color: var(--phc); box-shadow: inset 0 0 0 3px #fff; }
.rail .node.ok::before { background: var(--phc); opacity: 0.45; }
.rail .node.na .dotc { border-style: dashed; border-color: #AAB2BD; }
.rail .node.miss .dotc { border-color: var(--bad); }
.rail .lb { display: block; font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.rail .dt { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.5; margin-top: 1px; }

/* ---------- 需求页 ---------- */
.rq-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.rq-head h1 { margin: 0; }
.layout2 { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 28px; align-items: start; }
.side { position: sticky; top: 72px; font-size: 13px; }
.side h5 { margin: 0 0 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.side a.tl { display: block; padding: 3px 0 3px 10px; color: var(--ink-2); border-left: 2px solid var(--line-2); }
.side a.tl:hover { color: var(--ink); border-left-color: #AEB6C1; text-decoration: none; }
.side .bd { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.9; }
.side .pn { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.attr { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.attr > div { padding: 9px 13px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-size: 13.5px; line-height: 1.6; }
.attr > div.w { grid-column: 1 / -1; }
.attr dt { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.attr dd { margin: 0; }
.fld { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.fld:first-of-type { border-top: 0; }
.fld > .k { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding-top: 1px; }
.fld > .k small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.fld > .v { min-width: 0; font-size: 14.5px; }
.fld > .v > :first-child { margin-top: 0; } .fld > .v > :last-child { margin-bottom: 0; }
.fld > .v ol, .fld > .v ul { padding-left: 1.4em; margin: 2px 0; }
.fld.miss .v { color: var(--bad); font-size: 13.5px; }
.pass { border: 1px solid #BFE3D4; background: #F4FBF8; border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; font-size: 14.5px; }
.pass b { color: var(--ok); margin-right: 6px; }
.card-md { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 12px 0; }
.card-md > .hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: #FAFBFC; border-radius: var(--radius) var(--radius) 0 0; }
.card-md > .hd b { font-size: 15px; }
.card-md > .bd { padding: 6px 16px 12px; font-size: 14.5px; }
.card-md > .bd ul, .card-md > .bd ol { padding-left: 1.4em; }

/* ---------- 截图 ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 12px 0; }
.shots.big { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
figure.shot { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
figure.shot .img { position: relative; display: block; cursor: zoom-in; background: #EEF0F3; line-height: 0; }
figure.shot .img img { width: 100%; display: block; }
figure.shot .hl { position: absolute; border: 2px solid #E8590C; background: rgba(232, 89, 12, 0.10); border-radius: 3px; pointer-events: none; }
figure.shot figcaption { padding: 8px 12px 10px; font-size: 13px; line-height: 1.55; border-top: 1px solid var(--line-2); }
figure.shot figcaption b { display: block; font-weight: 600; color: var(--ink); }
figure.shot figcaption .acts { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #BCC4CF; background: #FAFBFC; }
.btn.pri { background: var(--link); border-color: var(--link); color: #fff; }
.btn.pri:hover { background: #1A47A0; }
.routes { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.routes .r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; }
.routes .r .nm { font-weight: 600; }
.routes .r .sp { flex: 1; }
.lb-mask { position: fixed; inset: 0; background: rgba(15, 20, 28, 0.78); z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.lb-mask.on { display: flex; }
.lb-mask .in { position: relative; max-width: 96vw; max-height: 92vh; line-height: 0; }
.lb-mask .fr { position: relative; line-height: 0; display: inline-block; }
.lb-mask .fr .hl { position: absolute; border: 2px solid #FF7A2F; background: rgba(255,122,47,.12); border-radius: 3px; }
.lb-mask img { max-width: 96vw; max-height: 88vh; display: block; border-radius: 4px; }
.lb-mask .cap { line-height: 1.5; color: #E6EAF0; font-size: 13px; margin-top: 8px; }

/* ---------- 矩阵 ---------- */
.mx td .rid { margin: 1px 2px 1px 0; }
.mx td.cell { min-width: 120px; }
.mx th.p1 { color: var(--p1); } .mx th.p2 { color: var(--p2); } .mx th.p3 { color: var(--p3); } .mx th.p4 { color: var(--p4); }
.rid.pre { background: transparent; box-shadow: inset 0 0 0 1px currentColor; opacity: 0.85; }
.yes { color: var(--ok); font-weight: 600; } .no { color: var(--bad); font-weight: 600; } .na { color: var(--ink-3); }

/* ---------- 搜索 ---------- */
.sr-mask { position: fixed; inset: 0; background: rgba(15, 20, 28, 0.38); z-index: 90; display: none; }
.sr-mask.on { display: block; }
.sr { position: absolute; top: 9vh; left: 50%; transform: translateX(-50%); width: min(720px, 94vw); background: var(--surface); border-radius: 10px; box-shadow: 0 18px 50px rgba(15, 20, 28, 0.25); overflow: hidden; }
.sr input { width: 100%; height: 52px; border: 0; border-bottom: 1px solid var(--line); padding: 0 18px; font: inherit; font-size: 16px; outline: none; }
.sr .res { max-height: 62vh; overflow-y: auto; padding: 6px; }
.sr .res a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); }
.sr .res a.on, .sr .res a:hover { background: #EEF2F9; text-decoration: none; }
.sr .res a b { font-weight: 600; font-size: 14px; }
.sr .res a .g { font-size: 11.5px; color: var(--ink-3); margin-left: 8px; }
.sr .res a .x { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr .res a .x mark { background: #FFF0B8; color: inherit; }
.sr .tip { padding: 8px 18px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line-2); }

.iframe-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.iframe-wrap iframe { width: 100%; height: 78vh; border: 0; display: block; }

@media (max-width: 1100px) { .layout2 { grid-template-columns: minmax(0, 1fr); } .side { position: static; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .nav { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.15); }
  body.nav-open .nav { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: block; }
  .top { padding: 0 14px; } .content { padding: 20px 16px 60px; }
  .sbtn { min-width: 0; } .sbtn span, .sbtn kbd { display: none; }
  .road, .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rail a.node::before { display: none; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .fld { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .nav, .top { display: none; } .main { margin: 0; } }
