.kbsm-manual {
	--kbsm-border: #e3e6ea;
	--kbsm-muted: #637083;
	--kbsm-accent: #1769aa;
	color: #172033;
	padding: 44px 20px 72px;
}

.kbsm-manual__inner {
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 80px);
	max-width: 1280px;
	margin: 0 auto;
}

.kbsm-sidebar {
	position: sticky;
	top: 24px;
	align-self: start;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding-right: 14px;
}

.kbsm-sidebar__home {
	display: block;
	margin-bottom: 18px;
	color: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	text-decoration: none;
}

.kbsm-search {
	display: flex;
	gap: 8px;
	margin: 0 0 22px;
}

.kbsm-search input {
	min-width: 0;
	width: 100%;
	border: 1px solid var(--kbsm-border);
	border-radius: 4px;
	padding: 9px 10px;
	font: inherit;
}

.kbsm-search button {
	border: 0;
	border-radius: 4px;
	background: var(--kbsm-accent);
	color: #fff;
	padding: 8px 11px;
	font: inherit;
	cursor: pointer;
}

.kbsm-chapter-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kbsm-chapter-list .kbsm-chapter-list {
	margin: 6px 0 6px 15px;
	border-left: 1px solid var(--kbsm-border);
	padding-left: 12px;
}

.kbsm-chapter-list li { margin: 0; }
.kbsm-chapter-list a {
	display: block;
	padding: 5px 0;
	color: #4b5565;
	font-size: .91rem;
	line-height: 1.4;
	text-decoration: none;
}
.kbsm-chapter-list .is-current > a { color: var(--kbsm-accent); font-weight: 700; }
.kbsm-chapter-list a:hover, .kbsm-chapter-list a:focus { color: var(--kbsm-accent); text-decoration: underline; }

.kbsm-mobile-directory { display: none; }

.kbsm-article { min-width: 0; max-width: 850px; }
.kbsm-breadcrumbs { color: var(--kbsm-muted); font-size: .87rem; margin-bottom: 24px; }
.kbsm-breadcrumbs a { color: inherit; text-decoration: none; }
.kbsm-breadcrumbs a:hover, .kbsm-breadcrumbs a:focus { color: var(--kbsm-accent); text-decoration: underline; }
.kbsm-breadcrumbs span { margin: 0 6px; }
.kbsm-article__header { border-bottom: 1px solid var(--kbsm-border); margin-bottom: 28px; padding-bottom: 24px; }
.kbsm-article__header h1 { margin: 0; font-size: clamp(2rem, 3.7vw, 3.1rem); line-height: 1.14; }
.kbsm-article__header p { margin: 12px 0 0; color: var(--kbsm-muted); }

.kbsm-on-page { margin: 0 0 30px; padding: 16px 20px; border-left: 3px solid var(--kbsm-accent); background: #f4f8fb; }
.kbsm-on-page summary { display: block; cursor: pointer; font-weight: 700; }
.kbsm-on-page[open] summary { margin-bottom: 8px; }
.kbsm-on-page ul { margin: 0; padding-left: 20px; }
.kbsm-on-page__level-3 { margin-left: 14px; }
.kbsm-on-page a { color: var(--kbsm-accent); }

.kbsm-content { font-size: 1rem; line-height: 1.72; overflow-wrap: anywhere; }
.kbsm-content h2, .kbsm-content h3 { scroll-margin-top: 28px; line-height: 1.25; }
.kbsm-content h2 { margin-top: 48px; font-size: 1.7rem; }
.kbsm-content h3 { margin-top: 34px; font-size: 1.27rem; }
.kbsm-content img { display: block; max-width: 100%; height: auto; margin: 22px auto; cursor: zoom-in; }
.kbsm-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 24px 0; }
.kbsm-content th, .kbsm-content td { border: 1px solid var(--kbsm-border); padding: 9px 12px; text-align: left; vertical-align: top; }
.kbsm-content th { background: #f4f6f8; }
.kbsm-content a { color: var(--kbsm-accent); }
.kbsm-content > a { display: block; margin: 12px 0; }
.kbsm-content pre { max-width: 100%; overflow: auto; padding: 16px; background: #172033; color: #eef5ff; }

/* Semantic structures emitted by the one-time Feishu converter. */
.kbsm-content .kbsm-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 26px 0;
}
.kbsm-content .kbsm-column {
	min-width: 0;
	flex: var(--kbsm-column-weight, 1) 1 230px;
}
.kbsm-content .kbsm-grid figure { margin: 0; }
.kbsm-content .kbsm-grid img { margin: 0 auto; }
.kbsm-content figure { max-width: 100%; margin: 24px auto; }
.kbsm-content figcaption { margin-top: 8px; color: var(--kbsm-muted); font-size: .9rem; text-align: center; }
.kbsm-content .kbsm-table-wrap { max-width: 100%; overflow-x: auto; margin: 24px 0; }
.kbsm-content .kbsm-table-wrap table { min-width: 560px; margin: 0; }
.kbsm-content .kbsm-highlight { border-radius: 2px; padding: 0 .15em; }

.kbsm-previous-next { display: flex; justify-content: space-between; gap: 20px; margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--kbsm-border); }
.kbsm-previous-next a { max-width: 48%; color: var(--kbsm-accent); font-weight: 700; text-decoration: none; }
.kbsm-previous-next__next { margin-left: auto; text-align: right; }
.kbsm-previous-next span { display: block; color: var(--kbsm-muted); font-size: .82rem; font-weight: 400; margin-bottom: 3px; }
.kbsm-results { margin: 0; padding: 0; list-style: none; }
.kbsm-results li { padding: 20px 0; border-bottom: 1px solid var(--kbsm-border); }
.kbsm-results a { color: var(--kbsm-accent); font-size: 1.15rem; font-weight: 700; }
.kbsm-results p { color: var(--kbsm-muted); margin-bottom: 0; }

.kbsm-lightbox[hidden] { display: none; }
.kbsm-lightbox { position: fixed; z-index: 99999; inset: 0; display: grid; place-items: center; padding: 24px; }
.kbsm-lightbox__backdrop { position: absolute; inset: 0; background: rgba(7, 12, 20, .87); }
.kbsm-lightbox__dialog { position: relative; max-width: min(1200px, 96vw); max-height: 92vh; outline: 0; }
.kbsm-lightbox__image { display: block; max-width: 100%; max-height: 90vh; margin: auto; object-fit: contain; }
.kbsm-lightbox__close { position: absolute; right: -10px; top: -12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #172033; font-size: 26px; line-height: 1; cursor: pointer; }

@media (max-width: 760px) {
	.kbsm-manual { padding: 28px 16px 52px; }
	.kbsm-manual__inner { display: block; }
	.kbsm-sidebar { display: none; }
	.kbsm-mobile-directory { display: block; margin: 0 0 24px; padding: 13px 15px; border: 1px solid var(--kbsm-border); border-radius: 5px; }
	.kbsm-mobile-directory summary { color: var(--kbsm-accent); cursor: pointer; font-weight: 700; }
	.kbsm-mobile-directory .kbsm-search { margin-top: 16px; }
	.kbsm-mobile-directory nav { max-height: 50vh; overflow: auto; }
	.kbsm-article__header h1 { font-size: 2rem; }
	.kbsm-content h2 { font-size: 1.45rem; }
	.kbsm-content .kbsm-grid { display: block; }
	.kbsm-content .kbsm-column + .kbsm-column { margin-top: 20px; }
	.kbsm-content .kbsm-table-wrap { margin-left: -2px; margin-right: -2px; }
}
