/* Profi-Wissen A–Z — Register und Begriffsseiten.

   Der Entwurf baut auf site.css auf; im Theme fehlen sechs Tokens und die
   beiden Hilfsklassen `.wrap` und `.sd-sec`. Sie stehen hier, damit das
   Plugin für sich steht und keine Theme-Datei angefasst werden muss. */

:root {
  --night: #0b0b0d;
  --hair: 1px solid var(--line, #e8e9ec);
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 8vw, 7rem);
  --r-tech: 3px;

  /* Farben, Schrift und Navi-Maße aus site.css des Entwurfs. Das Theme von sp2027 führt sie unter anderen Namen */
  --accent: #e30921;
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --ink: #16171a;
  --ink-soft: #5b5f66;
  --line: #e8e9ec;
  --nav-h: 64px;
  --nav-top: 34px;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Montserrat", -apple-system, sans-serif;

}

.dsp-wissen .wrap,
.wi-sec .wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wi-sec.sd-sec { padding-block: var(--section); }
.sd-sec--soft { background: var(--bg-soft); }

/* Das Theme setzt `box-sizing` nicht global. Ohne das addiert sich die
   Polsterung auf die gesetzte Höhe: die Kacheln wuchsen über ihre
   Rasterzeile hinaus und überlappten die nächste Reihe. */
.dsp-wissen,
.dsp-wissen *,
.dsp-wissen *::before,
.dsp-wissen *::after { box-sizing: border-box; }

/* Überschriften stehen im Entwurf gemischt gesetzt; das Theme zwingt sie
   in Versalien. */
.dsp-wissen :is(h1, h2, h3, h4) { text-transform: none; }


/* Grundschrift und Farben des Entwurfs. Das Theme setzt Überschriften in DM Sans und färbt Links gelb */
/* Schriftgröße und Zeilenhöhe wie body in site.css. Überschriften erben Zeilenhöhe und Farbe wie im Entwurf, wo er nichts Eigenes setzt (YOOtheme gibt ihnen 1.04 und #111) */
.dsp-wissen { font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); }
.dsp-wissen :is(h1, h2, h3, h4) { font-family: var(--font-display); line-height: inherit; color: inherit; }
.dsp-wissen a:not(.btn) { color: inherit; }

/* Hilfsklassen aus site.css des Entwurfs, auf das Register begrenzt */
.dsp-wissen .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}
.dsp-wissen h1.display { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.dsp-wissen h2.display { font-size: clamp(1.75rem, 3.2vw, 2.85rem); }
.dsp-wissen h3.display { font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
.dsp-wissen .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Ab hier unverändert assets/css/wissen.css aus dem Entwurf */

/* 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; }

/* Ab hier nur für WordPress und YOOtheme */

/* Pfeil und Randschaltfläche

   Beide stammen im Entwurf aus site.css. Die Datei ist hier nicht im Spiel,
   deshalb bringt das Plugin das Nötige selbst mit — auf den eigenen Bereich
   begrenzt, damit es dem Theme nicht ins Handwerk pfuscht. */

.dsp-wissen .btn__arrow {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-block;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M12 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M12 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dsp-wissen .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.dsp-wissen .btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line, #e8e9ec);
}
.dsp-wissen .btn--ghost:hover {
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--ink);
}
/* Die zweite Beschriftungsfassung ist Teil des Wechsels aus dem Entwurf;
   ohne dessen Mechanik bliebe sie sichtbar doppelt stehen. */
.dsp-wissen .swap { display: grid; overflow: hidden; line-height: 1.45; }
.dsp-wissen .swap__row { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: .6rem; }
.dsp-wissen .swap__row + .swap__row { visibility: hidden; }

/* Aus der Themenhülle ausbrechen

   YOOtheme rahmt Seiten ohne Builder-Layout in `#tm-main` als eigene
   Sektion mit Polsterung und darin einen Container mit fester Breite. Für
   das Register ist beides falsch: die Bühne soll oben unter der Navi
   durchlaufen und über die volle Fensterbreite gehen. Die Einrückung
   bringt sie selbst mit (`.wi-stage` polstert seitlich), die Inhaltsbreite
   steht in `.wrap`.

   Auf die eigenen Seitentypen begrenzt, damit das Theme sonst unberührt
   bleibt. */

/* `body { overflow: clip }` kappt `position: sticky` genauso wie
   `overflow: hidden`: der Kopf klebt dann nicht, er scrollt weg. Auf diesen
   beiden Seitentypen wird die Sperre aufgehoben — sie brauchen sie nicht,
   hier steht nichts über die Fensterbreite hinaus. */
body.post-type-archive-dsp_begriff,
body.single-dsp_begriff,
body:has(.dsp-wissen) { overflow: visible; }

/* Auf einer YOOtheme-Seite mit dem Shortcode: die Section um das Register ohne Polsterung und Containerbreite */
.uk-section:has(> .uk-container .dsp-wissen) { padding-block: 0; }
.uk-section:has(> .uk-container .dsp-wissen) > .uk-container { max-width: none; padding-inline: 0; }
.uk-section:has(.dsp-wissen) .uk-grid { margin-left: 0; }
.uk-section:has(.dsp-wissen) .uk-grid > * { padding-left: 0; }

body.post-type-archive-dsp_begriff #tm-main,
body.single-dsp_begriff #tm-main {
  padding-top: 0;
  padding-bottom: 0;
}
body.post-type-archive-dsp_begriff #tm-main > .uk-container,
body.single-dsp_begriff #tm-main > .uk-container {
  max-width: none;
  padding-inline: 0;
}
