/* ==========================================================================
   TestEliasConradWebsite - Aesthetik nach avatars.outpacestudios.com
   Die Werte unten sind am Vorbild gemessen (16.09.2026, Chrome, 1728 px):
   Grund #0a0a0a, Inter 30/36/550/-0.4px, Weiss in Deckkraftstufen,
   Karten Weiss 4 %, Pillen Weiss 8 %, Radius 20, Rasterluecke 8.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("assets/fonts/geist-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --grund: #0a0a0a;
  --w-96: rgb(255 255 255 / 0.96);
  --w-92: rgb(255 255 255 / 0.92);
  --w-88: rgb(255 255 255 / 0.88);
  --w-72: rgb(255 255 255 / 0.72);
  --w-56: rgb(255 255 255 / 0.56);
  --w-48: rgb(255 255 255 / 0.48);
  --w-40: rgb(255 255 255 / 0.5); /* Vorbild 0.4 - fuer WCAG-Kontrast 4.5:1 angehoben */
  --w-24: rgb(255 255 255 / 0.24);
  --w-14: rgb(255 255 255 / 0.14);
  --w-08: rgb(255 255 255 / 0.08);
  --w-06: rgb(255 255 255 / 0.06);
  --w-04: rgb(255 255 255 / 0.04);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --rand: 24px;
  --luecke: 8px;
  --radius: 20px;
  --spalten: 5;

  --feder: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  background: var(--grund);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grund);
  color: #fff;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--w-48);
  outline-offset: 2px;
  border-radius: 8px;
}

::selection {
  background: rgb(255 255 255 / 0.2);
}

.logo-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Kopfleiste
   -------------------------------------------------------------------------- */

.kopf-schleier {
  position: fixed;
  inset: 0 0 auto;
  height: 80px;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(var(--grund) 0%, rgb(10 10 10 / 0) 100%);
}

.kopf {
  position: fixed;
  top: 16px;
  left: var(--rand);
  right: var(--rand);
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 35px;
}

.marke {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #fff;
}

.marke-punkt {
  width: 14px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
}

.marke-text {
  font-size: 15px;
  line-height: 12px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.kopf-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.kopf-nav a {
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-48);
  transition: color 150ms ease;
}

.kopf-nav a:hover,
.kopf-nav a[aria-current="true"] {
  color: var(--w-96);
}

.kopf-rechts {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pille: 14/550, Polster 10 14 10 12, Weiss 8 % - wie "Figma" / "GitHub 130" */
.pille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 10px 12px;
  border-radius: 999px;
  background: var(--w-08);
  color: var(--w-96);
  font-size: 14px;
  line-height: 14px;
  font-weight: 550;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

a.pille:hover {
  background: var(--w-14);
}

.pille-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.pille-zahl {
  color: var(--w-48);
  font-variant-numeric: tabular-nums;
}

.pille-klein {
  padding: 8px 12px 8px 14px;
  font-size: 13px;
  line-height: 13px;
}

.pille-hell {
  background: #fff;
  color: var(--grund);
}

a.pille-hell:hover {
  background: rgb(255 255 255 / 0.86);
}

.live-punkt {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 3px rgb(61 220 132 / 0.18);
}

/* --------------------------------------------------------------------------
   Kopfbereich der Seite
   -------------------------------------------------------------------------- */

.seite {
  padding: 140px var(--rand) 0;
}

.held {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.held h1 {
  margin: 0;
  max-width: 20em;
  font-size: 30px;
  line-height: 36px;
  font-weight: 550;
  letter-spacing: -0.4px;
  color: var(--w-92);
  text-wrap: balance;
}

.held h1 > span {
  display: block;
}

/* Befehlszeile: die "npm i"-Pille, hier mit der Mailadresse */
.befehl {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 8px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--w-08);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.befehl:hover {
  background: rgb(255 255 255 / 0.1);
}

.befehl-prompt,
.befehl-text {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
}

.befehl-prompt {
  color: var(--w-40);
}

.befehl-text {
  color: var(--w-88);
}

.befehl-knopf {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--w-48);
  transition: color 150ms ease, background-color 150ms ease;
}

.befehl:hover .befehl-knopf {
  color: var(--w-96);
  background: var(--w-06);
}

.befehl-knopf svg {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  transition: opacity 200ms ease, transform 300ms var(--feder);
}

.icon-ok {
  opacity: 0;
  transform: scale(0.5);
}

.befehl.kopiert .icon-kopie {
  opacity: 0;
  transform: scale(0.5);
}

.befehl.kopiert .icon-ok {
  opacity: 1;
  transform: scale(1);
  color: #3ddc84;
}

/* --------------------------------------------------------------------------
   Raster
   -------------------------------------------------------------------------- */

.raster {
  margin-top: 76px;
  display: grid;
  grid-template-columns: repeat(var(--spalten), minmax(0, 1fr));
  gap: var(--luecke);
}

.zelle {
  position: relative;
  margin: 0;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--w-04);
  overflow: hidden;
  isolation: isolate;
  scroll-margin-top: 80px;
  transition: background-color 200ms ease;
}

.zelle-gross {
  grid-column: span 2;
  grid-row: span 2;
  padding: 24px;
}

.zelle-breit {
  grid-column: 1 / -1;
  aspect-ratio: auto;
}

.zelle-kopf {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
  color: var(--w-40);
  pointer-events: none;
}

.zelle-kopf > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zelle-kopf a {
  pointer-events: auto;
  transition: color 150ms ease;
}

.zelle-kopf a:hover {
  color: var(--w-96);
}

.raster-titel {
  grid-column: 1 / -1;
  margin: 56px 0 8px;
  padding: 0 4px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-48);
  scroll-margin-top: 80px;
}

.raster-titel::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--w-06);
  transform: translateY(-4px);
}

/* Die Projektueberschrift steht im Code (fuer Suche und Vorleser), im Bild
   beginnt das Raster aber direkt mit Karten - wie im Vorbild. `absolute`
   nimmt sie aus dem Rasterfluss, sonst schoebe sie sich unter die grosse Karte. */
.raster > .raster-titel:first-of-type {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Grosse Karte: die Person
   -------------------------------------------------------------------------- */

.person {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 8px 0;
}

.portrait {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.8);
}

.person-name {
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 550;
  letter-spacing: -0.2px;
  color: var(--w-92);
}

.person-alter {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.14px;
  color: var(--w-40);
  font-variant-numeric: tabular-nums;
}

.person-text {
  margin-top: 20px;
  max-width: 400px;
}

.person-text p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-48);
  text-wrap: pretty;
}

.person-text strong {
  font-weight: 550;
  color: var(--w-72);
}

.icon-leiste {
  margin-top: 16px;
  display: flex;
  gap: 4px;
}

.icon-knopf {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--w-48);
  transition: color 150ms ease, background-color 150ms ease;
}

.icon-knopf:hover {
  color: var(--w-96);
  background: var(--w-06);
}

.icon-knopf svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Kugeln - die generativen Verlaeufe des Vorbilds, je Projekt eine eigene
   Palette. Bewusst ohne Lila: jede Kugel nimmt die Farbwelt des Projekts.
   -------------------------------------------------------------------------- */

.kugel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  transform: translateZ(0);
  transition: transform 500ms var(--feder), opacity 300ms ease, filter 300ms ease;
}

.kugel::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: var(--k);
  filter: blur(7px) saturate(1.2);
  animation: kreisen 18s linear infinite;
}

/* Licht von oben links, Schatten unten rechts - macht aus der Scheibe eine Kugel */
.kugel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / 0.14), transparent 46%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgb(0 0 0 / 0.12));
}

@keyframes kreisen {
  to { transform: rotate(360deg); }
}

.kugel-scooly {
  --k:
    radial-gradient(circle at 26% 44%, #dbeafe 0 18%, transparent 52%),
    radial-gradient(circle at 70% 30%, #2563eb 0 18%, transparent 52%),
    radial-gradient(circle at 30% 78%, #38bdf8 0 18%, transparent 52%),
    radial-gradient(circle at 78% 78%, #1e40af 0 18%, transparent 52%),
    radial-gradient(circle at 50% 50%, #93c5fd 0 18%, transparent 52%),
    #93c5fd;
}

.kugel-services {
  --k:
    radial-gradient(circle at 26% 30%, #ffe08a 0 18%, transparent 52%),
    radial-gradient(circle at 72% 34%, #ff4502 0 18%, transparent 52%),
    radial-gradient(circle at 34% 76%, #ffb020 0 18%, transparent 52%),
    radial-gradient(circle at 80% 80%, #e11d2e 0 18%, transparent 52%),
    radial-gradient(circle at 50% 52%, #ff8a3d 0 18%, transparent 52%),
    #ff8a3d;
}

.kugel-forma {
  --k:
    radial-gradient(circle at 28% 28%, #fbe7d6 0 18%, transparent 52%),
    radial-gradient(circle at 74% 36%, #c98b6b 0 18%, transparent 52%),
    radial-gradient(circle at 30% 78%, #f2b8a0 0 18%, transparent 52%),
    radial-gradient(circle at 78% 80%, #a86b50 0 18%, transparent 52%),
    radial-gradient(circle at 50% 52%, #f5d5c0 0 18%, transparent 52%),
    #f5d5c0;
}

.kugel-topspin {
  --k:
    radial-gradient(circle at 26% 28%, #f5f542 0 18%, transparent 52%),
    radial-gradient(circle at 74% 34%, #10b981 0 18%, transparent 52%),
    radial-gradient(circle at 30% 78%, #a3e635 0 18%, transparent 52%),
    radial-gradient(circle at 80% 80%, #0d9488 0 18%, transparent 52%),
    radial-gradient(circle at 50% 52%, #d9f99d 0 18%, transparent 52%),
    #d9f99d;
}

.kugel-progress {
  --k:
    radial-gradient(circle at 26% 28%, #ffd166 0 18%, transparent 52%),
    radial-gradient(circle at 74% 36%, #e11d48 0 18%, transparent 52%),
    radial-gradient(circle at 32% 78%, #ff7a2f 0 18%, transparent 52%),
    radial-gradient(circle at 78% 80%, #9f1239 0 18%, transparent 52%),
    radial-gradient(circle at 50% 52%, #ffad66 0 18%, transparent 52%),
    #ffad66;
}

.kugel-web {
  --k:
    radial-gradient(circle at 26% 30%, #fef08a 0 18%, transparent 52%),
    radial-gradient(circle at 74% 32%, #0ea5e9 0 18%, transparent 52%),
    radial-gradient(circle at 30% 78%, #34d399 0 18%, transparent 52%),
    radial-gradient(circle at 80% 80%, #0369a1 0 18%, transparent 52%),
    radial-gradient(circle at 50% 52%, #a7f3d0 0 18%, transparent 52%),
    #a7f3d0;
}

/* Pausiert: dieselbe Kugel, nur gedaempft */
#forma .kugel {
  filter: saturate(0.7);
}

/* --------------------------------------------------------------------------
   Projektkarten
   -------------------------------------------------------------------------- */

.projekt {
  cursor: pointer;
}

.projekt:hover {
  background: var(--w-06);
}

.projekt-fuss {
  position: absolute;
  left: 20px;
  right: 56px;
  bottom: 18px;
  z-index: 2;
  transition: opacity 250ms ease, transform 400ms var(--feder);
}

.projekt-fuss h3 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-92);
}

.projekt-fuss p {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--w-40);
}

.marker {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--w-08);
  font-size: 9px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--w-48);
  vertical-align: 1px;
}

/* Der volle Text steht in der Karte (fuer die Suche), gezeigt wird er im Dialog. */
.projekt-text {
  display: none;
}

/* Desktop mit Maus: der Text erscheint beim Zeigen direkt in der Karte.
   Touch-Geraete (Handy, iPad) oeffnen stattdessen den Dialog - siehe Skript. */
@media (hover: hover) and (pointer: fine) {
  .projekt {
    cursor: default;
  }

  .projekt-text {
    display: block;
    position: absolute;
    inset: 48px 20px 58px;
    z-index: 2;
    overflow-y: auto;
    scrollbar-width: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 250ms ease, transform 400ms var(--feder), visibility 0s linear 250ms;
  }

  .projekt-text::-webkit-scrollbar {
    display: none;
  }

  .projekt-text p {
    margin: 0;
    font-size: 13px;
    line-height: 20px;
    color: var(--w-72);
    text-wrap: pretty;
  }

  .projekt:is(:hover, :focus-within) .kugel {
    opacity: 0;
    transform: scale(0.6);
    filter: blur(8px);
  }

  .projekt:is(:hover, :focus-within) .projekt-fuss {
    opacity: 0;
    transform: translateY(6px);
  }

  .projekt:is(:hover, :focus-within) .projekt-text {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 60ms, 60ms, 0s;
  }

  .projekt:is(:hover, :focus-within) .zelle-schalter svg {
    transform: rotate(45deg);
  }

  /* Am Desktop ist das Plus nur Anzeige - es oeffnet nichts. */
  .projekt .zelle-schalter {
    pointer-events: none;
  }
}

.mini-links {
  display: flex;
  gap: 2px;
  margin-top: 10px !important;
}

.mini-links a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--w-48);
  transition: color 150ms ease, background-color 150ms ease;
}

.mini-links a:hover {
  color: var(--w-96);
  background: var(--w-06);
}

.mini-links svg {
  width: 14px;
  height: 14px;
}

.zelle-schalter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--w-06);
  color: var(--w-48);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.zelle-schalter:hover {
  background: var(--w-14);
  color: var(--w-96);
}

.zelle-schalter svg {
  width: 16px;
  height: 16px;
  transition: transform 400ms var(--feder);
}



/* --------------------------------------------------------------------------
   Fotokarten
   -------------------------------------------------------------------------- */

.foto-zelle picture {
  position: absolute;
  inset: 0;
  display: block;
}

.foto-zelle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 700ms var(--feder);
}

.foto-zelle:hover img {
  transform: scale(1.04);
}

.foto-zelle::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgb(0 0 0 / 0.5), transparent 28%),
    linear-gradient(transparent 55%, rgb(0 0 0 / 0.7));
}

.foto-zelle .zelle-kopf {
  color: var(--w-72);
}

.foto-zelle figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--w-92);
}

.weiter-zelle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.weiter-zelle:hover {
  background: var(--w-06);
}

.weiter-zahl {
  font-size: 30px;
  line-height: 36px;
  font-weight: 550;
  letter-spacing: -0.4px;
  color: var(--w-92);
  font-variant-numeric: tabular-nums;
}

.weiter-text {
  font-size: 13px;
  line-height: 20px;
  color: var(--w-48);
}

.weiter-zelle .pille {
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Fragen und Kontakt
   -------------------------------------------------------------------------- */

.frage,
.kontakt-zelle {
  display: flex;
  flex-direction: column;
  padding: 56px 20px 20px;
}

.frage h3,
.kontakt-zelle h3 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-92);
}

.frage p,
.kontakt-zelle p {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-56);
  text-wrap: pretty;
}

.kontakt-zelle {
  justify-content: flex-end;
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(255 255 255 / 0.07), transparent 60%),
    var(--w-04);
}

.kontakt-zelle h3 {
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.kontakt-zelle .pille {
  align-self: flex-start;
  margin-top: 20px;
  max-width: 100%;
}

.kontakt-zelle .pille span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Commit-Aktivitaet
   -------------------------------------------------------------------------- */

.aktivitaet[hidden] {
  display: none;
}

.aktivitaet {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 24px 48px;
  padding: 56px 20px 20px;
}

.aktivitaet-kopf h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 550;
  letter-spacing: -0.2px;
  color: var(--w-92);
}

.aktivitaet-summe {
  margin: 4px 0 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--w-40);
  font-variant-numeric: tabular-nums;
}

.aktivitaet-herkunft {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-56);
}

.commit-liste {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--w-14) transparent;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
}

.commit-liste li {
  display: grid;
  grid-template-columns: 74px 44px minmax(0, max-content) 1fr;
  align-items: baseline;
  gap: 0 14px;
  padding: 5px 0;
  border-bottom: 1px solid var(--w-04);
}

.commit-liste li:last-child {
  border-bottom: 0;
}

.commit-liste li.commit-tagwechsel {
  margin-top: 10px;
}

.commit-liste li.commit-tagwechsel:first-child {
  margin-top: 0;
}

.commit-tag,
.commit-uhr {
  color: var(--w-40);
  font-variant-numeric: tabular-nums;
}

.commit-projekt {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--w-48);
}

.commit-anfang {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--w-88);
}

/* --------------------------------------------------------------------------
   Fuss
   -------------------------------------------------------------------------- */

.fuss {
  padding: 96px 0 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fuss-klein {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--w-48);
}

.fuss-name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--w-88);
  transition: color 150ms ease;
}

.fuss-name:hover {
  color: #fff;
}

.fuss-hinweis {
  margin: 32px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--w-40);
}

/* --------------------------------------------------------------------------
   Schwebender Umschalter (Gradient / Dither im Vorbild)
   -------------------------------------------------------------------------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%);
}

.umschalter {
  position: relative;
  display: flex;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--w-08);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.45), inset 0 0 0 1px var(--w-04);
}

/* Die helle Flaeche gleitet zum aktiven Knopf - Lage und Breite setzt das Skript.
   Sie liegt ueber dem ganzen Umschalter und wird per clip-path zugeschnitten:
   Das animiert nur das Zeichnen, nicht das Layout, und die Rundung bleibt rund
   (bei scaleX wuerde sie mitgestaucht). */
.umschalter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--w-14);
  clip-path: inset(
    4px
    calc(100% - var(--x, 0px) - var(--breite, 0px))
    4px
    var(--x, 0px)
    round 999px
  );
  transition: clip-path 450ms var(--feder);
}

.umschalter button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  line-height: 14px;
  font-weight: 550;
  color: var(--w-48);
  cursor: pointer;
  transition: color 200ms ease;
}

.umschalter button:hover,
.umschalter button[aria-pressed="true"] {
  color: var(--w-96);
}

/* Ohne Skript kein Gleiten - dann traegt der Knopf die Flaeche selbst. */
html:not(.js) .umschalter button[aria-pressed="true"] {
  background: var(--w-14);
}

.umschalter-punkt {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--w-14);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  color: var(--w-72);
}

.umschalter button[aria-pressed="true"] .umschalter-punkt {
  background: #fff;
  color: var(--grund);
}

/* --------------------------------------------------------------------------
   Cookie-Hinweis - dunkel, im Material des Umschalters
   -------------------------------------------------------------------------- */

.cookie-hinweis {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 70;
  width: min(400px, calc(100vw - 32px));
  padding: 20px 22px 22px;
  border-radius: var(--radius);
  background: rgb(22 22 22 / 0.82);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.45), inset 0 0 0 1px var(--w-06);
  overflow: hidden;
}

.cookie-hinweis[hidden] {
  display: none;
}

.cookie-hinweis .cookie-titel {
  margin: 0 0 6px;
  padding-right: 30px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-92);
}

.cookie-hinweis p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-56);
}

.cookie-hinweis p:last-of-type {
  margin-bottom: 0;
}

.cookie-hinweis.hat-figur p:last-of-type {
  margin-right: 170px;
  padding-bottom: 6px;
}

.cookie-figur {
  position: absolute;
  right: 0;
  bottom: -14px;
  width: 226px;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.cookie-hinweis:not(.hat-figur) .cookie-figur {
  display: none;
}

.cookie-tipp {
  border-bottom: 1px dotted var(--w-40);
  cursor: help;
}

.cookie-schliessen {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--w-06);
  color: var(--w-72);
  cursor: pointer;
}

.cookie-schliessen:hover {
  background: var(--w-14);
  color: #fff;
}

.cookie-schliessen svg {
  width: 14px;
  height: 14px;
  fill: none;
}

/* --------------------------------------------------------------------------
   Einlauf - wie das Vorbild beim Laden: kurz, weich, gestaffelt
   -------------------------------------------------------------------------- */

@keyframes auftauchen {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
}

.held h1,
.befehl,
.raster > .zelle {
  animation: auftauchen 700ms var(--feder) both;
  animation-delay: calc(var(--i, 0) * 40ms + 120ms);
}

.held h1 { --i: -2; }
.befehl { --i: 0; }

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

  .held h1,
  .befehl,
  .raster > .zelle,
  .kugel::before {
    animation: none;
  }

  .umschalter::before,
  .kugel,
  .projekt-fuss,
  .foto-zelle img {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Unterseite /bilder
   -------------------------------------------------------------------------- */

.bilder-raster {
  --spalten: 4;
}

.bilder-raster .foto-zelle,
.bilder-raster .weiter-zelle {
  aspect-ratio: 3 / 4;
  grid-column: auto;
}

/* Drei Spalten (Tablet): sieben Fotos plus eine doppelt breite Zurueck-Karte gehen ohne Luecke auf.
   Zwei Spalten (Handy): die Karte nimmt die ganze Zeile. */
@media (max-width: 1279px) {
  .bilder-raster .weiter-zelle { grid-column: span 2; aspect-ratio: auto; }
}

.film-zelle {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  padding: 56px 20px 20px;
}

.film-zelle video {
  display: block;
  width: min(100%, 832px);
  height: auto;
  aspect-ratio: 832 / 448;
  border-radius: 12px;
  background: #000;
}

.film-zelle figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-56);
}

.film-zelle a {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Projekt-Dialog - Material wie Umschalter und Cookie-Kasten
   -------------------------------------------------------------------------- */

.blatt {
  width: min(460px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: rgb(20 20 20 / 0.86);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.6), inset 0 0 0 1px var(--w-06);
  color: #fff;
  overflow: hidden;
}

.blatt::backdrop {
  background: rgb(0 0 0 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.blatt[open] {
  display: flex;
  flex-direction: column;
  animation: blatt-auf 420ms var(--feder) both;
}

.blatt[open]::backdrop {
  animation: schleier-auf 300ms ease both;
}

.blatt.schliesst {
  animation: blatt-zu 200ms ease-in both;
}

.blatt.schliesst::backdrop {
  animation: schleier-zu 200ms ease-in both;
}

@keyframes blatt-auf {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
}

@keyframes blatt-zu {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

@keyframes schleier-auf {
  from { opacity: 0; }
}

@keyframes schleier-zu {
  to { opacity: 0; }
}

.blatt-inhalt {
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px;
}

.blatt-inhalt::-webkit-scrollbar {
  display: none;
}

/* Die Buehne oben ist eine kleine Karte - dieselbe Flaeche wie im Raster. */
.blatt-buehne {
  position: relative;
  height: 220px;
  border-radius: 20px;
  background: var(--w-04);
  overflow: hidden;
}

.blatt-buehne .kugel {
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
}

.blatt-schliessen {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--w-08);
  color: var(--w-72);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.blatt-inhalt:focus {
  outline: none;
}

.blatt-schliessen:focus {
  outline: none;
}

.blatt-schliessen:focus-visible {
  background: var(--w-24);
  color: #fff;
}

.blatt-schliessen:hover {
  background: var(--w-14);
  color: #fff;
}

.blatt-schliessen svg {
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
}

.blatt-buehne .zelle-kopf {
  right: 60px;
}

.blatt-text {
  padding: 20px 16px 16px;
}

.blatt-text h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 550;
  letter-spacing: -0.2px;
  color: var(--w-92);
}

.blatt-rolle {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-40);
}

.blatt-beschreibung {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--w-72);
  text-wrap: pretty;
}

.blatt-fuss {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.blatt-fuss .mini-links {
  margin-top: 0 !important;
}

.blatt-fuss .pille {
  max-width: 100%;
}

.blatt-fuss .pille span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.blatt-fuss .pille[hidden],
.blatt-fuss .pille:empty,
.blatt-fuss .mini-links:empty {
  display: none;
}

/* Handy: Blatt von unten, volle Breite */
@media (max-width: 759px) {
  .blatt {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 40px);
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .blatt[open] {
    animation-name: blatt-hoch;
  }

  .blatt.schliesst {
    animation-name: blatt-runter;
  }

  .blatt-buehne {
    height: 180px;
  }

  .blatt-buehne .kugel {
    width: 104px;
    height: 104px;
    margin: -52px 0 0 -52px;
  }
}

@keyframes blatt-hoch {
  from { transform: translateY(100%); }
}

@keyframes blatt-runter {
  to { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .blatt[open],
  .blatt.schliesst,
  .blatt[open]::backdrop,
  .blatt.schliesst::backdrop {
    animation: none;
  }
}

html:has(.blatt[open]) {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Breakpoints - Handy-Regeln stehen am Ende, damit sie gewinnen
   -------------------------------------------------------------------------- */

@media (max-width: 1279px) {
  :root { --spalten: 4; }

  /* Bei vier Spalten deckt die grosse Karte drei Reihen - dann gehen
     die sechs Projekte ohne Loch auf. */
  .zelle-gross { grid-row: span 3; aspect-ratio: auto; }

  .bilder-raster { --spalten: 3; }
}

@media (max-width: 999px) {
  :root { --spalten: 3; }

  .zelle-gross {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: auto;
    padding: 56px 24px 32px;
  }

  .person { padding-top: 0; }

  .weiter-zelle,
  .kontakt-zelle {
    grid-column: span 2;
    aspect-ratio: auto;
  }

  .aktivitaet { grid-template-columns: 1fr; }

  .kopf-nav { gap: 14px; }
  .kopf-rechts .pille:not(.pille-still) span { display: none; }
  .kopf-rechts .pille:not(.pille-still) { padding: 10px; }
}

@media (max-width: 759px) {
  :root {
    --spalten: 2;
    --rand: 16px;
  }

  .kopf-nav { display: none; }
  .kopf { grid-template-columns: auto 1fr; }

  .seite { padding-top: 104px; }

  .held h1 {
    font-size: 26px;
    line-height: 32px;
  }

  .raster { margin-top: 56px; }

  .weiter-zelle { grid-column: span 2; min-height: 200px; }
  .kontakt-zelle { grid-column: 1 / -1; }

  /* Auf dem Handy etwas höher als quadratisch - der aufgeklappte Text hat sonst zu wenig Platz. */
  .projekt,
  .foto-zelle { aspect-ratio: 5 / 6; }

  .zelle-kopf { top: 16px; left: 16px; right: 16px; }
  .projekt-fuss { left: 16px; bottom: 14px; right: 50px; }
  .zelle-schalter { right: 10px; bottom: 10px; }
  .kugel { width: 76px; height: 76px; margin: -46px 0 0 -38px; }

  .frage { grid-column: 1 / -1; aspect-ratio: auto; padding: 48px 16px 18px; }

  .foto-zelle figcaption { left: 16px; right: 16px; bottom: 14px; font-size: 12px; line-height: 16px; }

  .commit-liste li {
    grid-template-columns: 50px 38px minmax(0, max-content) 1fr;
    gap: 0 8px;
    font-size: 11px;
  }

  .cookie-hinweis {
    left: 16px;
    right: 16px;
    bottom: 84px;
    width: auto;
  }

  .cookie-hinweis.hat-figur p:last-of-type { margin-right: 132px; }
  .cookie-figur { width: 176px; }

  .bilder-raster { --spalten: 2; }
}

@media (max-width: 420px) {
  .held h1 { font-size: 24px; line-height: 30px; }
  .befehl-text { font-size: 12px; }
  .kopf-rechts .pille-still > span:nth-child(2) { display: none; }

  /* Zwei Spalten werden unter 420 px eng: kleinere Kugel etwas hoeher,
     nur die Nummer oben, Titel ohne Rolle. */
  .projekt-fuss p { display: none; }
  .projekt .zelle-kopf > :last-child { display: none; }
  .kugel { width: 60px; height: 60px; margin: -44px 0 0 -30px; }
  .projekt-fuss h3 { font-size: 13px; line-height: 17px; }
  .foto-zelle figcaption { display: none; }
}

.held-unter {
  margin: 12px 0 0;
  max-width: 440px;
  font-size: 14px;
  line-height: 20px;
  color: var(--w-48);
}

.held .befehl-link {
  margin-top: 28px;
}

/* ==========================================================================
   Themenseiten (Wikipedia-Artikel) und Impressum
   ========================================================================== */

.held-etikett {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--w-06);
  font-size: 12px;
  line-height: 16px;
  font-weight: 550;
  color: var(--w-72);
}

.held-knoepfe {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Begriffe auf der Startseite, die zu einer Themenseite fuehren */
.thema-link {
  color: var(--w-72);
  text-decoration: underline;
  text-decoration-color: var(--w-24);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.thema-link:hover {
  color: #fff;
  text-decoration-color: var(--w-72);
}

.fuss-hinweis {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.fuss-hinweis a {
  color: var(--w-56);
  transition: color 150ms ease;
}

.fuss-hinweis a:hover {
  color: #fff;
}

/* --- Aufbau: Inhaltsverzeichnis links, Artikel rechts --------------------- */

.thema-raster {
  margin: 64px auto 0;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--luecke);
  align-items: start;
}

.thema-raster > .zelle,
.thema-seitenleiste > .zelle {
  aspect-ratio: auto;
}

.thema-seitenleiste {
  position: sticky;
  top: 72px;
  height: calc(100dvh - 96px);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: var(--luecke);
}

.thema-seitenleiste > * {
  pointer-events: auto;
}

.thema-inhalt {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 16px 12px 16px 16px;
  overflow-x: hidden;
}

.thema-inhalt::-webkit-scrollbar {
  display: none;
}

.thema-inhalt summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 12px;
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 16px;
  font-weight: 550;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--w-40);
}

.thema-inhalt summary::-webkit-details-marker {
  display: none;
}

.thema-inhalt ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.thema-inhalt a {
  display: block;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--w-56);
  transition: color 150ms ease, background-color 150ms ease;
}

.thema-inhalt a:hover {
  color: #fff;
  background: var(--w-06);
}

.thema-inhalt a[aria-current="true"] {
  color: #fff;
  background: var(--w-08);
}

.thema-inhalt .toc-h3 a {
  padding-left: 20px;
  font-size: 12px;
  color: var(--w-40);
}

.artikel {
  padding: 56px clamp(20px, 5vw, 64px) 48px;
  overflow: visible;
}

.lizenz {
  grid-column: 2;
  padding: 52px 24px 24px;
}

.lizenz h2 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-92);
}

.lizenz p {
  margin: 0;
  max-width: 720px;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-56);
}

.lizenz a {
  color: var(--w-88);
  text-decoration: underline;
  text-decoration-color: var(--w-24);
  text-underline-offset: 3px;
}

/* --- Artikeltypografie ---------------------------------------------------- */

.artikel {
  font-size: 15px;
  line-height: 26px;
  color: var(--w-72);
}

.artikel > *:not(.infobox):not(table):not(.zelle-kopf) {
  max-width: 720px;
}

.artikel-titel {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 550;
  letter-spacing: -0.4px;
  color: var(--w-92);
}

.artikel p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.artikel b,
.artikel strong {
  font-weight: 600;
  color: var(--w-92);
}

.artikel a {
  color: var(--w-92);
  text-decoration: underline;
  text-decoration-color: var(--w-14);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}

.artikel a:hover {
  color: #fff;
  text-decoration-color: var(--w-72);
}

/* Querverweis auf eine andere meiner Themenseiten */
.artikel a.intern {
  text-decoration-style: solid;
  text-decoration-color: rgb(61 220 132 / 0.6);
}

.artikel .mw-heading {
  scroll-margin-top: 88px;
}

.artikel .mw-heading h2,
.artikel .mw-heading h3,
.artikel .mw-heading h4 {
  scroll-margin-top: 88px;
  color: var(--w-92);
  font-weight: 550;
}

.artikel .mw-heading2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--w-06);
}

.artikel .mw-heading2 h2 {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
  letter-spacing: -0.2px;
}

.artikel .mw-heading3 h3 {
  margin: 32px 0 8px;
  font-size: 17px;
  line-height: 24px;
}

.artikel .mw-heading4 h4,
.artikel .mw-heading5 h5 {
  margin: 24px 0 6px;
  font-size: 15px;
  line-height: 22px;
}

.artikel ul,
.artikel ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.artikel li {
  margin: 4px 0;
}

.artikel li::marker {
  color: var(--w-40);
}

.artikel dl {
  margin: 0 0 16px;
}

.artikel dt {
  font-weight: 600;
  color: var(--w-92);
}

.artikel dd {
  margin: 0 0 8px 20px;
}

.artikel blockquote {
  margin: 0 0 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--w-04);
  color: var(--w-88);
}

.artikel sup,
.artikel sub {
  line-height: 0;
}

.artikel sup.reference {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.artikel sup.reference a {
  color: var(--w-40);
  text-decoration: none;
}

.artikel sup.reference a:hover {
  color: #fff;
}

.artikel .hauptartikel,
.artikel .dablink,
.artikel .rellink {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-48);
}

.artikel .hauptartikel-pfeil {
  display: none;
}

.artikel .hauptartikel::before {
  content: "→ ";
  color: var(--w-40);
}

/* Einzelnachweise */
.artikel .references,
.artikel .reflist,
.artikel .mw-references-wrap {
  font-size: 12px;
  line-height: 18px;
  color: var(--w-48);
}

.artikel .mw-references-wrap,
.artikel .reflist {
  columns: 2 280px;
  column-gap: 32px;
}

.artikel .references li {
  break-inside: avoid;
  margin: 0 0 6px;
}

.artikel .references a {
  color: var(--w-72);
}

.artikel .mw-cite-backlink a {
  text-decoration: none;
  color: var(--w-40);
}

.artikel cite {
  font-style: normal;
}

.artikel :target {
  border-radius: 6px;
  background: rgb(255 255 255 / 0.08);
}

.artikel code,
.artikel kbd,
.artikel pre {
  font-family: var(--mono);
  font-size: 13px;
}

.artikel pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--w-04);
}

/* Tabellen */
.artikel .tabelle {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 20px;
  border-radius: 12px;
  background: var(--w-04);
  scrollbar-width: thin;
  scrollbar-color: var(--w-14) transparent;
}

.artikel table {
  border-collapse: collapse;
  font-size: 13px;
  line-height: 18px;
  color: var(--w-72);
}

.artikel .tabelle > table {
  min-width: 100%;
}

.artikel th,
.artikel td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--w-06);
  text-align: left;
  vertical-align: top;
}

.artikel th {
  font-weight: 600;
  color: var(--w-92);
  background: var(--w-04);
}

.artikel caption {
  padding: 12px 12px 4px;
  text-align: left;
  font-weight: 600;
  color: var(--w-88);
}

/* Infobox: rechts daneben wie auf Wikipedia */
.artikel .infobox,
.artikel table.toptextcells {
  float: right;
  clear: right;
  width: 300px;
  margin: 0 0 24px 32px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--w-04);
}

.artikel .infobox th,
.artikel .infobox td {
  font-size: 12px;
  line-height: 18px;
}

.artikel .mw-heading2 {
  clear: both;
}

/* Mathematik (MathML aus der Wikipedia) */
.artikel math {
  font-size: 1.05em;
  color: var(--w-92);
}

.artikel .mwe-math-mathml-a11y {
  position: static !important;
  clip: auto !important;
  width: auto !important;
  height: auto !important;
  opacity: 1 !important;
}

/* Mehrspaltige Listen der Wikipedia */
.artikel .column-multiple,
.artikel .div-col {
  columns: 2 240px;
}

/* --- Weitere Themen --------------------------------------------------------- */

.thema-weitere {
  margin: 72px auto 0;
  max-width: 1180px;
  text-align: center;
}

.thema-weitere h2 {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-48);
}

.thema-pillen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.thema-pille {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--w-06);
  font-size: 14px;
  line-height: 14px;
  font-weight: 550;
  color: var(--w-72);
  transition: background-color 150ms ease, color 150ms ease;
}

.thema-pille:hover {
  background: var(--w-14);
  color: #fff;
}

.thema-pille[aria-current="page"] {
  background: #fff;
  color: var(--grund);
}

/* --- Impressum ---------------------------------------------------------- */

.recht-raster {
  --spalten: 3;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.recht-raster .zelle {
  aspect-ratio: auto;
  min-height: 240px;
  justify-content: flex-start;
}

.recht h2 {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-92);
}

.recht p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-56);
}

.recht a {
  color: var(--w-92);
  text-decoration: underline;
  text-decoration-color: var(--w-24);
  text-underline-offset: 3px;
}

.recht-gross p {
  font-size: 20px;
  line-height: 30px;
  font-weight: 550;
  letter-spacing: -0.2px;
  color: var(--w-92);
}

/* --- Themenseiten: schmalere Bildschirme ------------------------------------ */

@media (max-width: 999px) {
  .thema-raster {
    grid-template-columns: minmax(0, 1fr);
  }

  .lizenz {
    grid-column: auto;
  }

  .thema-seitenleiste {
    position: static;
    height: auto;
  }

  /* Auf dem Handy zuerst die Kurzfassung, dann das Inhaltsverzeichnis */
  .faul-karte {
    order: -1;
  }

  .thema-inhalt details:not([open]) summary {
    padding-bottom: 4px;
  }

  .thema-inhalt summary::after {
    content: "+";
    font-size: 16px;
    color: var(--w-48);
  }

  .thema-inhalt details[open] summary::after {
    content: "−";
  }

  .thema-inhalt summary .pille-zahl {
    margin-left: auto;
    margin-right: 12px;
  }

  .recht-raster {
    --spalten: 2;
  }
}

@media (max-width: 759px) {
  .thema-raster {
    margin-top: 48px;
  }

  .artikel {
    padding: 48px 18px 32px;
    font-size: 15px;
    line-height: 25px;
  }

  .artikel-titel {
    font-size: 24px;
    line-height: 30px;
  }

  .artikel .infobox,
  .artikel table.toptextcells {
    float: none;
    width: 100%;
    margin: 0 0 24px;
  }

  .artikel .mw-references-wrap,
  .artikel .reflist {
    columns: 1;
  }

  .recht-raster {
    --spalten: 1;
  }

  .recht-raster .zelle {
    grid-column: auto;
    min-height: 0;
  }
}

.recht-raster .recht-gross,
.recht-raster .recht-breit {
  grid-column: span 2;
}

@media (max-width: 999px) {
  .recht-raster .recht-breit {
    grid-column: auto;
  }
}

/* Breite Formeln scrollen fuer sich, statt die Seite zu verbreitern. */
.artikel .mwe-math-element {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
  scrollbar-width: none;
}

.artikel .mwe-math-element-block,
.artikel dd > .mwe-math-element {
  display: block;
}

/* Lange Adressen in den Nachweisen umbrechen */
.artikel {
  overflow-wrap: break-word;
}

.artikel .references a,
.artikel a.external.free {
  overflow-wrap: anywhere;
}

/* Themenseiten: Karte "Für Faule" unter dem Inhaltsverzeichnis */
.faul-karte {
  flex: none;
  aspect-ratio: auto;
  padding: 16px 20px 18px;
}

.faul-etikett {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 550;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--w-40);
}

.faul-etikett::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ddc84;
}

.faul-text {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
  color: var(--w-92);
  text-wrap: pretty;
}

/* ==========================================================================
   Themenseiten: Handy und Tablet
   ========================================================================== */

html {
  -webkit-tap-highlight-color: transparent;
}

/* Lesefortschritt oben */
.lesefortschritt {
  position: fixed;
  inset: 0 0 auto;
  z-index: 55;
  height: 2px;
  pointer-events: none;
}

.lesefortschritt span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.5), #fff);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Dock: Inhalt-Knopf (nur schmal) und Wegtauchen beim Lesen */
.dock {
  display: flex;
  align-items: center;
  gap: 8px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transition: transform 350ms var(--feder), opacity 250ms ease;
}

.dock.dock-weg {
  transform: translate(-50%, calc(100% + 40px));
  opacity: 0;
}

.dock-inhalt {
  display: none;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgb(30 30 30 / 0.72);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.45), inset 0 0 0 1px var(--w-06);
  font-size: 14px;
  line-height: 14px;
  font-weight: 550;
  color: var(--w-96);
  cursor: pointer;
  white-space: nowrap;
}

.dock-inhalt svg {
  width: 16px;
  height: 16px;
}

/* Inhaltsverzeichnis als Blatt */
.inhalt-blatt .blatt-inhalt {
  padding: 0 8px 16px;
}

.inhalt-blatt-kopf {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px 12px 12px;
  background: linear-gradient(rgb(20 20 20 / 0.98) 70%, rgb(20 20 20 / 0));
}

.inhalt-blatt-kopf h2 {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 550;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--w-40);
}

.inhalt-blatt-kopf .blatt-schliessen {
  position: static;
}

.inhalt-blatt-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.inhalt-blatt-liste a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 20px;
  color: var(--w-72);
}

.inhalt-blatt-liste .toc-h3 a {
  padding: 8px 12px 8px 28px;
  font-size: 14px;
  color: var(--w-48);
}

.inhalt-blatt-liste a:active,
.inhalt-blatt-liste a[aria-current="true"] {
  background: var(--w-08);
  color: #fff;
}

/* Einzelnachweise zuklappbar */
.artikel .nachweise {
  margin: 0 0 16px;
  border-radius: 14px;
  background: var(--w-04);
}

.artikel .nachweise > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  font-weight: 550;
  color: var(--w-88);
}

.artikel .nachweise > summary::-webkit-details-marker {
  display: none;
}

.artikel .nachweise > summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--w-48);
}

.artikel .nachweise[open] > summary::after {
  content: "−";
}

.artikel .nachweise > :not(summary) {
  padding: 0 16px 12px;
}

/* Tabellen: weicher Rand, wenn seitlich noch etwas kommt */
.artikel .tabelle.mehr-rechts {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.artikel .tabelle.mehr-links {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px);
  mask-image: linear-gradient(90deg, transparent, #000 40px);
}

.artikel .tabelle.mehr-links.mehr-rechts {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

@media (max-width: 999px) {
  .dock-inhalt {
    display: inline-flex;
  }

  .artikel > *:not(.infobox):not(table):not(.zelle-kopf) {
    max-width: 680px;
  }

  .artikel {
    padding-left: clamp(20px, 5vw, 48px);
    padding-right: clamp(20px, 5vw, 48px);
  }
}

@media (max-width: 759px) {
  .seite {
    padding-left: max(var(--rand), env(safe-area-inset-left));
    padding-right: max(var(--rand), env(safe-area-inset-right));
  }

  .kopf {
    left: max(var(--rand), env(safe-area-inset-left));
    right: max(var(--rand), env(safe-area-inset-right));
    top: calc(12px + env(safe-area-inset-top));
  }

  .thema-seite .held h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .thema-seite .held-knoepfe .pille {
    padding: 12px 16px;
  }

  /* Der Artikel nutzt die Breite fast ganz aus: weniger Rahmen, mehr Text. */
  main.thema-seite {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }

  .thema-seite .held,
  .thema-seite .thema-weitere,
  .thema-seite .fuss {
    padding-left: 8px;
    padding-right: 8px;
  }

  .artikel {
    padding: 48px 16px 24px;
    font-size: 16px;
    line-height: 27px;
    color: var(--w-80, rgb(255 255 255 / 0.8));
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .artikel .tabelle,
  .artikel table,
  .artikel .infobox,
  .artikel .nachweise {
    -webkit-hyphens: manual;
    hyphens: manual;
  }

  .artikel p {
    margin-bottom: 18px;
  }

  .artikel .mw-heading2 {
    margin-top: 40px;
    padding-top: 20px;
  }

  .artikel .mw-heading2 h2 {
    font-size: 22px;
    line-height: 28px;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .artikel .mw-heading3 h3 {
    margin-top: 28px;
    font-size: 18px;
    line-height: 24px;
  }

  .artikel ul,
  .artikel ol {
    padding-left: 20px;
  }

  .artikel dd {
    margin-left: 12px;
  }

  /* Fussnoten-Ziffern sind sonst kaum antippbar */
  .artikel sup.reference a {
    display: inline-block;
    padding: 6px 2px;
    margin: -6px 0;
    font-size: 11px;
  }

  .artikel .tabelle {
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 10px;
  }

  .artikel th,
  .artikel td {
    padding: 8px 10px;
    white-space: normal;
  }

  .artikel .infobox th,
  .artikel .infobox td {
    font-size: 13px;
  }

  .thema-inhalt {
    padding: 4px 12px;
  }

  .thema-inhalt summary {
    padding: 14px 4px;
  }

  .thema-inhalt a {
    padding: 9px 8px;
    font-size: 15px;
  }

  .faul-karte {
    padding: 18px 20px 20px;
  }

  .faul-text {
    font-size: 16px;
    line-height: 24px;
  }

  .lizenz {
    padding: 48px 20px 20px;
  }

  .thema-weitere {
    margin-top: 48px;
  }

  .thema-pille {
    padding: 12px 16px;
  }

  .thema-seite .fuss {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  .dock-inhalt {
    height: 42px;
  }

  .thema-seite ~ .dock .umschalter button {
    padding: 8px 12px 8px 8px;
  }
}

/* Sehr schmal (kleine iPhones): Sprachknöpfe nur mit Kürzel */
@media (max-width: 380px) {
  .dock:has(.dock-inhalt) .umschalter button {
    font-size: 0;
    gap: 0;
    padding: 4px;
  }

  .dock:has(.dock-inhalt) .umschalter-punkt {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock {
    transition: none;
  }
}

/* Handy: Kopfleiste deckt den Text darunter sauber ab */
@media (max-width: 759px) {
  .kopf-schleier {
    height: calc(84px + env(safe-area-inset-top));
    background: linear-gradient(var(--grund) 58%, rgb(10 10 10 / 0));
  }
}

/* --------------------------------------------------------------------------
   Breite Projektkarte (games.eliasconrad.eu)
   -------------------------------------------------------------------------- */

.spiel-karte {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2fr);
  gap: 8px;
  padding: 8px;
}

.spiel-buehne {
  position: relative;
  min-height: 300px;
  border-radius: 14px;
  background:
    radial-gradient(60% 60% at 50% 50%, rgb(255 255 255 / 0.05), transparent 70%),
    var(--w-04);
}

.spiel-buehne .kugel {
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
}

.kugel-games {
  --k:
    radial-gradient(circle at 26% 30%, #facc15 0 18%, transparent 52%),
    radial-gradient(circle at 74% 30%, #22d3ee 0 18%, transparent 52%),
    radial-gradient(circle at 30% 78%, #f43f5e 0 18%, transparent 52%),
    radial-gradient(circle at 78% 78%, #4ade80 0 18%, transparent 52%),
    radial-gradient(circle at 50% 52%, #fb923c 0 18%, transparent 52%),
    #fde68a;
}

.spiel-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 44px 28px 24px 20px;
}

.spiel-etikett {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 550;
  color: var(--w-56);
}

.marker-neu {
  margin: 0;
  background: #3ddc84;
  color: var(--grund);
}

.spiel-text h3 {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 550;
  letter-spacing: -0.4px;
  color: var(--w-92);
}

.spiel-rolle {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--w-40);
}

.spiel-beschreibung {
  margin: 14px 0 0;
  max-width: 620px;
  font-size: 14px;
  line-height: 22px;
  color: var(--w-72);
  text-wrap: pretty;
}

.spiel-werte {
  margin: 22px 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 720px;
}

.spiel-werte li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--w-04);
}

.spiel-werte strong {
  font-size: 22px;
  line-height: 28px;
  font-weight: 550;
  letter-spacing: -0.3px;
  color: var(--w-92);
  font-variant-numeric: tabular-nums;
}

.spiel-werte span {
  font-size: 11px;
  line-height: 14px;
  color: var(--w-48);
}

.spiel-karte:hover .kugel {
  transform: scale(1.08);
}

@media (max-width: 999px) {
  .spiel-karte {
    grid-template-columns: minmax(0, 1fr);
  }

  .spiel-buehne {
    min-height: 200px;
    margin-top: 40px;
  }

  .spiel-text {
    padding: 20px 16px 16px;
  }
}

@media (max-width: 759px) {
  .spiel-buehne {
    min-height: 170px;
    margin-top: 36px;
  }

  .spiel-buehne .kugel {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
  }

  .spiel-werte {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spiel-text h3 {
    font-size: 26px;
    line-height: 32px;
  }

  .spiel-text .pille {
    align-self: stretch;
    justify-content: center;
    padding: 14px 16px;
  }
}
