/**
 * BootHack — system dark mode surfaces (framework-agnostic).
 *
 * Complements per-adapter “dark-mode deference” (body text/background release)
 * with elevated surfaces, borders, and contrast-safe text on bh-* regions.
 * Targets WCAG 2.1 AA: normal text ≥ 4.5:1, large text ≥ 3:1 on surface tokens.
 *
 * Active when: OS prefers dark (unless html[data-theme=light]), or html[data-theme=dark].
 *
 * @package BootHack
 */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) {
		color-scheme: dark;

		--bh-dark-canvas: #0f1117;
		--bh-dark-surface: #1a1f28;
		--bh-dark-surface-raised: #232936;
		--bh-dark-border: rgba(255, 255, 255, 0.14);
		--bh-dark-border-strong: rgba(255, 255, 255, 0.22);
		--bh-dark-text: #e8ecf1;
		--bh-dark-text-muted: #b4bcc8;
		--bh-dark-text-subtle: #9aa5b4;
		--bh-dark-link: #8db4ff;
		--bh-dark-link-hover: #a8c6ff;
		--bh-dark-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.45);

		--boothack-surface: var(--bh-dark-surface);
		--boothack-border-subtle: var(--bh-dark-border);
		--boothack-shadow-strong: rgba(0, 0, 0, 0.85);
		--boothack-shadow-soft: rgba(0, 0, 0, 0.55);

		/* Release Customizer light tokens so adapter prose rules inherit dark copy. */
		--bs-body-color: var(--bh-dark-text);
		--bh-body-color: var(--bh-dark-text);
		--bs-body-bg: var(--bh-dark-canvas);
		--bh-body-bg: var(--bh-dark-canvas);
		--bh-text-muted: var(--bh-dark-text-muted);
		--pico-color: var(--bh-dark-text);
		--pico-muted-color: var(--bh-dark-text-muted);
		--pico-background-color: var(--bh-dark-surface);
		--pico-table-border-color: var(--bh-dark-border);

		/* Bootstrap 5 table color-mode tokens (when .table is present in prose). */
		--bs-table-bg: var(--bh-dark-surface);
		--bs-table-color: var(--bh-dark-text);
		--bs-table-border-color: var(--bh-dark-border);
		--bs-table-striped-bg: var(--bh-dark-surface-raised);
		--bs-table-striped-color: var(--bh-dark-text);
		--bs-table-hover-bg: color-mix(in srgb, var(--bh-dark-surface-raised) 82%, var(--bh-dark-link) 18%);
		--bs-table-hover-color: var(--bh-dark-text);
		--bs-table-active-bg: var(--bh-dark-surface-raised);
		--bs-table-active-color: var(--bh-dark-text);
	}
}

html[data-theme=dark] {
	color-scheme: dark;

	--bh-dark-canvas: #0f1117;
	--bh-dark-surface: #1a1f28;
	--bh-dark-surface-raised: #232936;
	--bh-dark-border: rgba(255, 255, 255, 0.14);
	--bh-dark-border-strong: rgba(255, 255, 255, 0.22);
	--bh-dark-text: #e8ecf1;
	--bh-dark-text-muted: #b4bcc8;
	--bh-dark-text-subtle: #9aa5b4;
	--bh-dark-link: #8db4ff;
	--bh-dark-link-hover: #a8c6ff;
	--bh-dark-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.45);

	--boothack-surface: var(--bh-dark-surface);
	--boothack-border-subtle: var(--bh-dark-border);
	--boothack-shadow-strong: rgba(0, 0, 0, 0.85);
	--boothack-shadow-soft: rgba(0, 0, 0, 0.55);

	--bs-body-color: var(--bh-dark-text);
	--bh-body-color: var(--bh-dark-text);
	--bs-body-bg: var(--bh-dark-canvas);
	--bh-body-bg: var(--bh-dark-canvas);
	--bh-text-muted: var(--bh-dark-text-muted);
	--pico-color: var(--bh-dark-text);
	--pico-muted-color: var(--bh-dark-text-muted);
	--pico-background-color: var(--bh-dark-surface);
	--pico-table-border-color: var(--bh-dark-border);

	--bs-table-bg: var(--bh-dark-surface);
	--bs-table-color: var(--bh-dark-text);
	--bs-table-border-color: var(--bh-dark-border);
	--bs-table-striped-bg: var(--bh-dark-surface-raised);
	--bs-table-striped-color: var(--bh-dark-text);
	--bs-table-hover-bg: color-mix(in srgb, var(--bh-dark-surface-raised) 82%, var(--bh-dark-link) 18%);
	--bs-table-hover-color: var(--bh-dark-text);
	--bs-table-active-bg: var(--bh-dark-surface-raised);
	--bs-table-active-color: var(--bh-dark-text);
}

/* --- Body + canvas --- */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) body {
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) body.custom-background {
		background-color: var(--bh-dark-canvas);
	}
}

html[data-theme=dark] body {
	color: var(--bh-dark-text);
}

html[data-theme=dark] body.custom-background {
	background-color: var(--bh-dark-canvas);
}

/* --- Content cards (all adapter hooks) --- */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) .bh-site-content .card,
	html:not([data-theme=light]) .bh-site-content .bh-card,
	html:not([data-theme=light]) .bh-site-content article.bh-card,
	html:not([data-theme=light]) .bh-site-content .uk-card-default,
	html:not([data-theme=light]) .bh-site-content .bh-tw-card,
	html:not([data-theme=light]) .bh-site-content .bh-materialize-card,
	html:not([data-theme=light]) .bh-site-content .boothack-post-nav.card,
	html:not([data-theme=light]) .bh-site-content a.boothack-post-nav.card,
	html:not([data-theme=light]) .bh-site-content a.boothack-post-nav.bh-post-nav-card,
	html:not([data-theme=light]) .bh-site-content .bh-featured-card,
	html:not([data-theme=light]) .bh-site-content #comments .card,
	html:not([data-theme=light]) .bh-singular-content .card,
	html:not([data-theme=light]) .bh-singular-content .bh-card {
		background-color: var(--bh-dark-surface) !important;
		border-color: var(--bh-dark-border) !important;
		color: var(--bh-dark-text) !important;
		box-shadow: var(--bh-dark-shadow);
	}

	html:not([data-theme=light]) .bh-site-content .card .card-body,
	html:not([data-theme=light]) .bh-site-content .card .card-content,
	html:not([data-theme=light]) .bh-site-content .card .card-header,
	html:not([data-theme=light]) .bh-site-content .card .card-footer,
	html:not([data-theme=light]) .bh-site-content .bh-card-body,
	html:not([data-theme=light]) .bh-site-content .uk-card-body,
	html:not([data-theme=light]) .bh-site-content .bh-tw-card-body {
		background-color: transparent;
		color: inherit;
		border-color: var(--bh-dark-border);
	}

	html:not([data-theme=light]) .bh-site-content .card-title,
	html:not([data-theme=light]) .bh-site-content .card-title a,
	html:not([data-theme=light]) .bh-site-content .bh-card-title,
	html:not([data-theme=light]) .bh-site-content .bh-card-title-link,
	html:not([data-theme=light]) .bh-site-content .bh-card-title-h4,
	html:not([data-theme=light]) .bh-site-content .bh-featured-title,
	html:not([data-theme=light]) .bh-site-content .bh-featured-card .title,
	html:not([data-theme=light]) .bh-site-content .card h2,
	html:not([data-theme=light]) .bh-site-content .card h3,
	html:not([data-theme=light]) .bh-site-content .card h4,
	html:not([data-theme=light]) .bh-site-content .card h5,
	html:not([data-theme=light]) .bh-site-content .bh-card .card-title,
	html:not([data-theme=light]) .bh-site-content .bh-card h2,
	html:not([data-theme=light]) .bh-site-content .bh-card h3,
	html:not([data-theme=light]) .bh-site-content a.text-dark,
	html:not([data-theme=light]) .bh-site-content .text-dark,
	html:not([data-theme=light]) .bh-site-content .card-title a.text-decoration-none {
		color: var(--bh-dark-text) !important;
	}

	html:not([data-theme=light]) .bh-site-content .card-text,
	html:not([data-theme=light]) .bh-site-content .card .text-muted,
	html:not([data-theme=light]) .bh-site-content .card-meta,
	html:not([data-theme=light]) .bh-site-content .bh-card-meta,
	html:not([data-theme=light]) .bh-site-content .bh-featured-meta,
	html:not([data-theme=light]) .bh-site-content .small.text-muted,
	html:not([data-theme=light]) .bh-site-content .text-muted,
	html:not([data-theme=light]) .bh-site-content .bh-card-excerpt,
	html:not([data-theme=light]) .bh-site-content .card-excerpt,
	html:not([data-theme=light]) .bh-site-content .content,
	html:not([data-theme=light]) .bh-site-content .uk-text-meta,
	html:not([data-theme=light]) .bh-site-content .bh-meta-muted {
		color: var(--bh-dark-text-muted) !important;
	}

	/* Heading-level links and entry titles inherit the heading colour, not link blue. */
	html:not([data-theme=light]) .bh-site-content :is(h1, h2, h3, h4, h5, h6) a,
	html:not([data-theme=light]) .bh-site-content .entry-title a {
		color: inherit !important;
	}

	html:not([data-theme=light]) .bh-site-content :is(h1, h2, h3, h4, h5, h6) a:hover,
	html:not([data-theme=light]) .bh-site-content :is(h1, h2, h3, h4, h5, h6) a:focus-visible,
	html:not([data-theme=light]) .bh-site-content .entry-title a:hover,
	html:not([data-theme=light]) .bh-site-content .entry-title a:focus-visible {
		color: var(--bh-dark-text) !important;
	}

	html:not([data-theme=light]) .bh-site-content .card-title a.stretched-link:hover,
	html:not([data-theme=light]) .bh-site-content .card-title a.stretched-link:focus-visible {
		color: var(--bh-dark-text);
	}
}

html[data-theme=dark] .bh-site-content .card,
html[data-theme=dark] .bh-site-content .bh-card,
html[data-theme=dark] .bh-site-content article.bh-card,
html[data-theme=dark] .bh-site-content .uk-card-default,
html[data-theme=dark] .bh-site-content .bh-tw-card,
html[data-theme=dark] .bh-site-content .bh-materialize-card,
html[data-theme=dark] .bh-site-content .boothack-post-nav.card,
html[data-theme=dark] .bh-site-content a.boothack-post-nav.card,
html[data-theme=dark] .bh-site-content a.boothack-post-nav.bh-post-nav-card,
html[data-theme=dark] .bh-site-content .bh-featured-card,
html[data-theme=dark] .bh-site-content #comments .card,
html[data-theme=dark] .bh-singular-content .card,
html[data-theme=dark] .bh-singular-content .bh-card {
	background-color: var(--bh-dark-surface) !important;
	border-color: var(--bh-dark-border) !important;
	color: var(--bh-dark-text) !important;
	box-shadow: var(--bh-dark-shadow);
}

html[data-theme=dark] .bh-site-content .card .card-body,
html[data-theme=dark] .bh-site-content .card .card-content,
html[data-theme=dark] .bh-site-content .card .card-header,
html[data-theme=dark] .bh-site-content .card .card-footer,
html[data-theme=dark] .bh-site-content .bh-card-body,
html[data-theme=dark] .bh-site-content .uk-card-body,
html[data-theme=dark] .bh-site-content .bh-tw-card-body {
	background-color: transparent;
	color: inherit;
	border-color: var(--bh-dark-border);
}

html[data-theme=dark] .bh-site-content .card-title,
html[data-theme=dark] .bh-site-content .card-title a,
html[data-theme=dark] .bh-site-content .bh-card-title,
html[data-theme=dark] .bh-site-content .bh-card-title-link,
html[data-theme=dark] .bh-site-content .bh-card-title-h4,
html[data-theme=dark] .bh-site-content .bh-featured-title,
html[data-theme=dark] .bh-site-content .bh-featured-card .title,
html[data-theme=dark] .bh-site-content .card h2,
html[data-theme=dark] .bh-site-content .card h3,
html[data-theme=dark] .bh-site-content .card h4,
html[data-theme=dark] .bh-site-content .card h5,
html[data-theme=dark] .bh-site-content .bh-card .card-title,
html[data-theme=dark] .bh-site-content .bh-card h2,
html[data-theme=dark] .bh-site-content .bh-card h3,
html[data-theme=dark] .bh-site-content a.text-dark,
html[data-theme=dark] .bh-site-content .text-dark,
html[data-theme=dark] .bh-site-content .card-title a.text-decoration-none {
	color: var(--bh-dark-text) !important;
}

html[data-theme=dark] .bh-site-content .card-text,
html[data-theme=dark] .bh-site-content .card .text-muted,
html[data-theme=dark] .bh-site-content .card-meta,
html[data-theme=dark] .bh-site-content .bh-card-meta,
html[data-theme=dark] .bh-site-content .bh-featured-meta,
html[data-theme=dark] .bh-site-content .small.text-muted,
html[data-theme=dark] .bh-site-content .text-muted,
html[data-theme=dark] .bh-site-content .bh-card-excerpt,
html[data-theme=dark] .bh-site-content .card-excerpt,
html[data-theme=dark] .bh-site-content .content,
html[data-theme=dark] .bh-site-content .uk-text-meta,
html[data-theme=dark] .bh-site-content .bh-meta-muted {
	color: var(--bh-dark-text-muted) !important;
}

/* Heading-level links and entry titles inherit the heading colour, not link blue. */
html[data-theme=dark] .bh-site-content :is(h1, h2, h3, h4, h5, h6) a,
html[data-theme=dark] .bh-site-content .entry-title a {
	color: inherit !important;
}

/* Heading links should stay on their inherited colour on hover too. */
html[data-theme=dark] .bh-site-content :is(h1, h2, h3, h4, h5, h6) a:hover,
html[data-theme=dark] .bh-site-content :is(h1, h2, h3, h4, h5, h6) a:focus-visible,
html[data-theme=dark] .bh-site-content .entry-title a:hover,
html[data-theme=dark] .bh-site-content .entry-title a:focus-visible {
	color: var(--bh-dark-text) !important;
}

html[data-theme=dark] .bh-site-content .card-title a.stretched-link:hover,
html[data-theme=dark] .bh-site-content .card-title a.stretched-link:focus-visible {
	color: var(--bh-dark-text);
}

/* --- Sidebar --- */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) .bh-sidebar,
	html:not([data-theme=light]) .bh-layout-sidebar,
	html:not([data-theme=light]) .bh-sidebar-outer {
		color: var(--bh-dark-text-muted);
	}

	html:not([data-theme=light]) .bh-sidebar .widget-title,
	html:not([data-theme=light]) .bh-sidebar .widget > h2,
	html:not([data-theme=light]) .bh-sidebar .widget > h3 {
		color: var(--bh-dark-text);
		border-bottom-color: var(--bh-dark-border);
	}

	html:not([data-theme=light]) .bh-sidebar .widget ul li {
		border-bottom-color: var(--bh-dark-border);
	}

	html:not([data-theme=light]) .bh-sidebar .widget a {
		color: inherit !important;
	}

	html:not([data-theme=light]) .bh-sidebar .widget a:hover,
	html:not([data-theme=light]) .bh-sidebar .widget a:focus-visible {
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-sidebar .widget select {
		background-color: var(--bh-dark-surface) !important;
		border-color: var(--bh-dark-border) !important;
		color: var(--bh-dark-text) !important;
	}
}

html[data-theme=dark] .bh-sidebar,
html[data-theme=dark] .bh-layout-sidebar,
html[data-theme=dark] .bh-sidebar-outer {
	color: var(--bh-dark-text-muted);
}

html[data-theme=dark] .bh-sidebar .widget-title,
html[data-theme=dark] .bh-sidebar .widget > h2,
html[data-theme=dark] .bh-sidebar .widget > h3 {
	color: var(--bh-dark-text);
	border-bottom-color: var(--bh-dark-border);
}

html[data-theme=dark] .bh-sidebar .widget ul li {
	border-bottom-color: var(--bh-dark-border);
}

html[data-theme=dark] .bh-sidebar .widget a {
	color: inherit !important;
}

html[data-theme=dark] .bh-sidebar .widget a:hover,
html[data-theme=dark] .bh-sidebar .widget a:focus-visible {
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-sidebar .widget select {
	background-color: var(--bh-dark-surface) !important;
	border-color: var(--bh-dark-border) !important;
	color: var(--bh-dark-text) !important;
}

/* --- Footer --- */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) .bh-site-footer.bh-footer {
		background-color: var(--bh-dark-surface-raised) !important;
		border-top: 1px solid var(--bh-dark-border-strong);
		color: var(--bh-dark-text-muted);
	}

	html:not([data-theme=light]) .bh-site-footer .widget,
	html:not([data-theme=light]) .bh-site-footer .widget-title {
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-site-footer a:not(.bh-footer-link) {
		color: var(--bh-dark-link);
	}

	html:not([data-theme=light]) .bh-site-footer a:not(.bh-footer-link):hover,
	html:not([data-theme=light]) .bh-site-footer a:not(.bh-footer-link):focus-visible {
		color: var(--bh-dark-link-hover);
	}

	html:not([data-theme=light]) .bh-site-footer hr,
	html:not([data-theme=light]) .bh-site-footer .bh-footer-divider {
		border-color: var(--bh-dark-border);
		opacity: 1;
	}
}

html[data-theme=dark] .bh-site-footer.bh-footer {
	background-color: var(--bh-dark-surface-raised) !important;
	border-top: 1px solid var(--bh-dark-border-strong);
	color: var(--bh-dark-text-muted);
}

html[data-theme=dark] .bh-site-footer .widget,
html[data-theme=dark] .bh-site-footer .widget-title {
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-site-footer a:not(.bh-footer-link) {
	color: var(--bh-dark-link);
}

html[data-theme=dark] .bh-site-footer a:not(.bh-footer-link):hover,
html[data-theme=dark] .bh-site-footer a:not(.bh-footer-link):focus-visible {
	color: var(--bh-dark-link-hover);
}

html[data-theme=dark] .bh-site-footer hr,
html[data-theme=dark] .bh-site-footer .bh-footer-divider {
	border-color: var(--bh-dark-border);
	opacity: 1;
}

/* --- Breadcrumbs, pagination, headers --- */

@media (prefers-color-scheme: dark) {

	/*
	 * Set Bootstrap link-colour tokens on the container so every descendant
	 * that reads var(--bs-link-color) picks up the dark-mode value without
	 * requiring per-selector specificity battles.  Also covers the active
	 * crumb label, dividers, and the visited state.
	 */
	html:not([data-theme=light]) .bh-breadcrumbs {
		color: var(--bh-dark-text-muted);
		--bs-link-color: var(--bh-dark-text-muted);
		--bs-link-hover-color: var(--bh-dark-text);
		--bs-breadcrumb-item-active-color: var(--bh-dark-text-subtle);
		--bs-breadcrumb-divider-color: var(--bh-dark-border-strong);
	}

	/* Direct colour rule for UIkit bare <a> and any other framework link. */
	html:not([data-theme=light]) .bh-breadcrumbs a,
	html:not([data-theme=light]) .bh-breadcrumbs .uk-breadcrumb a {
		color: var(--bh-dark-text-muted) !important;
	}

	html:not([data-theme=light]) .bh-breadcrumbs a:hover,
	html:not([data-theme=light]) .bh-breadcrumbs a:focus,
	html:not([data-theme=light]) .bh-breadcrumbs a:focus-visible,
	html:not([data-theme=light]) .bh-breadcrumbs .uk-breadcrumb a:hover,
	html:not([data-theme=light]) .bh-breadcrumbs .uk-breadcrumb a:focus {
		color: var(--bh-dark-text) !important;
	}

	html:not([data-theme=light]) .bh-site-content .bh-pagination-btn,
	html:not([data-theme=light]) .bh-site-content .page-numbers {
		border-color: var(--bh-dark-border);
		color: var(--bh-dark-text);
	}

	/*
	 * Standard post/archive header — framework bridges pin light hex on titles,
	 * Bulma `.title` / `.has-text-grey`, Materialize greys, and byline/social
	 * links. Scope to `bh-*` hooks so prose entry-content link mods do not bleed
	 * into the title block (Tailwind / UIkit / Foundation parity).
	 */
	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) {
		color: var(--bh-dark-text);
		--bs-link-color: var(--bh-dark-text);
		--bs-link-hover-color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-page-title,
		.bh-header__part-title,
		.bh-header__series-title,
		.bh-header__part-title-text,
		.title,
		h1,
		h2
	) {
		color: var(--bh-dark-text) !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-meta-muted-small,
		.bh-standard-meta,
		.bh-standard-meta-muted,
		.bh-standard-archive-tagline,
		.subtitle,
		.has-text-grey,
		.text-muted,
		.bh-meta-separator
	) {
		color: var(--bh-dark-text-muted) !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-author-link,
		.bh-header__series-link,
		.bh-meta-name-wrap a
	),
	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-author-link,
		.bh-header__series-link,
		.bh-meta-name-wrap a
	):visited {
		color: var(--bh-dark-text) !important;
		text-decoration-color: currentColor !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-author-link,
		.bh-header__series-link,
		.bh-meta-name-wrap a
	):hover,
	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-author-link,
		.bh-header__series-link,
		.bh-meta-name-wrap a
	):focus,
	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-author-link,
		.bh-header__series-link,
		.bh-meta-name-wrap a
	):focus-visible {
		color: var(--bh-dark-text) !important;
		text-decoration-color: currentColor !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-meta-social-link,
		.bh-meta-social-link:visited
	) {
		color: var(--bh-dark-text-muted) !important;
		opacity: 1 !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-meta-social-link:hover,
		.bh-meta-social-link:focus,
		.bh-meta-social-link:focus-visible
	) {
		color: var(--bh-dark-text) !important;
		opacity: 1 !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-archive-tagline a,
		.subtitle a
	) {
		color: var(--bh-dark-text-muted) !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	) :is(
		.bh-standard-archive-tagline a:hover,
		.bh-standard-archive-tagline a:focus,
		.subtitle a:hover,
		.subtitle a:focus
	) {
		color: var(--bh-dark-text) !important;
	}

	html:not([data-theme=light]) :is(
		.bh-site-content .bh-standard-header,
		.bh-singular-content > header.bh-standard-header,
		.bh-singular-content .bh-standard-header
	).bh-standard-header-border {
		border-bottom-color: var(--bh-dark-border);
	}
}

/*
 * Set Bootstrap link-colour tokens on the container so every descendant
 * that reads var(--bs-link-color) picks up the dark-mode value without
 * requiring per-selector specificity battles.  Also covers the active
 * crumb label, dividers, and the visited state.
 */
html[data-theme=dark] .bh-breadcrumbs {
	color: var(--bh-dark-text-muted);
	--bs-link-color: var(--bh-dark-text-muted);
	--bs-link-hover-color: var(--bh-dark-text);
	--bs-breadcrumb-item-active-color: var(--bh-dark-text-subtle);
	--bs-breadcrumb-divider-color: var(--bh-dark-border-strong);
}

/* Direct colour rule for UIkit bare <a> and any other framework link. */
html[data-theme=dark] .bh-breadcrumbs a,
html[data-theme=dark] .bh-breadcrumbs .uk-breadcrumb a {
	color: var(--bh-dark-text-muted) !important;
}

html[data-theme=dark] .bh-breadcrumbs a:hover,
html[data-theme=dark] .bh-breadcrumbs a:focus,
html[data-theme=dark] .bh-breadcrumbs a:focus-visible,
html[data-theme=dark] .bh-breadcrumbs .uk-breadcrumb a:hover,
html[data-theme=dark] .bh-breadcrumbs .uk-breadcrumb a:focus {
	color: var(--bh-dark-text) !important;
}

html[data-theme=dark] .bh-site-content .bh-pagination-btn,
html[data-theme=dark] .bh-site-content .page-numbers {
	border-color: var(--bh-dark-border);
	color: var(--bh-dark-text);
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) {
	color: var(--bh-dark-text);
	--bs-link-color: var(--bh-dark-text);
	--bs-link-hover-color: var(--bh-dark-text);
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-page-title,
	.bh-header__part-title,
	.bh-header__series-title,
	.bh-header__part-title-text,
	.title,
	h1,
	h2
) {
	color: var(--bh-dark-text) !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-meta-muted-small,
	.bh-standard-meta,
	.bh-standard-meta-muted,
	.bh-standard-archive-tagline,
	.subtitle,
	.has-text-grey,
	.text-muted,
	.bh-meta-separator
) {
	color: var(--bh-dark-text-muted) !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-author-link,
	.bh-header__series-link,
	.bh-meta-name-wrap a
),
html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-author-link,
	.bh-header__series-link,
	.bh-meta-name-wrap a
):visited {
	color: var(--bh-dark-text) !important;
	text-decoration-color: currentColor !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-author-link,
	.bh-header__series-link,
	.bh-meta-name-wrap a
):hover,
html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-author-link,
	.bh-header__series-link,
	.bh-meta-name-wrap a
):focus,
html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-author-link,
	.bh-header__series-link,
	.bh-meta-name-wrap a
):focus-visible {
	color: var(--bh-dark-text) !important;
	text-decoration-color: currentColor !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-meta-social-link,
	.bh-meta-social-link:visited
) {
	color: var(--bh-dark-text-muted) !important;
	opacity: 1 !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-meta-social-link:hover,
	.bh-meta-social-link:focus,
	.bh-meta-social-link:focus-visible
) {
	color: var(--bh-dark-text) !important;
	opacity: 1 !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-archive-tagline a,
	.subtitle a
) {
	color: var(--bh-dark-text-muted) !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
) :is(
	.bh-standard-archive-tagline a:hover,
	.bh-standard-archive-tagline a:focus,
	.subtitle a:hover,
	.subtitle a:focus
) {
	color: var(--bh-dark-text) !important;
}

html[data-theme=dark] :is(
	.bh-site-content .bh-standard-header,
	.bh-singular-content > header.bh-standard-header,
	.bh-singular-content .bh-standard-header
).bh-standard-header-border {
	border-bottom-color: var(--bh-dark-border);
}

/* --- Prose (pages/posts) + tables ---------------------------------------- *
 *
 * Adapter bridges pin singular copy to light hex / --bs-body-color; release
 * those locks and style Gutenberg + classic tables for dark surfaces.
 */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) .bh-singular-content,
	html:not([data-theme=light]) .bh-singular-content.entry-content,
	html:not([data-theme=light]) .bh-singular-content .entry-content,
	html:not([data-theme=light]) .bh-site-content .entry-content {
		color: var(--bh-dark-text);
		--pico-background-color: var(--bh-dark-surface);
		--pico-color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-singular-content :is(h1, h2, h3, h4, h5, h6),
	html:not([data-theme=light]) .bh-singular-content .entry-content :is(h1, h2, h3, h4, h5, h6),
	html:not([data-theme=light]) .bh-site-content .entry-content :is(h1, h2, h3, h4, h5, h6) {
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-singular-content :is(p, li, dd, dt, figcaption, caption, label, legend),
	html:not([data-theme=light]) .bh-singular-content .entry-content :is(p, li, dd, dt, figcaption, caption, label, legend),
	html:not([data-theme=light]) .bh-site-content .entry-content :is(p, li, dd, dt, figcaption, caption, label, legend) {
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-singular-content .entry-content > blockquote,
	html:not([data-theme=light]) .bh-singular-content .entry-content .wp-block-quote,
	html:not([data-theme=light]) .bh-singular-content .entry-content .wp-block-pullquote,
	html:not([data-theme=light]) .bh-site-content .entry-content > blockquote,
	html:not([data-theme=light]) .bh-site-content .entry-content .wp-block-quote,
	html:not([data-theme=light]) .bh-site-content .entry-content .wp-block-pullquote {
		color: var(--bh-dark-text-muted);
		border-left-color: var(--bh-dark-border-strong);
	}

	html:not([data-theme=light]) .bh-singular-content :is(.wp-caption-text, .wp-element-caption, .bh-citation),
	html:not([data-theme=light]) .bh-singular-content .entry-content :is(.wp-caption-text, .wp-element-caption, .bh-citation),
	html:not([data-theme=light]) .bh-site-content .entry-content :is(.wp-caption-text, .wp-element-caption, .bh-citation) {
		color: var(--bh-dark-text-muted);
	}

	html:not([data-theme=light]) .bh-singular-content :is(code, kbd, samp, var),
	html:not([data-theme=light]) .bh-singular-content .entry-content :is(code, kbd, samp, var),
	html:not([data-theme=light]) .bh-site-content .entry-content :is(code, kbd, samp, var) {
		color: var(--bh-dark-text);
		background-color: color-mix(in srgb, var(--bh-dark-surface-raised) 88%, var(--bh-dark-text) 12%);
	}

	html:not([data-theme=light]) .bh-singular-content :is(pre, .wp-block-code, .wp-block-preformatted),
	html:not([data-theme=light]) .bh-singular-content .entry-content :is(pre, .wp-block-code, .wp-block-preformatted),
	html:not([data-theme=light]) .bh-site-content .entry-content :is(pre, .wp-block-code, .wp-block-preformatted) {
		color: var(--bh-dark-text);
		background-color: var(--bh-dark-surface-raised);
		border: 1px solid var(--bh-dark-border);
	}

	html:not([data-theme=light]) .bh-singular-content .entry-content .bh-prose-link,
	html:not([data-theme=light]) .bh-site-content .entry-content .bh-prose-link,
	html:not([data-theme=light]) .bh-singular-content.prose .bh-prose-link,
	html:not([data-theme=light]) .bh-site-content .prose .bh-prose-link {
		color: var(--bh-content-link-color) !important;
		text-decoration-color: color-mix(in srgb, var(--bh-content-link-color) 35%, transparent) !important;
	}

	html:not([data-theme=light]) .bh-singular-content .entry-content .bh-prose-link:hover,
	html:not([data-theme=light]) .bh-singular-content .entry-content .bh-prose-link:focus-visible,
	html:not([data-theme=light]) .bh-site-content .entry-content .bh-prose-link:hover,
	html:not([data-theme=light]) .bh-site-content .entry-content .bh-prose-link:focus-visible,
	html:not([data-theme=light]) .bh-singular-content.prose .bh-prose-link:hover,
	html:not([data-theme=light]) .bh-singular-content.prose .bh-prose-link:focus-visible,
	html:not([data-theme=light]) .bh-site-content .prose .bh-prose-link:hover,
	html:not([data-theme=light]) .bh-site-content .prose .bh-prose-link:focus-visible {
		color: var(--bh-content-link-hover-color) !important;
		text-decoration-color: var(--bh-content-link-hover-color) !important;
	}

	html:not([data-theme=light]) .bh-singular-content .entry-content hr,
	html:not([data-theme=light]) .bh-site-content .entry-content hr {
		border-color: var(--bh-dark-border);
		opacity: 1;
	}

	html:not([data-theme=light]) .bh-singular-content .callout,
	html:not([data-theme=light]) .bh-site-content .entry-content .callout {
		background-color: var(--bh-dark-surface);
		border-color: var(--bh-dark-border);
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-singular-content .bh-content-card,
	html:not([data-theme=light]) .bh-site-content .entry-content .bh-content-card {
		background-color: var(--bh-dark-surface);
		border-color: var(--bh-dark-border);
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .bh-singular-content table,
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table,
	html:not([data-theme=light]) .bh-site-content .entry-content table,
	html:not([data-theme=light]) .bh-site-content .wp-block-table table {
		color: var(--bh-dark-text);
		background-color: var(--bh-dark-surface);
		border-color: var(--bh-dark-border);
	}

	/*
	 * Foundation Sites paints tbody/thead/tfoot #fefefe and even rows #f1f1f1 on
	 * ALL tables. Transparent td backgrounds inherit that white tbody slab.
	 */
	html:not([data-theme=light]) .bh-singular-content table :is(tbody, thead, tfoot),
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table :is(tbody, thead, tfoot),
	html:not([data-theme=light]) .bh-site-content .entry-content table :is(tbody, thead, tfoot),
	html:not([data-theme=light]) .bh-site-content .wp-block-table table :is(tbody, thead, tfoot) {
		background-color: var(--bh-dark-surface) !important;
		border-color: var(--bh-dark-border) !important;
	}

	html:not([data-theme=light]) .bh-singular-content table :is(th, td),
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table :is(th, td),
	html:not([data-theme=light]) .bh-site-content .entry-content table :is(th, td),
	html:not([data-theme=light]) .bh-site-content .wp-block-table table :is(th, td) {
		color: var(--bh-dark-text);
		border-color: var(--bh-dark-border);
		background-color: transparent !important;
	}

	html:not([data-theme=light]) .bh-singular-content table :is(thead th, thead td, tfoot th, tfoot td),
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table :is(thead th, thead td, tfoot th, tfoot td),
	html:not([data-theme=light]) .bh-site-content .entry-content table :is(thead th, thead td, tfoot th, tfoot td),
	html:not([data-theme=light]) .bh-site-content .wp-block-table table :is(thead th, thead td, tfoot th, tfoot td) {
		background-color: var(--bh-dark-surface-raised) !important;
	}

	html:not([data-theme=light]) .bh-singular-content table:not(.table-striped) tbody tr,
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table:not(.table-striped) tbody tr,
	html:not([data-theme=light]) .bh-site-content .entry-content table:not(.table-striped) tbody tr,
	html:not([data-theme=light]) .bh-site-content .wp-block-table table:not(.table-striped) tbody tr {
		background-color: transparent !important;
	}

	/* Foundation default zebra: even rows. */
	html:not([data-theme=light]) .bh-singular-content table:not(.table-striped) tbody tr:nth-child(even),
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even),
	html:not([data-theme=light]) .bh-site-content .entry-content table:not(.table-striped) tbody tr:nth-child(even),
	html:not([data-theme=light]) .bh-site-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even) {
		background-color: var(--bh-dark-surface-raised) !important;
	}

	html:not([data-theme=light]) .bh-singular-content table:not(.table-striped) tbody tr:nth-child(even) :is(th, td),
	html:not([data-theme=light]) .bh-singular-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even) :is(th, td),
	html:not([data-theme=light]) .bh-site-content .entry-content table:not(.table-striped) tbody tr:nth-child(even) :is(th, td),
	html:not([data-theme=light]) .bh-site-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even) :is(th, td) {
		background-color: var(--bh-dark-surface-raised) !important;
	}

	/* Bootstrap .table-striped: odd rows banded, even rows flush. */
	html:not([data-theme=light]) .bh-singular-content .table-striped > tbody > tr:nth-of-type(odd) > *,
	html:not([data-theme=light]) .bh-singular-content table.table-striped tbody tr:nth-child(odd),
	html:not([data-theme=light]) .bh-singular-content table.table-striped tbody tr:nth-child(odd) :is(th, td),
	html:not([data-theme=light]) .bh-singular-content .is-style-bh-table-striped tbody tr:nth-child(odd) :is(th, td),
	html:not([data-theme=light]) .bh-singular-content .wp-block-table.is-style-bh-table-striped tbody tr:nth-child(odd) :is(th, td),
	html:not([data-theme=light]) .bh-site-content .entry-content .table-striped > tbody > tr:nth-of-type(odd) > *,
	html:not([data-theme=light]) .bh-site-content .entry-content table.table-striped tbody tr:nth-child(odd),
	html:not([data-theme=light]) .bh-site-content .entry-content table.table-striped tbody tr:nth-child(odd) :is(th, td),
	html:not([data-theme=light]) .bh-site-content .wp-block-table.is-style-bh-table-striped tbody tr:nth-child(odd) :is(th, td) {
		background-color: var(--bh-dark-surface-raised) !important;
	}

	html:not([data-theme=light]) .bh-singular-content table.table-striped tbody tr:nth-child(even),
	html:not([data-theme=light]) .bh-singular-content table.table-striped tbody tr:nth-child(even) :is(th, td),
	html:not([data-theme=light]) .bh-singular-content .table-striped tbody tr:nth-child(even) :is(th, td),
	html:not([data-theme=light]) .bh-site-content .entry-content table.table-striped tbody tr:nth-child(even),
	html:not([data-theme=light]) .bh-site-content .entry-content table.table-striped tbody tr:nth-child(even) :is(th, td),
	html:not([data-theme=light]) .bh-site-content .entry-content .table-striped tbody tr:nth-child(even) :is(th, td) {
		background-color: transparent !important;
	}

	html:not([data-theme=light]) .boothack-comments .comment-content,
	html:not([data-theme=light]) .boothack-comments .comment-meta {
		color: var(--bh-dark-text-muted);
	}

	html:not([data-theme=light]) .boothack-comments .comment-author {
		color: var(--bh-dark-text);
	}
}

/* --- Search + comment form controls (framework-agnostic) --- */

@media (prefers-color-scheme: dark) {

	html:not([data-theme=light]) .bh-site-content :is(
		.boothack-search-form input[type="search"],
		.boothack-search-form input[type="text"],
		.boothack-search-form .input-group-field,
		.boothack-search-form .input,
		.boothack-search-form .form-control,
		.boothack-search-form .bh-search-input,
		.bh-search-form input[type="search"],
		.bh-search-form input[type="text"],
		.search-form input[type="search"],
		.search-form input[type="text"],
		.wp-block-search__input,
		.bh-no-results input[type="search"],
		.bh-no-results input[type="text"]
	),
	html:not([data-theme=light]) .bh-sidebar .widget :is(
		input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
		textarea,
		select
	),
	html:not([data-theme=light]) .boothack-comments .comment-form :is(
		input[type="text"],
		input[type="email"],
		input[type="url"],
		textarea
	),
	html:not([data-theme=light]) .bh-singular-content .entry-content :is(input, textarea, select),
	html:not([data-theme=light]) .bh-site-content .entry-content :is(input, textarea, select) {
		background-color: var(--bh-dark-surface) !important;
		border-color: var(--bh-dark-border) !important;
		color: var(--bh-dark-text) !important;
	}

	html:not([data-theme=light]) .bh-site-content :is(
		.boothack-search-form,
		.bh-search-form,
		.search-form,
		.wp-block-search
	) ::placeholder,
	html:not([data-theme=light]) .bh-sidebar .widget input::placeholder,
	html:not([data-theme=light]) .bh-sidebar .widget textarea::placeholder,
	html:not([data-theme=light]) .boothack-comments .comment-form ::placeholder {
		color: var(--bh-dark-text-subtle);
		opacity: 1;
	}

	html:not([data-theme=light]) .bh-site-content .bh-post-nav-meta {
		color: var(--bh-dark-text-muted);
	}

	html:not([data-theme=light]) .boothack-comments .comment-reply-title {
		color: var(--bh-dark-text);
	}

	html:not([data-theme=light]) .boothack-comments :is(
		.comment-notes,
		.comment-form .logged-in-as,
		.comment-form label,
		.comment-form-cookies-consent
	) {
		color: var(--bh-dark-text-muted) !important;
	}

	html:not([data-theme=light]) .boothack-comments .comment-form-cookies-consent label {
		color: var(--bh-dark-text-muted) !important;
	}

}

html[data-theme=dark] .bh-singular-content,
html[data-theme=dark] .bh-singular-content.entry-content,
html[data-theme=dark] .bh-singular-content .entry-content,
html[data-theme=dark] .bh-site-content .entry-content {
	color: var(--bh-dark-text);
	--pico-background-color: var(--bh-dark-surface);
	--pico-color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-singular-content :is(h1, h2, h3, h4, h5, h6),
html[data-theme=dark] .bh-singular-content .entry-content :is(h1, h2, h3, h4, h5, h6),
html[data-theme=dark] .bh-site-content .entry-content :is(h1, h2, h3, h4, h5, h6) {
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-singular-content :is(p, li, dd, dt, figcaption, caption, label, legend),
html[data-theme=dark] .bh-singular-content .entry-content :is(p, li, dd, dt, figcaption, caption, label, legend),
html[data-theme=dark] .bh-site-content .entry-content :is(p, li, dd, dt, figcaption, caption, label, legend) {
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-singular-content .entry-content > blockquote,
html[data-theme=dark] .bh-singular-content .entry-content .wp-block-quote,
html[data-theme=dark] .bh-singular-content .entry-content .wp-block-pullquote,
html[data-theme=dark] .bh-site-content .entry-content > blockquote,
html[data-theme=dark] .bh-site-content .entry-content .wp-block-quote,
html[data-theme=dark] .bh-site-content .entry-content .wp-block-pullquote {
	color: var(--bh-dark-text-muted);
	border-left-color: var(--bh-dark-border-strong);
}

html[data-theme=dark] .bh-singular-content :is(.wp-caption-text, .wp-element-caption, .bh-citation),
html[data-theme=dark] .bh-singular-content .entry-content :is(.wp-caption-text, .wp-element-caption, .bh-citation),
html[data-theme=dark] .bh-site-content .entry-content :is(.wp-caption-text, .wp-element-caption, .bh-citation) {
	color: var(--bh-dark-text-muted);
}

html[data-theme=dark] .bh-singular-content :is(code, kbd, samp, var),
html[data-theme=dark] .bh-singular-content .entry-content :is(code, kbd, samp, var),
html[data-theme=dark] .bh-site-content .entry-content :is(code, kbd, samp, var) {
	color: var(--bh-dark-text);
	background-color: color-mix(in srgb, var(--bh-dark-surface-raised) 88%, var(--bh-dark-text) 12%);
}

html[data-theme=dark] .bh-singular-content :is(pre, .wp-block-code, .wp-block-preformatted),
html[data-theme=dark] .bh-singular-content .entry-content :is(pre, .wp-block-code, .wp-block-preformatted),
html[data-theme=dark] .bh-site-content .entry-content :is(pre, .wp-block-code, .wp-block-preformatted) {
	color: var(--bh-dark-text);
	background-color: var(--bh-dark-surface-raised);
	border: 1px solid var(--bh-dark-border);
}

html[data-theme=dark] .bh-singular-content .entry-content .bh-prose-link,
html[data-theme=dark] .bh-site-content .entry-content .bh-prose-link,
html[data-theme=dark] .bh-singular-content.prose .bh-prose-link,
html[data-theme=dark] .bh-site-content .prose .bh-prose-link {
	color: var(--bh-content-link-color) !important;
	text-decoration-color: color-mix(in srgb, var(--bh-content-link-color) 35%, transparent) !important;
}

html[data-theme=dark] .bh-singular-content .entry-content .bh-prose-link:hover,
html[data-theme=dark] .bh-singular-content .entry-content .bh-prose-link:focus-visible,
html[data-theme=dark] .bh-site-content .entry-content .bh-prose-link:hover,
html[data-theme=dark] .bh-site-content .entry-content .bh-prose-link:focus-visible,
html[data-theme=dark] .bh-singular-content.prose .bh-prose-link:hover,
html[data-theme=dark] .bh-singular-content.prose .bh-prose-link:focus-visible,
html[data-theme=dark] .bh-site-content .prose .bh-prose-link:hover,
html[data-theme=dark] .bh-site-content .prose .bh-prose-link:focus-visible {
	color: var(--bh-content-link-hover-color) !important;
	text-decoration-color: var(--bh-content-link-hover-color) !important;
}

html[data-theme=dark] .bh-singular-content .entry-content hr,
html[data-theme=dark] .bh-site-content .entry-content hr {
	border-color: var(--bh-dark-border);
	opacity: 1;
}

html[data-theme=dark] .bh-singular-content .callout,
html[data-theme=dark] .bh-site-content .entry-content .callout {
	background-color: var(--bh-dark-surface);
	border-color: var(--bh-dark-border);
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-singular-content .bh-content-card,
html[data-theme=dark] .bh-site-content .entry-content .bh-content-card {
	background-color: var(--bh-dark-surface);
	border-color: var(--bh-dark-border);
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-singular-content table,
html[data-theme=dark] .bh-singular-content .wp-block-table table,
html[data-theme=dark] .bh-site-content .entry-content table,
html[data-theme=dark] .bh-site-content .wp-block-table table {
	color: var(--bh-dark-text);
	background-color: var(--bh-dark-surface);
	border-color: var(--bh-dark-border);
}

html[data-theme=dark] .bh-singular-content table :is(tbody, thead, tfoot),
html[data-theme=dark] .bh-singular-content .wp-block-table table :is(tbody, thead, tfoot),
html[data-theme=dark] .bh-site-content .entry-content table :is(tbody, thead, tfoot),
html[data-theme=dark] .bh-site-content .wp-block-table table :is(tbody, thead, tfoot) {
	background-color: var(--bh-dark-surface) !important;
	border-color: var(--bh-dark-border) !important;
}

html[data-theme=dark] .bh-singular-content table :is(th, td),
html[data-theme=dark] .bh-singular-content .wp-block-table table :is(th, td),
html[data-theme=dark] .bh-site-content .entry-content table :is(th, td),
html[data-theme=dark] .bh-site-content .wp-block-table table :is(th, td) {
	color: var(--bh-dark-text);
	border-color: var(--bh-dark-border);
	background-color: transparent !important;
}

html[data-theme=dark] .bh-singular-content table :is(thead th, thead td, tfoot th, tfoot td),
html[data-theme=dark] .bh-singular-content .wp-block-table table :is(thead th, thead td, tfoot th, tfoot td),
html[data-theme=dark] .bh-site-content .entry-content table :is(thead th, thead td, tfoot th, tfoot td),
html[data-theme=dark] .bh-site-content .wp-block-table table :is(thead th, thead td, tfoot th, tfoot td) {
	background-color: var(--bh-dark-surface-raised) !important;
}

html[data-theme=dark] .bh-singular-content table:not(.table-striped) tbody tr,
html[data-theme=dark] .bh-singular-content .wp-block-table table:not(.table-striped) tbody tr,
html[data-theme=dark] .bh-site-content .entry-content table:not(.table-striped) tbody tr,
html[data-theme=dark] .bh-site-content .wp-block-table table:not(.table-striped) tbody tr {
	background-color: transparent !important;
}

html[data-theme=dark] .bh-singular-content table:not(.table-striped) tbody tr:nth-child(even),
html[data-theme=dark] .bh-singular-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even),
html[data-theme=dark] .bh-site-content .entry-content table:not(.table-striped) tbody tr:nth-child(even),
html[data-theme=dark] .bh-site-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even) {
	background-color: var(--bh-dark-surface-raised) !important;
}

html[data-theme=dark] .bh-singular-content table:not(.table-striped) tbody tr:nth-child(even) :is(th, td),
html[data-theme=dark] .bh-singular-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even) :is(th, td),
html[data-theme=dark] .bh-site-content .entry-content table:not(.table-striped) tbody tr:nth-child(even) :is(th, td),
html[data-theme=dark] .bh-site-content .wp-block-table table:not(.table-striped) tbody tr:nth-child(even) :is(th, td) {
	background-color: var(--bh-dark-surface-raised) !important;
}

html[data-theme=dark] .bh-singular-content .table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-theme=dark] .bh-singular-content table.table-striped tbody tr:nth-child(odd),
html[data-theme=dark] .bh-singular-content table.table-striped tbody tr:nth-child(odd) :is(th, td),
html[data-theme=dark] .bh-singular-content .is-style-bh-table-striped tbody tr:nth-child(odd) :is(th, td),
html[data-theme=dark] .bh-singular-content .wp-block-table.is-style-bh-table-striped tbody tr:nth-child(odd) :is(th, td),
html[data-theme=dark] .bh-site-content .entry-content .table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-theme=dark] .bh-site-content .entry-content table.table-striped tbody tr:nth-child(odd),
html[data-theme=dark] .bh-site-content .entry-content table.table-striped tbody tr:nth-child(odd) :is(th, td),
html[data-theme=dark] .bh-site-content .wp-block-table.is-style-bh-table-striped tbody tr:nth-child(odd) :is(th, td) {
	background-color: var(--bh-dark-surface-raised) !important;
}

html[data-theme=dark] .bh-singular-content table.table-striped tbody tr:nth-child(even),
html[data-theme=dark] .bh-singular-content table.table-striped tbody tr:nth-child(even) :is(th, td),
html[data-theme=dark] .bh-singular-content .table-striped tbody tr:nth-child(even) :is(th, td),
html[data-theme=dark] .bh-site-content .entry-content table.table-striped tbody tr:nth-child(even),
html[data-theme=dark] .bh-site-content .entry-content table.table-striped tbody tr:nth-child(even) :is(th, td),
html[data-theme=dark] .bh-site-content .entry-content .table-striped tbody tr:nth-child(even) :is(th, td) {
	background-color: transparent !important;
}

html[data-theme=dark] .boothack-comments .comment-content,
html[data-theme=dark] .boothack-comments .comment-meta {
	color: var(--bh-dark-text-muted);
}

html[data-theme=dark] .boothack-comments .comment-author {
	color: var(--bh-dark-text);
}

html[data-theme=dark] .bh-site-content :is(
	.boothack-search-form input[type="search"],
	.boothack-search-form input[type="text"],
	.boothack-search-form .input-group-field,
	.boothack-search-form .input,
	.boothack-search-form .form-control,
	.boothack-search-form .bh-search-input,
	.bh-search-form input[type="search"],
	.bh-search-form input[type="text"],
	.search-form input[type="search"],
	.search-form input[type="text"],
	.wp-block-search__input,
	.bh-no-results input[type="search"],
	.bh-no-results input[type="text"]
),
html[data-theme=dark] .bh-sidebar .widget :is(
	input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
	textarea,
	select
),
html[data-theme=dark] .boothack-comments .comment-form :is(
	input[type="text"],
	input[type="email"],
	input[type="url"],
	textarea
),
html[data-theme=dark] .bh-singular-content .entry-content :is(input, textarea, select),
html[data-theme=dark] .bh-site-content .entry-content :is(input, textarea, select) {
	background-color: var(--bh-dark-surface) !important;
	border-color: var(--bh-dark-border) !important;
	color: var(--bh-dark-text) !important;
}

html[data-theme=dark] .bh-site-content :is(
	.boothack-search-form,
	.bh-search-form,
	.search-form,
	.wp-block-search
) ::placeholder,
html[data-theme=dark] .bh-sidebar .widget input::placeholder,
html[data-theme=dark] .bh-sidebar .widget textarea::placeholder,
html[data-theme=dark] .boothack-comments .comment-form ::placeholder {
	color: var(--bh-dark-text-subtle);
	opacity: 1;
}

html[data-theme=dark] .bh-site-content .bh-post-nav-meta {
	color: var(--bh-dark-text-muted);
}

html[data-theme=dark] .boothack-comments .comment-reply-title {
	color: var(--bh-dark-text);
}

html[data-theme=dark] .boothack-comments :is(
	.comment-notes,
	.comment-form .logged-in-as,
	.comment-form label,
	.comment-form-cookies-consent
) {
	color: var(--bh-dark-text-muted) !important;
}

html[data-theme=dark] .boothack-comments .comment-form-cookies-consent label {
	color: var(--bh-dark-text-muted) !important;
}

