@font-face {
	font-family: 'Satoshi';
	src: url('/fonts/Satoshi-Variable.woff2') format('woff2');
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Satoshi';
	src: url('/fonts/Satoshi-VariableItalic.woff2') format('woff2');
	font-weight: 300 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--schwarz: #000;
	--weiss: #fff;
	--grau: #8a8a8a;
	--orange: #f7931a;
	--linie: #262626;
	--rand: clamp(1.25rem, 4vw, 3rem);
	--spalte: 38rem;
	--mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

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

html {
	background: var(--schwarz);
	color: var(--weiss);
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: 'Satoshi', system-ui, sans-serif;
	font-weight: 400;
	font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-kerning: normal;
}

::selection { background: var(--weiss); color: var(--schwarz); }

a { color: inherit; }
:focus-visible { outline: 1px solid var(--weiss); outline-offset: 4px; }

/* Lesefortschritt: eine Haarlinie, sonst nichts. */
.fortschritt {
	position: fixed;
	inset: 0 0 auto 0;
	height: 2px;
	z-index: 10;
	pointer-events: none;
}
.fortschritt span {
	display: block;
	height: 100%;
	background: var(--orange);
	transform-origin: 0 50%;
	transform: scaleX(var(--fortschritt, 0));
}

/* ---------- Auftakt ---------- */

.auftakt {
	min-height: 100svh;
	display: grid;
	grid-template-rows: auto 1fr auto auto auto;
	padding: var(--rand);
	position: relative;
}

.kennung, .unterzeile {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--grau);
}

.titel {
	align-self: center;
	margin: 0;
	font-weight: 900;
	font-size: clamp(3rem, 18.6vw, 21rem);
	line-height: 0.84;
	letter-spacing: -0.055em;
	text-transform: uppercase;
	/* optischer Ausgleich: Versalien sitzen sonst zu weit rechts */
	margin-left: -0.06em;
}
.zeile { display: block; }
.kontur {
	/* Schwarze Füllung über doppelt breiter Kontur: innere Überlappungen
	   der Glyphen (T, Y) verschwinden, außen bleibt eine saubere Linie. */
	color: var(--schwarz);
	-webkit-text-stroke: 1.6px var(--weiss);
	paint-order: stroke fill;
	letter-spacing: -0.02em;
}
@media (min-width: 900px) {
	.kontur { -webkit-text-stroke-width: 3px; }
}

.unterzeile {
	padding-top: 1.25rem;
	border-top: 1px solid var(--linie);
	color: var(--weiss);
}
.unterzeile .lesezeit { color: var(--grau); white-space: nowrap; }

.weiter {
	justify-self: center;
	display: block;
	padding: 1.5rem 1rem 0;
}
.strich {
	display: block;
	width: 1px;
	height: 3.5rem;
	background: linear-gradient(var(--weiss), transparent);
	animation: tropfen 2.4s cubic-bezier(.6, 0, .4, 1) infinite;
	transform-origin: top;
}
@keyframes tropfen {
	0% { transform: scaleY(0); opacity: 1; }
	60% { transform: scaleY(1); opacity: 1; }
	100% { transform: scaleY(1); opacity: 0; }
}

/* Sprachwahl oben rechts */
.sprache { display: flex; gap: 0.6em; }
.sprache a { text-decoration: none; color: var(--grau); transition: color .2s; }
.sprache a:hover { color: var(--weiss); }
.sprache a[aria-current] { color: var(--weiss); }

/* B, C, T in Bitcoin-Orange. Das B trägt die Striche des ₿. */
.titel .btc { color: var(--orange); }
.kontur .btc { color: var(--schwarz); -webkit-text-stroke-color: var(--orange); }
.btc-b { position: relative; display: inline-block; }
.btc-b::before, .btc-b::after {
	content: '';
	position: absolute;
	left: 0.2em;
	width: 0.075em;
	height: 0.13em;
	background: var(--orange);
	box-shadow: 0.205em 0 0 var(--orange);
}
.btc-b::before { top: var(--btc-oben, 0.02em); }
.btc-b::after { bottom: var(--btc-unten, 0.02em); }

/* Auftakt erscheint einmal, dann ist Ruhe. */
.zeile, .kennung, .unterzeile {
	animation: auf 1.4s cubic-bezier(.16, 1, .3, 1) both;
}
.zeile.voll { animation-delay: .1s; }
.zeile.kontur { animation-delay: .25s; }
.unterzeile { animation-delay: .5s; }
@keyframes auf {
	from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
	to { opacity: 1; transform: none; filter: none; }
}

/* ---------- Text ---------- */

.text {
	padding: clamp(5rem, 14vw, 11rem) var(--rand) clamp(4rem, 10vw, 8rem);
}
article {
	max-width: var(--spalte);
	margin: 0 auto;
	hyphens: auto;
	-webkit-hyphens: auto;
	hanging-punctuation: first;
}

article p { margin: 0 0 1.55em; }

.einstieg {
	font-size: 1.32em;
	line-height: 1.5;
	font-weight: 500;
	letter-spacing: -0.012em;
	margin-bottom: 1.8em !important;
}
.einstieg::first-letter {
	float: left;
	font-size: 4.1em;
	line-height: 0.8;
	font-weight: 900;
	margin: 0.06em 0.09em 0 -0.04em;
}

/* Kapitel: Nummer in Monospace, Titel groß. */
article h2 {
	margin: 4.2em 0 1.6em;
	padding-top: 1.2em;
	border-top: 1px solid var(--linie);
	display: grid;
	gap: 0.9rem;
	scroll-margin-top: 4rem;
}
.ziffer {
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--grau);
}
.name {
	font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.2rem);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.028em;
	hyphens: manual;
	text-wrap: balance;
}

blockquote {
	margin: 2.6em 0;
	padding: 0;
}
/* Auf breiten Schirmen bricht das Zitat aus der Spalte aus. */
@media (min-width: 900px) {
	blockquote { margin-inline: -5rem; }
}
blockquote p {
	margin: 0 !important;
	font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.7rem);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.03em;
	hyphens: manual;
	text-wrap: balance;
}
blockquote p::before { content: '„'; }
blockquote p::after { content: '“'; }

.zahl {
	margin: 3.2em 0;
	text-align: center;
}
.wert {
	display: block;
	font-weight: 900;
	font-size: clamp(2.6rem, 1.2rem + 7vw, 6.5rem);
	letter-spacing: -0.05em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.zahl figcaption {
	margin-top: 1rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--grau);
}


em { font-style: italic; }
strong { font-weight: 700; }

/* Titelblock über dem Essay */
.kopf { margin-bottom: 4.5em; }
.dach {
	margin: 0 0 1.6rem !important;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--grau);
}
.essaytitel {
	margin: 0 0 1.4rem;
	font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem);
	line-height: 0.98;
	font-weight: 900;
	letter-spacing: -0.045em;
	hyphens: manual;
	text-wrap: balance;
}
@media (min-width: 900px) {
	.kopf { margin-inline: -5rem; }
}
.dek {
	margin: 0 !important;
	font-size: 1.15em;
	line-height: 1.5;
	font-style: italic;
	font-weight: 400;
	color: #c8c8c8;
	max-width: 32em;
}

/* Kernsätze: fett gesetzte Absätze des Essays. */
.kern {
	margin: 2.2em 0 !important;
	padding-left: 1.2rem;
	border-left: 2px solid var(--weiss);
	font-size: 1.22em;
	line-height: 1.42;
	font-weight: 700;
	letter-spacing: -0.015em;
}

/* Schlussfrage: der letzte fette Satz, ganz groß. */
.schluss {
	margin: 3em 0 0 !important;
	font-size: clamp(2rem, 1.2rem + 4vw, 4.2rem);
	line-height: 1.02;
	font-weight: 900;
	letter-spacing: -0.045em;
	hyphens: manual;
	text-wrap: balance;
}
@media (min-width: 900px) {
	.schluss { margin-inline: -5rem !important; }
}

/* Laufkopf: zeigt beim Lesen das aktuelle Kapitel (schmale Schirme). */
.laufkopf {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9;
	padding: 0.95rem var(--rand) 0.85rem;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.2em;
	font-family: var(--mono);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--grau);
	background: linear-gradient(#000 60%, rgba(0, 0, 0, 0));
	opacity: 0;
	transform: translateY(-100%);
	transition: opacity .5s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
	pointer-events: none;
}
.laufkopf.an { opacity: 1; transform: none; pointer-events: auto; }
.laufkopf p { margin: 0; display: flex; gap: 1.2em; min-width: 0; }
.laufkopf .nr { color: var(--orange); }
.laufkopf .nm {
	color: var(--weiss);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.inhalt-knopf {
	flex: none;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: var(--weiss);
	background: none;
	border: 1px solid #3a3a3a;
	padding: 0.45em 0.8em;
	cursor: pointer;
}
.inhalt-knopf:hover { border-color: var(--weiss); }

/* ---------- Leiste: das Inhaltsverzeichnis als Kette von Blöcken ---------- */
.leiste {
	display: none;
	position: fixed;
	left: var(--rand);
	top: 50%;
	z-index: 8;
	width: 13rem;
	transform: translate(-0.6rem, -50%);
	opacity: 0;
	transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
	pointer-events: none;
}
.leiste.an { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.leiste ol, .inhalt-dialog ol { list-style: none; margin: 0; padding: 0; }
.leiste li { position: relative; }
.leiste a {
	display: grid;
	grid-template-columns: 9px 1.6rem 1fr;
	align-items: center;
	gap: 0.7rem;
	padding: 0.34rem 0;
	text-decoration: none;
	color: var(--grau);
}
.kloetzchen {
	width: 9px;
	height: 9px;
	border: 1px solid #4a4a4a;
	background: var(--schwarz);
	position: relative;
	z-index: 1;
	transition: background .4s, border-color .4s, transform .4s;
}
.tnr { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; }
.tnm {
	font-size: 0.78rem;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color .3s;
}
.leiste a:hover .tnm, .leiste a:hover .tnr { color: var(--weiss); }
.leiste a.gelesen .kloetzchen { background: var(--weiss); border-color: var(--weiss); }
.leiste a.aktiv .kloetzchen { background: var(--orange); border-color: var(--orange); transform: scale(1.35); }
.leiste a.aktiv .tnr { color: var(--orange); }
.leiste a.aktiv .tnm { color: var(--weiss); }
/* Der Faden verbindet die Blöcke und füllt sich beim Lesen. */
.faden {
	position: absolute;
	left: 4px;
	top: 0.95rem;
	bottom: 0.95rem;
	width: 1px;
	background: #2a2a2a;
}
.faden span {
	position: absolute;
	inset: 0;
	background: var(--orange);
	transform-origin: top;
	transform: scaleY(var(--faden, 0));
	transition: transform .25s linear;
}
@media (min-width: 1320px) {
	.leiste { display: block; }
	.laufkopf { display: none; }
}

/* ---------- Inhalt als Vollbild (schmale Schirme) ---------- */
.inhalt-dialog {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: var(--rand);
	border: 0;
	background: var(--schwarz);
	color: var(--weiss);
	overflow-y: auto;
}
.inhalt-dialog::backdrop { background: var(--schwarz); }
.inhalt-dialog[open] { animation: auf .6s cubic-bezier(.16, 1, .3, 1); }
.dialog-kopf {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 2rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--grau);
}
.dialog-kopf .zu {
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: var(--weiss);
	background: none;
	border: 1px solid #3a3a3a;
	padding: 0.45em 0.8em;
	cursor: pointer;
}
.inhalt-dialog a {
	display: grid;
	grid-template-columns: 9px 2rem 1fr;
	align-items: baseline;
	gap: 0.9rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--linie);
	text-decoration: none;
	color: var(--weiss);
}
.inhalt-dialog .kloetzchen { align-self: center; }
.inhalt-dialog .tnr { color: var(--grau); }
.inhalt-dialog .tnm { font-size: 1.05rem; font-weight: 500; white-space: normal; }
.inhalt-dialog a.gelesen .kloetzchen { background: var(--weiss); border-color: var(--weiss); }
.inhalt-dialog a.aktiv .kloetzchen { background: var(--orange); border-color: var(--orange); }
.inhalt-dialog a.aktiv .tnr { color: var(--orange); }

/* ---------- Mining-Zeile im Auftakt ---------- */
.mining {
	margin: 0 0 1.1rem;
	display: flex;
	gap: 1.4em;
	min-width: 0;
	font-family: var(--mono);
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5a5a5a;
	animation: auf 1.4s cubic-bezier(.16, 1, .3, 1) .7s both;
}
.mining span { white-space: nowrap; }
.m-status { color: var(--grau); }
.m-nonce { min-width: 9em; font-variant-numeric: tabular-nums; }
.m-hash { overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.mining.gefunden .m-status, .mining.gefunden .m-hash { color: var(--orange); }

/* ---------- Blockkopf unter jeder Kapitelüberschrift ---------- */
.blockkopf {
	margin: -0.6rem 0 2.2em !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 1.4em;
	font-family: var(--mono);
	font-size: 0.64rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5a5a5a;
	hyphens: none;
}
.blockkopf .hash { text-transform: none; }
.blockkopf .ok { color: var(--orange); }
.block.gebrochen .blockkopf { color: #c0392b; }

/* ---------- Grafiken ---------- */
.grafik { margin: 3.2em 0; }
.grafik svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafik figcaption, .zahl figcaption {
	margin-top: 1rem;
	font-family: var(--mono);
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--grau);
	text-align: center;
	hyphens: none;
}
.grafik text { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; fill: var(--grau); }
.kurve .raster line { stroke: #2e2e2e; stroke-width: 1; }
.kurve .bruch { fill: none; stroke: var(--grau); stroke-width: 1; }
.kurve .linie {
	fill: none;
	stroke: var(--weiss);
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
}
.kurve .heute line { stroke: var(--orange); stroke-width: 1; stroke-dasharray: 2 3; }
.kurve .heute circle { fill: var(--orange); }
.kurve .heute text { fill: var(--orange); }
.bewegt .kurve .linie { transition: stroke-dashoffset 2.6s cubic-bezier(.45, 0, .2, 1) .2s; }
.bewegt .kurve .heute { transition: opacity .8s ease 2.4s; }
.bewegt .kurve:not(.da) .linie { stroke-dashoffset: 1; }
.bewegt .kurve:not(.da) .heute { opacity: 0; }

.qubit svg { max-width: 280px; margin: 0 auto; }
.qubit .draht { fill: none; stroke: #3a3a3a; stroke-width: 1; }
.qubit .draht circle { stroke: #6a6a6a; }
.qubit .vektor { stroke: var(--orange); stroke-width: 2; stroke-linecap: round; }
.qubit .spitze { fill: var(--orange); }
.qubit .mitte { fill: var(--weiss); }
.qubit text { font-size: 13px; }

/* Absätze tauchen beim Lesen sanft auf (nur mit JS, nur ohne reduzierte Bewegung). */
.bewegt .kopf, .bewegt .block > * {
	transition: opacity 1.1s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1);
}
.bewegt .kopf:not(.da), .bewegt .block > :not(.da) {
	opacity: 0;
	transform: translateY(1.2rem);
}

/* ---------- Ende ---------- */

.ende {
	padding: 0 var(--rand) var(--rand);
	display: grid;
	justify-items: center;
	gap: 2.5rem;
}
.ende .zeichen { font-size: 1rem; color: var(--orange); }
.ende p {
	margin: 0;
	width: 100%;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--linie);
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--grau);
}
.ende p + p { border-top: 0; padding-top: 0; margin-top: -1.6rem; }
.kette .k-status { transition: color .4s; }
.kette.heil .k-status { color: var(--orange); }
.kette.kaputt .k-status { color: #c0392b; }
.nachoben { text-decoration: none; }
.nachoben:hover { color: var(--weiss); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
