/* Grundlage: Reset und die Plattform-Details, die eine Seite am Handy wie eine App wirken lassen. */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  background: var(--kalk);
}

body {
  margin: 0;
  font: 400 var(--t-body)/1.55 var(--font);
  color: var(--fels);
  background: var(--kalk);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

a { color: inherit; }

/* Steuerelemente: sofort reagieren, kein Doppeltipp-Zoom, Beschriftung nicht markierbar */
button, a, [role="button"], summary, label, select {
  touch-action: manipulation;
}
button, [role="button"], summary, .chip, .btn {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* 16px in Eingabefeldern, sonst zoomt iOS beim Antippen hinein */
input, select, textarea { font: inherit; font-size: max(16px, 1rem); color: inherit; }

:focus-visible {
  outline: 2px solid var(--enzian);
  outline-offset: 3px;
  border-radius: 6px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-3) var(--s-4); background: var(--fels); color: var(--kalk-hell);
  border-radius: var(--r-s);
}
.skip:focus { top: var(--s-4); }

.wrap {
  width: 100%;
  max-width: calc(var(--breite) + 2 * var(--rand));
  margin-inline: auto;
  padding-inline: max(var(--rand), env(safe-area-inset-left)) max(var(--rand), env(safe-area-inset-right));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
