

*, *::after, *::before {
	box-sizing: border-box;
}

:root { 
	--bg: color-mix(in oklab, midnightblue 42%, black);
	--fg: color-mix(in oklab, azure 42%, lavender);
	--gillikin: color-mix(in oklab, magenta 42%, mistyrose);
	--munchkin: color-mix(in oklab, cyan 42%, dodgerblue);
	--oz: color-mix(in oklab, palegreen 42%, mediumaquamarine);
	--quadling: color-mix(in oklab, chocolate 42%, coral);
	--winkie: color-mix(in oklab, blanchedalmond 42%, gold);
}

a {
	color: var(--gillikin);
	text-decoration: underline;
	text-decoration-color: var(--gillikin);
	text-decoration-style: dashed;
	text-underline-offset: 0.2em;
	transition: all 0.42s ease;
}

a:focus, button:focus, #search-input:focus {
	outline: 2px solid var(--winkie);
	outline-offset: 4px;
}

article {
	display: flex;
	flex-direction: column;
	gap: 1lh;
}

body, html {
	background-color: var(--bg);
	color: var(--fg);
}

body {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 1.42rem;
	line-height: 1.84;
	margin: 0 auto;
	max-width: 70ch;
	min-height: 100dvh;
	-moz-osx-font-smoothing: grayscale;
	padding: 2lh 1.2rem;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p {
	margin: 0;
	overflow-wrap: break-word;
}

h1 {
	color: var(--winkie);
	font-size: 2.4rem;
	padding-top: 0.5em;
}

h1::after {
	content: "_";
	color: var(--fg);
	font-weight: bold;
	animation: blink 3s step-end infinite;
}

h1::before {
	content: "# ";
	opacity: 0.42;
}

h2::before {
	content: "## ";
	opacity: 0.42;
}

h2 {
	color: var(--winkie);
	font-size: 1.42rem;
}

@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

/************ TOP NAV ************/

.fixed {
	align-items: center;
	border-bottom: 1px solid color-mix(in oklab, var(--munchkin) 42%, transparent);
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	margin-bottom: 1lh;
	padding-bottom: 0.5lh;
	width: 100%;
}

.fixed-links {
	color: var(--munchkin);
	display: flex;
	flex-direction: row;
	gap: 2ch;
}

.fixed-links a {
	color: var(--munchkin);
	opacity: 0.42;
	text-decoration: none;
	transition: all 0.4s ease;
}

.fixed-links a:hover {
	opacity: 1;
}

.return {
	color: var(--winkie);
	text-decoration: none;
	white-space: nowrap;
}


/************ SEARCH BAR ************/

.search-container {
	align-items: center;
	border-bottom: 3px solid var(--munchkin);
	display: flex;
	gap: 1.5ch;
	margin-block: 1lh;
	padding-top: 1lh;
	width: 100%;
}

.search-container::before {
	animation: blink 3s step-end infinite;
	color: var(--munchkin);
	content: ">";
	font-size: 1.8rem;
	font-weight: bold;
}

#search-input {
	background: transparent;
	border: none;
	color: var(--winkie);
	font-size: 1.8rem;
	outline: none;
	padding: 0;
	width: 100%;
}

#search-input::placeholder {
	color: var(--fg);
	opacity: 0.42;
	font-size: italic;
	font-size: 1.8;
}

#search-button {
	background: var(--munchkin);
	border: none;
	box-shadow: 4px 4px 0 var(--fg);
	color: var(--bg);
	cursor: pointer;
	padding: 0.5lh 3ch;
	font-size: 1rem;
	font-weight: bold;
	text-transform: uppercase;
	transition: all 0.4s ease;
}

#search-button:hover {
	box-shadow: 6px 6px 0 var(--fg);
	transform: translate(-2px, -2px);
}

#search-button:active {
	box-shadow: none;
	transform: translate(2px, 2px);
}

/************ PILLS ************/

.tags-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 1ch;
	margin-top: 1lh;
	margin-bottom: 1lh;
	width: 100%;
}

.pill-button {
	background: transparent;
	border: none;
	color: var(--oz);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9rem;
	padding: 0.5ch;
	transition: all 0.4s ease;
}

.pill-button:before {
	content: "[";
	opacity: 0.4;
}

.pill-button:after {
	content: "]";
	opacity: 0.4;
}

.pill-button:hover {
	color: var(--winkie);
}

.pill-button:hover::before, .pill-btn:hover::after {
	opacity: 1;
}

/************ FOOTER ************/

footer {
	border-top: 1px solid color-mix(in oklab, var(--munchkin) 54%, transparent);
	font-size: 0.9rem;
	margin-top: 4lh;
	opacity: 0.8;
	padding: 1lh 0lh;
	text-align: center;
	transition: opacity 0.3s ease;
}

footer:hover {
	opacity: 1;
}

/************ DISTINCTION BOX ************/

.distinction-box {
	background: color-mix(in oklab, var(--oz) 5%, transparent);
	border-left: 3px solid var(--oz);
	margin-block: 1lh;
	padding: 1lh;
}

.distinction-box::before {
	content: "NOTE";
	color: var(--oz);
	display: block;
	font-size: 0.75rem;
	font-style: normal;
	font-weight: bold;
	letter-spacing: 0.1em;
	margin-bottom: 0.5lh;
}

.distinction-box h2 {
	margin-bottom: 1lh;
	margin-top: 0 !important;
}

/************ RED FLAG BOX ************/

.red-flag-box {
	background: var(--bg);
	border: 2px solid var(--quadling);
	box-shadow: 5px 5px 0 var(--quadling);
	margin-top: 1lh;
	padding: 1.5lh;
}

.red-flag-box::before {
	color: var(--quadling);
	content: "ALERT";
	display: block;
	font-size: 0.75rem;
	font-style: normal;
	font-weight: bold;
	letter-spacing: 0.1em;
	margin-bottom: 0.5lh;
}

.red-flag-box h2 {
	margin-bottom: 1lh;
	margin-top: 0 !important;
}

/************ RELATED BOX ************/

.related-section {
	border-top: 1px dashed var(--gillikin);
	margin-top: 2lh;
	padding-top: 1lh;
}

.related-section h2 {
	color: var(--gillikin);
	margin-top: 0;
}

.related-list {
	list-style: none;
	margin-top: 1lh;
	padding: 0;
}

.related-list li {
	padding-left: 4ch;
	position: relative;
}

.related-list li::before {
	color: var(--gillikin);
	content: "[>]";
	left: 0;
	opacity: 0.84;
	position: absolute;
}

/************ SAFE SPACE ************/

@media (max-width: 640px) {
	body {
		font-size: 1.1;
		line-height: 1.42;
		padding: 1lh;
	}

	.distinction-box {
		margin-block: 0.5lh;
		padding: 0.5lh;
	}

	.fixed {
		align-items: flex-start;
		flex-direction: column;
			gap: 1lh;
		}

	h1 {
		font-size: 1.4rem;		
	}

	.red-flag-box {
		margin-top: 0.5lh;
		padding: 0.5lh;
	}
}


@media (prefers-color-scheme: light) {
	html:root {
		--bg: color-mix(in oklab, honeydew 21%, ivory);
		--fg: color-mix(in oklab, darkred 21%, black);
		--gillikin: color-mix(in oklab, indianred 21%, indigo);
		--munchkin: color-mix(in oklab, darkslategrey 21%, teal);
		--oz: color-mix(in oklab, rosybrown 21%, darkgreen);
		--quadling: color-mix(in oklab, darkred 21%, crimson);
		--winkie: color-mix(in oklab, peachpuff 21%, brown);
	}

	body {
		font-weight: 500;
	}

	.fixed-links a {
	opacity: 0.84;
	}
}


@media (prefers-reduced-motion: reduce) {
	*, ::after, ::before {
		animation: none !important;
		scroll-behavior: auto !important;
		transition: none !important;
	}

	h1::after {
		content: "_";
		opacity: 1 !important;
	}

	.search-container::before {
		content: ">";
		opacity: 1 !important;
	}
}


@media (prefers-reduced-transparency: reduce) {
	
	*, ::after, ::before {
		filter: none !important;
		opacity: 1 !important;
	}
}

