.bh-howto {
	--bh-ink: #1a1814;
	--bh-text: #111827;
	--bh-muted: #6b7280;
	--bh-gold: #9a6f2e;
	--bh-gold-bg: #faf5ec;
	--bh-line: #e5e7eb;
	--bh-bg: #fcfaf7;
	--bh-offset: 96px;
	color: var(--bh-text);
	font-family: Inter, system-ui, sans-serif;
	line-height: 1.6;
	font-size: 16px;
}

.bh-howto *,
.bh-howto *::before,
.bh-howto *::after {
	box-sizing: border-box;
}

.bh-layout {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.bh-toc {
	position: sticky;
	top: var(--bh-offset);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - var(--bh-offset) - 24px);
	overflow: hidden;
}

.bh-toc-search {
	flex: 0 0 auto;
	margin-bottom: 12px;
	padding: 3px 3px 0;
}

.bh-howto input.bh-toc-search-input {
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--bh-line);
	border-bottom-width: 1px;
	border-radius: 6px;
	background: #fff;
	box-shadow: none;
	color: var(--bh-ink);
	font: inherit;
	font-size: 14px;
	line-height: 1.35;
	appearance: none;
}

.bh-howto input.bh-toc-search-input:focus {
	outline: 2px solid var(--bh-gold);
	outline-offset: 1px;
	border-color: transparent;
	box-shadow: none;
}

.bh-toc-search-input::-webkit-search-cancel-button {
	cursor: pointer;
}

.bh-toc-toggle {
	display: none;
}

.bh-toc-panel {
	min-height: 0;
	overflow: auto;
}

.bh-toc-label {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bh-muted);
}

.bh-toc-empty {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--bh-muted);
}

.bh-toc a.is-hit {
	background: var(--bh-gold-bg);
	color: var(--bh-gold);
}

.bh-toc-list,
.bh-toc-children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bh-toc-list > li + li {
	margin-top: 2px;
}

.bh-toc li.is-hidden {
	display: none;
}

.bh-toc a {
	display: flex;
	gap: 8px;
	align-items: baseline;
	padding: 7px 10px;
	border-radius: 6px;
	color: var(--bh-text);
	text-decoration: none;
	font-size: 14px;
	line-height: 1.35;
}

.bh-toc a:hover {
	background: var(--bh-gold-bg);
	color: var(--bh-ink);
}

.bh-toc a.is-active {
	background: var(--bh-gold-bg);
	color: var(--bh-gold);
	font-weight: 600;
}

.bh-toc-num {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
	font-size: 12px;
	color: var(--bh-gold);
}

.bh-toc-children {
	margin: 0 0 6px 18px;
	padding-left: 10px;
	border-left: 1px solid var(--bh-line);
}

.bh-toc-children a {
	padding: 4px 8px;
	font-size: 13px;
	color: var(--bh-muted);
}

.bh-toc-level-3 a {
	padding-left: 16px;
}

.bh-section {
	scroll-margin-top: var(--bh-offset);
	padding-bottom: 40px;
	margin-bottom: 40px;
	border-bottom: 1px solid var(--bh-line);
}

.bh-section:last-child {
	border-bottom: 0;
	margin-bottom: 0;
}

.bh-section-head {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin-bottom: 20px;
}

.bh-num {
	flex: 0 0 auto;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 28px;
	line-height: 1;
	color: var(--bh-gold);
	padding-top: 4px;
}

.bh-title {
	margin: 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 32px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--bh-ink);
}

.bh-summary {
	margin: 6px 0 0;
	color: var(--bh-muted);
	font-size: 15px;
}

.bh-video {
	position: relative;
	margin: 0 0 20px;
	background: #111827;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.bh-prose .bh-video {
	margin: 14px 0 22px;
}

.bh-video iframe,
.bh-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.bh-tool {
	margin: 0 0 20px;
}

.bh-tool-link {
	display: inline-block;
	padding: 10px 16px;
	border-radius: 6px;
	background: #111827;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.bh-tool-link:hover {
	background: #1f2937;
	color: #fff;
}

.bh-prose {
	max-width: 68ch;
}

.bh-prose h2,
.bh-prose h3 {
	scroll-margin-top: var(--bh-offset);
	font-family: "Playfair Display", Georgia, serif;
	font-weight: 500;
	color: var(--bh-ink);
	line-height: 1.25;
}

.bh-prose h2 {
	margin: 32px 0 8px;
	font-size: 24px;
}

.bh-prose h3 {
	margin: 24px 0 8px;
	font-size: 20px;
}

.bh-prose p,
.bh-prose li {
	font-size: 16px;
}

.bh-prose ol,
.bh-prose ul {
	margin: 0 0 16px;
	padding-left: 1.25em;
}

.bh-prose li + li {
	margin-top: 6px;
}

.bh-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.bh-prose a {
	color: var(--bh-gold);
}

.bh-empty {
	color: var(--bh-muted);
}

@media (max-width: 860px) {
	.bh-layout {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.bh-toc {
		position: sticky;
		top: 0;
		z-index: 20;
		max-height: none;
		overflow: visible;
		background: #fff;
		border: 1px solid var(--bh-line);
		border-radius: 8px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	}

	.bh-toc-search {
		margin: 0;
		padding: 10px 10px 0;
	}

	.bh-toc-label {
		display: none;
	}

	.bh-toc-toggle {
		display: flex;
		width: 100%;
		align-items: center;
		justify-content: space-between;
		padding: 12px 14px;
		border: 0;
		background: transparent;
		font: inherit;
		font-size: 14px;
		font-weight: 600;
		color: var(--bh-ink);
		cursor: pointer;
	}

	.bh-toc-toggle::after {
		content: "";
		width: 8px;
		height: 8px;
		border-right: 2px solid var(--bh-gold);
		border-bottom: 2px solid var(--bh-gold);
		transform: rotate(45deg);
		margin-top: -4px;
	}

	.bh-toc.is-open .bh-toc-toggle::after {
		transform: rotate(225deg);
		margin-top: 4px;
	}

	.bh-toc-panel {
		display: none;
		max-height: 50vh;
		overflow: auto;
		padding: 0 8px 10px;
	}

	.bh-toc.is-open .bh-toc-panel {
		display: block;
	}

	.bh-title {
		font-size: 26px;
	}
}
