/* ==========================================================================
   teacher-loop.css — Scroll-geführtes Instrument („Teacher on the Loop")
   Nutzt ausschließlich Tokens aus styles.css und wird nur auf perspektiven.html
   geladen. Ohne JavaScript bleibt data-static="true" aktiv und alle fünf
   Stufen stehen vollständig lesbar im Fluss.
   ========================================================================== */

#loop {
  scroll-margin-top: 84px;
}
#loop .sektion-kopf p a {
  border-bottom: 1px solid var(--rule);
}
#loop .sektion-kopf p a:hover {
  color: var(--white);
  border-color: var(--lead);
}

.totl-scroll-section {
  height: 560vh;
  position: relative;
  margin-top: 12px;
}
.totl-scroll-section[data-static="true"] {
  height: auto;
  padding: 12px 0 32px;
}

.totl-sticky-frame {
  position: sticky;
  top: 67px; /* unterhalb .masthead */
  height: calc(100svh - 67px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
[data-static="true"] .totl-sticky-frame {
  position: static;
  height: auto;
  overflow: visible;
}

.totl-frame-inner {
  width: 100%;
  max-width: min(76rem, 94vw);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
  gap: 44px;
  align-items: center;
}
[data-static="true"] .totl-frame-inner {
  grid-template-columns: 1fr;
  max-width: var(--col);
  gap: 36px;
}

.totl-stage {
  display: flex;
  justify-content: center;
  align-items: center;
}
.totl-stage svg {
  width: 100%;
  height: calc(90svh - 67px);
  display: block;
  overflow: visible;
}
.totl-stage svg:empty {
  display: none;
}
[data-static="true"] .totl-stage svg {
  height: auto;
  max-width: 620px;
}

.totl-svg-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  fill: var(--lead);
}
.totl-svg-closure {
  font-style: italic;
  fill: var(--dia-alt);
}
.totl-svg-idx {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  fill: var(--dia-alt);
}

/* ---------- Rechte Register-Spalte ---------- */
.totl-steps {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.totl-step {
  position: relative;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--rule);
  transition: opacity 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.totl-step:focus-visible {
  outline: 1.5px solid var(--white);
  outline-offset: 6px;
}
.totl-step[data-state="active"] {
  opacity: 1;
  border-left: 1.5px solid var(--white);
}
.totl-step[data-state="done"],
.totl-step[data-state="upcoming"] {
  opacity: 0.38;
}
.totl-step[data-state="done"]:hover,
.totl-step[data-state="upcoming"]:hover {
  opacity: 0.72;
}
[data-static="true"] .totl-step {
  opacity: 1;
  border-left: 1px solid var(--rule);
  cursor: default;
}

.totl-step-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 4px;
}
.totl-step[data-state="active"] .totl-step-kicker {
  color: var(--white);
}
.totl-step-title {
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 400;
  font-variation-settings: 'opsz' 36, 'wght' 420;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 0 0 5px;
  color: var(--white);
}
.totl-step-body {
  font-size: 0.96rem;
  line-height: 1.52;
  margin: 0;
  color: var(--mid);
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .totl-frame-inner {
    padding: 0 var(--pad);
  }
}

/* Schmale Schirme: Die SVG wird auf rund zwei Drittel verkleinert, deshalb
   die Beschriftung im Koordinatensystem größer setzen (≈ 12 px sichtbar). */
@media (max-width: 600px) {
  .totl-svg-label { font-size: 15px; }
  .totl-svg-idx { font-size: 13px; }
}

@media print {
  .totl-scroll-section {
    height: auto !important;
    padding: 12px 0 !important;
  }
  .totl-sticky-frame {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
  }
  .totl-frame-inner {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .totl-stage svg {
    height: auto !important;
    max-width: 520px !important;
  }
  .totl-step {
    opacity: 1 !important;
    border-left-color: #999 !important;
  }
  .totl-step-title { color: #000 !important; }
  .totl-step-kicker, .totl-step-body { color: #333 !important; }
}
