/* Fonts. */

@font-face
{
	src: url("/assets/fonts/typ.ttf");
	font-family: "Typ";
}

@font-face
{
	src: url("/assets/fonts/typ-tiny.ttf");
	font-family: "Typ Tiny";
}

/* Base. */

html
{
	font-size: 24px;
}

body
{
	background-color: #000000;
	color: #ffffff;
	font-family: "Typ", monospace;
	hyphens: auto;
	line-height: 1;
	margin: 0 auto;
	max-width: calc(100% - 2ch); /* Considering double padding. */
	width: 32ch;
	overflow-wrap: break-word;
	padding: 0 1ch;
}

*
{
	border-color: #808080;
	border-width: calc(1ch / 6); /* 1 pixel of the 6x6 font. */
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: normal;
	padding: 0;
	margin: 0;
}

*::before
{
	color: #808080;
}

/* General. */

h1,
h2
{
	color: #808080;
	margin: 2ch 0;
	text-transform: uppercase;
}

h1
{
	text-align: right;
}

blockquote,
ol,
p,
pre,
ul
{
	margin: 1ch 0;
}

blockquote,
pre
{
	border-left-style: solid;
	padding: 0 0 0 calc(1ch - (1ch / 6)); /* Considering border width. */
}

pre
{
	border-right-style: solid;
	overflow-x: scroll
}

ol,
ul
{
	padding: 0;
}

li
{
	list-style-type: none;
	padding-left: 2ch;
	position: relative;
}

li::before
{
	content: "-";
	left: 0;
	position: absolute;
	top: 0;
}

hr
{
	border-style: none;
	border-bottom-style: solid;
	margin: 2ch 0;
	width: 100%;
}

a
{
	color: #4fd970;
	text-decoration: none;
}

em
{
	font-family: "Typ Tiny", monospace;
	font-size: calc(1em * (4 / 6)); /* Typ Tiny is 4x4, while Typ is 6x6. */
	font-style: normal;
}

/* Do not style imgs in header and footer. */
main img
{
	border-style: solid;
	max-width: calc(100% - (2 * 1ch)); /* Considering double padding. */
	padding: 1ch;
	width: 24ch;
}

/* Specific. */

header
{
	align-items: center;
	display: flex;
	flex-direction: column;
}

header img
{
	image-rendering: crisp-edges;
	transform: scaleY(-1);
	width: calc(8ch / 6); /* Match pixel size with the 6x6 font. */
}
