/* Reset, Basistypografie, Fokus-Stile. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3);
  line-height: var(--line-height-tight);
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }

p {
  margin: 0 0 var(--space-4);
  max-width: 68ch;
}

ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  max-width: 68ch;
}

li { margin-bottom: var(--space-2); }

a {
  color: var(--color-primary-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

strong { font-weight: 650; }

code, kbd, samp, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.94em;
}

code {
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

pre {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
}

input, select {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
}

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

/* Sichtbar nur für Screenreader */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-2);
}
