/* Grundlagen */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
  color: var(--color-text);
}

h1 { font-size: var(--h1); font-weight: 500; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 600; }

p, ul, ol, dl, address { margin: 0 0 var(--space-4); }
p, li { max-width: var(--measure); }
address { font-style: normal; }

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--duration) var(--ease);
}

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

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus { outline: none; }

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--color-surface-alt);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

mark.todo {
  background: var(--color-warning-soft);
  color: #6B4A12;
  border: 1px dashed var(--color-warning-line);
  border-radius: 4px;
  padding: 0 0.3em;
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-small);
  font-weight: 600;
}

.skip-link:focus { top: var(--space-4); color: #fff; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -0.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--color-text);
}

.muted { color: var(--color-text-muted); font-size: var(--text-small); }
.center { text-align: center; }
.center > * { margin-inline: auto; }
