@import url("kb-v4.css");
/* EEACCN 电子工程知识库 */
html .eeaccn_container.kb-container {
	max-width: min(1280px, calc(100vw - 40px)) !important;
}
.kb-page-body {
	--kb-ink: #0f172a;
	--kb-muted: #64748b;
	--kb-line: rgba(148, 163, 184, .24);
	--kb-blue: #2563eb;
	--kb-cyan: #0891b2;
	background: #f6f8fc;
}
body.dark-theme.kb-page-body,
html[data-night='night'] .kb-page-body {
	--kb-ink: #e6edf7;
	--kb-muted: #93a4bd;
	--kb-line: rgba(148, 163, 184, .2);
	background: #0b1220;
}
.kb-main {
	width: 100%;
	padding: 22px 0 56px;
}
.kb-kicker {
	display: inline-block;
	margin-bottom: 7px;
	color: #0e7490;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .16em;
}
body.dark-theme .kb-kicker,
html[data-night='night'] .kb-kicker { color: #67e8f9; }

/* 知识库页头：比文章页矮，避免正文被压到屏幕外 */
.kb-page-body .HeaderImg.kb-header-img {
	position: relative;
	height: var(--eeaccn-hero-h, 550px) !important;
	min-height: var(--eeaccn-hero-h, 550px) !important;
	background-color: #081426;
	background-position: center center !important;
	background-size: cover !important;
	background-repeat: no-repeat !important;
}
.kb-page-body .HeaderImg.kb-header-img::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(120deg, rgba(8, 20, 38, .62), rgba(10, 39, 54, .42)),
		repeating-linear-gradient(90deg, rgba(125, 211, 252, .05) 0 1px, transparent 1px 44px),
		repeating-linear-gradient(0deg, rgba(125, 211, 252, .04) 0 1px, transparent 1px 44px),
		radial-gradient(700px 260px at 78% 18%, rgba(34, 211, 238, .16), transparent 65%);
}
.kb-page-body .HeaderImg.kb-header-img .infomation {
	position: relative;
	z-index: 2;
}
.kb-page-body .HeaderImg.kb-header-img .HeaderImg_bottom {
	position: absolute;
	left: 0;
	bottom: -5px;
	width: 100%;
	z-index: 2;
}
.kb-page-body .HeaderImg.kb-header-img .title { font-size: clamp(30px, 4vw, 46px); }
@media (max-width: 860px) {
	.kb-page-body .HeaderImg.kb-header-img { height: var(--eeaccn-hero-h-sm, 18.5rem) !important; min-height: var(--eeaccn-hero-h-sm, 18.5rem) !important; }
}

/* 首页 hero */
.kb-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
	gap: 24px;
	align-items: center;
	padding: 34px 36px;
	border: 1px solid rgba(37, 99, 235, .18);
	border-radius: 22px;
	background:
		radial-gradient(900px 300px at 100% 0%, rgba(34, 211, 238, .16), transparent 62%),
		linear-gradient(135deg, #0f172a 0%, #14253d 58%, #0d2b37 100%);
	box-shadow: 0 22px 56px rgba(15, 23, 42, .16);
	color: #e8f0fb;
	overflow: hidden;
	position: relative;
}
.kb-hero::after {
	content: "";
	position: absolute;
	right: -60px;
	bottom: -100px;
	width: 300px;
	height: 300px;
	border: 1px solid rgba(125, 211, 252, .18);
	border-radius: 50%;
	box-shadow: 0 0 0 34px rgba(125, 211, 252, .04), 0 0 0 68px rgba(125, 211, 252, .025);
	pointer-events: none;
}
.kb-hero__copy { position: relative; z-index: 1; }
.kb-hero h1 {
	margin: 0 0 12px;
	color: #fff;
	font-size: clamp(26px, 3.2vw, 40px);
	line-height: 1.25;
	letter-spacing: -.01em;
}
.kb-hero p {
	max-width: 780px;
	margin: 0;
	color: #b9c9dd;
	font-size: 14px;
	line-height: 1.95;
}
.kb-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}
.kb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 18px;
	border: 1px solid rgba(148, 190, 235, .28);
	border-radius: 10px;
	background: rgba(148, 190, 235, .08);
	color: #e2e8f0;
	font-size: 13px;
	font-weight: 700;
}
.kb-btn:hover { color: #fff; background: rgba(148, 190, 235, .16); }
.kb-btn--primary {
	border-color: transparent;
	background: linear-gradient(135deg, #2563eb, #0891b2);
	box-shadow: 0 8px 24px rgba(37, 99, 235, .28);
	color: #fff;
}
.kb-btn--primary:hover { background: linear-gradient(135deg, #1d4ed8, #0e7490); }

/* 长书页里几百个代码块一次性排版会把主线程拖住；视口外的代码块延后渲染。 */
.kb-book-body .kb-book pre {
	content-visibility: auto;
	contain-intrinsic-size: auto 108px;
}
.kb-hero__stats {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.kb-hero__stats div {
	padding: 16px;
	border: 1px solid rgba(148, 190, 235, .2);
	border-radius: 14px;
	background: rgba(15, 23, 42, .38);
	backdrop-filter: blur(6px);
}
.kb-hero__stats b {
	display: block;
	color: #fff;
	font-size: 26px;
	line-height: 1.15;
}
.kb-hero__stats span { display: block; margin-top: 3px; color: #8fa8c2; font-size: 11px; }

/* 区块标题 */
.kb-stages, .kb-tools, .kb-fpga, .kb-section { margin-top: 42px; }
.kb-section-title {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 16px;
}
.kb-section-title h2 {
	margin: 0;
	color: var(--kb-ink);
	font-size: 24px;
	line-height: 1.3;
}
.kb-section-title p {
	margin: 0 0 2px;
	color: var(--kb-muted);
	font-size: 13px;
	line-height: 1.6;
	text-align: right;
}

/* 阶段卡片 */
.kb-stage-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}
.kb-stage-card {
	display: flex;
	flex-direction: column;
	min-height: 210px;
	padding: 18px;
	border: 1px solid var(--kb-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
	color: var(--kb-ink);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.kb-stage-card:hover {
	transform: translateY(-3px);
	border-color: rgba(37, 99, 235, .34);
	box-shadow: 0 16px 34px rgba(37, 99, 235, .12);
}
.kb-stage-card.is-fpga {
	border-color: rgba(8, 145, 178, .3);
	background: linear-gradient(160deg, #f0fdff, #ffffff 70%);
}
body.dark-theme .kb-stage-card,
html[data-night='night'] .kb-stage-card { background: #111c2e; }
body.dark-theme .kb-stage-card.is-fpga,
html[data-night='night'] .kb-stage-card.is-fpga { background: linear-gradient(160deg, #0d2833, #111c2e 70%); }
.kb-stage-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kb-stage-card__no { color: #2563eb; font-size: 22px; font-weight: 800; line-height: 1; }
.kb-stage-card__en { color: var(--kb-muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.kb-stage-card h3 { margin: 0 0 7px; color: var(--kb-ink); font-size: 17px; }
.kb-stage-card p { flex: 1; margin: 0 0 14px; color: var(--kb-muted); font-size: 12.5px; line-height: 1.75; }
.kb-stage-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px dashed var(--kb-line); color: var(--kb-muted); font-size: 11px; }
.kb-stage-card__foot b { color: #2563eb; font-size: 12px; }

/* 工具箱 */
.kb-tool-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}
.kb-tool {
	display: flex;
	flex-direction: column;
	padding: 14px 16px;
	border: 1px solid var(--kb-line);
	border-radius: 12px;
	background: #fff;
	color: var(--kb-ink);
}
.kb-tool b { font-size: 14px; }
.kb-tool span { margin: 4px 0 8px; color: var(--kb-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; }
.kb-tool i { margin-top: auto; color: #2563eb; font-size: 11px; font-style: normal; font-weight: 700; }
body.dark-theme .kb-tool,
html[data-night='night'] .kb-tool { background: #111c2e; }
.kb-quick-links {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 10px;
}
.kb-quick-links a {
	padding: 13px 16px;
	border: 1px dashed rgba(37, 99, 235, .3);
	border-radius: 12px;
	background: rgba(37, 99, 235, .04);
	color: var(--kb-ink);
	font-size: 13px;
	font-weight: 700;
}
.kb-quick-links a span { display: block; margin-top: 3px; color: var(--kb-muted); font-size: 11px; font-weight: 400; }

/* 第五阶段 */
.kb-fpga {
	padding: 28px;
	border: 1px solid rgba(8, 145, 178, .2);
	border-radius: 20px;
	background:
		radial-gradient(700px 260px at 0% 0%, rgba(8, 145, 178, .08), transparent 65%),
		#fff;
	box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}
body.dark-theme .kb-fpga,
html[data-night='night'] .kb-fpga { background: #0e1829; }
.kb-fpga-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; }
.kb-fpga-intro p { margin: 0 0 12px; color: var(--kb-muted); font-size: 13.5px; line-height: 1.95; }
.kb-fpga-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.kb-fpga-actions .kb-btn { border-color: rgba(37, 99, 235, .2); background: rgba(37, 99, 235, .06); color: #1d4ed8; }
.kb-fpga-actions .kb-btn--primary { background: linear-gradient(135deg, #2563eb, #0891b2); color: #fff; }
.kb-fpga-chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kb-fpga-chapter {
	padding: 14px 16px;
	border: 1px solid var(--kb-line);
	border-radius: 12px;
	background: rgba(248, 250, 252, .7);
}
body.dark-theme .kb-fpga-chapter,
html[data-night='night'] .kb-fpga-chapter { background: rgba(17, 28, 46, .72); }
.kb-fpga-chapter h3 { margin: 0 0 8px; font-size: 14px; }
.kb-fpga-chapter h3 a { color: var(--kb-ink); }
.kb-fpga-chapter ul { margin: 0; padding: 0; list-style: none; }
.kb-fpga-chapter li { margin: 5px 0; }
.kb-fpga-chapter li a { color: var(--kb-muted); font-size: 12px; line-height: 1.6; }
.kb-fpga-chapter li a:hover { color: #2563eb; }
.kb-source-note {
	margin-top: 26px;
	padding: 12px 16px;
	border-left: 3px solid rgba(37, 99, 235, .45);
	background: rgba(37, 99, 235, .04);
	color: var(--kb-muted);
	font-size: 12px;
	line-height: 1.8;
}
.kb-source-note p { margin: 0; }

/* 文章页 */
.kb-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
	color: var(--kb-muted);
	font-size: 12px;
}
.kb-breadcrumb a { color: var(--kb-muted); }
.kb-breadcrumb a:hover { color: #2563eb; }
.kb-article, .kb-section {
	max-width: 960px;
	margin: 0 auto;
	padding: 30px 34px;
	border: 1px solid var(--kb-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}
body.dark-theme .kb-article,
body.dark-theme .kb-section,
html[data-night='night'] .kb-article,
html[data-night='night'] .kb-section { background: #111c2e; }
.kb-article-head, .kb-section-head { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--kb-line); }
.kb-article-head h1, .kb-section-head h1 {
	margin: 0 0 10px;
	color: var(--kb-ink);
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.35;
}
.kb-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--kb-muted); font-size: 12px; }
.kb-meta a { color: #2563eb; }
.kb-section-intro { margin: 0; }
.kb-section-intro p { margin: 0 0 10px; color: var(--kb-muted); font-size: 13.5px; line-height: 1.9; }
.kb-content { color: #334155; font-size: 15px; line-height: 1.95; }
body.dark-theme .kb-content,
html[data-night='night'] .kb-content { color: #c7d4e5; }
.kb-content h2 {
	margin: 30px 0 10px;
	padding-left: 12px;
	border-left: 3px solid #2563eb;
	color: var(--kb-ink);
	font-size: 20px;
	line-height: 1.45;
	scroll-margin-top: 96px;
}
.kb-content h3 { margin: 22px 0 8px; color: var(--kb-ink); font-size: 16.5px; }
.kb-content p { margin: 0 0 14px; }
.kb-content ul, .kb-content ol { margin: 0 0 16px; padding-left: 24px; }
.kb-content li { margin: 5px 0; }
.kb-content code {
	padding: 2px 6px;
	border-radius: 5px;
	background: rgba(37, 99, 235, .08);
	color: #1d4ed8;
	font-size: 13px;
}
.kb-content pre {
	margin: 16px 0;
	padding: 16px 18px;
	border: 1px solid rgba(148, 163, 184, .2);
	border-radius: 10px;
	background: #0f172a;
	overflow: auto;
}
.kb-content pre code { padding: 0; background: none; color: #dbeafe; font-size: 12.5px; line-height: 1.75; }
.kb-content table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 13px; }
.kb-content th, .kb-content td { padding: 9px 10px; border: 1px solid var(--kb-line); text-align: left; }
.kb-content th { background: rgba(37, 99, 235, .06); color: var(--kb-ink); }
.kb-content blockquote { margin: 16px 0; padding: 10px 16px; border-left: 3px solid #0891b2; background: rgba(8, 145, 178, .06); color: var(--kb-muted); }
.kb-content img { max-width: 100%; height: auto; border-radius: 10px; }

/* 章节列表 */
.kb-chapter-list { display: grid; gap: 16px; }
.kb-chapter { padding: 18px; border: 1px solid var(--kb-line); border-radius: 14px; background: rgba(248, 250, 252, .55); }
body.dark-theme .kb-chapter,
html[data-night='night'] .kb-chapter { background: rgba(17, 28, 46, .6); }
.kb-chapter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.kb-chapter-head h2 { margin: 0; font-size: 18px; }
.kb-chapter-head h2 a { color: var(--kb-ink); }
.kb-chapter-head span { color: var(--kb-muted); font-size: 11px; }
.kb-lesson-list { display: grid; gap: 6px; }
.kb-lesson-list--wide { margin-top: 8px; }
.kb-lesson {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 13px;
	border: 1px solid transparent;
	border-radius: 9px;
	background: #fff;
	color: var(--kb-ink);
	font-size: 13px;
}
body.dark-theme .kb-lesson,
html[data-night='night'] .kb-lesson { background: #0f1a2b; }
.kb-lesson:hover { border-color: rgba(37, 99, 235, .28); background: rgba(37, 99, 235, .05); }
.kb-lesson__dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #0891b2; }
.kb-lesson b { flex: 1; min-width: 0; font-weight: 600; }
.kb-lesson__arrow { color: var(--kb-muted); font-size: 12px; }

/* 上下篇 */
.kb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--kb-line); }
.kb-pager__item { display: flex; flex-direction: column; gap: 4px; padding: 13px 16px; border: 1px solid var(--kb-line); border-radius: 11px; color: var(--kb-ink); }
.kb-pager__item small { color: var(--kb-muted); font-size: 10px; letter-spacing: .08em; }
.kb-pager__item b { font-size: 13px; line-height: 1.5; }
.kb-pager__item--next { text-align: right; }
.kb-pager__item:hover { border-color: rgba(37, 99, 235, .3); background: rgba(37, 99, 235, .04); }

@media (max-width: 1100px) {
	.kb-stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.kb-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.kb-hero { grid-template-columns: 1fr; padding: 24px 20px; }
	.kb-hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.kb-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kb-stage-card { min-height: 190px; }
	.kb-fpga-layout { grid-template-columns: 1fr; }
	.kb-fpga-chapters { grid-template-columns: 1fr; }
	.kb-quick-links { grid-template-columns: 1fr; }
	.kb-section-title { display: block; }
	.kb-section-title p { margin-top: 6px; text-align: left; }
	.kb-article, .kb-section { padding: 22px 18px; border-radius: 14px; }
	.kb-pager { grid-template-columns: 1fr; }
	.kb-pager__item--next { text-align: left; }
}
@media (max-width: 520px) {
	.kb-stage-grid, .kb-tool-grid { grid-template-columns: 1fr; }
	.kb-hero__stats { grid-template-columns: 1fr 1fr; }
	.kb-fpga { padding: 20px 16px; }
}

/* 知识库书籍：代码深色高对比度，避免 Prism 浅色主题把代码冲成一片 */
.kb-book-content pre[class*="language-"],
.kb-content pre[class*="language-"] {
	background: #0b1220 !important;
	border: 1px solid #243244 !important;
	border-radius: 10px !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03) !important;
	color: #e6edf7 !important;
	font-size: 13px !important;
	line-height: 1.75 !important;
	tab-size: 4;
}
.kb-book-content code[class*="language-"],
.kb-content code[class*="language-"] {
	color: #e6edf7 !important;
	text-shadow: none !important;
	font-family: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", monospace !important;
}
.kb-book-content pre[class*="language-"] code,
.kb-content pre[class*="language-"] code { background: transparent !important; }
.kb-book-content .token.comment, .kb-book-content .token.prolog, .kb-book-content .token.doctype, .kb-book-content .token.cdata { color: #7f8ea3 !important; }
.kb-book-content .token.punctuation { color: #b8c4d6 !important; }
.kb-book-content .token.property, .kb-book-content .token.tag, .kb-book-content .token.boolean, .kb-book-content .token.number, .kb-book-content .token.constant, .kb-book-content .token.symbol { color: #f7a76c !important; }
.kb-book-content .token.selector, .kb-book-content .token.attr-name, .kb-book-content .token.string, .kb-book-content .token.char, .kb-book-content .token.builtin { color: #a5d6a7 !important; }
.kb-book-content .token.operator, .kb-book-content .token.entity, .kb-book-content .token.url { color: #89ddff !important; }
.kb-book-content .token.atrule, .kb-book-content .token.attr-value, .kb-book-content .token.keyword { color: #c792ea !important; }
.kb-book-content .token.function, .kb-book-content .token.class-name { color: #82aaff !important; }
.kb-book-content .token.regex, .kb-book-content .token.important, .kb-book-content .token.variable { color: #ffcb6b !important; }
.kb-book-intro { margin: 0 0 24px; padding: 16px 18px; border: 1px solid #dbeafe; border-radius: 12px; background: linear-gradient(135deg, #f8fbff, #eff6ff); color: #334155; }
.kb-book-intro__meta { margin-top: 8px; color: #64748b; font-size: 12px; }
html[data-night='night'] .kb-book-intro { border-color: #2a3646; background: linear-gradient(135deg, #111a27, #16202d); color: #dbeafe; }
html[data-night='night'] .kb-book-intro__meta { color: #94a3b8; }

/* 知识库 · 调整电路在线仿真 */
.kb-lab__panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--kb-line, #e5e7eb);
    border-radius: 18px;
    background: var(--kb-card, #fff);
}
.kb-lab__controls { display: grid; gap: 18px; }
.kb-lab__controls label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    font-size: 13px;
    color: var(--kb-muted, #64748b);
}
.kb-lab__controls output { color: var(--kb-ink, #0f172a); font-weight: 700; font-variant-numeric: tabular-nums; }
.kb-lab__controls input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
    height: 24px;
    margin: 2px 0 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    accent-color: #2563eb;
    cursor: pointer;
}
.kb-lab__controls input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 99px;
    background: linear-gradient(90deg, #bfdbfe, #dbeafe);
    border: 1px solid #c7d9f5;
}
.kb-lab__controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 2px 7px rgba(37, 99, 235, .35);
}
.kb-lab__controls input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 99px;
    background: #dbeafe;
    border: 1px solid #c7d9f5;
}
.kb-lab__controls input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 2px 7px rgba(37, 99, 235, .35);
}
.kb-lab__controls input[type="range"]:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
.kb-lab__readout {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 4px 2px;
}
.kb-lab__meter { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px dashed var(--kb-line, #e5e7eb); }
.kb-lab__meter span { color: var(--kb-muted, #64748b); font-size: 12px; }
.kb-lab__meter b { color: var(--kb-ink, #0f172a); font-size: 18px; font-variant-numeric: tabular-nums; }
.kb-lab__bar { height: 6px; margin-top: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.kb-lab__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #2563eb); transition: width .12s linear; }
.kb-lab__readout p { margin: 8px 0 2px; color: var(--kb-muted, #64748b); font-size: 12px; line-height: 1.7; }
@media (max-width: 760px) {
    .kb-lab__panel { grid-template-columns: 1fr; padding: 18px; }
}

body.dark-theme .kb-lab__panel,
html[data-night="night"] .kb-lab__panel { background: #151f2d; }
body.dark-theme .kb-lab__bar,
html[data-night="night"] .kb-lab__bar { background: #263244; }
html[data-night="night"] .kb-lab__controls input[type="range"]::-webkit-slider-runnable-track { background: #263244; border-color: #3b4b62; }
html[data-night="night"] .kb-lab__controls input[type="range"]::-webkit-slider-thumb { border-color: #dbeafe; }
html[data-night="night"] .kb-lab__controls input[type="range"]::-moz-range-track { background: #263244; border-color: #3b4b62; }

/* 收紧后的分压器入口 */
.kb-lab__compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border: 1px solid var(--kb-line, #e5e7eb);
    border-radius: 16px;
    background: var(--kb-card, #fff);
}
.kb-lab__compact-copy { display: grid; gap: 5px; min-width: 0; }
.kb-lab__compact-copy b { color: var(--kb-ink, #0f172a); font-size: 14px; }
.kb-lab__compact-copy span { color: var(--kb-muted, #64748b); font-size: 12px; line-height: 1.7; }
.kb-lab__compact-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.kb-lab__compact-actions .kb-btn { border-color: rgba(37, 99, 235, .2); background: rgba(37, 99, 235, .06); color: #1d4ed8; }
.kb-lab__compact-actions .kb-btn:hover { color: #1e40af; background: rgba(37, 99, 235, .12); }
.kb-lab__compact-actions .kb-btn--primary { border-color: transparent; background: linear-gradient(135deg, #2563eb, #0891b2); color: #fff; }
.kb-lab__compact-actions .kb-btn--primary:hover { background: linear-gradient(135deg, #1d4ed8, #0e7490); }
body.dark-theme .kb-lab__compact,
html[data-night="night"] .kb-lab__compact { background: #151f2d; }
body.dark-theme .kb-lab__compact-actions .kb-btn,
html[data-night="night"] .kb-lab__compact-actions .kb-btn { border-color: rgba(148, 190, 235, .28); background: rgba(148, 190, 235, .08); color: #e2e8f0; }
body.dark-theme .kb-lab__compact-actions .kb-btn--primary,
html[data-night="night"] .kb-lab__compact-actions .kb-btn--primary { border-color: transparent; background: linear-gradient(135deg, #2563eb, #0891b2); color: #fff; }
@media (max-width: 760px) {
    .kb-lab__compact { align-items: stretch; flex-direction: column; padding: 15px 16px; }
    .kb-lab__compact-actions .kb-btn { flex: 1 1 auto; justify-content: center; }
}


/* ===== 五阶段导航 / 下一章入口 ===== */
.kb-stage-nav {
    display: flex;
    gap: 8px;
    margin: 14px 0 22px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.kb-stage-nav::-webkit-scrollbar { display: none; }
.kb-stage-nav__home,
.kb-stage-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.kb-stage-nav__no {
    color: var(--stage-accent, #2563eb);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}
.kb-stage-nav__item:hover,
.kb-stage-nav__home:hover {
    border-color: var(--stage-accent, #2563eb);
    color: #0f172a;
    transform: translateY(-1px);
}
.kb-stage-nav__item.is-active {
    border-color: var(--stage-accent, #2563eb);
    background: color-mix(in srgb, var(--stage-accent, #2563eb) 12%, #fff);
    color: #0f172a;
}
.kb-stage-nav--bottom { margin: 30px 0 4px; }
.kb-chapter-next {
    margin: 28px 0 6px;
    padding: 16px 18px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #fff);
}
.kb-chapter-next a { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: inherit; text-decoration: none; }
.kb-chapter-next small { display: block; color: #2563eb; font-size: 11px; letter-spacing: .08em; }
.kb-chapter-next b { display: block; margin-top: 3px; color: #0f172a; font-size: 15px; }
.kb-chapter-next span { flex: 0 0 auto; color: #2563eb; font-size: 13px; font-weight: 700; }
html[data-night="night"] .kb-stage-nav__home,
html[data-night="night"] .kb-stage-nav__item {
    border-color: #2b3a4f;
    background: #151f2d;
    color: #b7c5d8;
}
html[data-night="night"] .kb-stage-nav__home:hover,
html[data-night="night"] .kb-stage-nav__item:hover,
html[data-night="night"] .kb-stage-nav__item.is-active { color: #f8fbff; background: #1b2a3d; }
html[data-night="night"] .kb-chapter-next {
    border-color: #2b3a4f;
    background: linear-gradient(135deg, #151f2d, #101827);
}
html[data-night="night"] .kb-chapter-next b { color: #f8fbff; }
@media (max-width: 760px) {
    .kb-stage-nav { margin: 10px 0 18px; gap: 6px; }
    .kb-stage-nav__home, .kb-stage-nav__item { min-height: 32px; padding: 5px 9px; font-size: 11px; }
    .kb-chapter-next { margin-top: 22px; padding: 13px 14px; }
    .kb-chapter-next b { font-size: 13px; }
}

/* 知识库独立页版权行 */
.kb-page-body .indie-copyright {
	margin: 20px 0 8px;
	padding-top: 14px;
	border-top: 1px dashed rgba(100, 116, 139, .22);
	color: #7b8798;
	font-size: 13px;
	line-height: 1.8;
	text-align: center;
}
.kb-page-body .indie-copyright a { color: #2563eb; text-decoration: none; }
.kb-page-body .indie-copyright a:hover { text-decoration: underline; }
@media (max-width: 768px) {
	.kb-page-body .indie-copyright { font-size: 12px; line-height: 1.7; padding-left: 12px; padding-right: 12px; }
}
