/* Typography and styling */

html {
	font-family: "Barlow", sans-serif;
	font-size: 13pt;
	line-height: 1.5;
	color: #000;
}

body {
	min-width: 22rem;
	margin: 0;
	background: white;
}

main p {
	text-align: justify;
}

code,
pre,
var {
	font-family: "Roboto Mono", monospace;
	font-weight: 300;
}

pre {
	margin: 0.3em;
	padding-left: 0.5em;
	border-left: 2pt dotted #fc8;
	overflow-x: auto;
	white-space: pre-wrap; /* Allows wrapping */
	word-wrap: break-word; /* Ensures long words break */
}

code,
var {
	border: 2pt dotted #fc8;
	border-radius: 0.2em;
}

pre code,
pre var {
	border: none;
}

a {
	text-decoration: none;
	color: #0ad;
}

a:hover {
	text-decoration: underline;
}

a.header-local-anchor {
	color: #eee;
	font-weight: 300;
	padding-left: 0.5em;
}

a.header-local-anchor:hover {
	text-decoration: none;
	color: #0ad;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: #555;
	border-bottom: 1pt solid #e8e8e8;
	font-family: "Barlow Semi Condensed", sans-serif;
}

h1 {
	font-size: 160%;
	font-weight: bold;
}

h2 {
	font-size: 150%;
	font-weight: normal;
}

h3 {
	font-size: 140%;
	font-weight: 100;
}

h4 {
	font-size: 130%;
	font-weight: bold;
}

h5 {
	font-size: 120%;
	font-weight: normal;
}

h6 {
	font-size: 110%;
	font-weight: 100;
}

main table {
	font-variant-numeric: tabular-nums;
}

main tbody td {
	padding: 0.3em;
}

main thead th {
	padding: 0.5em;
	border-bottom: 1pt solid #777;
}

blockquote {
	border-left: 0.5em solid #eee;
	padding-left: 1em;
}

main img,
main video {
	max-width: 100%;
}

main figcaption {
	display: none;
}

main li {
	text-decoration: none;
}

/* Navigation bar */

nav {
	margin: 0;
	margin-top: 1rem;
	padding: 0;
}

nav ul {
	display: flex;
	justify-content: right;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 0;
	padding-inline-start: 0;
}

nav ul li {
	list-style-type: none;
	font-weight: bold;
}

/* Search form and related stuff */

.search-form-wrap {
	text-align: center;
	font-size: 120%;
}

ul.search-results li {
	margin-bottom: 1em;
}

ul.search-results li a.search-result {
	font-size: 120%;
	display: block;
}

ul.search-results li div.search-tag {
	display: block;
	font-size: 80%;
	color: #555;
	font-weight: bold;
}

form.search-form-wrap {
	width: 100%;
}

div.search {
	width: 100%;
	border: 2pt solid #eee;
	border-radius: 2em;
	transition: border 250ms;
	margin-left: auto;
	margin-right: auto;
	display: flex;
}

div.search:focus-within {
	border: 2pt solid #0ad;
}

.search i {
	height: 2em;
	width: 2em;
	background-image: url("static/search.svg");
	background-size: contain;
	background-repeat: no-repeat;
	flex-grow: 0;
}

.search input {
	font-size: inherit;
	font-family: inherit;
	line-height: 2em;
	border: none;
	background: none;
	flex-grow: 1;
}

.search input:focus,
.search input:active,
.search input:focus-visible {
	outline: none;
}

/* Grid layout */

.grid-container {
	display: grid;
	grid-template-columns: minmax(3rem, 1fr) 46rem minmax(24rem, 1fr);
}

.grid-nav {
	grid-column: 2 / 3;
	grid-row-start: 2;
}

main {
	grid-column: 2 / 3;
	grid-row-start: 3;
	margin-top: 2rem;
	text-align: left;
}

.grid-sidebar {
	grid-column: 3;
	grid-row-start: 3;
	margin-top: 2rem;
	padding: 0;
}

footer {
	grid-column: 1 / 4;
	grid-row-start: 4;
	display: flex;
	justify-content: center;
	height: 10rem;
	margin-top: 5rem;
	background-color: #ddd;
	box-shadow:
		inset 10rem -10rem 10rem 0 #fff,
		inset -10rem -10rem 10rem 0 #fff;
}

/* Top bar */

header {
	padding: 0;
	padding-top: 2rem;
	display: flex;
	background: #fafafa;
}

.topbar-border {
	border-bottom: solid 1pt #777;
	background: #fafafa;
}

.topbar-text {
	display: flex;
	font-family: "Barlow Condensed", sans-serif;
	color: #777;
	align-self: flex-end;
	padding-bottom: 1rem;
	line-height: 1.2;
}

.topbar-title {
	font-size: 300%;
	font-weight: 300;
	padding-left: 1rem;
	padding-right: 1rem;
}

.topbar-subtitle {
	display: flex;
	align-items: center;
	font-size: 120%;
	max-width: 7em;
	padding-left: 0.5rem;
	border-left: 1pt solid #777;
	vertical-align: middle;
}

.topbar-filler {
	flex-grow: 1;
}

.logo-unilu {
	height: 4rem;
	width: 4.7rem;
	background-image: url("static/unilu.svg");
	background-size: contain;
	background-repeat: no-repeat;
}

.logo-lcsb {
	height: 4rem;
	width: 4rem;
	background-image: url("static/lcsb.svg");
	background-size: contain;
	background-repeat: no-repeat;
}

.unilu-div {
	border: solid 1pt #777;
	border-bottom: 0;
	border-radius: 1.2rem 1.2rem 0 0;
	padding: 1.2rem;
	padding-bottom: 0;
	background: white;
}

.lcsb-div {
	padding: 0 1.2rem 0.6rem 1.2rem;
}

/* Side bar */

.sidebar {
	max-width: 20rem;
	padding-left: 2rem;
	padding-right: 2rem;
	color: #777;
}

.sidebar ul {
	padding-inline-start: 0.5rem;
}

.sidebar li {
	list-style-type: none;
}

.sidebar-header,
.sidebar-values {
	font-size: 80%;
	text-align: left;
}

.sidebar-header {
	font-weight: bold;
	margin-bottom: 0.5rem;
}

.sidebar-values,
.sidebar-links {
	margin-bottom: 1em;
}

.sidebar-toc ul {
	padding-left: 1em;
	list-style-type: none;
}

.sidebar-links {
	text-align: right;
}

.sidebar-toc ul,
.sidebar li {
	text-align: left;
}

/* Footer */

.footer-lcsb {
	align-self: center;
	margin-left: 1rem;
	height: 3rem;
	width: 3rem;
	background-image: url("static/lcsb.svg");
	background-size: contain;
	background-repeat: no-repeat;
}

.footer-text {
	align-self: center;
	margin-left: 2rem;
	max-width: 75%;
	font: "Barlow Condensed", sans-serif;
	font-size: 80%;
	color: #777;
}

/* On smaller screens, stack the layout vertically */

@media screen and (max-width: 79rem) {
	.grid-container {
		grid-template-columns: 0.25fr 3fr 0.25fr;
	}

	.grid-nav {
		grid-row-start: 2;
	}

	.grid-sidebar {
		grid-column: 2 / 3;
		grid-row-start: 3;
		margin: 0;
		padding: 0;
	}

	footer {
		grid-row-start: 5;
	}

	.topbar-subtitle {
		display: none;
	}

	.topbar-title {
		font-size: 200%;
	}

	.sidebar {
		max-width: unset;
		margin-top: 1rem;
		padding: 0;
	}

	main {
		grid-column: 2 / 3;
		grid-row-start: 4;
		margin-top: 1rem;
	}

	nav {
		grid-column: 2 / 3;
		grid-row: 2;
		margin-top: 0.5rem;
	}
}

@media screen and (max-width: 50rem) {
	.logo-unilu {
		height: 2.5rem;
		width: 3rem;
	}

	.logo-lcsb {
		height: 2.5rem;
		width: 2.5rem;
	}

	.unilu-div {
		border-radius: 0.75rem 0.75rem 0 0;
		padding: 0.75rem;
		padding-bottom: 0;
	}

	.lcsb-div {
		padding: 0 0.75rem 0.325rem 0.75rem;
	}

	h1 {
		font-size: 120%;
	}

	h2 {
		font-size: 110%;
	}

	h3 {
		font-size: 100%;
	}

	h4 {
		font-size: 90%;
	}

	h5 {
		font-size: 80%;
	}

	h6 {
		font-size: 70%;
	}

	.topbar-title {
		font-size: 200%;
	}
}

@media print {
	html {
		font-size: 10pt;
	}

	.grid-container {
		display: block;
		padding: 0;
		margin: 0;
	}

	main {
		margin: 0;
	}

	header,
	.topbar-border,
	.grid-nav,
	.grid-sidebar,
	footer {
		display: none;
	}
}
