/* Base: reset, typography, links, focus, motion (design-system sections 3.3, 5). */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {

	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: 400;
	line-height: 1.65;
	color: var(--c-text);
	background: var(--c-paper);
	font-feature-settings: "kern", "liga";
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizelegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--space-4);
	font-weight: 700;
	text-wrap: balance;
	hyphens: manual;
	scroll-margin-top: calc(var(--header-h) + 16px);
}

h1 {
	font-size: var(--text-4xl);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

h2 {
	font-size: var(--text-3xl);
	line-height: 1.15;
	letter-spacing: -0.015em;
}

h3 {
	font-size: var(--text-xl);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

h4 {
	font-size: var(--text-lg);
	font-weight: 600;
	line-height: 1.3;
}

p,
ul,
ol,
dl,
blockquote,
figure,
table {
	margin: 0 0 var(--space-4);
}

p {
	text-wrap: pretty;
}

:lang(de) {
	hyphens: auto;
}

small {
	font-size: var(--text-sm);
	color: var(--c-ink-3);
}

code,
kbd,
samp,
pre {
	font-family: var(--font-mono);
	font-size: 0.9em;
	line-height: 1.6;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

hr {
	border: 0;
	border-top: var(--border);
	margin-block: var(--space-8);
}

.nbt-t-num {
	font-variant-numeric: tabular-nums slashed-zero;
}

/* Links */
a {
	color: var(--c-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--c-link-hover);
	text-decoration-thickness: 2px;
}

a:active {
	color: var(--c-brand-active);
}

/* Focus: never remove the outline without a replacement. */
:focus-visible {
	outline: 3px solid var(--c-focus);
	outline-offset: 3px;
	border-radius: var(--radius-xs);
}

:focus:not(:focus-visible) {
	outline: none;
}

.nbt-on-night :focus-visible,
.nbt-on-brand :focus-visible {
	outline-color: var(--c-focus-night);
}

.nbt-on-brand :focus-visible {
	outline-color: #fff;
}

::selection {
	background: var(--c-cyan);
	color: var(--c-ink);
}

/* Visually hidden, still available to assistive technology. */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
