@import "_variables";
@import "_mixins";

*,
html {
	box-sizing: border-box;
}

html {
	background: var(--sl-color-bg);
}

html.transition {
	transition-duration: 200ms;
	transition-timing-function: cubic-bezier(0.57, 0.33, 0.19, 0.97);
	transition-property: background;
}

[hidden] {
	display: none !important;
}

body {
	font-size: 16px;
	text-rendering: optimizelegibility;
	-webkit-font-smoothing: antialiased;
	color: var(--sl-color-text);
	line-height: 1.5;
	margin: 0;
}

code {
	font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
	-moz-tab-size: 2;
	tab-size: 2;
	background-color: var(--inline-code-background-color);
	padding: 2px 5px;
	border-radius: 2px;
}

pre code {
	background: none;
	padding: 0;
}

h1 {
	font-size: 2em;
	line-height: calc(var(--body-line-height) / 2em);
}

h2 {
	font-size: 1.5em;
	line-height: calc(var(--body-line-height) / 1.5em);
}

h3 {
	font-size: 1.2em;
	line-height: calc(var(--body-line-height) / 1.2em);
}

h4,
h5 {
	font-size: 1em;
	line-height: calc(var(--body-line-height) / 1em);
}

h1,
h2,
h3,
h4,
h5 {
	color: var(--logo-font-color);
	font-weight: bold;
}

.no-scroll {
	overflow: hidden;
}

.main {
	width: 100%;
}

.page-main {
	@media only screen and (max-width: var(--mobile-breakpoint)) {
		margin-top: 64px;
	}
}

.skip-to-content a {
	transition-duration: 200ms;
	transition-timing-function: cubic-bezier(0.57, 0.33, 0.19, 0.97);
	transition-property: top;
	position: absolute;
	right: 0;
	top: -40px;
	padding: calc(var(--unit) / 2) var(--unit);
	z-index: 100;
	background: var(--logo-font-color);
	color: var(--container-color);
	font-weight: bold;
}

.skip-to-content a:focus {
	position: absolute;
	right: 0;
	top: 0;
	padding: var(--unit);
	z-index: 100;
}

.sr-only {
	display: none;
}

@media (prefers-reduced-motion) {
	* {
		transition: none !important;
	}
}

.foreground-svg {
	path,
	polygon {
		fill: var(--sl-color-text-accent);
	}
}

:root {
	scroll-padding-top: 80px;

	@media only screen and (max-width: var(--mobile-breakpoint)) {
		scroll-padding-top: 64px;
	}
}
:root[data-theme="dark"] & {
	color-scheme: dark only;
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"] & {
		color-scheme: dark only;
	}
}
