@import url("https://fonts.googleapis.com/css2?family=Alegreya:wght@400..900&display=swap");

/* recoloring and refonting */

:root {
	--md-primary-fg-color: #f6bc00;
	--md-accent-fg-color: #f3b94d;

	--md-accent-fg-color--transparent: #f3b94d1a;

	--md-primary-fg-color--light: #f6bc00;
	--md-primary-fg-color--dark: #f6bc00;
}

:root,
[data-md-color-scheme="default"] {
	--md-default-fg-color: #000 !important;
}

[data-md-color-scheme="slate"] {
	--md-default-fg-color: #fff !important;
}

.md-header__topic {
	font-family: "Alegreya", serif;
}

.md-header__topic + .md-header__topic {
	font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: "Alegreya", serif;

	color: var(--md-default-fg-color) !important;
}

.md-header,
.md-tabs {
	color: var(--md-default-fg-color);
	background-color: initial;
	backdrop-filter: blur(0.25rem);
}

.md-search__form:hover {
	background-color: #00000020;
}

/* dragons admonition */

:root {
	/* simple/redragon */
	--md-admonition-icon--dragons: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.995 4.077v.06A11 11 0 0 1 16.22 8.42c.605 2.167.876 4.414.805 6.662a1 1 0 0 1 0 .113 6.3 6.3 0 0 0-.721-1.846 4.4 4.4 0 0 0-1.367-1.45c.025.064.059.113.059.168a7 7 0 0 1 .528 2.245 4.7 4.7 0 0 1-1.076 3.41 1.4 1.4 0 0 0-.113.203l-.069-.065a3.95 3.95 0 0 0-.138-2.374c-.578 2.216-2.068 3.538-4.047 4.437 2.404-.01 4.723-.375 6.697-1.856.015.533-.148.958-.696 1.841 1.673-.839 2.403-2.23 2.586-4.012.45.536.755 1.178.888 1.866.128.656.192 1.327.286 1.974.71-1.747.686-3.593.444-5.512 2.137 1.248 3.02 3.266 3.701 5.428a25 25 0 0 0-.133-3.494c-.17-1.698-.59-3.36-1.248-4.935a11.84 11.84 0 0 0-6.638-6.583 8.8 8.8 0 0 0-1.973-.563m-2.734.11c-.306.522-.587 1.06-.933 1.539a18 18 0 0 1-1.14 1.524 1.31 1.31 0 0 1-.943.43l.445-2.083a.6.6 0 0 0-.143.188c-.3.46-.592.928-.908 1.372a.63.63 0 0 1-.726.247c-.493-.144-.987-.282-1.48-.44a.26.26 0 0 0-.326.08A18 18 0 0 1 3.785 8.42c-1.076.953-2.24 1.746-3.785 1.638v.065c.434 1.026.864 2.053 1.318 3.074a1.65 1.65 0 0 0 .69.74 12 12 0 0 1-.183-1.283c-.024-.523.094-.617.617-.667a.17.17 0 0 1 .203.129c.074.187.163.37.246.558.104-.227.193-.44.296-.642a.3.3 0 0 1 .149-.133c.222-.094.45-.168.686-.257l.177.356c.153-.35.296-.696.46-1.037a.375.375 0 0 1 .468-.173v.242a4.93 4.93 0 0 0 .493 2.626 4.2 4.2 0 0 1 .281 1.046c.04.162-.043.257-.196.257l-.4.044a1.7 1.7 0 0 1 .27.247c.075.094.179.27.144.32a.9.9 0 0 1-.39.267.54.54 0 0 1-.315 0 10 10 0 0 1-.81-.272 4 4 0 0 1-.414-.212l-.08.094.716.612a1.55 1.55 0 0 0 1.24.41.987.987 0 0 0 .986-.988c.045-.306.005-.616.045-.922a2.7 2.7 0 0 1 .927-1.974 2.56 2.56 0 0 0-1.214.74 6.4 6.4 0 0 1-.079-1.135 1.545 1.545 0 0 1 1.402-1.653 21 21 0 0 1 1.648-.281c.805-.08 1.599-.246 2.369-.494a4.4 4.4 0 0 0 1.406-.794 18 18 0 0 1-2.872.38 8.88 8.88 0 0 0 3.4-4.777c-1.056 1.48-2.202 2.867-3.87 3.701a22.7 22.7 0 0 0 1.447-4.086zM5.443 8.07c-.03.153-.054.305-.094.454-.074.29-.163.577-.237.868a.197.197 0 0 1-.198.178c-.384.045-.764.103-1.183.157zM9.4 10.775a4 4 0 0 0-.577.053 2.9 2.9 0 0 0-1.48.523.99.99 0 0 0-.43.923 1.1 1.1 0 0 1 .972-.671 3.07 3.07 0 0 1 1.762.34c.49.234.772.76.696 1.298a2.34 2.34 0 0 1-.687 1.377 5.8 5.8 0 0 1-1.914 1.308 9.7 9.7 0 0 0-2.32 1.41 3.95 3.95 0 0 0-1.396 2.567h5.921a2.023 2.023 0 0 1 .987-2.551l-.26 1.115a5.43 5.43 0 0 0 1.243-2.665c.171.407.245.848.216 1.288a5.6 5.6 0 0 0 .44-2.866l.518.561c-.049-.4-.09-.755-.134-1.11a3.1 3.1 0 0 0-1.865-2.585 4.2 4.2 0 0 0-1.692-.315"/></svg>');
	--md-admonition-icon--workshop: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M756-120 537-339l84-84 219 219-84 84Zm-552 0-84-84 276-276-68-68-28 28-51-51v82l-28 28-121-121 28-28h82l-50-50 142-142q20-20 43-29t47-9q24 0 47 9t43 29l-92 92 50 50-28 28 68 68 90-90q-4-11-6.5-23t-2.5-24q0-59 40.5-99.5T701-841q15 0 28.5 3t27.5 9l-99 99 72 72 99-99q7 14 9.5 27.5T841-701q0 59-40.5 99.5T701-561q-12 0-24-2t-23-7L204-120Z"/></svg>');
}

.md-typeset .admonition.dragons,
.md-typeset details.dragons {
	border-color: #ff1744;
}

.md-typeset .dragons > .admonition-title,
.md-typeset .dragons > summary {
	background-color: #ff17441a;

	&::before {
		background-color: #ff1744;
		-webkit-mask-image: var(--md-admonition-icon--dragons);
		mask-image: var(--md-admonition-icon--dragons);
	}
}

.md-typeset .admonition.workshop,
.md-typeset details.workshop {
	border-color: #00bfa5;
}

.md-typeset .workshop > .admonition-title,
.md-typeset .workshop > summary {
	background-color: #00bfa51a;

	&::before {
		background-color: #00bfa5;
		-webkit-mask-image: var(--md-admonition-icon--workshop);
		mask-image: var(--md-admonition-icon--workshop);
	}
}

/* steps */

:root > * {
	--md-steps-bg-color: var(--md-code-bg-color);
	--md-steps-fg-color: var(--md-code-fg-color);
	--md-steps-border-color: hsla(0, 0%, 75%, 1);
}

:root > *[data-md-color-scheme="slate"] {
	--md-steps-border-color: hsla(225, 15%, 30%, 1);
}

.md-typeset div.steps > ol {
	counter-reset: item;
}

.md-typeset div.steps > ol li {
	position: relative;
	padding-left: 1em;
	list-style: none;

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		z-index: -1;
		display: block;
		width: 1.75em;
		height: 1.75em;
		margin-left: -1.25em;
		color: var(--md-steps-fg-color);
		font-weight: 600;
		font-size: 0.9em;
		text-align: center;
		background-color: var(--md-steps-bg-color);
		border: 1px solid var(--md-steps-border-color);
		border-radius: 100px;
		content: counter(item);
		counter-increment: item;
	}

	&::after {
		position: absolute;
		top: 0;
		bottom: 0;
		left: -0.36em;
		display: block;
		width: 1px;
		margin-top: 2em;
		border-left: 1px solid var(--md-steps-border-color);
		content: "";
	}
}

/* tags */

.md-tag {
	font-family: var(--md-text-font-family);
}

.md-tag.md-tag-icon::before {
	background-color: var(--md-default-fg-color);
}

.md-tag.md-tag--yields {
	background: #ff8f00 /* amber 800 */;
	color: #ffffff;

	&::before {
		background-color: #ffffff;
	}
}

.md-tag.md-tag--experimental {
	background: #4527a0 /* deep purple 800 */;
	color: #ffffff;

	&::before {
		background-color: #ffffff;
	}
}

/* badges from mkdocs material */

.md-typeset .mdx-badge {
	font-family: var(--md-text-font-family);
	font-size: 0.85em;
}

.md-typeset .mdx-badge--right {
	float: right;
	margin-left: 0.35em;
}

[dir="ltr"] .md-typeset .mdx-badge__icon {
	border-top-left-radius: 0.1rem;
}

[dir="rtl"] .md-typeset .mdx-badge__icon {
	border-top-right-radius: 0.1rem;
}

[dir="ltr"] .md-typeset .mdx-badge__icon {
	border-bottom-left-radius: 0.1rem;
}

[dir="rtl"] .md-typeset .mdx-badge__icon {
	border-bottom-right-radius: 0.1rem;
}

.md-typeset .mdx-badge__icon {
	background: var(--md-accent-fg-color--transparent);
	padding: 0.2rem;
}

.md-typeset .mdx-badge__icon:last-child {
	border-radius: 0.1rem;
}

[dir="ltr"] .md-typeset .mdx-badge__text {
	border-top-right-radius: 0.1rem;
}

[dir="rtl"] .md-typeset .mdx-badge__text {
	border-top-left-radius: 0.1rem;
}

[dir="ltr"] .md-typeset .mdx-badge__text {
	border-bottom-right-radius: 0.1rem;
}

[dir="rtl"] .md-typeset .mdx-badge__text {
	border-bottom-left-radius: 0.1rem;
}

.md-typeset .mdx-badge__text {
	box-shadow: 0 0 0 1px inset var(--md-accent-fg-color--transparent);
	padding: 0.2rem 0.3rem;
}
