:root {
	color-scheme: light dark;
	accent-color: var(--link);
	--page-bg: canvas;
	--text: light-dark(black, white);
	--link: light-dark(darkblue, lightblue);
	--hover: light-dark(#2d2d2d, #c8c8c8);
	--backing: light-dark(rgb(0,0,0,.075), rgb(0,0,0,.5));
	--tag: light-dark(rgb(0,0,0,.05), var(--page-bg));
	--green: light-dark(darkgreen, #8dff8d);
	--red: light-dark(darkred, #ffaea0);
	--brightness: light-dark(brightness(.1), brightness(1));
}

html, body {
	background: var(--page-bg);
	color: var(--text);
	margin: 0;
}

/* Fonts */
body {
  font-family: Verdana, 'DejaVu Sans', Seravek, sans-serif;
}
h1, h2, h3, h4 {
  font-family: 'Book Antiqua', 'Palatino Linotype', Garamond, Cambria, serif;
}

/* Text Areas */

.index header {
	width: 100%;
	background: var(--backing);
	text-align: center;
	padding: 1em;
	box-sizing: border-box;}

.index main {
	margin: 2em auto;
	max-width: 1070px;
	width: 95vw;
	box-sizing: border-box;
}

.preface {
	padding-left: 10px;
	padding-right: 10px;
}

footer {
	max-width: 1200px;
	text-align: center;
	margin: 3em auto;
}

.collection {
	display: flex;
	flex-direction: row-reverse;
	flex-wrap: wrap;
	gap: 3%;}
.filters {width: 22%;}
.works {
	width: 75%;
	margin-top: .75em;
}

/* Mobile Friendly */
@media only screen and (width < 900px) {
	.filters, .works {width: 100%;}
}

/* Works & Tags */

.work {
	width: 100%;
	background: light-dark(var(--page-bg), var(--backing));
	border: 1px solid var(--backing);
	border-radius: 10px;
	padding: 10px 20px;
	margin: 10px 0 15px 0;
	box-sizing: border-box;
}
.work .stats {
	list-style: none;
	font-size: .8em;
	margin-bottom: .4em;
	padding: 0;
	display: flex;
	justify-content: flex-end;
	gap: 1em;
}

ul.tags {
	display: inline;
	padding: 0;
	li {
		font-size: .9em;
		background: var(--tag);
		display: inline-block;
		padding: 5px 10px;
		margin: 0 5px 5px 0;
	}
}

/* Headers */

h1 {
	font-size: 3em;
}

.preface h2 {font-size: 1.2em}

.filters h2 {
	margin-top: .2em;}
.filters h3 {
	font-size: 1.1em;
	margin: .5em 0 .5em .3em}

.work h2 {
	font-size: 1.5em;
	margin: .5em
}

/* Links */
a {
	color: var(--link);
	text-decoration-style: dotted;
	text-underline-offset: .2em;
	&:hover {color: var(--hover);}
}

/* Focus Outlines */

*:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: .15em; }

input:focus-visible {
	outline: none}

label:has(input:focus-visible) {
	outline: 2px solid var(--link);
	outline-offset: .15em;
	border-radius: .2em }

/* Details Toggle */

details {
	width: 100%;
	text-align: left;
	margin: 10px 0 20px 0;
	}
summary {
	background: var(--backing);
	padding: .5em;
	}
summary:hover {
	background: var(--hover);
	color: var(--page-bg);
	cursor: pointer;
	}
.preface summary {
	width: 95%;
	margin-left: auto;
	margin-right: auto;
}
.filters summary {
	font-weight: bold;
	font-size: 1.1em; }

/* Filter Checkbox Inputs */

input {appearance: none;}
label {
	margin: .3em 0;
	display: block;}
label:hover {
	cursor: pointer;
	color: var(--hover);}

label::before {
	font-weight: bold;
	margin-left: .5em;
	filter: opacity(.3);
}
label:has(input[name="require"])::before {content: '✓ ';}
label:has(input[name="exclude"])::before {content: '✖ ';}

label:has(input:checked) {font-weight: bold}
label:has(input:checked)::before {filter: opacity(1)}
label:has(input:checked[name="require"])::before {color: var(--green);}
label:has(input:checked[name="exclude"])::before {color: var(--red);}

/* Icons */

.work h2 {
	display: flex;
	height: 1.3em;
	&::before {
		display: inline-block;
		margin-right: .5em;
		margin-left: -.3em;
	}
}
*[pairings~="f-f"] h2::before {content: url('icons/fxf.svg');}
*[pairings~="m-m"] h2::before {content: url('icons/mxm.svg');}
*[pairings~="m-f"] h2::before {content: url('icons/mxf.svg');}
*[pairings~="nb-nb"] h2::before {content: url('icons/nbxnb.svg');}
*[pairings~="no-pairings"] h2::before {content: url('icons/gen.svg');}
