/* nygim.css · 说明书：浅蓝灰纸面、深海蓝线稿、等宽编号 */
:root {
  --bg: #edf1f5;
  --bg-2: #e2e8ee;
  --card: #fbfcfd;
  --ink: #0e2238;
  --ink-2: #3a4d63;
  --ink-3: #66788c;
  --rule: #b4c1cf;
  --rule-2: #d3dbe4;
  --navy: #173d64;
  --navy-2: #24548a;
  --navy-d: #0b1f36;
  --tint: #dde6ef;
  --ok: #1d6656;
  --ok-bg: #e4efeb;
  --warn: #8a5a0f;
  --warn-bg: #f4eddc;
  --halt: #9a3122;
  --halt-bg: #f5e5e1;
  --mono: "SF Mono", "Cascadia Mono", "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.9 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--navy-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(36, 84, 138, .4); }
a:hover { color: var(--navy-d); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; }
b, strong { font-weight: 700; }
time { font-family: var(--mono); font-size: .94em; letter-spacing: -.01em; }

.ng-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--navy-d); color: #fff; padding: 10px 16px; text-decoration: none; }
.ng-skip:focus { top: 10px; }
.ng-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ── 顶栏 ── */
.ng-top { position: sticky; top: 0; z-index: 30; background: rgba(237, 241, 245, .95); border-bottom: 1px solid var(--rule-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ng-top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ng-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; min-height: 44px; }
.ng-brand span { font: 700 16px/1 var(--mono); letter-spacing: .22em; }
.ng-mark { color: var(--navy); flex: none; }
.ng-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.ng-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.ng-nav a:hover { color: var(--ink); }
.ng-nav a[aria-current="page"] { color: var(--navy-d); font-weight: 700; box-shadow: inset 0 -2px 0 var(--navy); }
.ng-navbtn { display: none; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; }
.ng-navbtn-ico { width: 16px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.ng-navbtn-ico::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }

/* ── 首页首屏：标题 + 设备部件图 + 码卡细带 ── */
.ng-sheet.is-home { padding: clamp(22px, 4.4vw, 56px) 0 clamp(26px, 4vw, 52px); border-bottom: 1px solid var(--rule); }
.ng-hero-k { margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 4px 0; font: 500 12.5px/1.5 var(--mono); letter-spacing: .08em; color: var(--ink-3); }
.ng-hero-k span + span::before { content: ""; display: inline-block; width: 1px; height: .9em; margin: 0 12px; vertical-align: -1px; background: var(--rule); }
.ng-hero-k span:first-child { color: var(--navy); font-weight: 700; }
.ng-sheet.is-home h1 { margin: 0; max-width: 12em; font-size: clamp(26px, 2.4vw + 14px, 52px); line-height: 1.2; letter-spacing: -.015em; font-weight: 800; color: var(--navy-d); text-wrap: balance; }
.ng-sheet.is-home .ng-lead { margin: 18px 0 0; max-width: 38em; font-size: clamp(15px, .5vw + 13px, 18px); line-height: 1.8; color: var(--ink-2); }

.ng-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 0 56px; align-items: end; }
.ng-hero-t { min-width: 0; }
.ng-dev { margin: 0; min-width: 0; }
.ng-dev figcaption { margin: 0 0 14px; font: 600 12.5px/1.4 var(--mono); letter-spacing: .12em; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.ng-dev figcaption::before { content: ""; width: 28px; border-top: 1.5px solid var(--navy); }
.ng-dev-art { display: block; width: 100%; height: auto; color: var(--navy); }
.ng-dev-art .is-fill { fill: var(--tint); }
.ng-dev-art .is-thin { stroke-width: 1; opacity: .6; }
.ng-dev-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ng-dev-list li { margin: 0; min-width: 0; }
.ng-dev-list a { display: grid; justify-items: center; gap: 2px; padding: 6px 8px 8px; text-align: center; color: var(--ink); text-decoration: none; }
.ng-dev-n { width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid var(--navy); border-radius: 50%; font: 700 13px/1 var(--mono); color: var(--navy); background: var(--bg); margin-bottom: 4px; transition: background-color .15s, color .15s; }
.ng-dev-list b { font-size: clamp(15px, .5vw + 12.5px, 19px); line-height: 1.35; font-weight: 800; color: var(--navy-d); }
.ng-dev-list small { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.ng-dev-list em { margin-top: 2px; font: 600 12.5px/1.5 var(--mono); font-style: normal; color: var(--navy); letter-spacing: .04em; }
.ng-dev-list a:hover b, .ng-dev-list a:focus-visible b { text-decoration: underline; text-underline-offset: 4px; }
.ng-dev-list a:hover .ng-dev-n, .ng-dev-list a:focus-visible .ng-dev-n { background: var(--navy); color: #fff; }

/* ── 码卡：首页是首屏底部一条细带，文章里是一张横卡 ── */
.ng-plate-slot { margin-top: clamp(22px, 3vw, 40px); }
.ng-plate-slot > p:empty { display: none; }
.ng-plate { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: stretch; background: var(--card); border: 1px solid var(--navy); }
.ng-plate > div { padding: 16px 24px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.ng-plate > div + div { border-left: 1px solid var(--rule-2); }
.ng-plate-k { margin: 0; font: 600 11.5px/1.4 var(--mono); letter-spacing: .14em; color: var(--ink-3); }
.ng-plate-code { display: flex; align-items: center; gap: 14px; }
.ng-code { font: 700 clamp(24px, 1vw + 18px, 30px)/1.1 var(--mono); letter-spacing: .14em; color: var(--navy-d); user-select: all; -webkit-user-select: all; }
.ng-copy { flex: none; min-height: 44px; min-width: 64px; padding: 0 14px; cursor: pointer; background: transparent; color: var(--navy-d); border: 1px solid var(--navy); font: 600 14px/1 var(--sans); letter-spacing: .06em; }
.ng-copy:hover { background: var(--tint); }
.ng-copy.is-done { background: var(--navy); color: #fff; }
.ng-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: .03em; white-space: nowrap; }
.ng-go:hover { background: var(--navy-d); color: #fff; }
.ng-plate-disc { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); max-width: 26em; }
.ng-plate-gain { margin: 0; font-size: 15px; line-height: 1.7; font-weight: 600; color: var(--ink); }
.ng-plate-hint { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.ng-plate.is-bare { grid-template-columns: auto minmax(0, 1fr); }
.ng-body .ng-plate { margin: 2.2em 0; grid-template-columns: auto minmax(0, 1fr); }
.ng-body .ng-plate .ng-plate-txt { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule-2); }
.ng-body .ng-plate.is-bare .ng-plate-txt { grid-column: auto; border-top: 0; border-left: 1px solid var(--rule-2); }

/* ── 正文版心：左目录 + 正文栏 ── */
.ng-doc { max-width: var(--wrap); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gut) clamp(48px, 7vw, 96px); display: grid; grid-template-columns: 220px minmax(0, 740px); gap: 0 72px; align-items: start; }
.ng-doc.is-solo { grid-template-columns: minmax(0, 760px); justify-content: center; }
.ng-toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; padding-right: 4px; }
.ng-toc-box summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.ng-toc-box summary::-webkit-details-marker { display: none; }
.ng-toc-h { font: 700 12px/1 var(--mono); letter-spacing: .22em; color: var(--navy); }
.ng-toc-n { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.ng-toc ol { list-style: none; margin: 0; padding: 4px 0 0; counter-reset: tc; border-top: 1px solid var(--rule); }
.ng-toc li { counter-increment: tc; margin: 0; }
.ng-toc li a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 8px 0 8px 10px; margin-left: -10px; min-height: 44px; align-items: baseline; color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.55; border-left: 2px solid transparent; }
.ng-toc li a::before { content: counter(tc); font: 600 12.5px/1.55 var(--mono); color: var(--ink-3); }
.ng-toc li a:hover { color: var(--navy-d); }
.ng-toc li a.is-here { color: var(--navy-d); font-weight: 700; border-left-color: var(--navy); }
.ng-toc li a.is-here::before { color: var(--navy); }

.ng-body { min-width: 0; counter-reset: ch sec tb fg st; }
.ng-by { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 6px; font-size: 13.5px; color: var(--ink-3); }
.ng-by span + span::before { content: "·"; margin: 0 10px; color: var(--rule); }
:where(.ng-body) > p, :where(.ng-body) li { color: #1a2c40; }
:where(.ng-body) p { margin: 0 0 1.1em; }
.ng-body h2 {
  counter-increment: ch; counter-set: sec 0;
  margin: 3.4em 0 .9em; padding-top: 20px; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline;
  font-size: clamp(21px, .9vw + 16px, 27px); line-height: 1.4; font-weight: 800; color: var(--navy-d); text-wrap: balance;
}
.ng-body h2::before { content: counter(ch); font: 400 1.9em/1 var(--mono); color: var(--navy); letter-spacing: -.04em; }
.ng-by + h2, .ng-body > h2:first-child { margin-top: 1.6em; }
.ng-body h3 { counter-increment: sec; margin: 2.2em 0 .6em; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; font-size: clamp(17.5px, .4vw + 15.5px, 20px); line-height: 1.5; font-weight: 800; color: var(--ink); }
.ng-body h3::before { content: counter(ch) "." counter(sec); font: 600 .74em/1 var(--mono); color: var(--navy); letter-spacing: .02em; }
.ng-body h4 { margin: 1.5em 0 .4em; font-size: 17px; color: var(--ink); }
:where(.ng-body) ul, :where(.ng-body) ol { margin: 0 0 1.2em; padding-left: 1.4em; }
:where(.ng-body) li { margin: .35em 0; }
:where(.ng-body) ul li::marker { color: var(--navy); }
:where(.ng-body) ol li::marker { font-family: var(--mono); font-weight: 700; color: var(--navy); }
.ng-body code, .ng-icode { font: 600 .88em/1 var(--mono); background: var(--tint); color: var(--navy-d); padding: 2px 6px; }
.ng-body blockquote { margin: 1.3em 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--rule); color: var(--ink-2); }
.ng-body hr { border: 0; border-top: 1px dashed var(--rule); margin: 2.4em 0; }
.ng-body img { margin: 0 auto; }

/* 操作步骤（与 HowTo 同一份数据） */
.ng-steps { list-style: none; margin: 1.4em 0 1.8em; padding: 0; counter-reset: st; border-top: 1.5px solid var(--navy); }
.ng-steps li { counter-increment: st; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "n b" "n s"; gap: 0; margin: 0; padding: 16px 0 18px; border-bottom: 1px dotted var(--rule); }
.ng-steps li::before { grid-area: n; content: counter(st, decimal-leading-zero); font: 400 26px/1.1 var(--mono); color: var(--navy); letter-spacing: -.03em; }
.ng-steps b { grid-area: b; font-size: 17px; line-height: 1.6; color: var(--navy-d); }
.ng-steps span { grid-area: s; color: var(--ink-2); font-size: 16px; line-height: 1.8; }

/* 说明 / 对照 / 注意 / 停 */
.ng-note { margin: 1.6em 0; padding: 14px 18px 4px; border-left: 3px solid var(--navy); background: var(--card); display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 6px; }
.ng-note-h { display: contents; }
.ng-note-k { grid-column: 1; grid-row: 1 / span 2; font: 800 14px/1.7 var(--sans); letter-spacing: .12em; color: var(--navy); }
.ng-note-h b { grid-column: 2; grid-row: 1; font-size: 16px; line-height: 1.7; color: var(--ink); margin-bottom: 2px; }
.ng-note-b { grid-column: 2; grid-row: 2; font-size: 16px; line-height: 1.8; }
.ng-note-b p { margin: 0 0 .8em; }
.ng-note-b ul, .ng-note-b ol { margin-bottom: .8em; }
.ng-note.is-check { border-left-color: var(--ok); background: var(--ok-bg); }
.ng-note.is-check .ng-note-k { color: var(--ok); }
.ng-note.is-caution { border-left-color: var(--warn); background: var(--warn-bg); }
.ng-note.is-caution .ng-note-k { color: var(--warn); }
.ng-note.is-halt { border-left-color: var(--halt); background: var(--halt-bg); }
.ng-note.is-halt .ng-note-k { color: var(--halt); }

/* 屏幕上看到什么 → 怎么做 */
.ng-state { margin: 1.5em 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0 2px; }
.ng-state-k { margin: 0 0 6px; font: 600 11.5px/1.5 var(--mono); letter-spacing: .16em; color: var(--ink-3); }
.ng-state-q { margin: 0 0 10px; padding: 10px 14px; background: var(--tint); color: var(--navy-d); font: 600 15.5px/1.65 var(--sans); border-left: 3px solid var(--navy); }
.ng-state-b { font-size: 16px; }
.ng-state-b p { margin: 0 0 .8em; }

/* 章首参数表 */
.ng-sheetbox { margin: 1.2em 0 1.8em; border-top: 1.5px solid var(--navy); border-bottom: 1px solid var(--rule); }
.ng-sheetbox-h { margin: 0; padding: 9px 0 6px; font: 700 12px/1.5 var(--mono); letter-spacing: .16em; color: var(--navy); }
.ng-sheetbox dl { margin: 0; }
.ng-sheetbox dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); border-top: 1px dotted var(--rule); }
.ng-sheetbox dt { padding: 9px 0; font: 600 13px/1.7 var(--mono); color: var(--ink-3); }
.ng-sheetbox dd { margin: 0; padding: 9px 0; font-size: 16px; line-height: 1.7; }

/* 表格 */
.ng-table { counter-increment: tb; margin: 1.6em 0 1.8em; overflow-x: auto; }
.ng-table::before { content: "表 " counter(tb); display: block; margin-bottom: 8px; font: 700 12px/1.4 var(--mono); letter-spacing: .12em; color: var(--navy); }
.ng-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.7; border-top: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); }
.ng-table th { text-align: left; padding: 10px 14px 9px 0; font-size: 13.5px; font-weight: 700; color: var(--navy-d); border-bottom: 1px solid var(--navy); white-space: nowrap; }
.ng-table td { padding: 11px 14px 11px 0; border-top: 1px solid var(--rule-2); vertical-align: top; color: #1a2c40; }
.ng-table tr:first-child td { border-top: 0; }

/* 自绘界面示意 */
.ng-screen { counter-increment: fg; margin: 1.8em auto 2em; max-width: 540px; }
.ng-screen.is-phone { max-width: 290px; }
.ng-screen-dev { border: 1.5px solid var(--navy-d); background: #fff; }
.ng-screen.is-phone .ng-screen-dev { border-radius: 30px; border-width: 7px; padding: 10px 0 18px; }
.ng-screen-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--rule-2); background: var(--bg); }
.ng-screen-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--rule); flex: none; }
.ng-screen-bar span { margin-left: 8px; flex: 1; min-width: 0; padding: 3px 10px; font: 500 12.5px/1.4 var(--mono); color: var(--ink-2); background: #fff; border: 1px solid var(--rule-2); border-radius: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ng-screen.is-desk .ng-screen-bar { background: var(--navy-d); border-bottom-color: var(--navy-d); }
.ng-screen.is-desk .ng-screen-bar i { border-color: #6d8bab; }
.ng-screen.is-desk .ng-screen-bar span { background: transparent; border: 0; color: #c5d3e1; }
.ng-screen-notch { width: 80px; height: 16px; margin: -10px auto 12px; border-radius: 0 0 12px 12px; background: var(--navy-d); }
.ng-screen-ui { padding: 18px 22px 16px; display: grid; gap: 10px; }
.ng-screen-ui p { margin: 0; font-size: 14px; line-height: 1.5; }
.ng-screen-ui .u-title { font-weight: 800; font-size: 18px; color: var(--ink); }
.ng-screen-ui .u-field, .ng-screen-ui .u-pick { border: 1px solid var(--rule); padding: 9px 12px; color: var(--ink-3); background: #fff; }
.ng-screen-ui .u-pick { position: relative; padding-right: 30px; }
.ng-screen-ui .u-pick::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); }
.ng-screen-ui .u-btn { background: var(--navy-d); color: #fff; text-align: center; font-weight: 700; padding: 10px 12px; }
.ng-screen-ui .u-ghost { border: 1px solid var(--navy); color: var(--navy); text-align: center; padding: 9px 12px; }
.ng-screen-ui .u-text { color: var(--ink-3); font-size: 13px; }
.ng-screen-ui .u-check { padding-left: 26px; position: relative; color: var(--ink-2); font-size: 13px; }
.ng-screen-ui .u-check::before { content: ""; position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border: 1.5px solid var(--navy); background: #fff; }
.ng-screen-ui .u-rule { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12.5px; }
.ng-screen-ui .u-rule::before, .ng-screen-ui .u-rule::after { content: ""; flex: 1; border-top: 1px solid var(--rule-2); }
.ng-screen-ui .u-ok { padding-left: 28px; position: relative; color: var(--ok); font-weight: 700; }
.ng-screen-ui .u-ok::before { content: ""; position: absolute; left: 3px; top: 3px; width: 7px; height: 12px; border-right: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(40deg); }
.ng-screen figcaption, .ng-fig figcaption, .ng-shot figcaption, .ng-cover figcaption { margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.ng-screen figcaption::before, .ng-fig figcaption::before, .ng-shot figcaption::before { content: "图 " counter(fg) "　"; font: 700 12px/1 var(--mono); color: var(--navy); letter-spacing: .06em; }
.ng-fig, .ng-shot, .ng-cover { counter-increment: fg; margin: 1.8em 0 2em; }
.ng-cover { counter-increment: none; }
.ng-fig img, .ng-cover img { border: 1px solid var(--rule-2); background: #fff; }
.ng-shot-f { display: block; border: 1px solid var(--rule); background: #fff; padding: 6px; }
.ng-shot.is-phone .ng-shot-f { max-width: 320px; margin: 0 auto; }
.ng-shot-k { display: inline-block; margin-right: 8px; padding: 0 6px; font: 700 11px/1.7 var(--mono); letter-spacing: .1em; color: var(--ink-2); border: 1px solid var(--rule); }
.ng-pair { margin: 1.8em 0 2em; }
.ng-pair-in { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.ng-pair-in > figure { margin: 0; }
.ng-pair-cap { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }

/* 编写依据 */
.ng-basis { margin: 2.4em 0 1.6em; padding: 14px 0 4px; border-top: 1px dashed var(--navy); border-bottom: 1px dashed var(--navy); font-size: 15.5px; color: var(--ink-2); }
.ng-basis-h { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 10px; font: 700 12px/1.5 var(--mono); letter-spacing: .14em; color: var(--navy); }
.ng-basis-h time { font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }
.ng-basis p { margin: 0 0 .8em; }

/* 常见问题 */
.ng-faq-lead { color: var(--ink-2); }
.ng-faq-list { border-top: 1.5px solid var(--navy); counter-reset: fq; }
.ng-faq-list details { counter-increment: fq; border-bottom: 1px solid var(--rule-2); }
.ng-faq-list summary { list-style: none; cursor: pointer; position: relative; display: block; padding: 15px 40px 15px 64px; min-height: 44px; font-weight: 700; font-size: 16.5px; line-height: 1.6; color: var(--ink); }
.ng-faq-list summary::-webkit-details-marker { display: none; }
.ng-faq-list summary::before { content: counter(ch) "." counter(fq); position: absolute; left: 0; top: 18px; font: 600 12.5px/1.3 var(--mono); color: var(--navy); }
.ng-faq-list summary::after { content: ""; position: absolute; right: 10px; top: 23px; width: 9px; height: 9px; border-right: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); transform: rotate(45deg); transition: transform .15s; }
.ng-faq-list details[open] summary::after { transform: rotate(-135deg); top: 27px; }
.ng-faq-list summary:hover { color: var(--navy-2); }
.ng-faq-list details p { margin: 0 0 18px; padding-left: 64px; font-size: 16px; color: var(--ink-2); }

.ng-sign { margin-top: 3em; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 1.85; color: var(--ink-3); }
.ng-sign p { margin: 0; }
.ng-sign b { color: var(--navy-d); }

/* 标签条 / 相关条目 */
.ng-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2.4em 0 0; padding-top: 14px; border-top: 1px solid var(--rule-2); font-size: 14px; }
.ng-tags-k { font: 700 11.5px/1 var(--mono); letter-spacing: .16em; color: var(--ink-3); margin-right: 4px; }
.ng-tags a, .ng-tags span:not(.ng-tags-k) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); color: var(--ink-2); text-decoration: none; }
.ng-tags a { border-color: var(--navy); color: var(--navy-d); }
.ng-tags a:hover { background: var(--navy); color: #fff; }
.ng-rel { margin-top: 2.6em; }
.ng-rel-h { margin: 0 0 8px; font: 700 12px/1.5 var(--mono); letter-spacing: .16em; color: var(--navy); }

/* 条目表 */
.ng-rows { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--navy); }
.ng-rows li { counter-increment: ngrow; border-bottom: 1px solid var(--rule-2); margin: 0; }
.ng-rows a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "n t d" "n s d"; gap: 2px 18px; padding: 18px 0; color: var(--ink); text-decoration: none; }
.ng-rows a::before { grid-area: n; content: counter(ngrow, decimal-leading-zero); font: 400 22px/1.2 var(--mono); color: var(--navy); letter-spacing: -.03em; }
.ng-rows b { grid-area: t; font-size: 18px; line-height: 1.5; color: var(--navy-d); }
.ng-rows span { grid-area: s; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.ng-rows time { grid-area: d; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.ng-rows a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.ng-rows.is-compact a { padding: 12px 0; grid-template-columns: 48px minmax(0, 1fr) auto; }
.ng-rows.is-compact a::before { font-size: 17px; }
.ng-rows.is-compact b { font-size: 16px; }
.ng-rows.is-compact span { display: none; }

.ng-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.ng-pager a, .ng-pager .is-off { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--navy); color: var(--navy-d); text-decoration: none; font-weight: 700; font-size: 15px; }
.ng-pager a:hover { background: var(--navy); color: #fff; }
.ng-pager .is-off { border-color: var(--rule-2); color: var(--rule); font-weight: 500; }
.ng-pager-at { font: 500 13.5px/1.4 var(--mono); color: var(--ink-3); }
.ng-pager-at b { color: var(--navy-d); }

/* 首页附录：有文章时才出 */
.ng-latest { padding: clamp(36px, 5vw, 72px) 0 clamp(44px, 6vw, 88px); border-top: 1px solid var(--rule); background: var(--bg-2); }
.ng-latest-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k a" "h a" "p p"; gap: 4px 16px; margin-bottom: 20px; align-items: end; }
.ng-latest-head .ng-latest-k { grid-area: k; margin: 0; font: 700 12px/1.4 var(--mono); letter-spacing: .2em; color: var(--navy); }
.ng-latest-head h2 { grid-area: h; margin: 0; font-size: clamp(22px, 1vw + 17px, 30px); font-weight: 800; color: var(--navy-d); }
.ng-latest-head p { grid-area: p; margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; }
.ng-latest-all { grid-area: a; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--navy-d); }

/* ── 内页页头 ── */
.ng-sheet.is-art, .ng-sheet.is-page { padding: clamp(24px, 4vw, 52px) 0 clamp(22px, 3.4vw, 40px); border-bottom: 1px solid var(--rule); }
.ng-sheet.is-art .ng-wrap, .ng-sheet.is-page .ng-wrap { max-width: calc(760px + 2 * var(--gut)); }
.ng-crumbs { list-style: none; display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 6px; padding: 0; font-size: 13.5px; color: var(--ink-3); }
.ng-crumbs li { margin: 0; }
.ng-crumbs li + li::before { content: "/"; margin: 0 9px; color: var(--rule); }
.ng-crumbs a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; }
.ng-eyebrow { margin: 0 0 8px; font: 700 12px/1.4 var(--mono); letter-spacing: .18em; color: var(--navy); }
.ng-sheet.is-art h1, .ng-sheet.is-page h1 { margin: 0; font-size: clamp(25px, 1.6vw + 18px, 40px); line-height: 1.3; font-weight: 800; color: var(--navy-d); text-wrap: balance; }
.ng-sheet.is-art .ng-lead, .ng-sheet.is-page .ng-lead { margin: 14px 0 0; max-width: 42em; font-size: 17px; line-height: 1.85; color: var(--ink-2); }
.ng-sheet.is-page .ng-lead p { margin: 0 0 .6em; }
.ng-specs { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.ng-specs > div { display: flex; gap: 8px; align-items: baseline; }
.ng-specs > div + div::before { content: ""; width: 1px; height: .9em; margin: 0 14px; background: var(--rule); align-self: center; }
.ng-specs dt { font: 600 11.5px/1.4 var(--mono); letter-spacing: .12em; color: var(--ink-3); }
.ng-specs dd { margin: 0; font-size: 14px; color: var(--ink); }
.ng-body.is-list { padding-top: 0; }
.ng-body.is-plain h2 { font-size: clamp(19px, .7vw + 15px, 23px); grid-template-columns: 52px minmax(0, 1fr); }
.ng-body.is-plain h2::before { content: "§" counter(ch); font-size: .9em; letter-spacing: 0; }
.ng-body.is-plain h3 { grid-template-columns: 52px minmax(0, 1fr); }
@media (min-width: 1081px) {
  .ng-sheet.is-art.has-toc .ng-wrap { max-width: var(--wrap); padding-left: calc(var(--gut) + 292px); }
}

/* ── 页脚 ── */
.ng-foot { background: var(--navy-d); color: #b7c6d6; font-size: 14px; line-height: 1.85; }
.ng-foot-in { max-width: var(--wrap); margin: 0 auto; padding: clamp(34px, 5vw, 60px) var(--gut) 26px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; }
.ng-foot .ng-brand { color: #fff; }
.ng-foot .ng-mark { color: #8fb0d2; }
.ng-foot-a p { margin: 12px 0 0; max-width: 40em; }
.ng-foot-risk { color: #90a5bb; font-size: 13.5px; }
.ng-foot a { color: #e3ebf4; text-decoration-color: rgba(227, 235, 244, .35); }
.ng-foot a:hover { color: #fff; }
.ng-foot-k { margin: 6px 0 8px; font: 700 11.5px/1 var(--mono); letter-spacing: .2em; color: #7f98b3; }
.ng-foot-b ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.ng-foot-b li { border-bottom: 1px solid rgba(255, 255, 255, .09); }
.ng-foot-b li a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.ng-foot-c { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gut) 26px; display: flex; flex-wrap: wrap; gap: 6px 22px; border-top: 1px solid rgba(255, 255, 255, .12); font: 500 12.5px/1.6 var(--mono); color: #7f98b3; }
.ng-foot-c a { color: #b7c6d6; }

/* ── 宽度档 ── */
@media (max-width: 900px) {
  .ng-hero { grid-template-columns: minmax(0, 1fr); }
  .ng-dev { margin-top: clamp(22px, 4vw, 40px); max-width: 760px; }
  .ng-sheet.is-home h1 { max-width: 15em; }
}
@media (max-width: 1080px) {
  .ng-hero { gap: 0 36px; }
  .ng-doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ng-toc { position: static; max-height: none; overflow: visible; margin-bottom: 8px; }
  .ng-toc-box { border-top: 1.5px solid var(--navy); border-bottom: 1px solid var(--rule); }
  .ng-toc-box summary { min-height: 48px; }
  .ng-toc-box summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); transform: rotate(45deg); margin: -4px 4px 0 0; }
  .ng-toc-box[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .ng-toc-n { margin-left: auto; }
  .ng-toc ol { columns: 2; column-gap: 28px; padding-bottom: 10px; }
  .ng-toc li { break-inside: avoid; }
  .ng-plate { grid-template-columns: auto minmax(0, 1fr); }
  .ng-plate .ng-plate-txt { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--rule-2); }
  .ng-plate.is-bare .ng-plate-txt { grid-column: auto; border-top: 0; border-left: 1px solid var(--rule-2) !important; }
  .ng-foot-in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.85; }
  .ng-navbtn { display: inline-flex; }
  .ng-top-in { height: 56px; }
  .ng-nav { display: none; position: absolute; left: 0; right: 0; top: 56px; background: var(--bg); border-bottom: 1.5px solid var(--navy); box-shadow: 0 12px 24px rgba(11, 31, 54, .1); }
  .ng-nav.is-open { display: block; }
  .ng-nav ul { flex-direction: column; gap: 0; padding: 6px var(--gut) 12px; }
  .ng-nav a { min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--rule-2); font-size: 16px; }
  .ng-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--navy); padding-left: 12px; }
  .ng-sheet.is-home { padding-top: 14px; padding-bottom: 22px; }
  .ng-hero-k { margin-bottom: 8px; font-size: 11.5px; }
  .ng-hero-k span + span::before { margin: 0 8px; }
  .ng-sheet.is-home h1 { font-size: 25px; line-height: 1.3; }
  .ng-sheet.is-home .ng-lead { margin-top: 8px; font-size: 14.5px; line-height: 1.7; }
  .ng-sheet.is-home .ng-wrap { display: flex; flex-direction: column; }
  .ng-hero { display: contents; }
  .ng-hero-t { order: 1; }
  .ng-plate-slot { order: 2; }
  .ng-dev { order: 3; margin-top: 22px; }
  .ng-dev figcaption { margin-bottom: 6px; font-size: 11.5px; }
  .ng-dev-list a { padding: 2px 2px 0; }
  .ng-dev-n { width: 24px; height: 24px; font-size: 12px; margin-bottom: 2px; }
  .ng-dev-list b { font-size: 14.5px; }
  .ng-dev-list small { display: none; }
  .ng-dev-list em { font-size: 11px; }
  .ng-plate-slot { margin-top: 14px; }
  .ng-plate, .ng-body .ng-plate, .ng-plate.is-bare { grid-template-columns: minmax(0, 1fr); }
  .ng-plate > div { padding: 12px 14px; gap: 6px; }
  .ng-plate > div + div, .ng-plate.is-bare .ng-plate-txt { border-left: 0 !important; border-top: 1px solid var(--rule-2); }
  .ng-plate .ng-plate-txt { grid-column: auto; }
  .ng-plate-id { flex-direction: row !important; align-items: center !important; justify-content: space-between !important; flex-wrap: wrap; }
  .ng-plate-code { flex: 1; justify-content: space-between; }
  .ng-code { font-size: 25px; }
  .ng-go { min-height: 48px; width: 100%; }
  .ng-plate-gain { font-size: 14px; line-height: 1.65; }
  .ng-doc { padding-top: 18px; }
  .ng-toc ol { columns: 1; }
  .ng-body h2 { grid-template-columns: 44px minmax(0, 1fr); margin-top: 2.8em; }
  .ng-body h2::before { font-size: 1.6em; }
  .ng-body h3 { grid-template-columns: 44px minmax(0, 1fr); }
  .ng-steps li { grid-template-columns: 46px minmax(0, 1fr); }
  .ng-steps li::before { font-size: 21px; }
  .ng-note { grid-template-columns: minmax(0, 1fr); padding: 12px 14px 2px; }
  .ng-note-k { grid-row: auto; line-height: 1.5; }
  .ng-note-h b, .ng-note-b { grid-column: 1; grid-row: auto; }
  .ng-sheetbox dl > div { grid-template-columns: 76px minmax(0, 1fr); }
  .ng-pair-in { grid-template-columns: 1fr; }
  .ng-table.is-wide { overflow: visible; }
  .ng-table.is-wide table, .ng-table.is-wide tbody, .ng-table.is-wide tr, .ng-table.is-wide td { display: block; width: 100%; }
  .ng-table.is-wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .ng-table.is-wide tr { border-top: 1px solid var(--navy); padding: 6px 0 8px; }
  .ng-table.is-wide tr:first-child { border-top: 0; }
  .ng-table.is-wide td { border-top: 0; padding: 4px 0; display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 10px; }
  .ng-table.is-wide td::before { content: attr(data-th); font: 600 12px/1.9 var(--mono); color: var(--ink-3); }
  .ng-table.is-wide td:first-child { font-weight: 700; color: var(--navy-d); }
  .ng-faq-list summary { padding-left: 46px; padding-right: 30px; font-size: 15.5px; }
  .ng-faq-list details p { padding-left: 46px; }
  .ng-rows a { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "n t" "n s" "n d"; padding: 16px 0; gap: 2px 10px; }
  .ng-rows a::before { font-size: 18px; }
  .ng-rows time { justify-self: start; }
  .ng-sheet.is-art .ng-lead, .ng-sheet.is-page .ng-lead { font-size: 15px; line-height: 1.75; }
  .ng-specs > div + div::before { margin: 0 10px; }
  .ng-pager a, .ng-pager .is-off { padding: 0 12px; }
}
@media (max-width: 360px) {
  .ng-dev-list b { font-size: 13.5px; }
  .ng-code { font-size: 23px; }
  .ng-foot-b ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .ng-top, .ng-toc, .ng-plate-slot, .ng-foot-b { display: none; }
  body { background: #fff; }
}
