/* Elements
--------------------------------------------- */
body {
	background: var(--color-white);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.site-footer {
	margin-top: auto;
}

hr {
	background-color: var(--color-gray-mid);
	border: 0;
	height: 1px;
	margin-bottom: 1.5em;
}

ul,
ol {
	margin: 0 0 1.5rem 1rem;
	padding: 0 0 0 1rem;
}

ul {
	list-style: disc;
}

ol {
	list-style: decimal;
}

li > ul,
li > ol {
	margin-bottom: 0;
	margin-left: 1.5em;
}

dt {
	font-family: "Maax Bold";
	font-weight: 400;
}

dd {
	margin: 0 1.5em 1.5em;
}

/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object {
	max-width: 100%;
}

img {
	height: auto;
	max-width: 100%;
}

figure {
	margin: 1em 0;
}

table {
	margin: 0 0 1.5em;
	width: 100%;
}

/* Links
--------------------------------------------- */
a {
	color: inherit;
	text-decoration-color: var(--color-gray-dark);
	text-decoration-color: var(--color-text-2);
	text-decoration-thickness: 0.125rem;
	text-decoration-thickness: var(--border-width-md);

	/* Push the line clear of the baseline and let it gap around descenders
	   (g, y, p, j) so it never strikes through them. em-based offset scales
	   with font size, so large display links clear their descenders too.
	   Mirrors the kodansha.us treatment. */
	text-underline-offset: 0.2em;
	text-decoration-skip-ink: auto;
}

a:focus {
	text-decoration-color: transparent;
}

/* Keyboard focus must remain visible: the transparent-underline above kills
   the only affordance for mouse focus, so restore a real ring for keyboard
   users (WCAG 2.4.7). currentColor keeps it on-palette in both light and
   dark sections. */
a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

a:active {

	/* Remove black background on active links */
	background: transparent;
	color: inherit;
	text-decoration-color: currentColor;
	text-decoration-skip-ink: auto;
}

a:visited {
	color: currentColor;
}

/* Reduced motion
--------------------------------------------- */

/* Honor the OS-level "reduce motion" preference: near-zero all transitions
   and animations and disable smooth scrolling (WCAG 2.3.3). The JS smooth
   scroll in js/faq.js also degrades to instant under this query. */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
