:root, .light {
	--header-bg: transparent;
	--button-color: rgb(64, 131, 153);
	--button-border-color: rgb(198, 217, 223);
	--button-color-hover: rgb(7, 86, 134);
	--button-border-color-hover: rgb(155, 191, 213);
	--nav-current-bg: linear-gradient(to right, #ecf1f3, transparent);
	--nav-link-hover-shadow-color: rgba(0, 0, 0, 0.15);
	--nav-link-hover-before-bg: #d2e5e7;
	--nav-link-hover-bg: #f4f7f9;
	--autonav-bg: #fff;
	--cmd-bg: #333;
	--tip-color: #5c50bb;
	--menu-toggle-bg: #e4f1f2;
	--table-header-bg: #eaf1f5;
	--table-border-color: #cad9e2;
}

.dark {
	--header-bg: rgba(44, 130, 164, 0.11);
	--button-color: rgb(36, 166, 208);
	--button-border-color: rgb(38, 116, 140);
	--button-color-hover: rgb(0, 194, 255);
	--button-border-color-hover: rgb(0, 194, 255);
	--nav-current-bg: linear-gradient(to right, #1a3c4d, transparent);
	--nav-link-hover-shadow-color: rgb(0 0 0 / 32%);
	--nav-link-hover-before-bg: #32494f;
	--nav-link-hover-bg: #e3fffe0d;
	--autonav-bg: #1d2b32;
	--cmd-bg: black;
	--tip-color: #a6b2f7;
	--menu-toggle-bg: #274d5c;
	--table-header-bg: #1d2d38;
	--table-border-color: #1a373d;
}





html,
body {
	min-height: 100%;

}

body {
	/* background-image:
		radial-gradient(circle at 30% top, hsl(137.64deg, 100%, 92.42%) 0px, transparent min(15%, 500px)),
		radial-gradient(circle at 70% top, hsl(201.2deg, 68%, 90.2%) 0px, transparent min(15%, 500px));  */
	background-image:
		radial-gradient(circle at 30% top, hsl(137.64deg 100% 75.21% / 19%) 0px, transparent min(15%, 700px)),
		radial-gradient(circle at 70% top, hsl(201.2deg 100% 69.19% / 24%) 0px, transparent min(15%, 700px));
	background-repeat: no-repeat;
}


.dark body {
	/* background-image:
		radial-gradient(at calc(50% - min(35vw, 700px)) -10%, hsla(130, 100%, 9%, 0.74) 0px, transparent min(25%, 600px)),
		radial-gradient(at calc(50% + min(35vw, 700px)) -10%, hsla(201, 100%, 12%, 0.646) 0px, transparent min(25%, 600px)) */
	background-image:
		radial-gradient(circle at calc(50% - min(35vw, 700px)) -50px, hsl(206.39deg 100% 40.77% / 16%) 0px, transparent min(25%, 800px)),
		radial-gradient(circle at calc(50% + min(35vw, 700px)) -50px, hsl(142.09deg 100% 32.23% / 17%) 0px, transparent min(25%, 800px));

	scrollbar-color: rgb(255 255 255 / .25) rgb(0 0 0 / .2);
}

.wrapper {
	max-width: 2000px;
}

header {
	border-bottom: 1px solid var(--header-border-color);
}

.topbar {
	border-bottom: 0;
}

button,
.button {
	color: var(--button-color);
	border: 1px solid var(--button-border-color);
}
button:hover,
.button:hover {
	color: var(--button-color-hover);
	border: 1px solid var(--button-border-color-hover);
}
button.primary,
.button.primary {
	background: linear-gradient(135deg, #3b9c5b 25%, rgb(45 137 183) 80%);
	color: white;
	border: none;
}
button.primary:hover,
.button.primary:hover {
	color: white;
}
.button.purple:hover {
	border: none;
}


main {
	margin-top: 50px;
	margin-bottom: 100px;
	font-family: Inter, system-ui;
}







.docs {
	display: flex;
	font-size: 16px;
	gap: 1em;
}

.docs nav,
#pagenav {
	flex: 1;
}

.docs nav {
	min-width: 250px;
}

#docs-menu {
	background: var(--menu-toggle-bg);
	padding: 1em;
	cursor: pointer;
	display: none;
}

#pagenav {
	position: sticky;
	top: 10px;
	align-self: flex-start; /* so the flex item isn't 100% height and thus doesn't stick */
}

#pagenav .heading {
	display: none;
}















main nav ul {
	list-style-type: none;
}

main nav li {
	position: relative;
}

main nav li li::before {
	content: '';
	display: block;
	position: absolute;
	width: 1px;
	height: 100%;
	background-color: var(--nav-link-hover-before-bg);
	transition: .15s;
}

main nav li li:hover::before {
	background-color: #62868d;
	width: 4px;
}

main nav ul li a,
main nav .heading,
#autonav a {
	padding: 8px 18px 8px 28px;
}
/* 
main nav li a,
#pagenav a {
	color: #546c75;
} */

main nav a {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 1.5em;
	color: var(--main-nav-link-color);
	transition: .15s;
}


main nav li:hover > a,
#autonav a:hover,
#pagenav a:hover {
	color: var(--main-nav-link-hover-color);
	background: var(--nav-link-hover-bg);
}


main nav li:hover > a {
	/* background: #f6fafc; */
	box-shadow: -10px 0 10px -3px var(--nav-link-hover-shadow-color);
}

main nav > ul > li > a::before {
	content: '\203A';
	font-weight: bold;
	font-size: 150%;
	line-height: .75;
	position: absolute;
	opacity: 0;
	left: 0;
	transition: left .15s, opacity .15s;
}

main nav li a:hover::before {
	opacity: 1;
	left: .75rem;
}

main nav li a.current {
	background: var(--nav-current-bg);
}

main nav .heading {
	font-weight: bold;
	text-transform: uppercase;
	font-size: 80%;
	letter-spacing: 1px;
}

main nav ul:not(:first-child) > .heading {
	margin-top: 2.5em;
}

main nav li li a {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	padding-left: 1em;
	transition: padding .15s;
}

main nav li li a:not(#autonav a) {
	font-size: 90%;
}

main nav li ul {
	margin-left: 2.5em;
	margin-bottom: .5em;
}


















article {
	font-family: 'Albert Sans', Figree, Assistant, 'Red Hat Text', 'Be Vietnam Pro', system-ui;
	font-size: 20px;
	word-wrap: break-word;

	max-width: 1200px;
	min-width: 0;
	width: 100%;
}

/*
while we want most elements that are rendered
server-side from markdown to have a constrained
width, a few elements should be allowed to
extend to the borders of the page
*/
article > :not(.fullwidth, .fullspan, #hovercard),
article > .fullwidth > *,
.pad {
	padding-left: 8%;
	padding-right: 8%;
}
article > :not(h1, hr),
dd,
article p,
article ol,
article ul,
article pre,
article table {
	margin-bottom: 1.5rem;
}
article > .fullwidth { margin-bottom: 1.5rem; }
article > .fullwidth > * { margin-bottom: 0; }

article > pre.chroma > code {
	background: none;
	padding: 0;
}
article > pre.chroma {
	padding-top: 2em;
	padding-bottom: 2em;
}

article ul,
article ol,
#hovercard ul,
#hovercard ol {
	margin-left: 2.5em;
}

article ul ul,
article ol ol,
article ol ul,
article ul ol {
	margin-bottom: 0;
}

article p,
article li {
	line-height: 1.6;
}

article li p,
article li ul,
article li ol {
	margin-bottom: .5em;
}

article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
	/* to ensure that the anchor-link icons stay inside the heading */
	position: relative;

	font-family: Gantari;
	font-weight: 800;
	color: var(--heading-color);
}

article h1,
article h2,
article h3 {
	text-align: center;
}

article h1 {
	font-size: 72px;
	color: #0e3e5b;
	letter-spacing: -2px;
	margin-top: 5%;
	margin-bottom: 50px;

	background: linear-gradient(to right, #23a1ec, #3fd53a);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

article h2 {
	font-size: 56px;
	padding-bottom: 15px;
	margin: 100px 0 40px;

	border-image-slice: 1;
	border-bottom-width: 10px;
	border-bottom-style: solid;
	border-image-source: linear-gradient(to left, #23a1ec, #3fd53a);
}

article h3 {
	font-size: 36px;
	margin: 50px 0 20px;
	font-weight: 600;
	text-align: center;
}

article h4 {
	font-size: 24px;
	margin: 25px 0 15px;
}

article h5 {
	font-size: 22px;
	margin: 2em 0 1em;
}

.anchor-link {
	opacity: 0;
	font-size: .6em;
	border-radius: 10px;
	padding: .3em .5em;
	position: absolute;
	top: 5px;
	left: 0;
	text-decoration: none;
}

*:hover > .anchor-link,
.anchor-link:focus {
	opacity: 1;
	text-decoration: none;
}

.anchor-link:hover {
	background-color: rgba(0, 0, 0, .075);
}

code {
	background-color: var(--code-bg);
	border-radius: 6px;
	padding: 2px 5px;
	font-size: 90%;
}

code.cmd {
	background-color: var(--cmd-bg);
	color: #eaeaea;
}

pre > code,
pre.chroma,
.group {
	display: block;
	white-space: pre;
}

pre > code,
article > pre {
	padding: 1em;
	line-height: 1.6;
	overflow: auto;
}

pre > code.cmd,
.chroma {
	border-radius: 10px;
}

/* hide underline for links in code blocks; otherwise can look pretty distracting I guess */
pre > code a:not(:hover) {
	text-decoration: none;
}

code.cmd.bash,
code.cmd .bash,
code.cmd.bash-continuation,
code.cmd .bash-continuation {
	font-weight: bold;
}

code.cmd.bash::before,
code.cmd .bash::before {
	content: '$';
	margin-right: .5rem;
}

code.cmd.bash-continuation::before,
code.cmd .bash-continuation::before {
	content: '>';
	margin-right: .5rem;
}

dt:hover .inline-link {
	visibility: visible;
}

dd {
	margin-left: 1em;
}

#field-list-header {
	display: none;
}

.field-name {
	display: block;
	font-family: 'Source Code Pro', monospace;
	margin-top: 2em;
	font-weight: bold;
	margin-bottom: .5em;
}

.inline-link {
	text-decoration: none;
	position: absolute;
	margin-left: -1.5em;
	/* margin-top: -.1em; */
	padding-right: .3em;
	padding-left: .2em;
	visibility: hidden;
}

.inline-link:hover {
	text-decoration: none;
}

hr {
	border: none;
	border-top: 4px solid var(--link-decoration-color);
	margin: 4em auto;
	width: 35%;
}

article img {
	max-width: 100%;
}

iframe {
	margin: 1em 0 2em;
}











article aside {
	position: relative;
	font-size: 16px;
	margin: 2em auto 3em !important;
	max-width: 800px;
}

article aside.tip,
article aside.advice {
	padding-left: calc(8% + 50px) !important;
}

article aside.tip::before,
article aside.advice::before {
	font-size: 45px;
	position: absolute;
	top: -4px;
	left: 8%;
}

article aside.tip {
	color: var(--tip-color);
}


article aside.advice {
	color: #826848;
}

article aside.tip:nth-child(even)::before {
	content: '💁‍♀️';
}
article aside.tip:nth-child(odd)::before {
	content: '💁‍♂️';
}

article aside.advice::before {
	content: '🤦';
}

article aside.complete {
	color: #65a5b9;
	border: 2px dotted #88db88;
	text-align: center;
	max-width: 500px;
	padding: 15px 25px !important;
}

article aside.complete::before {
	content: '✅ complete';
	color: #39c849;
	text-transform: uppercase;
	font-size: 14px;
	font-weight: bold;
	letter-spacing: 1px;
	margin-right: 2em;
	margin-bottom: .5em;
}

table {
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 16px;
}

article > .table-wrapper {
	overflow-x: auto;
	margin: 25px 0 0 0;
	padding: 0;
}

article table {
	margin: 0 auto 25px auto;
}

th, td {
	border-bottom: 1px solid var(--table-border-color);
	padding: 10px;
	line-height: 1.4em;
	vertical-align: top;
	word-wrap: break-word;
}

th {
	text-align: left;
	background: var(--table-header-bg);
}

td code {
	font-size: 14px;
	word-wrap: break-word;
}


.box {
	border-radius: 10px;
	padding: 1em;
	margin: 1em;
	font-size: 18px;
	border: 2px solid var(--box-bg);
}

.box-filled {
	border: none;
	background: var(--box-bg);
}

.box-capped {
	padding: 0;
}

.box-capped > * {
	padding: 1em;
}

.box-cap {
	border-bottom: 1px solid var(--box-bg);
}

.box-filled .box-cap {
	border-bottom: 1px solid var(--button-border-color); /* #d0dfe6; */
}

.box > :first-child {
	margin-top: 0;
}
.box > :last-child {
	margin-bottom: 0;
}

.box:not(.box-capped) > :first-child {
	padding-top: 0;
}
.box:not(.box-capped) > :last-child {
	padding-bottom: 0;
}

.box h3 {
	font-size: 125%;
	margin: 0 0 .5em;
	text-align: left;
}


#autonav {
	position: absolute;
	display: none;
	left: 80%;
	top: 0;
	background: var(--autonav-bg);
	box-shadow: 0 10px 40px rgb(0 0 0 / .2);
	border-radius: 10px;
	border-top-left-radius: 0;
	min-width: 300px;
	z-index: 999;
	padding-top: .5em;
	padding-bottom: .5em;
	max-height: 400px;
	overflow: hidden; 
	overflow-y: auto;
	font-size: 14px;
}

main nav ul > li:hover #autonav {
	display: block;
}

#autonav .heading {
	color: #888;
}

#autonav a {
	transition: none;
	border-radius: 0;
}




#pagenav .heading {
	padding-left: .75em;
}

#pagenav a {
	display: block;
	animation: fadeIn 500ms;
	padding: .75em;
	font-size: 90%;
}

@keyframes fadeIn {
	0%   { opacity: 0; transform: translateY(2em); }
	100% { opacity: 1; transform: translateY(0); }
}




.quick-assist-history {
	font-size: 90%;

	display: flex;
	flex-wrap: wrap;
	gap: .5em;
}

.quick-assist-history > a {
	display: inline-block;
	color: var(--text-color-muted);
	text-decoration: none;
	cursor: pointer;
}

.quick-assist-history > a:hover {
	color: #216688;
	text-decoration: underline;
}

.quick-assist-history > a:not(:first-child):before {
	content: '>';
	margin-right: .5em;
	display: inline-block;
	color: #809783;
}

h3.quick-assist-question {
	font-size: 150%;
}

.quick-assist-options {
	margin-top: 1.5em;
	display: grid;
	gap: 1em;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.quick-assist-options > div {
	display: contents;
}

.quick-assist button,
.quick-assist .button {
	font-size: 100%;
	min-height: 3.5em;
}

main nav li img,
article li img,
img.external-link {
	max-height: .9em;
}




/* JSON and module */

.nonstandard-notice {
	font-size: 14px;
	max-width: 500px;
	margin: 25px auto;
	border: 1px solid #ecd200;
	background: #fffddf;
	border-radius: 5px;
	padding: 10px;
	color: #886c00;
	line-height: 1.4em;
	display: none;
}

.nonstandard {
	color: rgb(214, 145, 16);
}

.standard-flag,
.nonstandard-flag {
	cursor: help;
	font-size: 8px;
	line-height: 1em;
	padding: 4px 8px;
	text-transform: uppercase;
	font-weight: bold;
	color: white;
	border-radius: 4px;
	white-space: nowrap;
	vertical-align: middle;
}

.standard-flag {
	background-color: rgb(34, 163, 23);
}

.nonstandard-flag {
	background-color: rgb(238, 167, 34);
}



#module-docs-container,
#module-list-container,
#module-template {
	display: none;
}

#module-list-container {
	overflow-x: auto;
}

#module-list {
	margin-top: 50px;
}

#module-list td:first-child {
	word-wrap: break-word;
	max-width: 400px;
}

#module-list .module-link {
	font-weight: bold;
	font-size: 20px;
}


#module-multiple-repos {
	display: none;
	margin: 25px;
}

.module-repo-selector {
	font-size: 26px;
	padding: 25px;
	font-weight: bold;
	border-bottom: 1px solid #888;
	cursor: pointer;
}

.module-repo-selector:hover {
	color: #009cda;
	background: var(--table-header-bg);
}

.module-repo-selector-arrow {
	margin: 10px;
}

.module-repo-differentiator {
	font-size: 11px;
	font-weight: bold;
	color: #555;
	line-height: 1em;
}


.toggle-obj {
	padding: 0 .5em;
	visibility: hidden;
}

.group:hover > .toggle-obj {
	visibility: visible;
}

.collapsed {
	display: none;
}








.breadcrumbs {
	margin: 0 !important;
	font-size: 16px;
	font-weight: bold;
	line-height: 1.75em;
}

#top-breadcrumb {
	font-weight: bold;
}

#top-breadcrumb:not(:hover) {
	/* color: #2861aa; */
}

.breadcrumbs a {
	font-weight: normal;
	text-decoration: none;
}

.breadcrumb-siblings-title {
	padding: 10px;
	font-weight: bold;
}

.breadcrumb-siblings a {
	display: block;
	padding: 0 10px;
	text-decoration: none;
}

.breadcrumb-siblings a+a {
	padding-top: 10px;
}

.breadcrumb-siblings a:last-child {
	padding-bottom: 10px;
}


.json {
	line-height: 1.5em;
}
.json .qu { color: #5c91bf; }
.json .key { color: #1c83dc; font-weight: bold; }
.json .str { color: #2f8598; }
.json .num { color: #038a3f; }
.json .bool { color: #9b5e14; }
.json .key a:not([href]) { color: var(--text-color); }
article .json a {
	text-decoration: none;
	font-weight: bold;
}
.json .has-popup { border-bottom: 1px dashed var(--text-color); }
.json a[href].has-popup { border-bottom-color: #1c82dc; }
.json .has-popup.module { border-bottom: none; }


#hovercard {
	max-width: 450px;
	border-radius: 10px;
	filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .25));
	position: absolute;
	font-size: 16px;
	transition: transform .25s ease-in-out, opacity .25s ease-in-out;
	/* TODO: This would be nice, but it breaks the arrow-box... */
	/* max-height: 50%;
	overflow-y: auto; */
}

#hovercard:not(.popup) {
	opacity: 0;
	visibility: hidden;
	transform: translateY(0);
}

.popup {
	visibility: visible;
	opacity: 1;
	transform: translateY(-10px);
}

.arrow-box {
	position: relative;
	background: var(--body-bg);
}

.arrow-box:after {
	bottom: 100%;
	left: 50%;
	border: solid transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
	border-color: rgba(255, 255, 255, 0);
	border-bottom-color: var(--body-bg);
	border-width: 10px;
	margin-left: -10px;
}

#hovercard p,
#hovercard ol,
#hovercard ul,
#hovercard pre,
#hovercard table {
	margin-bottom: 0;
}

#hovercard p {
	padding: 1em;
	line-height: 1.4em;
}

#hovercard p+p {
	padding-top: 0;
}

#hovercard li {
	margin: .25em;
}

#hovercard pre > code {
	border-radius: 0;
}

#hovercard li {
	padding-top: 0;
	padding-bottom: 0;
}

#hovercard .nonstandard-flag {
	float: right;
}

#hovercard .module-link {
	display: block;
	text-decoration: none;
	font-size: 18px;
	line-height: 1em;
	font-weight: bold;
	padding: .5em 1em;
}

#hovercard .module-link:hover {
	background: var(--table-border-color);
}

#hovercard .module-link:last-child {
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
}

#hovercard .module-link-description {
	font-size: 14px;
	color: var(--text-color-muted);
	margin-left: .5em;
	font-weight: normal;
}

#hovercard-namespace-box,
#hovercard-inline-link {
	border: 0px solid var(--table-border-color);
}

#hovercard-namespace-box {
	border-bottom-width: 1px;
}

#hovercard-inline-link {
	border-top-width: 1px;
}

#hovercard-inline-link a {
	display: block;
	padding: 8px 10px;
	text-decoration: none;
	font-size: 85%;
	font-weight: bold;
	text-align: center;
}

#hovercard-namespace {
	font-weight: bold;
}








@media (max-width: 1400px) {
	#pagenav {
		display: none;
	}
}

@media (max-width: 950px) {
	#autonav {
		display: none !important;
	}

	.docs {
		flex-direction: column;
	}

	#docs-menu {
		display: block;
	}

	#docs-menu-container {
		height: 0;
		overflow: hidden;
		transition: height 250ms ease-out;
		display: flex;
		flex-wrap: wrap;
	}

	.docs nav ul {
		min-width: 250px;
		flex: 1;
	}

	main nav ul .heading {
		margin-top: 2.5em !important;
	}

	article {
		font-size: 18px;
	}

	article > :not(.fullwidth, .fullspan, #hovercard), article > .fullwidth > *, .pad {
		padding-left: 4%;
		padding-right: 4%;
	}

	article h1 {
		font-size: 50px;
	}
	article h2 {
		margin: 50px 0 20px;
		font-size: 40px;
	}
	article h3 {
		font-size: 32px;
	}

	article p,
	article li {
		line-height: 1.5;
	}

	hr {
		margin: 2em auto;
	}
}
