html {
	font-size: 100%;
	scroll-behavior: smooth;
}

body {
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 1.3rem;
	line-height: 1.55;

	display: flex;
	flex-direction: column;
	min-height: 100vh;

	margin: 0 24px;
}

@media only screen and (max-width: 468px) {
	.page-header {
		flex-direction: column;
	}
}

.page-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	margin-top: 8px;
}

.page-header nav a:not(:hover):not(:focus) {
	color: currentColor;
	text-decoration: none;
}

nav a {
	margin: 0 12px;
	font-size: 1.25em;
}

main {
	flex-grow: 1;
	max-width: 60ch;
	width: 100%;
	margin: 0 auto;
}

.page-footer {
	text-align: center;
	margin-bottom: 8px;
}

.footnotes {
	font-size: 0.8em;
}

/* Typography */
p {
	margin-bottom: 1.15rem;
}

h1,
h2,
h3,
h4,
h5 {
	font-family: 'Roboto', sans-serif;
	margin: 2.75rem 0 1.05rem;
	font-weight: 900;
	line-height: 1.15;
}

h1 {
	font-size: 3.052em;
}

h2 {
	font-size: 2.441em;
}

h3 {
	font-size: 1.953em;
}

h4 {
	font-size: 1.563em;
}

h5,
.larger {
	font-size: 1.25em;
}

small {
	font-size: 0.8em;
}

em {
	color: #bc74ff;
}

/* backlinks */
.backlinks-title {
	margin-bottom: 0;
}

.backlinks-container {
	margin-top: 0;
}

.backlinks-default {
	margin-top: 0;
	margin-left: 16px;
	color: var(--grey);
}

.backlink__preview {
	display: none;

	position: absolute;
	bottom: 8px;
	left: 100%;
	background-color: #fff;
	border-radius: 4px;
	padding: 4px;
	box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.25);
	width: 348px;
	max-height: 148px;
	overflow: hidden;
}
.backlink__preview::after {
	content: '';
	position: absolute;
	bottom: 0;
	background: linear-gradient(transparent, white);
	width: 100%;
	height: 24px;
}

.backlink__preview h1 {
	font-size: 1.2rem;
	margin-top: 8px;
	font-weight: bold;
}

.backlink {
	width: fit-content;
	position: relative;
}

.backlink:hover {
	padding-right: 4px; /* Allow mouse to travel between link and modal */
}

.backlink:hover .backlink__preview {
	display: block;
}
