/*******************************************************************************
SITE UI

Navigation links and animated Docs category tabs.
*******************************************************************************/

:root {
	--butterfly-lavender: #a5a1e8;
	--butterfly-cyan: #7dd3fc;
	--nav-active-bg: linear-gradient(
		135deg,
		rgba(165, 161, 232, 0.1),
		rgba(125, 211, 252, 0.055)
	);
	--nav-active-border: rgba(165, 161, 232, 0.18);
	--nav-hover-bg: rgba(128, 128, 128, 0.08);
	--nav-radius: 0.5rem;
	--archive-line: rgba(128, 128, 128, 0.28);
	--archive-dot: rgba(96, 96, 96, 0.55);
	--archive-heading-dot: rgba(17, 17, 17, 0.8);
	--site-header-bg: rgba(255, 255, 255, 0.56);
	--site-header-shadow: 0 0.15rem 0.5rem rgba(44, 44, 44, 0.035);
}

html[data-theme="dark"],
html:not([data-theme]) {
	--butterfly-lavender: #b9b7ff;
	--butterfly-cyan: #93d8ff;
	--nav-active-bg: linear-gradient(
		135deg,
		rgba(185, 183, 255, 0.13),
		rgba(147, 216, 255, 0.07)
	);
	--nav-active-border: rgba(185, 183, 255, 0.22);
	--nav-hover-bg: rgba(255, 255, 255, 0.07);
	--archive-line: rgba(255, 255, 255, 0.14);
	--archive-dot: rgba(200, 200, 206, 0.5);
	--archive-heading-dot: rgba(235, 235, 240, 0.82);
	--site-header-bg: rgba(33, 37, 43, 0.62);
	--site-header-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.14);
}

@media (prefers-color-scheme: light) {
	html:not([data-theme]) {
		--butterfly-lavender: #a5a1e8;
		--butterfly-cyan: #7dd3fc;
		--nav-active-bg: linear-gradient(
			135deg,
			rgba(165, 161, 232, 0.1),
			rgba(125, 211, 252, 0.055)
		);
		--nav-active-border: rgba(165, 161, 232, 0.18);
		--nav-hover-bg: rgba(128, 128, 128, 0.08);
		--archive-line: rgba(128, 128, 128, 0.28);
		--archive-dot: rgba(96, 96, 96, 0.55);
		--archive-heading-dot: rgba(17, 17, 17, 0.8);
		--site-header-bg: rgba(255, 255, 255, 0.56);
		--site-header-shadow: 0 0.15rem 0.5rem rgba(44, 44, 44, 0.035);
	}
}

/*******************************************************************************
NAVIGATION
*******************************************************************************/

.site-nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1em;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.site-nav a:any-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	margin: 0;
	padding: 0.3em 0.55em;
	border: 1px solid transparent;
	border-radius: var(--nav-radius);
	background: transparent;
	box-shadow: none;
	color: color-mix(in srgb, var(--theme-text) 82%, transparent);
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.15;
	text-decoration: none;
	transition:
		color 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
	border-color: color-mix(in srgb, var(--theme-text) 10%, transparent);
	background: var(--nav-hover-bg);
	color: var(--theme-heading);
	outline: none;
}

.site-nav a.is-active {
	border-color: var(--nav-active-border);
	background: var(--nav-active-bg);
	color: var(--theme-heading);
	box-shadow: none;
}

.site-nav .theme-toggle-btn {
	width: 2.5rem;
	height: 2.5rem;
	margin: 0 3em 0 auto;
	align-self: center;
	border: 1px solid transparent;
	border-radius: var(--nav-radius);
	background: transparent;
	color: var(--theme-text);
	transition:
		color 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease;
}

.site-nav .theme-toggle-btn:hover,
.site-nav .theme-toggle-btn:focus-visible {
	border-color: color-mix(in srgb, var(--theme-text) 10%, transparent);
	background: var(--nav-hover-bg);
	color: var(--theme-heading);
}

/*******************************************************************************
DOCS CATEGORY TABS
*******************************************************************************/

.docs-tab-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	margin: 0 0 0.75em;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.docs-tab-button {
	box-sizing: border-box;
	inline-size: 5.5em;
	flex: 0 0 5.5em;
	min-height: 0;
	padding: 0.32em 0.62em;
	border: 1px solid transparent;
	border-radius: var(--nav-radius);
	background: transparent;
	color: color-mix(in srgb, var(--theme-text) 80%, transparent);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
	transition:
		color 160ms ease,
		background-color 160ms ease,
		border-color 160ms ease;
}

.docs-tab-button:hover,
.docs-tab-button:focus-visible {
	border-color: color-mix(in srgb, var(--theme-text) 10%, transparent);
	background: var(--nav-hover-bg);
	color: var(--theme-heading);
	outline: none;
}

.docs-tabs:has(#docs-tab-quantum:checked) label[for="docs-tab-quantum"],
.docs-tabs:has(#docs-tab-math:checked) label[for="docs-tab-math"],
.docs-tabs:has(#docs-tab-physics:checked) label[for="docs-tab-physics"],
.docs-tabs:has(#docs-tab-computer:checked) label[for="docs-tab-computer"],
.docs-tabs:has(#docs-tab-essay:checked) label[for="docs-tab-essay"] {
	border-color: var(--nav-active-border);
	background: var(--nav-active-bg);
	color: var(--theme-heading);
	box-shadow: none;
	font-weight: 700;
}

@keyframes docs-panel-in {
	from {
		opacity: 0;
		transform: translateY(0.65rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes docs-panel-item-in {
	from {
		opacity: 0;
		transform: translateY(0.45rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.docs-tabs:has(#docs-tab-quantum:checked) .docs-tab-panel-quantum,
.docs-tabs:has(#docs-tab-math:checked) .docs-tab-panel-math,
.docs-tabs:has(#docs-tab-physics:checked) .docs-tab-panel-physics,
.docs-tabs:has(#docs-tab-computer:checked) .docs-tab-panel-computer,
.docs-tabs:has(#docs-tab-essay:checked) .docs-tab-panel-essay {
	animation: docs-panel-in 280ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.docs-tabs:has(#docs-tab-quantum:checked) .docs-tab-panel-quantum > *,
.docs-tabs:has(#docs-tab-math:checked) .docs-tab-panel-math > *,
.docs-tabs:has(#docs-tab-physics:checked) .docs-tab-panel-physics > *,
.docs-tabs:has(#docs-tab-computer:checked) .docs-tab-panel-computer > *,
.docs-tabs:has(#docs-tab-essay:checked) .docs-tab-panel-essay > * {
	animation: docs-panel-item-in 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.docs-tabs:has(#docs-tab-quantum:checked) .docs-tab-panel-quantum > *:nth-child(1),
.docs-tabs:has(#docs-tab-math:checked) .docs-tab-panel-math > *:nth-child(1),
.docs-tabs:has(#docs-tab-physics:checked) .docs-tab-panel-physics > *:nth-child(1),
.docs-tabs:has(#docs-tab-computer:checked) .docs-tab-panel-computer > *:nth-child(1),
.docs-tabs:has(#docs-tab-essay:checked) .docs-tab-panel-essay > *:nth-child(1) {
	animation-delay: 20ms;
}

.docs-tabs:has(#docs-tab-quantum:checked) .docs-tab-panel-quantum > *:nth-child(2),
.docs-tabs:has(#docs-tab-math:checked) .docs-tab-panel-math > *:nth-child(2),
.docs-tabs:has(#docs-tab-physics:checked) .docs-tab-panel-physics > *:nth-child(2),
.docs-tabs:has(#docs-tab-computer:checked) .docs-tab-panel-computer > *:nth-child(2),
.docs-tabs:has(#docs-tab-essay:checked) .docs-tab-panel-essay > *:nth-child(2) {
	animation-delay: 70ms;
}

.docs-tabs:has(#docs-tab-quantum:checked) .docs-tab-panel-quantum > *:nth-child(3),
.docs-tabs:has(#docs-tab-math:checked) .docs-tab-panel-math > *:nth-child(3),
.docs-tabs:has(#docs-tab-physics:checked) .docs-tab-panel-physics > *:nth-child(3),
.docs-tabs:has(#docs-tab-computer:checked) .docs-tab-panel-computer > *:nth-child(3),
.docs-tabs:has(#docs-tab-essay:checked) .docs-tab-panel-essay > *:nth-child(3) {
	animation-delay: 120ms;
}

.docs-tabs:has(#docs-tab-quantum:checked) .docs-tab-panel-quantum > *:nth-child(4),
.docs-tabs:has(#docs-tab-math:checked) .docs-tab-panel-math > *:nth-child(4),
.docs-tabs:has(#docs-tab-physics:checked) .docs-tab-panel-physics > *:nth-child(4),
.docs-tabs:has(#docs-tab-computer:checked) .docs-tab-panel-computer > *:nth-child(4),
.docs-tabs:has(#docs-tab-essay:checked) .docs-tab-panel-essay > *:nth-child(4) {
	animation-delay: 170ms;
}

/*******************************************************************************
DOCS ARCHIVE TIMELINE
*******************************************************************************/

.docs-archive-group {
	--archive-left: 4.5rem;
	--archive-chain: 2rem;
	position: relative;
	margin: 1.05rem 0 1.4rem;
}

.docs-archive-heading-row {
	position: relative;
	display: grid;
	grid-template-columns: var(--archive-left) var(--archive-chain) minmax(0, 1fr);
	align-items: center;
	min-height: 1.8rem;
	padding: 0.12rem 0;
	border-radius: 0.45rem;
	cursor: pointer;
	user-select: none;
	transition: background-color 160ms ease;
}

.docs-archive-heading-row:hover,
.docs-archive-heading-row:focus-visible {
	background: var(--nav-hover-bg);
	outline: none;
}

.docs-archive-heading-row::before {
	content: "";
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	width: 0.62rem;
	height: 0.62rem;
	border: 0;
	border-radius: 50%;
	background: var(--archive-heading-dot);
	box-shadow: 0 0 0 4px var(--theme-bg);
}

.docs-archive-heading-row::after {
	content: "";
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	width: 0;
	height: 0;
	margin-right: 0.15rem;
	border-top: 0.38rem solid transparent;
	border-bottom: 0.38rem solid transparent;
	border-left: 0.58rem solid color-mix(in srgb, var(--theme-text) 52%, transparent);
	transform: rotate(0deg);
	transform-origin: 35% 50%;
	transition:
		transform 180ms ease,
		border-left-color 180ms ease;
}

.docs-archive-group:not(.is-collapsed) .docs-archive-heading-row::after {
	border-left-color: var(--nav-accent);
	transform: rotate(90deg);
}

.docs-archive-heading {
	grid-column: 3;
	grid-row: 1;
	margin: 0;
	color: var(--theme-heading);
	font-size: 1.65rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
}

.docs-archive-count {
	grid-column: 1;
	grid-row: 1;
	justify-self: end;
	padding-right: 0.55rem;
	color: color-mix(in srgb, var(--theme-text) 52%, transparent);
	font-size: 0.82rem;
	font-weight: 600;
	white-space: nowrap;
}

.docs-archive-list {
	position: relative;
	display: grid;
	overflow: hidden;
	margin: 0.25rem 0 0;
	padding: 0;
	list-style: none;
	counter-reset: docs-item;
	transition:
		max-height 420ms cubic-bezier(0.4, 0, 0.2, 1),
		opacity 260ms ease;
}

.docs-archive-list::before {
	content: "";
	position: absolute;
	top: -0.35rem;
	bottom: var(--archive-tail, 1.1rem);
	left: calc(var(--archive-left) + (var(--archive-chain) / 2) - 1px);
	width: 0;
	border-left-width: 2px;
	border-left-style: dashed;
	border-left-color: var(--archive-line);
	transform-origin: top;
}

.docs-archive-list.is-unnumbered {
	counter-reset: none;
}

.docs-archive-item.is-unnumbered {
	counter-increment: none;
}

.docs-archive-item.is-unnumbered a:any-link::before {
	content: none;
}

.docs-archive-group > hr {
	width: 100%;
}

.docs-archive-item {
	position: relative;
	margin: 0;
	counter-increment: docs-item;
}

.docs-archive-item a:any-link {
	display: grid;
	grid-template-columns: var(--archive-left) var(--archive-chain) minmax(0, 1fr);
	align-items: center;
	min-height: 2rem;
	padding: 0.2rem 0;
	border-radius: 0.45rem;
	color: var(--theme-text);
	font-weight: 500;
	font-size: 1.25rem;
	text-decoration: none;
	transition:
		color 180ms ease,
		background-color 180ms ease,
		transform 180ms ease;
}

.docs-archive-item a:any-link::before {
	content: counter(docs-item);
	grid-column: 1;
	grid-row: 1;
	justify-self: end;
	padding-right: 0.55rem;
	color: color-mix(in srgb, var(--theme-text) 76%, transparent);
	font-size: 0.88rem;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	text-align: right;
}

.docs-archive-node {
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	align-self: center;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	background: var(--archive-dot, rgba(96, 96, 96, 0.55));
	box-shadow: 0 0 0 3px var(--theme-bg);
	pointer-events: none;
	transform: scale(1);
	transform-origin: center;
	transition:
		transform 180ms ease,
		background-color 180ms ease,
		box-shadow 180ms ease;
}

.docs-archive-link-text {
	grid-column: 3;
	grid-row: 1;
	min-width: 0;
	text-align: left;
}

.docs-archive-item.is-entering {
	animation: docs-archive-item-in 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--item-index, 0) * 70ms);
}

.docs-archive-item.is-leaving {
	animation: docs-archive-item-out 300ms cubic-bezier(0.4, 0, 0.2, 1) both;
	animation-delay: calc(var(--item-index, 0) * 45ms);
}

@keyframes docs-archive-item-in {
	from {
		opacity: 0;
		transform: translateY(0.9rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes docs-archive-item-out {
	to {
		opacity: 0;
		transform: translateY(-0.55rem);
	}
}

.docs-archive-item a:hover,
.docs-archive-item a:focus-visible {
	background: var(--nav-hover-bg);
	color: var(--theme-heading);
	outline: none;
}

.docs-archive-item:hover .docs-archive-node,
.docs-archive-item a:focus-visible .docs-archive-node,
.docs-archive-node.is-active {
	transform: scale(0.64, 2.2);
	border-radius: 0.12rem;
	background: var(--archive-dot, rgba(96, 96, 96, 0.55));
	box-shadow: 0 0 0 4px var(--nav-accent-soft);
}

@media (max-width: 760px) {
	.site-nav {
		width: 100%;
		justify-content: flex-start;
		gap: 0.5em;
	}

	.site-nav .theme-toggle-btn {
		margin-right: 0;
	}

	.docs-tab-buttons {
		display: grid;
		width: 100%;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5em;
	}

	.docs-tab-button {
		box-sizing: border-box;
		inline-size: auto;
		width: 100%;
	}

	.docs-archive-group {
		--archive-left: 3.2rem;
		--archive-chain: 1.6rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-nav a,
	.site-nav .theme-toggle-btn,
	.docs-tab-button,
	.docs-tab-panel,
	.docs-tab-panel > *,
	.docs-archive-item.is-entering,
	.docs-archive-item.is-leaving,
	.docs-archive-group > .marginnote.is-archive-entering,
	.docs-archive-group > .marginnote.is-archive-leaving,
	.docs-archive-list::before,
	.docs-archive-group > hr {
		animation: none;
		transition: none;
	}
}

/*******************************************************************************
FULL-WIDTH HEADER AND SEARCH
*******************************************************************************/

.site-header-shell {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 80;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	transform: translateY(var(--site-header-offset, 0%));
}

@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
	html {
		overflow-anchor: none;
	}

	body {
		padding-top: 0;
	}

	body.is-header-peeking {
		padding-top: var(--site-header-height, 0px);
	}

	.site-header-shell.is-hover-animated {
		transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
	}

	body.is-header-animated {
		transition: padding-top 380ms cubic-bezier(0.22, 1, 0.36, 1);
	}

	.site-header-shell.is-fully-hidden {
		pointer-events: none;
	}
}

body > .site-header-shell > header.site-header-nav {
	position: static;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0 1.25rem;
	border-bottom: 1px solid var(--surface-card-border);
	background: var(--site-header-bg);
	box-shadow: var(--site-header-shadow);
	-webkit-backdrop-filter: blur(24px) saturate(1.6);
	backdrop-filter: blur(24px) saturate(1.6);
}

body > .site-header-shell .site-nav {
	position: relative;
	display: flex;
	align-items: stretch;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0;
	width: 100%;
	max-width: none;
	margin: 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

body > .site-header-shell .site-nav a:any-link {
	display: flex;
	align-items: center;
	min-height: 3.4rem;
	padding: 0.7rem 1.35rem;
	border-color: transparent;
	border-radius: 0;
	font-size: 1.6rem;
	font-weight: 700;
}

body > .site-header-shell .site-nav a:hover,
body > .site-header-shell .site-nav a:focus-visible,
body > .site-header-shell .site-nav a.is-active {
	border-color: transparent;
	box-shadow: none;
}

body > .site-header-shell .site-nav a:hover,
body > .site-header-shell .site-nav a:focus-visible {
	background: rgba(165, 161, 232, 0.18);
	color: var(--theme-heading);
}

body > .site-header-shell .site-nav a.is-active {
	background: linear-gradient(
		135deg,
		rgba(165, 161, 232, 0.28),
		rgba(125, 211, 252, 0.14)
	);
	color: var(--theme-heading);
}

body > .site-header-shell .site-nav .theme-toggle-btn {
	position: absolute;
	right: 0;
	top: 50%;
	margin: 0;
	transform: translateY(-50%);
}

.site-header-brand {
	position: absolute;
	left: 1.25rem;
	top: 50%;
	color: color-mix(in srgb, var(--theme-text) 58%, transparent);
	font-size: 0.92rem;
	line-height: 1.3;
	white-space: nowrap;
	transform: translateY(-50%);
}

@media (max-width: 1100px) {
	.site-header-brand {
		display: none;
	}
}

.site-search {
	position: absolute;
	right: 3.5rem;
	top: 50%;
	width: min(15rem, 26vw);
	transform: translateY(-50%);
}

.site-search-input {
	width: 100%;
	height: 2.35rem;
	padding: 0 0.75rem 0 2.15rem;
	border: 1px solid var(--surface-card-border);
	border-radius: var(--nav-radius);
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
			0.7rem center / 1rem 1rem no-repeat,
		color-mix(in srgb, var(--theme-text) 5%, transparent);
	color: var(--theme-text);
	font: inherit;
	font-size: 0.95rem;
	outline: none;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease;
}

.site-search-input::placeholder {
	color: color-mix(in srgb, var(--theme-text) 50%, transparent);
}

.site-search-input:focus {
	border-color: var(--nav-active-border);
	background-color: color-mix(in srgb, var(--nav-accent-soft) 36%, transparent);
	box-shadow: 0 0 0 3px var(--nav-accent-soft);
}

.site-search-results {
	position: absolute;
	top: calc(100% + 0.45rem);
	right: 0;
	display: none;
	width: min(24rem, 82vw);
	max-height: min(60vh, 30rem);
	overflow-y: auto;
	padding: 0.35rem;
	border: 1px solid var(--surface-card-border);
	border-radius: var(--nav-radius);
	background: var(--site-header-bg);
	box-shadow: var(--surface-card-shadow-hover);
	z-index: 90;
}

.site-search-results.is-open {
	display: block;
}

.site-search-result {
	display: block;
	padding: 0.55rem 0.65rem;
	border-radius: 0.45rem;
	color: var(--theme-text);
	text-decoration: none;
}

.site-search-result:hover,
.site-search-result:focus-visible {
	background: var(--nav-hover-bg);
	color: var(--theme-heading);
	outline: none;
}

.site-search-result-title {
	display: block;
	color: var(--theme-heading);
	font-size: 0.98rem;
	font-weight: 650;
	line-height: 1.35;
}

.site-search-result-meta {
	display: block;
	margin-top: 0.15rem;
	overflow: hidden;
	color: color-mix(in srgb, var(--theme-text) 58%, transparent);
	font-size: 0.82rem;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.site-search-empty {
	padding: 0.75rem;
	color: color-mix(in srgb, var(--theme-text) 58%, transparent);
	font-size: 0.88rem;
	text-align: center;
}

@media (max-width: 760px) {
	.site-header-shell {
		position: static;
		width: 100%;
		transition: none;
	}

	body > .site-header-shell > header.site-header-nav {
		padding: 0.5rem 0.75rem;
	}

	body > .site-header-shell .site-nav {
		flex-wrap: wrap;
		gap: 0.4em;
	}

	body > .site-header-shell .site-nav .theme-toggle-btn {
		position: static;
		order: 6;
		margin-left: 0.25rem;
		transform: none;
	}

	.site-header-brand {
		position: static;
		margin-bottom: 0.35rem;
		transform: none;
	}

	.site-search {
		position: static;
		order: 5;
		width: 100%;
		max-width: 32rem;
		margin-top: 0.35rem;
		transform: none;
	}

	.site-search-results {
		right: 0;
		left: 0;
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header-shell.is-hover-animated,
	body.is-header-animated {
		transition: none;
	}
}

/*******************************************************************************
DOCS TAB SIDEBAR
*******************************************************************************/

@media (min-width: 761px) {
	body > article {
		padding-top: 7.5rem;
	}

	body:has(.docs-tabs) > article {
		padding-top: 9rem;
	}
}

@media (min-width: 761px) {
	.docs-tabs {
		display: block;
		width: 55%;
	}

	.docs-tab-buttons {
		position: fixed;
		left: 1rem;
		top: 50%;
		z-index: 60;
		display: flex;
		flex-direction: column;
		gap: 0;
		width: 9rem;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		transform: translateY(-50%);
	}

	.docs-tab-buttons::before {
		content: "";
		position: absolute;
		top: calc(3.85rem / 2);
		bottom: calc(3.85rem / 2);
		left: calc(0.45rem - 1px);
		width: 0;
		border-left: 2px dashed var(--archive-line);
	}

	.docs-tab-button {
		position: relative;
		flex: 0 0 auto;
		height: 3.85rem;
		width: 100%;
		justify-content: center;
		padding: 0 0.4rem 0 1.1rem;
		border: 0;
		border-radius: 0;
		font-size: 1.65rem;
		line-height: 1;
		text-align: center;
		white-space: nowrap;
	}

	.docs-tab-button::before {
		content: "";
		position: absolute;
		top: 50%;
		left: 0.15rem;
		width: 0.6rem;
		height: 0.6rem;
		border-radius: 999px;
		background: var(--archive-dot);
		transform: translateY(-50%);
		transition:
			transform 180ms ease,
			border-radius 180ms ease,
			background-color 180ms ease,
			box-shadow 180ms ease;
	}

	.docs-tab-button:hover,
	.docs-tab-button:focus-visible {
		border: 0;
		border-radius: 0;
		background: rgba(165, 161, 232, 0.18);
	}

	.docs-tab-button:hover::before,
	.docs-tab-button:focus-visible::before {
		border-radius: 0.12rem;
		background: var(--archive-dot);
		box-shadow: 0 0 0 3px var(--theme-bg);
		transform: translateY(-50%) scale(0.62, 2.35);
	}

	.docs-tabs:has(#docs-tab-quantum:checked) label[for="docs-tab-quantum"],
	.docs-tabs:has(#docs-tab-math:checked) label[for="docs-tab-math"],
	.docs-tabs:has(#docs-tab-physics:checked) label[for="docs-tab-physics"],
	.docs-tabs:has(#docs-tab-computer:checked) label[for="docs-tab-computer"],
	.docs-tabs:has(#docs-tab-essay:checked) label[for="docs-tab-essay"] {
		border: 0;
		border-radius: 0;
		background: linear-gradient(
			135deg,
			rgba(165, 161, 232, 0.28),
			rgba(125, 211, 252, 0.14)
		);
		box-shadow: none;
		color: var(--theme-heading);
	}

	.docs-tabs:has(#docs-tab-quantum:checked) label[for="docs-tab-quantum"]::before,
	.docs-tabs:has(#docs-tab-math:checked) label[for="docs-tab-math"]::before,
	.docs-tabs:has(#docs-tab-physics:checked) label[for="docs-tab-physics"]::before,
	.docs-tabs:has(#docs-tab-computer:checked) label[for="docs-tab-computer"]::before,
	.docs-tabs:has(#docs-tab-essay:checked) label[for="docs-tab-essay"]::before {
		border-radius: 0.12rem;
		background: var(--archive-heading-dot);
		box-shadow: 0 0 0 3px var(--theme-bg);
		transform: translateY(-50%) scale(0.75, 2.8);
	}
}

@media (max-width: 760px) {
	.docs-tabs {
		display: block;
		width: 100%;
	}

	.docs-tab-buttons {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		border-right: 0;
		border-bottom: 1px solid var(--surface-card-border);
	}

	.docs-tab-button {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}
