:root {
  --schwarz: #000;
  --flaeche: #0a1719;
  --flaeche-hell: #12292c;
  --linie: #16292c;
  --matt: #0e8088;
  --teal: #11a0a0;
  --cyan: #00d6d6;
  --hell: #aef9f1;
  --silber: #dfe9ea;
  --amber: #ffc400;
  --zeile: 24px;
  --rand: 18px;
  --rund: 12px;
  --rund-klein: 8px;
  --pixel: 1px;
  --punkte: "....................................................................................................................................................";
}

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

html {
  background: var(--schwarz);
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--schwarz);
  color: var(--teal);
  font: 14px/var(--zeile) Verdana, Geneva, "DejaVu Sans", sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.sprung {
  position: absolute;
  left: var(--rand);
  top: -60px;
  background: var(--cyan);
  color: var(--schwarz);
  padding: 12px 18px;
  border-radius: var(--rund-klein);
  z-index: 20;
}
.sprung:focus { top: 8px; }

.kopf, .suche, main, .fuss {
  width: 100%;
  max-width: 1314px;
  margin-inline: auto;
  padding-inline: var(--rand);
}

/* Kopf */
.kopf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 134px;
  column-gap: 18px;
  align-items: end;
  padding-top: 24px;
}
.marke { grid-column: 1 / -1; }
.logo { display: block; }
.logo img { width: 100%; max-width: 360px; }

h1 {
  font-size: 14px;
  font-weight: 700;
  color: var(--silber);
  text-transform: uppercase;
  margin-top: 16px;
}
.spruch { color: var(--cyan); }

.nfo { margin-top: 16px; align-self: center; min-width: 0; }
.nfo h2, .nfo p { display: none; }
.nfo div { display: flex; }
.nfo dt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.nfo dt::after { content: " ........................................"; color: var(--matt); }
.nfo dd { color: var(--silber); padding-left: 9px; }

.haube { margin-top: 16px; display: block; position: relative; }
.haube img { width: 134px; image-rendering: pixelated; }
.haube::after {
  content: "";
  position: absolute;
  left: calc(43 * var(--pixel));
  top: calc(60 * var(--pixel));
  width: calc(56 * var(--pixel));
  height: calc(74 * var(--pixel));
  background: url(../assets/images/code.png) 0 0 / calc(672 * var(--pixel)) calc(74 * var(--pixel));
  image-rendering: pixelated;
  animation: code 2.4s steps(12) 1.1s infinite, an 1ms 1.1s both;
}

.vorrat { display: none; }
.ic { flex: none; width: 16px; height: 16px; }

/* Suchzeile */
.suche {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--schwarz);
  padding-block: 8px 12px;
}
.feld {
  display: flex;
  align-items: center;
  min-height: 48px;
  background: var(--flaeche-hell);
  border-radius: var(--rund);
  padding-inline: 18px;
  gap: 12px;
}
.feld:focus-within { box-shadow: 0 0 0 1px var(--cyan); }
.suche label { display: flex; color: var(--cyan); cursor: text; }
.suche input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--hell);
  caret-color: var(--amber);
  font: inherit;
  font-size: 16px;
  outline: none;
  appearance: none;
}
.suche input::placeholder { color: var(--teal); opacity: 1; }
.suche input::-webkit-search-cancel-button { appearance: none; }
.suche output { color: var(--silber); white-space: nowrap; }
body:not(.sucht) .suche output { display: none; }
.wo {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  min-width: 0;
  max-width: 55%;
  color: var(--cyan);
}
.wo[hidden], .suche input:focus ~ .wo { display: none; }
.wo .zahl { display: none; }
.wo:hover .n, .wo:hover .ic { color: var(--hell); }

/* Fenster */
.fenster {
  background: var(--flaeche);
  border-radius: var(--rund);
  padding: 8px;
  margin-top: 16px;
}
.fenster h2, .nfo h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--silber);
  text-transform: uppercase;
}
.fenster h2 { padding: 8px 9px; }
summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 9px;
  border-radius: var(--rund-klein);
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "▼"; color: var(--silber); margin-left: auto; }
details[open] summary::after { content: "▲"; }

/* Zeilen */
.fenster a, .rubrik a {
  display: flex;
  min-height: 36px;
  align-items: center;
  padding-inline: 9px;
  border-radius: var(--rund-klein);
}
.n { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.p {
  flex: 1 1 18px;
  min-width: 18px;
  overflow: hidden;
  white-space: nowrap;
  color: var(--matt);
  margin-inline: 9px;
  position: relative;
}
.p::before { content: var(--punkte); }
.p::after {
  content: var(--punkte);
  position: absolute;
  inset: 0;
  color: var(--cyan);
  clip-path: inset(0 100% 0 0);
}
.a { color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.fenster a .ic { color: var(--teal); margin-right: 9px; }

.fenster a:hover, .fenster a:focus-visible,
.rubrik a:hover, .rubrik a:focus-visible { background: var(--flaeche-hell); }
.fenster a:hover .n, .fenster a:focus-visible .n,
.rubrik a:hover .n, .rubrik a:focus-visible .n,
.fenster a:hover .a, .fenster a:focus-visible .a,
.rubrik a:hover .a, .rubrik a:focus-visible .a,
.fenster a:hover .ic, .fenster a:focus-visible .ic { color: var(--hell); }
.fenster a:hover .p::after, .fenster a:focus-visible .p::after,
.rubrik a:hover .p::after, .rubrik a:focus-visible .p::after { clip-path: inset(0); }

mark {
  background: rgba(0, 214, 214, .18);
  color: var(--hell);
  border-radius: 3px;
}

.leser {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.neu {
  flex: none;
  margin-left: 9px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.rubrik li.aus a { cursor: default; }
.rubrik li.aus a:hover { background: none; }
.rubrik li.aus .n, .rubrik li.aus a:hover .n { color: var(--teal); text-decoration: line-through; }
.rubrik li.aus .a, .rubrik li.aus a:hover .a, .rubrik li.um .a { color: var(--amber); }
.rubrik li.aus a:hover .p::after { clip-path: inset(0 100% 0 0); }

/* Rubriken */
.rubrik { margin-top: 32px; }
.rubrik h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  color: var(--cyan);
  border-bottom: 1px solid var(--linie);
  padding: 0 9px 8px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.rubrik h2 .ic { width: 32px; height: 32px; }
.rubrik.wartet h2 .ic { clip-path: inset(0 0 100% 0); }
.rubrik.da h2 .ic { animation: laden .6s steps(16) both; }
.zahl {
  flex: none;
  margin-left: auto;
  font-size: 14px;
  font-weight: 400;
  color: var(--silber);
}

body.sucht .fenster { display: none; }
body.sucht .rubrik { margin-top: 24px; }
.rubrik[hidden], li[hidden] { display: none; }

#nichts { color: var(--amber); margin-top: 24px; }

/* Nach oben */
.hoch {
  position: fixed;
  right: var(--rand);
  bottom: 16px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--flaeche-hell);
  color: var(--cyan);
  box-shadow: 0 0 0 4px var(--schwarz);
}
.hoch[hidden] { display: none; }
.hoch:hover, .hoch:focus-visible { color: var(--hell); }

/* Fuss: Fläche wie die Info-Box, rechts eine kleine Terminal-Sitzung */
.fuss {
  margin-top: 72px;
  padding-bottom: 72px; /* frei für den Knopf nach oben */
  color: var(--teal);
}
.ende {
  display: grid;
  gap: 24px;
  background: var(--flaeche);
  border-radius: var(--rund);
  padding: 18px;
}
.abschied .logo { width: fit-content; padding-block: 6px; }
.abschied .logo img { width: 180px; }
.abschied p { margin-top: 12px; color: var(--silber); }
.sitzung dt, .eingabe { color: var(--silber); white-space: nowrap; }
.sitzung dt span, .eingabe span:first-child { color: var(--matt); }
.sitzung dd { color: var(--cyan); margin-bottom: 8px; }
.sitzung b { font-weight: normal; color: var(--hell); }
.jahre { display: inline-flex; gap: 2px; margin-left: 12px; vertical-align: 1px; }
.jahre i { width: 6px; height: 6px; background: var(--teal); }
.jahre i:last-child { background: var(--hell); }
.abspann {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 36px;
  margin-top: 8px;
  padding-inline: 18px;
}
.abspann a { display: inline-flex; align-items: center; min-height: 48px; color: var(--teal); text-decoration: none; }
.abspann a:hover, .abspann a:focus-visible { color: var(--hell); }
.cursor {
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: .4em;
  vertical-align: -.15em;
  background: var(--teal);
  animation: blinken 1s steps(1) infinite;
}

@media (min-width: 720px) {
  :root { --rand: 27px; --pixel: 2px; }
  body { font-size: 13px; }
  .suche input { font-size: inherit; }
  .kopf {
    grid-template-columns: minmax(0, 1fr) 268px;
    grid-template-rows: auto 1fr;
    column-gap: 36px;
    padding-top: 36px;
  }
  .marke { grid-column: 1; grid-row: 1; }
  h1 { margin-top: 24px; }
  .nfo {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    background: var(--flaeche);
    border-radius: var(--rund);
    padding: 16px 18px;
    margin-block: 24px;
  }
  .nfo h2 { display: block; margin-bottom: 8px; }
  .nfo dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }
  .nfo p { display: block; margin-top: 12px; color: var(--silber); }
  .haube { grid-column: 2; grid-row: 1 / 3; margin-top: 0; align-self: end; }
  .haube img { width: 268px; animation: laden 1.1s steps(55) both; }
  body:not(.sucht) .feld:not(.ort) output { display: inline; }
  .wo .zahl { display: inline; margin-left: 9px; }
  .suche input:focus ~ .wo { display: flex; }
  .suche input:focus ~ .wo[hidden] { display: none; }
  summary { display: none; }
  .fenster { margin-top: 4px; padding: 8px 9px 12px; }
  .fenster ol { columns: 2; column-gap: 36px; }
  .fenster li { break-inside: avoid; }
  .fenster a, .rubrik a { min-height: 32px; }
  .rubrik ul { columns: 2; column-gap: 36px; }
  .rubrik li { break-inside: avoid; }
  .ende { padding: 24px 27px; }
  .abschied .logo img { width: 220px; }
  .sitzung { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 48px; }
  .abspann { padding-inline: 27px; }
}

@media (min-width: 1100px) {
  .fenster ol, .rubrik ul { columns: 3; }
  .rubrik { margin-top: 40px; }
  .ende { grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; align-items: center; }
}

@keyframes laden {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0); }
}
@keyframes code {
  to { background-position-x: calc(-672 * var(--pixel)); }
}
@keyframes blinken {
  50% { visibility: hidden; }
}
@keyframes an {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .hoch { animation: laden .2s steps(6) both; }
  .fenster a .p::after, .rubrik a .p::after { transition: none; }
  .fenster a:hover .p::after, .fenster a:focus-visible .p::after,
  .rubrik a:hover .p::after, .rubrik a:focus-visible .p::after { transition: clip-path .4s steps(20); }
  .fenster a:hover .a, .fenster a:focus-visible .a,
  .rubrik a:hover .a, .rubrik a:focus-visible .a { transition: color 0s .36s; }
}

@media (prefers-reduced-motion: reduce) {
  .haube img, .rubrik.da h2 .ic, .hoch, .cursor { animation: none; }
  .haube::after { display: none; }
}
