:root {
	--main-color: #111111;
	--bgrd-code: whitesmoke;
	--accent-color: #777777;
	--link-color: #2ea6d2;
	font-size: 1rem;
}

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

body {
	color: var(--main-color);
	max-width: 800px;
	margin: 0 auto;
	font-family: "Fira Sans", sans-serif;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
	padding: 0 16px;
}

p {
	text-wrap: pretty;
	line-height: 1.5;
}

a {
	color: var(--link-color);
	text-decoration: none;
}

a:hover {
	color: var(--main-color);
}

ul {
	padding-left: 1rem;
}

ul ul {
	margin-left: 1.05rem;
}

ul ul ul {
	margin-left: 1.10rem;
}

li {
	line-height: 1.75;
}

hr {
	border: none;
}

hr::before {
	content: '***';
	display: block;
	text-align: center;
	font-size: 2em;
	color: var(--accent-color);
}

blockquote {
	border-left: 3px solid var(--accent-color);
	color: var(--accent-color);
	margin: 0;
	padding-left: 1em;
}

img {
	max-height: 100%;
	max-width: 100%;
	border: 1px solid var(--bgrd-code);
	border-radius: 2px;
}

code,
pre {
	background-color: var(--bgrd-code);
	font-size: 92.5%;
}

code {
	padding: .1em .2em;
	border-radius: 3px;
	font-family: monospace;
}

pre {
	line-height: 1.4;
	padding: 1em;
	border-radius: 4px;
	overflow-x: auto;
	color: #555;
	scrollbar-width: none;
}

:is(p, li, ol, ul) > code {
	background-color: var(--bgrd-code);
	color: #555;
}

pre code {
	background-color: transparent;
	color: #555;
	padding: 0;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 700;
	text-wrap: balance;
	line-height: 1.25;
	font-kerning: normal;
	color: #404040;
}

time {
	color: var(--accent-color);
}

table {
	border-spacing: 0;
	border-collapse: collapse;
}

table th,
table td {
	padding: 6px 13px;
	border: 1px solid var(--bgrd-code);
}

table th {
	font-size: large;
	background: var(--bgrd-code);
}

article > header {
	margin-bottom: 3rem;
}

article > header > time {
	display: block;
}

article > aside {
	border-radius: 5px;
	padding: 16px;
	margin: 2.5rem 0;
	background-color: var(--bgrd-code);
}

:is(h2, h3, h4, h5, h6) > a {
	color: #404040;
	text-decoration: none;
}

:is(h2, h3, h4, h5, h6) > a:hover {
	color: var(--accent-color);
}

article > h2 {
	font-size: 180%;
}

article > h3 {
	font-size: 150%;
}

article > h4 {
	font-size: 125%;
}

article > h5 {
	font-size: 100%;
}

body > footer {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
	margin-bottom: 1rem;
}

ul[role=menu],
ol[role=menu] {
	list-style: none;
	padding-left: 0;
	line-height: 2;
}

@media (min-width: 640px) {
	body {
		font-size: 18px;
	}
	.grid {
		column-count: 3;
		column-gap: 16px;
		padding: 16px 0;
		list-style-type: none;
	}
	main > section > h2 {
		font-size: 150%;
	}
	main > section > h2:first-child {
		margin-top: 0;
	}
	main > section {
		break-inside: avoid;
		margin-bottom: 1rem;
		overflow: hidden;
		max-width: 100%;
		text-overflow: ellipsis;
	}
}

/* Search */
form {
	position: relative;
	width: 260px;
	margin: 2rem auto;
}

input[type=text] {
	box-sizing: border-box;
	padding: 10px 16px;
	border: 1px solid var(--accent-color);
	width: 100%;
	border-radius: 20px;
	background: none;
	text-align: center;
}

form button {
	position: absolute;
	border: none;
	display: block;
	width: 24px;
	height: 24px;
	line-height: 18px;
	font-size: 18px;
	border-radius: 50%;
	top: 0;
	bottom: 0;
	right: 8px;
	margin: auto;
	background: #ddd;
	padding: 0;
	outline: none;
	cursor: pointer;
	transition: .1s;
}

input:hover {
	color: var(--accent-color);
}

input[type=text]:focus {
	color: var(--main-color);
	outline: none;
}

.content-item h2 a {
	text-decoration: none;
}
