/* Base styles that theme.json cannot express. Keep this file short. */

html { scroll-behavior: smooth; }

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

/* Header, main and footer sit flush; sections set their own spacing. */
body .wp-site-blocks > * + * { margin-block-start: 0; }

::selection { background: rgba(42, 63, 214, 0.18); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--signal);
	outline-offset: 3px;
}

/* Links as in the design: a thin, faint underline that darkens on hover. */
a {
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	text-decoration-color: rgba(20, 21, 24, 0.3);
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover { text-decoration-color: currentColor; }

.mk-stack {
	display: flex;
	flex-direction: column;
	gap: 18px;
	max-width: 820px;
}

body .mk-stack > * { margin-block: 0; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font-family: var(--wp--preset--font-family--sans);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Paragraph style "Intro": the larger, lighter opening paragraph of a section. */
.is-style-intro {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: clamp(21px, 2vw, 25px);
	line-height: 1.5;
	color: var(--wp--preset--color--body);
	text-wrap: pretty;
}

/* Paragraph style "Side note": small sans text under a short dark rule. */
.is-style-note {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--meta);
}

.is-style-note::before {
	content: "";
	display: block;
	width: 28px;
	height: 1px;
	background: var(--wp--preset--color--ink);
	margin: 12px 0 14px;
}

/* Columns with a side note: text column three times the width of the note. */
body .mk-note-cols {
	gap: 20px 48px;
	margin: 0;
}

body .mk-note-cols > .wp-block-column:first-child {
	flex: 3 1 440px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

body .mk-note-cols > .wp-block-column:last-child {
	flex: 1 1 200px;
}

body .mk-note-cols > .wp-block-column > * {
	margin-block: 0;
}

body .mk-note-cols p:not([class*="is-style-"]) {
	font-size: 19px;
	line-height: 1.65;
	color: var(--wp--preset--color--body);
}

/* ---------- Blog posts (design/Post.dc.html) ---------- */
body .mk-post-body {
	max-width: 1040px;
	margin: 0 auto;
	box-sizing: border-box;
	padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 64px) 0;
}

body .mk-prose {
	display: flex;
	flex-direction: column;
	gap: 26px;
	color: var(--wp--preset--color--body);
}

body .mk-prose > * { margin-block: 0; max-width: 680px; }

.mk-prose p {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 20px;
	line-height: 1.72;
}

.mk-prose .is-style-lede {
	font-weight: 300;
	font-size: clamp(21px, 2vw, 24px);
	line-height: 1.6;
	color: var(--wp--preset--color--ink);
}

body .mk-prose > h2 {
	margin-top: 34px;
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 400;
	font-size: clamp(27px, 2.6vw, 34px);
	line-height: 1.2;
	letter-spacing: -0.012em;
}

body .mk-prose > h3 {
	margin-top: 20px;
	font-weight: 500;
	font-size: 23px;
	line-height: 1.3;
	letter-spacing: 0;
}

/* Pull quote: a short coloured bar, then large italic text. */
body .mk-prose > .wp-block-quote,
body .mk-prose > .wp-block-pullquote {
	margin-block: 24px;
	margin-inline: 0;
	max-width: 880px;
	padding: 0;
	border: 0;
	text-align: left;
}

.mk-prose .wp-block-quote::before,
.mk-prose .wp-block-pullquote::before {
	content: "";
	display: block;
	width: 44px;
	height: 2px;
	background: var(--wp--preset--color--signal);
	margin-bottom: 20px;
}

.mk-prose .wp-block-quote p,
.mk-prose .wp-block-pullquote p {
	font-style: italic;
	font-weight: 300;
	font-size: clamp(30px, 3.6vw, 48px);
	line-height: 1.18;
	letter-spacing: -0.015em;
	color: var(--wp--preset--color--ink);
}

.mk-prose .wp-block-quote cite,
.mk-prose .wp-block-pullquote cite {
	display: block;
	margin-top: 14px;
	font-family: var(--wp--preset--font-family--sans);
	font-style: normal;
	font-size: 14px;
	color: var(--wp--preset--color--meta);
}

.mk-prose ul,
.mk-prose ol {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 20px;
	line-height: 1.65;
	padding-left: 1.3em;
}

.mk-prose li + li { margin-top: 0.35em; }

.mk-prose figure.wp-block-image,
.mk-prose .wp-block-embed,
.mk-prose .mk-video-embed { max-width: 880px; }

body .mk-prose > .mk-spec { max-width: 880px; }

.mk-prose figcaption,
.mk-prose .wp-element-caption {
	margin-top: 12px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	line-height: 1.55;
	color: var(--wp--preset--color--meta);
}

.mk-prose code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.85em;
	background: var(--wp--preset--color--panel);
	padding: 0.1em 0.35em;
	border-radius: 3px;
}

.mk-prose pre.wp-block-code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 15px;
	line-height: 1.6;
	background: var(--wp--preset--color--panel);
	padding: 16px 18px;
	border-radius: 3px;
	overflow-x: auto;
}

.mk-prose pre.wp-block-code code { background: none; padding: 0; }

/* References: a heading and a numbered list at the end of a post. */
body .mk-prose > .mk-refs {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--wp--preset--color--ink);
}

.mk-refs h2 {
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0;
	line-height: 1.4;
	color: var(--wp--preset--color--ink);
}

.mk-prose .mk-refs ol,
.mk-prose .mk-refs ul {
	margin: 0;
	padding: 0 0 0 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	line-height: 1.55;
	color: #45484e;
}

.mk-prose .mk-refs li + li { margin-top: 0; }

/* YouTube click-to-play */
.mk-video-embed { margin: 0; }

.mk-video-embed__play,
.mk-video-embed__frame {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 2px;
	padding: 0;
	overflow: hidden;
	background: #0b0c10;
	cursor: pointer;
}

.mk-video-embed__play img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mk-video-embed__play:hover img { transform: scale(1.02); }

.mk-video-embed__icon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 68px;
	margin: -34px 0 0 -34px;
	border-radius: 50%;
	background: rgba(7, 8, 12, 0.78);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.mk-video-embed__play:hover .mk-video-embed__icon { background: var(--wp--preset--color--signal); }

.mk-video-embed figcaption { display: flex; flex-direction: column; gap: 4px; }

.mk-video-embed__note { font-size: 13px; }

/* Empty blog: a flat spectrum, no lines yet (flat_spectrum() in the plugin). */
.mk-flat__plot {
	position: relative;
	height: 96px;
	overflow: hidden;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.mk-flat--strip .mk-flat__plot {
	height: 56px;
}

.mk-flat__plot svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.mk-flat__plot path {
	fill: none;
	stroke: var(--wp--preset--color--meta);
	stroke-width: 1.25;
	vector-effect: non-scaling-stroke;
}

.mk-flat__scan {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -160px;
	width: 160px;
	border-right: 1px solid var(--wp--preset--color--signal);
	background: linear-gradient(90deg, rgba(42, 63, 214, 0), rgba(42, 63, 214, 0.1));
	animation: mk-flat-scan 8s linear infinite;
}

@keyframes mk-flat-scan {
	to { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.mk-flat__scan { display: none; }
}

.mk-flat__text {
	margin-top: 28px;
}

.mk-flat p {
	margin: 0;
}

.mk-flat .mk-flat__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--meta);
}

.mk-flat .mk-flat__title {
	margin-top: 10px;
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--ink);
}

.mk-flat--strip .mk-flat__title {
	font-size: clamp(24px, 2.2vw, 30px);
}

.mk-flat .mk-flat__lede {
	margin-top: 12px;
	max-width: 560px;
	font-size: 17px;
	line-height: 1.55;
	color: #45484e;
}

.mk-flat .mk-flat__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 28px;
	margin-top: 16px;
}

.mk-flat__links a {
	display: inline-block;
	padding: 8px 0;
	color: var(--wp--preset--color--signal);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

.mk-blog--empty {
	padding-bottom: 24px;
}

/* Plain pages (Impressum, privacy): quiet headings for long legal text. */
body.page-template-default .wp-block-post-content h2.wp-block-heading {
	margin-top: 2em;
	margin-bottom: 0.5em;
	font-size: clamp(22px, 2vw, 26px);
	line-height: 1.25;
}

body.page-template-default .wp-block-post-content > h2.wp-block-heading:first-child {
	margin-top: 1em;
}

.mk-address mark {
	background: #fff3c4;
	color: inherit;
	padding: 0 4px;
}
