/* ---------- Code ---------- */
.codebox {
  background: var(--dunkel-flaeche);
  border-radius: 10px;
  overflow: clip;
  box-shadow: var(--schatten);
}
.codebox-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--dunkel-rand);
}
.codebox-titel {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dunkel-gedaempft);
}
.code-kopieren {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--dunkel-rand);
  border-radius: 8px;
  background: transparent;
  color: var(--dunkel-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.code-kopieren:hover {
  background: var(--dunkel-rand);
}
.code-kopieren:focus-visible {
  outline: 2px solid var(--weiss);
  outline-offset: 2px;
}
.geprueft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--dunkel-teal-stark);
  color: var(--dunkel-text);
  font-size: 13px;
  font-weight: 700;
}
.code {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--dunkel-text);
  tab-size: 4;
}
.code:focus-visible {
  outline: 2px solid var(--weiss);
  outline-offset: -4px;
}
.zeile {
  display: block;
  min-height: 1.7em;
}
.code-tippt .zeile {
  animation: tippen 500ms steps(28, end) both;
  animation-delay: var(--verzoegerung, 0s);
}
@keyframes tippen {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
.auftauchen {
  animation: auftauchen 300ms var(--bewegung) both;
  animation-delay: var(--verzoegerung, 0s);
}
@keyframes auftauchen {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.t-schluessel {
  color: var(--code-schluessel);
}
.t-zahl {
  color: var(--code-zahl);
}
.t-text {
  color: var(--code-text);
}
.t-kommentar {
  color: var(--code-kommentar);
  font-style: italic;
}
/* Blockansicht unter dem Senden: zum Selber-Nachbauen, Blöcke als eigenes SVG (bloecke.js) */
.bloecke-tafel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bloecke-tafel p {
  margin: 0;
}
.bloecke-kasten {
  background: var(--dunkel-flaeche);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--schatten);
}
/* Breite Programme scrollen hier drin, die Seite selbst nie */
.bloecke-flaeche {
  position: relative;
  overflow: auto;
  max-width: 100%;
  border-radius: 8px;
  background: var(--bloecke-flaeche, #ffffff);
  border: 1px solid var(--dunkel-rand);
}
.bloecke-flaeche:focus-visible {
  outline: 2px solid var(--weiss);
  outline-offset: 2px;
}
.bloecke-svg {
  display: block;
  max-width: none;
}
.bloecke-svg text {
  white-space: pre;
}
.erklaerung {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.erklaerung li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.55;
}
/* Schritte mit Stift: Text links, Stift rechts; beim Ändern steht das Feld unter dem Satz */
.erklaerung-tipp {
  margin: -4px 0 0;
}
.schritt-zeile {
  flex-wrap: wrap;
  border-radius: 8px;
  padding: 4px 4px 4px 0;
  transition: background-color 600ms var(--bewegung);
}
.schritt-satz {
  flex: 1 1 0;
  min-width: 0;
  padding-top: 1px;
}
.stift {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -8px -4px -8px 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stift:hover {
  background: var(--teal-07);
}
.stift:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}
.stift[aria-expanded="true"] {
  background: var(--teal);
  color: var(--weiss);
}
.schritt-zeile.schritt-neu {
  background: var(--teal-t8);
}
.schritt-aendern {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 4px 40px;
}
.schritt-aendern[hidden] {
  display: none;
}
.schritt-aendern-zeile {
  display: flex;
  gap: 12px;
  align-items: center;
}
.schritt-aendern textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 64px;
  padding: 10px 14px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  font: inherit;
  font-size: 17px;
  line-height: 1.45;
  color: var(--anthrazit);
  background: var(--weiss);
  resize: vertical;
}
.schritt-aendern textarea:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}
.mikro-klein {
  width: 56px;
  height: 56px;
  flex: none;
}
.mikro-klein[aria-pressed="true"] {
  box-shadow: 0 0 0 6px var(--teal-15);
}
.schritt-aendern .meldung:empty {
  display: none;
}
.schritt-aendern-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
