@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Old+Standard+TT:wght@400;700&display=swap");

:root {
	--ink: #000000d9;
	--rule: #000;
	--link-faint: #00000040;
	--link-strong: #00000080;
}

* { box-sizing: border-box; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0000000d; }
::-webkit-scrollbar-thumb { background: #0000000d; }
::-webkit-scrollbar-thumb:hover { background: #000; }

html, body, main { height: 100%; }
html, body { background-color: rgb(254, 243, 199); }

@media screen and (min-width: 740px) {
	html, body { overflow: hidden; }
}

html {
	font-family: "IBM Plex Mono", monospace;
	font-size: 14px;
	line-height: 1.2em;
	color: var(--ink);
}

body {
	margin: 0;
}

h1, h2, h3, h4 {
	font-family: "Old Standard TT", serif;
	margin: 0;
	display: inline-block;
}
h1, h2 { font-size: 1.75rem; font-weight: 400; }

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--link-faint);
	text-decoration-thickness: 1px;
}
a:hover { text-decoration-color: var(--link-strong); }

p { margin: 0.5rem 0; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 500; }
s { text-decoration-color: var(--link-strong); }
small { font-size: 0.9rem; }

ul { margin: 0; padding: 0; }
ul:not(:last-child) { margin-bottom: 1rem; }
li { list-style: none; position: relative; }

.new { color: red; }

/* Layout */
#page { width: 100%; }
@media screen and (min-width: 740px) {
	#page {
		height: 100vh;
		display: flex;
		flex-direction: column;
	}
}

header#header {
	padding: 2rem 0;
	border-bottom: 1px solid var(--rule);
	z-index: 2;
}
@media screen and (min-width: 740px) {
	header#header { padding: 3rem 0; }
}
header#header .flex { align-items: flex-end; }
header#header .column { padding: 0 2rem; }
@media screen and (min-width: 740px) {
	header#header .column { padding: 0 3rem; }
}

main {
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.flex { display: flex; flex-wrap: wrap; }
main > .flex { flex: 1; overflow-y: auto; }
@media screen and (min-width: 740px) {
	main > .flex { overflow: hidden; }
}

.column { width: 100%; }
@media screen and (min-width: 740px) {
	.column { height: 100%; width: 50%; }
}

@media screen and (min-width: 740px) {
	.scroll {
		overflow-y: scroll;
		-webkit-overflow-scrolling: touch;
	}
	.scroll:not(:last-child) { border-right: 1px solid; }
}

section {
	padding: 2rem;
	position: relative;
	overflow: visible;
	border-bottom: 1px solid;
}
@media screen and (min-width: 740px) {
	section { padding: 3rem; }
	section:last-of-type { border-bottom: 0; }
}

section header { margin-bottom: 1rem; }
aside { margin-bottom: 1rem; }
[title] { cursor: help; }

/* Trælister — det visuelle signaturelement */
ul.nested li {
	max-width: 32rem;
	padding-left: 1.25em;
	margin-top: 0.5em;
}
ul.nested li:before {
	content: "";
	width: 0.5em;
	height: 0.5em;
	display: block;
	position: absolute;
	left: 0;
	top: 0;
	border: solid var(--rule);
	border-width: 0 0 1px 1px;
}
ul.nested li.website:before {
	content: "*";
	top: 0;
	border: 0;
}
ul.nested > li {
	break-inside: avoid;
	position: relative;
}
ul.nested > li:not(:last-child) { margin-bottom: 1rem; }
ul.nested > li > ul > li:not(:last-child) { margin-bottom: 1em; }
ul.nested > li:before { border-left-width: 0; }
ul.nested > li li:not(:last-child):after {
	content: "";
	width: 1px;
	height: calc(100% + 0.5rem);
	display: block;
	position: absolute;
	left: 0;
	top: 0.5rem;
	background-color: #000;
}

ul.inline,
ul.inline li { display: inline-block; }

/* Details/summary */
details { white-space: pre-line; }
details ul { display: table; }
details ul li:before {
	top: 0.2em !important;
	border-left-width: 0 !important;
}
details ul li:after { display: none !important; }
details > small { display: block; line-height: 1.5em; }
details[open] > small {
	position: relative;
	padding-left: 1rem;
}
details[open] > small:before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2rem;
	width: 1px;
	height: calc(100% - 0.4rem);
	background-color: var(--ink);
}

summary {
	margin: 0.5rem 0;
	display: inline-block;
	list-style: none;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-color: var(--link-faint);
	text-decoration-thickness: 1px;
	-webkit-user-select: none;
	user-select: none;
}
summary::marker,
summary::-webkit-details-marker { display: none; }
summary:after {
	content: "➤";
	display: inline-block;
	margin-left: 0.5em;
	transform: rotate(90deg);
}
details[open] summary small:first-of-type,
details:not([open]) summary small:last-of-type { display: none; }
details[open] summary:after { transform: rotate(-90deg); }

/* Print */
@media print {
	html, body, main { height: unset; }
	html { font-size: 12px; }
	body { background-color: transparent !important; }
	.print-hide { display: none; }
	strong { font-weight: 400; }
	a { text-decoration: none; }
	h1, h2 { font-size: 1.25rem; }
	main { display: block; }
	header#header { padding: 2rem; }
	section { padding: 2rem; }
	section header { margin-bottom: 0.25rem; }
	.column { padding: 0 !important; height: unset; }
	.scroll { overflow: visible; }
	ul.nested li { margin: 0.5rem 0 0 !important; }
}

@media screen { .screen-hide { display: none; } }
