:root {
	--light-color-background: #ffffff;
	--light-color-background-secondary: #f5f8fc;
	--light-color-accent: #e6eefb;
	--light-color-text: #1b2430;
	--light-color-text-aside: #4b5563;
	--light-color-link: #1d4ed8;
	--light-color-focus-outline: #1d4ed8;
	--light-code-background: #f3f6fb;
	--light-docs-edge: #6b7280;
	--light-docs-rule: #dde4ee;

	--dark-color-background: #0f1420;
	--dark-color-background-secondary: #161d2c;
	--dark-color-accent: #1e2d4f;
	--dark-color-text: #e5e9f0;
	--dark-color-text-aside: #a7b0c0;
	--dark-color-link: #93c5fd;
	--dark-color-focus-outline: #93c5fd;
	--dark-code-background: #161d2c;
	--dark-docs-edge: #8793a8;
	--dark-docs-rule: #263148;

	--dim-toolbar-contents-height: 3.25rem;
	--docs-edge: var(--light-docs-edge);
	--docs-rule: var(--light-docs-rule);
}

@media (prefers-color-scheme: dark) {
	:root {
		--docs-edge: var(--dark-docs-edge);
		--docs-rule: var(--dark-docs-rule);
	}
}

:root[data-theme='light'] {
	--docs-edge: var(--light-docs-edge);
	--docs-rule: var(--light-docs-rule);
}

:root[data-theme='dark'] {
	--docs-edge: var(--dark-docs-edge);
	--docs-rule: var(--dark-docs-rule);
}

.tsd-typography table {
	display: block;
	width: fit-content;
	max-width: 100%;
	overflow-x: auto;
}

.tsd-typography :not(pre) > code {
	overflow-wrap: anywhere;
}

.tsd-typography pre {
	overflow-x: auto;
}

html {
	scroll-padding-top: calc(var(--dim-header-height) + 1rem);
}

.docs-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.docs-skip {
	position: absolute;
	z-index: 3;
	top: -4rem;
	left: 0.5rem;
	padding: 0.625rem 1rem;
	border: 1px solid var(--docs-edge);
	border-radius: 6px;
	background: var(--color-background);
	color: var(--color-link);
	font-weight: 600;
}

.docs-skip:focus {
	top: 0.5rem;
}

#docs-main:focus {
	outline: none;
}

/* top bar, on every page */
.tsd-page-toolbar {
	background: var(--color-background);
	border-bottom-color: var(--docs-rule);
}

.tsd-toolbar-contents {
	gap: 0.5rem;
}

.tsd-toolbar-contents > .title {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5rem;
	min-height: 2.25rem;
	align-self: center;
	line-height: 2.25rem;
	font-weight: 700;
	white-space: nowrap;
}

.docs-version {
	color: var(--color-text-aside);
	font-size: 0.8125rem;
	font-weight: 400;
}

.docs-search,
.docs-github,
.docs-theme,
.docs-menu,
.docs-close {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-sizing: border-box;
	height: 2.25rem;
	min-width: 2.25rem;
	margin: 0;
	padding: 0 0.625rem;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: var(--color-text);
	font: inherit;
	font-size: 0.875rem;
	line-height: 1;
	text-decoration: none;
	opacity: 1;
	cursor: pointer;
}

.docs-github:hover,
.docs-theme:hover,
.docs-menu:hover,
.docs-close:hover {
	background: var(--color-background-secondary);
}

.docs-search {
	width: min(18rem, 34vw);
	border-color: var(--docs-edge);
	background: var(--color-background-secondary);
	color: var(--color-text-aside);
}

.docs-search:hover {
	background: var(--color-accent);
	color: var(--color-text);
}

.docs-search svg {
	flex: none;
}

.docs-search kbd {
	margin-left: auto;
	padding: 0.125rem 0.375rem;
	border: 1px solid var(--docs-edge);
	border-radius: 4px;
	font: inherit;
	font-size: 0.75rem;
}

.docs-theme[hidden],
.docs-menu {
	display: none;
}

.docs-menu {
	border-color: var(--docs-edge);
}

.docs-theme:not([hidden]) {
	display: inline-flex;
	justify-content: center;
}

/* guide pages: three fixed columns, so the sidebar never moves between pages */
.docs-guide .container-main {
	display: grid;
	grid-template-areas: none;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 1.75rem;
	margin-top: 0;
	margin-bottom: 0;
}

.docs-guide .col-content {
	grid-area: auto;
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	padding: 0 0 2rem;
}

.docs-guide .col-content > .tsd-panel {
	max-width: 48rem;
	margin: 0;
}

.docs-guide .col-content > .tsd-panel > :is(h1, h2, h3) {
	margin-inline: 0;
	padding-inline: 0;
}

.docs-eyebrow {
	margin: 1.75rem 0 0;
	color: var(--color-text-aside);
	font-size: 0.8125rem;
	font-weight: 600;
}

.docs-guide .col-content > .docs-eyebrow + .tsd-panel > h1:first-child {
	margin-top: 0.25rem;
}

.docs-sidebar-head,
.docs-side-gh {
	display: none;
}

.docs-sidebar {
	grid-column: 1;
	grid-row: 1;
	box-sizing: border-box;
	border-right: 1px solid var(--docs-rule);
	background: var(--color-background);
	color: var(--color-text);
}

.docs-nav summary,
.docs-nav a {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	min-height: 2.25rem;
}

.docs-group {
	margin: 0 0 0.25rem;
}

.docs-group > summary {
	gap: 0.5rem;
	padding: 0 0.5rem;
	border-radius: 6px;
	color: var(--color-text);
	font-size: 0.875rem;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.docs-group > summary::-webkit-details-marker {
	display: none;
}

.docs-group > summary::before {
	content: '';
	flex: none;
	width: 0.4375rem;
	height: 0.4375rem;
	border-right: 2px solid var(--docs-edge);
	border-bottom: 2px solid var(--docs-edge);
	transform: rotate(-45deg);
}

.docs-group[open] > summary::before {
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
	.docs-group > summary::before {
		transition: transform 0.12s ease-out;
	}
}

.docs-group > summary:hover {
	background: var(--color-background-secondary);
}

.docs-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.docs-nav ul:not(:last-child) {
	margin-bottom: 0.25rem;
}

.docs-nav a {
	margin-left: 0.9375rem;
	padding: 0.25rem 0.75rem;
	border-left: 2px solid var(--docs-rule);
	color: var(--color-text-aside);
	font-size: 0.875rem;
	line-height: 1.3;
	text-decoration: none;
}

.docs-nav a:hover {
	background: var(--color-background-secondary);
	color: var(--color-text);
}

.docs-nav a[aria-current='page'] {
	border-left-color: var(--color-link);
	background: var(--color-accent);
	color: var(--color-link);
	font-weight: 700;
}

.docs-nav a.docs-ext::after {
	content: '\2197';
	margin-left: 0.375rem;
	font-size: 0.75rem;
}

.docs-section {
	margin: 0.75rem 0 0.125rem 1.75rem;
	color: var(--color-text-aside);
	font-size: 0.75rem;
	font-weight: 600;
}

/* outline on the right, wide screens only */
.docs-toc {
	display: none;
	grid-column: 3;
	grid-row: 1;
	font-size: 0.8125rem;
}

.docs-toc p {
	margin: 0 0 0.5rem 0.75rem;
	font-weight: 700;
}

.docs-toc ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.docs-toc a {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 2rem;
	padding: 0.25rem 0.5rem 0.25rem 0.75rem;
	border-left: 2px solid var(--docs-rule);
	color: var(--color-text-aside);
	line-height: 1.3;
	text-decoration: none;
}

.docs-toc .docs-toc-h3 a {
	padding-left: 1.5rem;
}

.docs-toc a:hover {
	color: var(--color-text);
}

.docs-toc a[aria-current='location'] {
	border-left-color: var(--color-link);
	color: var(--color-link);
	font-weight: 700;
}

/* previous and next */
.docs-pager {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	max-width: 48rem;
	margin: 3rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--docs-rule);
}

.docs-pager a {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	box-sizing: border-box;
	min-height: 2.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--docs-rule);
	border-radius: 8px;
	color: var(--color-text);
	text-decoration: none;
}

.docs-pager a:hover {
	border-color: var(--docs-edge);
	background: var(--color-background-secondary);
}

.docs-pager-prev {
	grid-column: 1;
}

.docs-pager-next {
	grid-column: 2;
	align-items: flex-end;
	text-align: right;
}

.docs-pager-label,
.docs-pager-desc {
	color: var(--color-text-aside);
	font-size: 0.8125rem;
}

.docs-pager-title {
	color: var(--color-link);
	font-weight: 700;
}

@media (min-width: 770px) {
	.docs-guide .container-main {
		grid-template-columns: 15rem minmax(0, 1fr);
	}

	.docs-guide .col-content {
		grid-column: 2;
	}

	.docs-sidebar {
		display: block;
		position: sticky;
		inset: auto;
		top: var(--dim-header-height);
		align-self: start;
		width: auto;
		height: calc(100vh - var(--dim-header-height));
		margin: 0;
		border: 0;
		border-right: 1px solid var(--docs-rule);
		max-height: calc(100vh - var(--dim-header-height));
		overflow-y: auto;
		padding: 1.25rem 0.75rem 2rem 0;
	}

	.docs-nav a {
		outline-offset: -2px;
	}
}

@media (min-width: 1280px) {
	.docs-guide .container-main {
		grid-template-columns: 15rem minmax(0, 1fr) 13rem;
	}

	.docs-toc {
		display: block;
		position: sticky;
		top: var(--dim-header-height);
		align-self: start;
		max-height: calc(100vh - var(--dim-header-height));
		overflow-y: auto;
		padding: 1.25rem 0 2rem;
	}
}

@media (max-width: 769px) {
	.docs-guide .container {
		padding: 0 1rem;
	}

	.docs-search {
		width: 2.75rem;
		padding: 0;
		justify-content: center;
	}

	.docs-search span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.docs-search kbd,
	.docs-github,
	.docs-version {
		display: none;
	}

	.docs-theme,
	.docs-menu,
	.docs-close,
	.docs-search {
		height: 2.75rem;
		min-width: 2.75rem;
	}

	.docs-pager {
		grid-template-columns: 1fr;
	}

	.docs-pager-prev,
	.docs-pager-next {
		grid-column: 1;
	}

	.docs-pager-next {
		align-items: flex-start;
		text-align: left;
	}
}

/* below 770px the sidebar is a drawer opened by a native button; without popover support it stays in the page */
@supports selector(:popover-open) {
	@media (max-width: 769px) {
		.docs-menu {
			display: inline-flex;
		}

		.docs-sidebar {
			position: fixed;
			inset: 0 auto 0 0;
			width: min(21rem, 88vw);
			height: 100dvh;
			max-height: none;
			margin: 0;
			padding: 0 0.75rem 2rem;
			overflow-y: auto;
			border: 0;
			border-right: 1px solid var(--docs-rule);
		}

		.docs-sidebar::backdrop {
			background: rgb(0 0 0 / 0.5);
		}

		.docs-sidebar-head {
			display: flex;
			align-items: center;
			justify-content: space-between;
			position: sticky;
			top: 0;
			z-index: 1;
			min-height: 3.5rem;
			margin: 0 -0.75rem 0.5rem;
			padding: 0 0.75rem;
			border-bottom: 1px solid var(--docs-rule);
			background: var(--color-background);
			font-weight: 700;
		}

		.docs-side-gh {
			display: flex;
			margin: 0.75rem 0 0;
			padding: 0 0.5rem;
			min-height: 2.75rem;
			align-items: center;
			border-top: 1px solid var(--docs-rule);
			color: var(--color-text);
			font-size: 0.875rem;
			font-weight: 700;
			text-decoration: none;
		}

		.docs-nav summary,
		.docs-nav a {
			min-height: 2.75rem;
		}
	}
}

@supports not selector(:popover-open) {
	@media (max-width: 769px) {
		.docs-guide .container-main {
			display: block;
		}
	}
}
