/* clip keeps wide carousels from causing a horizontal scrollbar
   without turning the body into a scroll container, which would
   stop the header from sticking. */
html,
body {
	overflow-x: clip;
}

:root {
	--logo-width: 118px;
	--logo-pad: 28px;
	--logo-radius: 20px;
	--logo-hang: 0px;
}

@media (max-width: 1279.98px) {
	:root {
		--logo-width: 96px;
	}
}

@media (min-width: 992px) and (max-width: 1279.98px) {
	.site-header #navbarSupportedContentDesktop .nav-link {
		font-size: 13px;
		margin-left: 4px;
		margin-right: 4px;
	}

	.site-header #searchpc {
		min-width: 0;
	}

	.site-header #searchinput {
		width: 108px;
	}
}

@media (min-width: 992px) and (max-width: 1049.98px) {
	.site-header #searchinput {
		width: 72px;
	}
}

@media (min-width: 1280px) {
	.site-header #navbarSupportedContentDesktop .nav-link {
		margin-left: 6px;
		margin-right: 6px;
	}

	.site-header #searchpc {
		min-width: 0;
	}

	.site-header #searchinput {
		width: 108px;
	}
}

@media (max-width: 991.98px) {
	:root {
		--logo-width: 84px;
		/* Tab hangs below the 45px top bar. 454/640 is the lockup's aspect ratio. */
		--logo-hang: calc((var(--logo-width) * 454 / 640) + (var(--logo-pad) * 2) - 45px);
	}
}

@media (max-width: 399.98px) {
	:root {
		--logo-width: 74px;
	}

	.site-header #shortcuts p {
		padding-left: 4px;
	}
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 1030;
}

.site-header .topbar {
	background: #fff;
	margin-top: 0;
	position: relative;
	z-index: 2;
}

.site-header .topbar .row {
	align-items: stretch;
	flex-wrap: nowrap;
}

.site-header #homelogo {
	align-self: stretch;
	flex: 0 0 auto;
	left: 0;
	margin: 0;
	max-width: none;
	padding: 0;
	position: relative;
	width: calc(var(--logo-width) + (var(--logo-pad) * 2));
	z-index: 3;
}

.site-header #shortcuts {
	flex: 1 1 auto;
	max-width: none;
	min-width: 0;
	width: auto;
}

.nav-logo-tab {
	background: #fff;
	border-radius: 0 0 var(--logo-radius) var(--logo-radius);
	display: block;
	left: 0;
	line-height: 0;
	padding: var(--logo-pad);
	position: absolute;
	text-decoration: none;
	top: 0;
}

.site-header #homelogo .nav-logo-tab img {
	display: block;
	height: auto;
	max-width: none;
	width: var(--logo-width);
}

.site-header .navbar {
	position: relative;
	z-index: 1;
}

@media (min-width: 992px) {
	.site-header #navbarSupportedContentDesktop {
		box-sizing: border-box;
		padding-left: calc(var(--logo-width) + (var(--logo-pad) * 2) + 16px);
	}
}

@media (max-width: 991.98px) {
	.site-header #navbarSupportedContentMobile.show,
	.site-header #navbarSupportedContentMobile.collapsing {
		padding-top: calc(var(--logo-hang) + 8px);
	}
}

@media (max-width: 575.98px) {
	.site-header .topbar > .container {
		margin-left: 0;
		margin-right: 0;
	}

	.site-header #shortcuts p {
		gap: 4px;
	}

	.site-header #login,
	.site-header #signup,
	.site-header #apibutton {
		margin: 0;
		padding-left: 6px;
		padding-right: 6px;
	}
}
