/* Knowledge Base /knowledge/ — handgepflegt; die HTML-Seiten daneben erzeugt knowledge-base/build.py. */
.kb-crumbs { max-width: var(--max); margin: 0 auto; padding: 32px 36px 0; }
.kb-crumbs + .topic-head, .kb-crumbs + .kb-article .topic-head { padding-top: 32px; }
.kb-article .display { font-size: clamp(34px, 6vw, 64px); line-height: 1.05; }
.kb-meta { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0; }

/* Artikeltext */
.kb-body h2 { font-family: "Archivo", sans-serif; font-weight: 600; font-size: 26px; line-height: 1.2; color: var(--ink); margin: 40px 0 12px; }
.kb-body h2:first-child { margin-top: 0; }
.kb-body h4 { font-size: 16px; color: var(--ink); margin: 20px 0 6px; }
.kb-body ul, .kb-body ol { margin: 0 0 16px; padding-left: 1.3em; }
.kb-body blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--ink); }
.kb-body figure { margin: 28px 0; }
.kb-body img { max-width: 100%; height: auto; display: block; }
.kb-body .kb-zoom { display: block; cursor: zoom-in; }
/* Bild in voller Größe: <dialog> über die ganze Seite, Skript in build.py (LIGHTBOX_JS) */
.kb-lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 64px 16px; border: 0; box-sizing: border-box; background: rgba(5, 9, 8, .94); color: #fff; }
.kb-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.kb-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kb-lightbox button { position: absolute; bottom: 10px; width: 44px; height: 44px; padding: 0; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.kb-lightbox button:hover, .kb-lightbox button:focus-visible { background: rgba(255, 255, 255, .3); }
.kb-lightbox button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kb-lightbox .kb-lightbox-close { top: 10px; right: 10px; bottom: auto; }
.kb-lightbox [data-step="-1"] { left: calc(50% - 100px); }
.kb-lightbox [data-step="1"] { right: calc(50% - 100px); }
.kb-lightbox p { position: absolute; bottom: 10px; left: 0; right: 0; margin: 0; line-height: 44px; text-align: center; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; pointer-events: none; }
.kb-lightbox-single [data-step], .kb-lightbox-single p { display: none; }
.kb-body figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.kb-body table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; display: block; overflow-x: auto; }
.kb-body th, .kb-body td { border: 1px solid var(--line-2); padding: 8px 12px; text-align: left; vertical-align: top; }
.kb-body th { background: var(--bg-2); color: var(--ink); }
.kb-body .kb-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; }
.kb-body .kb-tags li { font-size: 13px; padding: 4px 10px; border: 1px solid var(--line-2); color: var(--ink-3); max-width: none; }

/* Artikellisten + Kategorie-Kacheln */
.kb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.kb-list a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; background: var(--bg-2); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.kb-list a:hover, .kb-list a:focus-visible { border-color: var(--accent); }
.kb-list h3 { margin: 0; font-family: "Archivo", sans-serif; font-weight: 600; font-size: 18px; line-height: 1.25; color: var(--ink); }
.kb-list p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.kb-list small { margin-top: auto; font-size: 13px; color: var(--ink-3); }
.kb-cats h3 a { color: inherit; text-decoration: none; }
.kb-cats h3 a:hover { color: var(--accent-ink); }
.kb-empty { color: var(--ink-3); }

.kb-search .pf-filter-pane:empty, .kb-search .pf-results:empty { display: none !important; } /* Pagefind-CSS hat ID-Spezifitaet */
/* Pagefind-Suche in den Farben der Seite */
.kb-search { max-width: 46em; margin-top: 8px; display: grid; gap: 16px;
  --pf-font: inherit; --pf-border-radius: 0; --pf-mark: color-mix(in srgb, var(--accent) 30%, transparent);
  --pf-text: var(--ink); --pf-text-secondary: var(--ink-3); --pf-text-muted: var(--ink-mute); --pf-background: var(--panel-2);
  --pf-border: var(--line-2); --pf-border-focus: var(--accent); --pf-hover: var(--bg-2); }
/* Dark: --line-2 auf --panel-2 hebt das Suchfeld kaum vom Hintergrund ab */
html[data-theme="dark"] .kb-search .pf-input:not(:focus-visible) { border-color: var(--ink-mute) !important; }

@media (max-width: 900px) {
  .kb-crumbs { padding: 24px 20px 0; }
}
/* Handy: Titel kleiner und ohne Silbentrennung, Kategorien und Artikel als Zeilen statt Kacheln. */
@media (max-width: 640px) {
  .kb-crumbs li:nth-child(n+4) { display: none; } /* der Artikeltitel steht direkt darunter als H1 */
  .kb-article .display { font-size: max(1.05rem, 5.4vw); line-height: 1.12; text-wrap: balance; } /* 5.4vw: auch 20 Buchstaben lange Woerter passen in eine Zeile */
  .topic-lede { font-size: 17px; margin: 18px 0 20px; }
  .kb-body h2 { font-size: 22px; margin-top: 32px; }
  .kb-body table { font-size: 14px; }
  .kb-body th, .kb-body td { padding: 8px 10px; }
  .kb-cats, .kb-list { gap: 0; border-top: 1px solid var(--line-2); }
  .kb-cats li, .kb-list a { padding: 14px 0; background: none; border: 0; border-bottom: 1px solid var(--line-2); }
  .kb-cats p { display: none; }
  .kb-cats h3 { font-size: 16px; }
  .kb-list a { gap: 6px; }
  .kb-list h3 { font-size: 17px; }
  .kb-list p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Teaser zur Fußball-Weltkarte: Punkte-Globus (weltkarte/teaser.js) mit kreisendem Pfeil-Ring, darin der Schriftzug */
.kb-hub-head { position: relative; }
.kb-globe { position: absolute; top: 48px; right: 36px; width: 190px; height: 190px; display: block; color: var(--ink); text-decoration: none; }
.kb-globe canvas { position: absolute; inset: 17%; width: 66%; height: 66%; display: block; }
.kb-orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: kb-orbit 28s linear infinite; }
.kb-orbit text { font: 600 11.5px/1 var(--mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; fill: var(--ink); }
.kb-orbit-arc { fill: none; stroke: var(--ink-mute); stroke-width: 1.6; stroke-linecap: round; transition: stroke .2s; }
.kb-orbit marker path { fill: var(--ink-mute); transition: fill .2s; }
.kb-globe:hover .kb-orbit-arc, .kb-globe:focus-visible .kb-orbit-arc { stroke: var(--accent); }
.kb-globe:hover .kb-orbit marker path, .kb-globe:focus-visible .kb-orbit marker path, .kb-globe:hover .kb-orbit text { fill: var(--accent); }
@keyframes kb-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kb-orbit { animation: none; } }
@media (max-width: 1100px) {
  .kb-globe { position: relative; top: auto; right: auto; width: 150px; height: 150px; margin: 0 0 16px; }
}
