/* Gemeinsames dunkles Design. Keine fremden Schriften, keine externen Ressourcen. */

:root {
  color-scheme: dark;
  --grund: #0f1419;
  --flaeche: #182028;
  --flaeche-hell: #1f2a35;
  --rand: #3a4a5a;
  --text: #e6e9ee;
  --text-leise: #b7c0cc;
  --link: #7cc4ff;
  --akzent: #8ad8a4;
  --warnung: #ffd166;
  --fokus: #ffd166;
}

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

html {
  font-size: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--grund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.rahmen {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Sprunglink: erst bei Fokus sichtbar */
.sprunglink {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background-color: var(--warnung);
  color: #0f1419;
  font-weight: 700;
  border-radius: 0.4rem;
  transform: translateY(-300%);
}

.sprunglink:focus {
  transform: translateY(0);
}

/* Sichtbarer Fokus für alle Bedienelemente */
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

main:focus {
  outline: none;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #b3dcff;
}

/* Kopf und Navigation */
.kopf {
  background-color: var(--flaeche);
  border-bottom: 1px solid var(--rand);
}

.kopf-innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.marke {
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-block;
  padding: 0.35rem 0;
}

.kopf nav a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.kopf nav a:hover {
  border-bottom-color: var(--link);
}

.kopf nav a[aria-current="page"] {
  color: var(--akzent);
  border-bottom-color: var(--akzent);
}

/* Inhalt */
main {
  flex: 1;
  padding: 2rem 0 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rand);
}

h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Startseite */
.auftakt {
  padding: 1.5rem 0 0.5rem;
}

.auftakt h1 {
  font-size: clamp(2.1rem, 7vw, 3.2rem);
  margin-bottom: 0.25rem;
}

.vorzeile {
  margin: 0;
  color: var(--akzent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.unterzeile {
  font-size: 1.3rem;
  color: var(--text-leise);
}

.knopf {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  background-color: var(--flaeche-hell);
  border: 1px solid var(--link);
  border-radius: 0.5rem;
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.knopf:hover {
  background-color: #263545;
}

/* Karten */
.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.karte {
  margin: 0;
  padding: 1rem 1.1rem;
  background-color: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 0.6rem;
}

.karte h3 {
  margin-top: 0;
}

.karte p {
  margin-bottom: 0;
  color: var(--text-leise);
}

.marke-status {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--warnung);
  border-radius: 1rem;
  color: var(--warnung);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Werdegang */
.stationen div {
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
  background-color: var(--flaeche);
  border-left: 4px solid var(--akzent);
  border-radius: 0.3rem;
}

.stationen dt {
  font-weight: 700;
}

.stationen dd {
  margin: 0;
  color: var(--text-leise);
}

/* Projektseiten */
.zurueck {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.eckdaten {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.eckdaten li {
  margin: 0;
  padding: 0.25rem 0.75rem;
  background-color: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 1rem;
  font-size: 0.95rem;
}

.hinweis {
  padding: 0.7rem 1rem;
  background-color: var(--flaeche);
  border-left: 4px solid var(--rand);
  border-radius: 0.3rem;
  color: var(--text-leise);
}

.entwurf {
  padding: 0.9rem 1rem;
  background-color: var(--flaeche);
  border: 2px solid var(--warnung);
  border-radius: 0.5rem;
  color: var(--warnung);
}

code {
  padding: 0.05rem 0.3rem;
  background-color: var(--flaeche-hell);
  border-radius: 0.25rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.leitsatz {
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  background-color: var(--flaeche);
  border-left: 4px solid var(--akzent);
  border-radius: 0.3rem;
  font-size: 1.15rem;
}

.leitsatz p {
  margin: 0;
}

/* Ablaufkette als reine CSS-Grafik */
/* Raster mit fester Spaltenzahl, damit das Zeilenende bekannt ist:
   der Pfeil am Zeilenende zeigt schräg nach unten in die nächste Zeile
   und ragt nicht in den Seitenrand. */
.kette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.9rem;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.kette li {
  position: relative;
  margin: 0;
  padding: 0.7rem 0.9rem;
  background-color: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 0.5rem;
  counter-increment: schritt;
}

.kette li::before {
  content: counter(schritt);
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background-color: var(--flaeche-hell);
  border: 1px solid var(--link);
  color: var(--link);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: center;
}

.kette li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -1.45rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-leise);
  font-size: 1.2rem;
}

.kette li:nth-child(4n):not(:last-child)::after {
  content: "↙";
  right: auto;
  left: 1.2rem;
  top: auto;
  bottom: -1.85rem;
  transform: none;
}

.kette-titel {
  font-weight: 700;
}

.kette-text {
  display: block;
  color: var(--text-leise);
  font-size: 0.95rem;
}

.kette .kette-mensch {
  border-color: var(--akzent);
  border-width: 2px;
}

.belege {
  padding: 0;
  list-style: none;
}

.belege li {
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
  background-color: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 0.5rem;
}

.belege strong {
  display: block;
  color: var(--akzent);
  font-size: 1.15rem;
}

address {
  font-style: normal;
  padding: 0.8rem 1rem;
  background-color: var(--flaeche);
  border-left: 4px solid var(--akzent);
  border-radius: 0.3rem;
}

/* Fuß */
.fuss {
  background-color: var(--flaeche);
  border-top: 1px solid var(--rand);
  color: var(--text-leise);
  font-size: 0.95rem;
}

.fuss-innen {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.fuss p {
  margin: 0.4rem 0 0;
}

/* Mittlere Breite: zwei Spalten, Zeilenende nach jedem zweiten Baustein */
@media (max-width: 54rem) {
  .kette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kette li:nth-child(2n):not(:last-child)::after {
    content: "↙";
    right: auto;
    left: 1.2rem;
    top: auto;
    bottom: -1.85rem;
    transform: none;
  }
}

/* Mobil */
@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  .kette {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.7rem;
  }

  .kette li:not(:last-child)::after,
  .kette li:nth-child(2n):not(:last-child)::after,
  .kette li:nth-child(4n):not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 1.2rem;
    top: auto;
    bottom: -1.65rem;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sprunglink {
    transition: transform 0.15s ease-out;
  }
}

@media print {
  .sprunglink,
  nav {
    display: none;
  }
}
