:root {
  --pfeil-groesse: 0.8rem; /* Ausklapppfeile */
  --hintergrund: #eeeeec;
  --text: #202020;
  --petrol: #007377;
  --tuerkis: #00a19a;
  --gelb: #ffd500;
  --orange: #f28c28;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
}

main {
  /* Die längste Summary bestimmt die gemeinsame Menübreite. */
  width: max-content;
  max-width: 100%;
  min-height: 100svh;
  padding: 1rem 1rem 7rem;
}

details {
  margin: 0;
}

summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
  cursor: pointer;

  font-family: "Rubik", Arial, sans-serif;
  font-size: clamp(1rem, 9.5vw, 9rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.045em;
}

summary::-webkit-details-marker {
  display: none;
}

summary::marker {
  content: "";
}

summary::before {
  content: "";
  flex: 0 0 var(--pfeil-groesse);
  width: var(--pfeil-groesse);
  height: var(--pfeil-groesse);
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

details[open] > summary::before {
  transform: rotate(135deg);
}

summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--tuerkis);
  outline-offset: 5px;
}

.inhalt {
  contain: inline-size;
  overflow-wrap: anywhere;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.5rem 0 1.5rem calc(var(--pfeil-groesse) + 0.65rem);

  font-family: Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* Eine Hover-Regel für Textlinks: Nur die Unterstreichung wechselt die Farbe. */
.inhalt a {
  color: var(--text);
  font-weight: bold;
  background: transparent;
  text-decoration: underline;
  text-decoration-color: var(--petrol);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 180ms ease;
}

.inhalt a:hover,
.inhalt a:focus-visible {
  text-decoration-color: var(--orange);
}

.unterstrichen {
  text-decoration-line: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 5px;
  text-underline-offset: 0.1em;
  transition: text-decoration-thickness 180ms ease;
}


/* Nur die vorhandenen Unterstreichungen wachsen beim Hover über die Zeile. */
@media (hover: hover) {
  main > details > summary:hover .unterstrichen {
    text-decoration-thickness: 7px;
  }
}

main > details > summary:focus-visible .unterstrichen {
  text-decoration-thickness: 7px;
}

.logo {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 6rem;
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.portrait {
  width: 100%;
  min-width: 0;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.portrait p {
  margin: 1rem 0 0;
}

/* Smartphone: gut antippbare Zeilen und etwas Luft nach oben. */
@media (max-width: 47.99rem) {
  main {
    margin-top: 1em;
  }

  summary {
    min-height: 48px;
    font-size: 10vw;
    line-height: 1.32;
  }
}

/* Desktop: alle fünf geschlossenen Zeilen berücksichtigen die Fensterhöhe. */
@media (min-width: 48rem) {
  main {
    padding: 1.5rem 3rem 9rem;
  }

@media (min-width: 48rem) {
  main > details > summary {
    font-size: clamp(
      3rem,
      min(9.5vw, calc(13svh - 1.28rem)),
      9rem
    );
    line-height: 1.25;
  }
}

  .logo {
    right: 3rem;
    bottom: 1.5rem;
    width: 9rem;
  }

  .inhalt {
    font-size: 1.35rem;
  }
}

/* Systemeinstellung für reduzierte Bewegung. */
@media (prefers-reduced-motion: reduce) {
  summary::before,
  .unterstrichen,
  .inhalt a {
    transition: none;
  }
}
main > details {
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

main > details > .inhalt {
  padding-top: 0.15rem;
}

main > details > .inhalt > p {
  margin-block: 0;