/* Kopf Uebernommen vom Seitenkopf des Pilates-Projekts (.stbh-stage/.stbh-hero): seitlich eingerueckte Buehne, 280px hohes Motiv, unten 56px gerundet, Titel im Fuss */

/* Die Buehne bleibt beim Scrollen stehen, der Inhalt zieht darunter weg , wie im Vorbild */
.wi-stage {
  --kopf-h: 294px;               /* 280px Motiv + 14px Fuss der Buehne */
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 50px 14px;
  background: var(--bg-soft);
}
/* Das Register liegt unter der Buehne: beim Scrollen ziehen Kacheln und Leiste hinter dem Kopf durch */
.wi-stage + .sd-sec {
  position: relative;
  z-index: 1;
  padding-top: clamp(1.25rem, 2vw, 1.75rem);
}
.wi-top {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 280px;
  border-radius: 0 0 56px 56px;
  overflow: hidden;
  background: var(--night);
  color: #fff;
}
.wi-top__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}
.wi-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,12,.45) 0%,
    rgba(10,10,12,.08) 34%,
    rgba(10,10,12,.12) 62%,
    rgba(10,10,12,.55) 100%);
}
.wi-top__copy {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 0 clamp(24px, 4vw, 56px) clamp(24px, 3vw, 36px);
}
.wi-top__copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
}

/* Der Text unter dem Kopf steht ohne eigene Ueberschrift; der Titel oben traegt die Seite */
.wi-lede { max-width: 62ch; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Suchleiste Suche und Buchstaben stehen in einer Zeile und bleiben unter der Buehne haengen */

.wi-bar {
  position: sticky;
  top: 294px;
  z-index: 10;
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(1rem, 1.8vw, 1.4rem) var(--gutter) .9rem;
  background: var(--bg-soft);
  border-bottom: var(--hair);
}

/* Titel links, Suchfeld rechts auf gleicher Grundlinie */
.wi-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  align-items: end;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: clamp(1rem, 2vw, 1.4rem);
}
.wi-head h2 { margin: 0; }

/* Das Suchfeld ist eine Kapsel wie die Navi oben, nur hell: gleiche Pillenform. Das Lupensymbol sitzt im Feld, damit die Kante durchlaeuft */
.wi-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 3rem;
  padding-inline: 1.15rem;
  border: var(--hair);
  border-radius: 999px;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.wi-search:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(22,23,26,.08);
}
.wi-search svg {
  flex: none;
  width: 18px; height: 18px;
  color: var(--ink-soft);
}
.wi-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
}
.wi-search input:focus { outline: none; }
.wi-search input::-webkit-search-cancel-button { display: none; }
.wi-search__clear {
  flex: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .8rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.wi-search__clear:hover { color: var(--accent); }

/* Buchstabenleiste: eine Zeile, ohne Umbruch */
.wi-alpha {
  display: flex;
  justify-content: space-between;
  gap: .1rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.wi-alpha::-webkit-scrollbar { display: none; }
.wi-alpha button {
  flex: none;
  min-width: 1.85rem;
  height: 1.85rem;
  padding-inline: .3rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: .875rem;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.wi-alpha button:first-child { padding-inline: .7rem; }
.wi-alpha button:hover { background: rgba(22,23,26,.07); }
.wi-alpha button[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* Buchstaben ohne Begriff bleiben stehen, damit die Leiste ihre Breite behaelt, sie sind nur nicht anklickbar */
.wi-alpha button:disabled { color: rgba(22,23,26,.25); cursor: default; }
.wi-alpha button:disabled:hover { background: none; }

.wi-count {
  margin: 1.25rem 0 0;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* Kacheln */

.wi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.wi-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1.35rem, 2.4vw, 1.9rem);
  border: var(--hair);
  border-radius: var(--r-tech);
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .25s ease;
}
.wi-card:hover, .wi-card:focus-visible { border-color: var(--ink); }
.wi-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wi-card__term {
  margin: 0;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}
.wi-card__short {
  flex: 1;
  margin: .7rem 0 0;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.wi-card__more {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.15rem;
  padding-top: .85rem;
  border-top: var(--hair);
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
}
.wi-card__more .btn__arrow { color: currentColor; }

.wi-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  color: var(--ink-soft);
}
.wi-empty b { color: var(--ink); }

/* Panel mit dem Volltext */

.wi-panel { position: fixed; inset: 0; z-index: 60; }
.wi-panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11,11,13,.55);
  opacity: 0;
  transition: opacity .4s ease;
}
.wi-panel__sheet {
  position: absolute;
  top: 0; right: 0;
  width: min(100%, 41rem);
  height: 100%;
  padding: clamp(2rem, 4vw, 3.25rem);
  /* Die Navi-Kapsel schwebt ueber der Seite und liegt damit auch ueber dem Panel. Der Inhalt beginnt deshalb unterhalb von ihr */
  padding-top: calc(var(--nav-top) + var(--nav-h) + 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.wi-panel.is-open .wi-panel__scrim { opacity: 1; }
.wi-panel.is-open .wi-panel__sheet { transform: translateX(0); }

/* Der Knopf haengt am Panel, nicht am Text: dadurch steht er immer an derselben Stelle, auf einer Hoehe mit der Navi-Kapsel daneben */
.wi-panel__close {
  position: fixed;
  top: calc(var(--nav-top) + (var(--nav-h) - 2.5rem) / 2);
  right: clamp(2rem, 4vw, 3.25rem);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: var(--hair);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.wi-panel__close svg { width: 18px; height: 18px; }
.wi-panel__close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wi-panel__inner h2 {
  margin: 0 3rem .35rem 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.wi-panel__lead {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
}
.wi-panel__body { color: var(--ink-soft); }
.wi-panel__body h3 {
  margin: 2rem 0 .6rem;
  font-size: 1.1rem;
  color: var(--ink);
}
.wi-panel__body h3:first-child { margin-top: 0; }
.wi-panel__body p { margin: 0 0 1rem; line-height: 1.7; }
.wi-panel__body ul { margin: 0 0 1.25rem; padding-left: 1.1rem; }
.wi-panel__body li { margin-bottom: .4rem; line-height: 1.7; }
.wi-panel__body strong { color: var(--ink); }

.wi-panel__block {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: var(--hair);
}
.wi-panel__block h4 {
  margin: 0 0 .9rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.wi-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.wi-tags span {
  padding: .3rem .7rem;
  border: var(--hair);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--ink-soft);
}
.wi-related { display: flex; flex-wrap: wrap; gap: .5rem; }
.wi-related button {
  padding: .45rem .95rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.wi-related button:hover { background: var(--ink); color: #fff; }

body.wi-locked { overflow: hidden; }

@media (max-width: 980px) {
  .wi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wi-stage { --kopf-h: 190px; padding: 0 14px 10px; }
  .wi-top { height: 180px; border-radius: 0 0 32px 32px; }
  .wi-bar { top: 190px; }
  .wi-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .wi-top__copy h1 { font-size: 1.8rem; }
  .wi-grid { grid-template-columns: minmax(0, 1fr); }
  .wi-panel__sheet { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .wi-panel__sheet, .wi-panel__scrim { transition: none; }
}

/* Schaubilder im Panel */
.wi-fig {
  margin: 1.5rem 0 1.75rem;
  padding: 1rem;
  border: var(--hair);
  border-radius: var(--r-tech);
  background: #fff;
}
.wi-fig img {
  display: block;
  width: 100%;
  height: auto;
}

/* Einzelseite je Begriff Erzeugt von build-wissen.py */

.wi-single {
  padding-top: calc(var(--nav-top) + var(--nav-h) + clamp(2rem, 5vw, 4rem));
  padding-bottom: var(--section);
}
.wi-single .wrap { max-width: 54rem; }

.wi-single__weg {
  display: flex;
  gap: .5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  font-size: .875rem;
  color: var(--ink-soft);
}
.wi-single__weg a { color: var(--ink-soft); text-decoration: none; }
.wi-single__weg a:hover { color: var(--accent); }

.wi-single h1 { margin: 0 0 1rem; }
.wi-single__lead {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
  border-bottom: var(--hair);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink);
}

.wi-single__body { color: var(--ink-soft); }
.wi-single__body h2 {
  margin: 2.5rem 0 .85rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--ink);
}
.wi-single__body h2:first-child { margin-top: 0; }
.wi-single__body p { margin: 0 0 1.15rem; line-height: 1.75; }
.wi-single__body ul { margin: 0 0 1.5rem; padding-left: 1.15rem; }
.wi-single__body li { margin-bottom: .5rem; line-height: 1.75; }
.wi-single__body strong { color: var(--ink); }

.wi-single__block {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: var(--hair);
}
.wi-single__block h2 {
  margin: 0 0 1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.wi-single .wi-related a {
  padding: .45rem .95rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.wi-single .wi-related a:hover { background: var(--ink); color: #fff; }
.wi-single__zurueck { margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; }

/* Die Kacheln im Register sind Verweise auf diese Seiten. Ein einfacher Klick oeffnet das Panel, Befehlstaste oder Mittelklick die Seite */
a.wi-card { text-decoration: none; }

.wi-panel__perma {
  margin: 1.75rem 0 0;
  font-size: .9rem;
  font-weight: 600;
}
.wi-panel__perma a { color: var(--accent); text-decoration: none; }
