/* Shared by every design: reset, the design switcher and the switch transition.
   Each design's own stylesheet is scoped to :root[data-design="<id>"]. */

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

:root {
  --ds-h: 44px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

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

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 1000;
  padding: 8px 14px;
  background: #fff;
  color: #000;
  font: 600 14px/1.2 system-ui, sans-serif;
  border-radius: 6px;
}
.skip:focus {
  top: 8px;
}

/* ── Design switcher ─────────────────────────────────────────── */

#ds.ds {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--ds-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: #000;
  color: #fff;
  font: 500 13px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.14);
}

#ds .ds-label {
  color: rgb(255 255 255 / 0.62);
  white-space: nowrap;
}

#ds .ds-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  list-style: none;
  background: rgb(255 255 255 / 0.1);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
#ds .ds-list::-webkit-scrollbar {
  display: none;
}

#ds .ds-list a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
#ds .ds-list a:hover {
  background: rgb(255 255 255 / 0.14);
}
#ds .ds-list a[aria-current='page'] {
  background: #fff;
  color: #000;
}
#ds .ds-list a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#ds .ds-key {
  font-size: 11px;
  opacity: 0.5;
}

#ds .ds-hint {
  margin-left: auto;
  color: rgb(255 255 255 / 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ds .ds-motion {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
#ds .ds-motion svg {
  fill: currentColor;
}
#ds .ds-motion:hover {
  background: rgb(255 255 255 / 0.14);
}
#ds .ds-motion[aria-pressed='true'] {
  background: #fff;
  color: #000;
}
#ds .ds-motion:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  #ds .ds-motion {
    padding: 7px;
  }
  #ds .ds-motion-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  #ds.ds {
    gap: 8px;
    padding: 0 8px;
  }
  #ds .ds-label,
  #ds .ds-hint,
  #ds .ds-key {
    display: none;
  }
  #ds .ds-list {
    flex: 1;
  }
  #ds .ds-list a {
    padding: 7px 8px;
    font-size: 12px;
  }
  #ds .ds-list {
    gap: 0;
  }
}

/* Without JavaScript the links still work: each design is its own prerendered page. */

/* ── Switch transition: new design grows as a circle from the clicked button ── */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation: ds-reveal 0.75s cubic-bezier(0.65, 0, 0.25, 1) both;
}
@keyframes ds-reveal {
  from {
    clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0));
  }
  to {
    clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0));
  }
}

:root[data-motion='off']::view-transition-new(root) {
  animation: none;
}

/* ── Legal pages (Impressum, Datenschutz) ── */

.legal {
  max-width: 68ch;
  margin: 0 auto;
  padding: 48px 20px 80px;
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  background: #fff;
}
.legal h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 24px;
}
.legal h2 {
  font-size: 19px;
  margin: 32px 0 8px;
}
.legal a {
  color: #1d4ed8;
}
.legal .back {
  display: inline-block;
  margin-bottom: 32px;
}
