/* Strafakten: the look of a carbon-copy file. Self-hosted fonts, no scripts. */

@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/fonts/barlow-condensed-latin-500-normal-24f826a7cf9c42ed26c79b07f5b3303f.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/fonts/barlow-condensed-latin-600-normal-ba4513495282e696439a15e0c0f7784c.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/fonts/barlow-condensed-latin-700-normal-e1180918b87380fc8304efcbb08d6de6.woff2") format("woff2");
}
@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
	src: url("/fonts/source-serif-4-latin-wght-normal-fb34450b3254d74776bedd8ca1324aea.woff2") format("woff2");
}
@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 200 900;
	font-display: swap;
	src: url("/fonts/source-serif-4-latin-wght-italic-9be147cef3b5e3637a92a0087120493b.woff2") format("woff2");
}

:root {
	--paper: #e9eef3;
	--sheet: #f7f9fb;
	--ink: #0e2038;
	--ink-soft: #4a5a70;
	--rule: #b9c4d1;
	--rule-faint: #dde4ec;
	--blue: #2b50c8;

	--ban: #b42318;
	--mute: #5b6b7f;
	--warn: #9a5b00;
	--ok: #1b6f4f;
	--kick: #2b50c8;

	--ui: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

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

html {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--text);
	font-size: 106.25%;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

h1,
h2 {
	font-family: var(--ui);
	line-height: 1.05;
	margin: 0;
}

h1 {
	font-weight: 700;
	font-size: clamp(2.4rem, 6vw, 3.4rem);
	letter-spacing: -0.005em;
}

h2 {
	font-weight: 600;
	font-size: 1.6rem;
}

p {
	margin: 0 0 1rem;
}

a {
	color: var(--blue);
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 2px;
}

code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.88em;
	background: var(--rule-faint);
	padding: 0.05em 0.35em;
	border-radius: 0.2rem;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.defs {
	position: absolute;
	width: 0;
	height: 0;
}

.skip {
	position: absolute;
	left: 0.5rem;
	top: -4rem;
	background: var(--sheet);
	padding: 0.5rem 0.9rem;
	z-index: 10;
	font-family: var(--ui);
	font-size: 1.1rem;
}

.skip:focus {
	top: 0.5rem;
}

/* Header */

.masthead {
	background: var(--ink);
	color: var(--paper);
}

.masthead-inner {
	max-width: 62rem;
	margin: 0 auto;
	padding: 0.55rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 2rem;
	justify-content: space-between;
}

.brand {
	font-family: var(--ui);
	color: var(--paper);
	text-decoration: none;
	font-size: 1.5rem;
	line-height: 1;
	display: flex;
	gap: 0.55rem;
	align-items: baseline;
}

.brand-name {
	font-weight: 700;
}

.brand-sub {
	font-weight: 500;
	color: #b9c4d1;
}

.menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.4rem;
	align-items: center;
	font-family: var(--ui);
	font-size: 1.2rem;
	font-weight: 500;
}

.menu a,
.menu button {
	color: var(--paper);
	text-decoration: none;
	padding: 0.45rem 0;
	border-bottom: 3px solid transparent;
}

.menu a:hover,
.menu button:hover {
	border-bottom-color: #7f90a8;
}

.menu a[aria-current="page"] {
	border-bottom-color: var(--paper);
	font-weight: 600;
}

.menu :focus-visible {
	outline-color: var(--paper);
}

.logout {
	margin: 0;
}

.logout button {
	font: inherit;
	background: none;
	border-width: 0 0 3px;
	border-style: solid;
	border-color: transparent;
	cursor: pointer;
	color: #b9c4d1;
}

/* The sheet: the top copy, with the next one peeking out below */

.sheet {
	width: min(100% - 2rem, 56rem);
	margin: 2rem auto 2.5rem;
	padding: 2.25rem 2.5rem 2.5rem;
	background: var(--sheet);
	border: 1px solid var(--rule);
	box-shadow: 0.5rem 0.5rem 0 -1px #dde4ec, 0.5rem 0.5rem 0 0 var(--rule);
}

.sheet-narrow {
	width: min(100% - 2rem, 40rem);
}

.lead {
	margin-top: 0.9rem;
	max-width: 36rem;
	color: var(--ink-soft);
}

.sheet > h1 + .lead {
	margin-bottom: 1.5rem;
}

.foot {
	margin-top: auto;
	text-align: center;
	color: var(--ink-soft);
	font-size: 0.9rem;
	padding: 0 1rem 2rem;
}

.foot p {
	margin: 0;
}

/* Messages and forms */

.notice,
.problem {
	padding: 0.7rem 1rem;
	border-left: 0.3rem solid var(--ok);
	background: #e6f1ec;
	max-width: 36rem;
}

.problem {
	border-left-color: var(--ban);
	background: #faebe9;
}

label {
	display: block;
	font-family: var(--ui);
	font-weight: 600;
	font-size: 1.25rem;
	margin-bottom: 0.25rem;
}

input[type="text"] {
	width: 100%;
	font-family: var(--ui);
	font-weight: 600;
	font-size: 1.7rem;
	letter-spacing: 0.04em;
	padding: 0.5rem 0.75rem;
	color: var(--ink);
	background: #fff;
	border: 2px solid var(--ink-soft);
	border-radius: 0.2rem;
}

input[type="text"]::placeholder {
	color: #8c99ab;
	font-weight: 500;
}

input[type="text"]:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 1px;
	border-color: var(--blue);
}

.help {
	color: var(--ink-soft);
	font-size: 0.92rem;
	margin: 0.5rem 0 1.25rem;
}

button,
.button {
	font-family: var(--ui);
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1;
	letter-spacing: 0.02em;
	padding: 0.75rem 1.5rem;
	color: #fff;
	background: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 0.2rem;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

button:hover,
.button:hover {
	background: var(--blue);
	border-color: var(--blue);
}

.menu button {
	padding: 0.45rem 0;
	border-radius: 0;
	font-size: inherit;
}

.search-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.search-row input {
	flex: 1 1 18rem;
	font-size: 1.35rem;
}

.uuid {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.82rem;
	word-break: break-all;
	user-select: all;
}

/* The folder: name, reference and the stamp */

.folder {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1.25rem 1.75rem;
	align-items: start;
	padding-bottom: 1.75rem;
}

.identicon {
	width: 5.5rem;
	height: 5.5rem;
	padding: 0.45rem;
	background: #fff;
	border: 1px solid var(--rule);
}

.identicon rect {
	fill: var(--tone);
}

.tone-0 {
	--tone: #0e2038;
}
.tone-1 {
	--tone: #2b50c8;
}
.tone-2 {
	--tone: #1b6f4f;
}
.tone-3 {
	--tone: #9a5b00;
}
.tone-4 {
	--tone: #6b3fa0;
}
.tone-5 {
	--tone: #0f6e7c;
}

.folder-title {
	min-width: 0;
}

.folder-ref {
	margin: 0.7rem 0 0;
	display: grid;
	gap: 0.1rem;
}

.folder-ref div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.6rem;
	align-items: baseline;
}

.folder-ref dt {
	font-family: var(--ui);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--ink-soft);
	min-width: 3rem;
}

.folder-ref dd {
	margin: 0;
	font-family: var(--ui);
	font-weight: 500;
	font-size: 1.1rem;
}

.folder-ref dd.uuid {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.8rem;
}

/* The stamp, the one thing that is allowed to be loud */

.stamp {
	--stamp: var(--ok);
	justify-self: end;
	min-width: 12.5rem;
	max-width: 17rem;
	padding: 0.4rem 1.1rem 0.5rem;
	text-align: center;
	font-family: var(--ui);
	color: var(--stamp);
	border: 0.22rem solid var(--stamp);
	border-radius: 0.35rem;
	outline: 1px solid var(--stamp);
	outline-offset: 0.2rem;
	transform: rotate(-4deg);
	filter: url(#ink);
	mix-blend-mode: multiply;
	margin: 0.3rem 0.3rem 0 0;
}

.stamp-word {
	display: block;
	font-weight: 700;
	font-size: 2.3rem;
	line-height: 1.05;
	letter-spacing: 0.03em;
}

.stamp-detail {
	display: block;
	margin-top: 0.25rem;
	padding-top: 0.2rem;
	border-top: 1px solid var(--stamp);
	font-weight: 500;
	font-size: 1.1rem;
	line-height: 1.2;
}

.stamp-ban {
	--stamp: var(--ban);
}
.stamp-mute,
.stamp-limit {
	--stamp: var(--mute);
}
.stamp-warn {
	--stamp: var(--warn);
}
.stamp-clear,
.stamp-empty {
	--stamp: var(--ok);
}

@media (prefers-reduced-motion: no-preference) {
	.stamp {
		animation: thump 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) 0.15s both;
	}
}

@keyframes thump {
	0% {
		opacity: 0;
		transform: rotate(-11deg) scale(1.7);
	}
	55% {
		opacity: 1;
		transform: rotate(-4deg) scale(0.96);
	}
	100% {
		opacity: 1;
		transform: rotate(-4deg) scale(1);
	}
}

/* Filter */

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.6rem;
	border-bottom: 1px solid var(--rule);
	font-family: var(--ui);
	font-size: 1.2rem;
	font-weight: 500;
}

.filters a {
	color: var(--ink-soft);
	text-decoration: none;
	padding: 0.55rem 0 0.5rem;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
}

.filters a:hover {
	color: var(--ink);
	border-bottom-color: var(--rule);
}

.filters a[aria-current="page"] {
	color: var(--ink);
	font-weight: 600;
	border-bottom-color: var(--ink);
}

.filters .n {
	font-weight: 600;
	color: var(--ink);
}

.filters .live {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sheet);
	background: var(--ink-soft);
	padding: 0.05rem 0.45rem;
	border-radius: 0.8rem;
	margin-left: 0.2rem;
}

/* Timeline: date in the gutter, the entry beside a rule in the color of its type */

.timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.entry {
	--type: var(--ink-soft);
	display: grid;
	grid-template-columns: 7.25rem 1fr;
	column-gap: 1.5rem;
	padding: 1.4rem 0 1.5rem;
	border-bottom: 1px solid var(--rule-faint);
}

.entry-ban {
	--type: var(--ban);
}
.entry-mute {
	--type: var(--mute);
}
.entry-warn {
	--type: var(--warn);
}
.entry-kick {
	--type: var(--kick);
}

.entry-when {
	margin: 0;
	font-family: var(--ui);
	font-size: 1.1rem;
	line-height: 1.25;
	color: var(--ink-soft);
}

.entry-when .date {
	display: block;
	font-weight: 600;
	color: var(--ink);
}

.entry-body {
	border-left: 0.28rem solid var(--type);
	padding-left: 1.25rem;
	min-width: 0;
}

.entry-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem 0.8rem;
	font-size: 1.7rem;
}

.entry-type {
	color: var(--type);
	font-weight: 700;
}

.entry-status {
	font-size: 1.05rem;
	font-weight: 600;
	padding: 0.1rem 0.6rem;
	border: 1px solid var(--rule);
	border-radius: 0.8rem;
	color: var(--ink-soft);
}

.is-aktiv .entry-status {
	background: var(--type);
	border-color: var(--type);
	color: #fff;
}

.entry-reason {
	display: block;
	margin: 0.45rem 0 0;
	font-style: italic;
	font-size: 1.1rem;
	quotes: "\201E" "\201C";
	overflow-wrap: anywhere;
}

.entry-reason.none {
	quotes: none;
	color: var(--ink-soft);
}

.is-abgelaufen .entry-reason,
.is-aufgehoben .entry-reason {
	color: var(--ink-soft);
}

.facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 1.6rem;
	margin: 0.7rem 0 0;
}

.facts div {
	display: flex;
	gap: 0.4rem;
	align-items: baseline;
}

.facts dt {
	font-family: var(--ui);
	font-size: 1.05rem;
	color: var(--ink-soft);
}

.facts dd {
	margin: 0;
	font-family: var(--ui);
	font-weight: 600;
	font-size: 1.1rem;
}

.entry-revoked {
	margin: 0.6rem 0 0;
	font-size: 0.95rem;
	color: var(--ink-soft);
	overflow-wrap: anywhere;
}

.empty {
	padding: 1.75rem 0 0.5rem;
	color: var(--ink-soft);
}

.pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	padding-top: 1.25rem;
	font-family: var(--ui);
	font-size: 1.2rem;
}

.pager .pos {
	color: var(--ink-soft);
}

/* Overview: a ledger and a bar per month */

.ledger {
	margin: 0 0 2.25rem;
	max-width: 40rem;
}

.ledger div {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px dotted var(--ink-soft);
}

.ledger dt {
	flex: 1 1 auto;
}

.ledger .of {
	font-size: 0.9rem;
	color: var(--ink-soft);
	margin-left: 0.4rem;
}

.ledger dd {
	margin: 0;
	font-family: var(--ui);
	font-weight: 700;
	font-size: 1.7rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.legend {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.4rem;
	margin: 0.6rem 0 1rem;
	padding: 0;
	font-family: var(--ui);
	font-size: 1.1rem;
	color: var(--ink-soft);
}

.legend li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.swatch {
	display: inline-block;
	width: 0.9rem;
	height: 0.9rem;
}

.months {
	list-style: none;
	margin: 0;
	padding: 0;
}

.month {
	display: grid;
	grid-template-columns: 9.5rem 1fr 3rem;
	gap: 1rem;
	align-items: center;
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--rule-faint);
	font-family: var(--ui);
	font-size: 1.15rem;
}

.month-total {
	text-align: right;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.bar {
	display: block;
	width: 100%;
	height: 1.05rem;
}

.track {
	fill: var(--rule-faint);
}

.seg-ban {
	fill: var(--ban);
	background: var(--ban);
}
.seg-mute {
	fill: var(--mute);
	background: var(--mute);
}
.seg-warn {
	fill: var(--warn);
	background: var(--warn);
}
.seg-kick {
	fill: var(--kick);
	background: var(--kick);
}

/* Small screens */

@media (max-width: 40rem) {
	.sheet {
		margin: 1rem auto 1.5rem;
		padding: 1.5rem 1.15rem 1.75rem;
		box-shadow: none;
	}

	.folder {
		grid-template-columns: auto 1fr;
	}

	.stamp {
		grid-column: 1 / -1;
		justify-self: start;
		margin-left: 0.3rem;
	}

	.entry {
		grid-template-columns: 1fr;
		row-gap: 0.5rem;
	}

	.entry-when .date,
	.entry-when .time {
		display: inline;
	}

	.entry-when .time::before {
		content: " ";
	}

	.month {
		grid-template-columns: 1fr 2.5rem;
		row-gap: 0.15rem;
	}

	.month .bar {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

@media print {
	html {
		background: #fff;
		font-size: 100%;
	}

	.masthead,
	.foot,
	.skip,
	.pager,
	.filters {
		display: none;
	}

	.sheet {
		box-shadow: none;
		border: 0;
		margin: 0;
		width: 100%;
		padding: 0;
	}

	.stamp {
		animation: none;
	}
}
