.sa-image-open { display: block; cursor: zoom-in; }
.sa-image-open:focus-visible { outline: 2px solid var(--sa-accent); outline-offset: 5px; }
.sa-prose .sa-media-link {
  display: inline-block; font-family: var(--sa-sans); word-spacing: .12em;
  font-size: 16px; line-height: 1.5; padding: 16px 20px;
  border: 1px solid var(--sa-line); text-decoration: none; max-width: 100%;
}
.sa-prose audio { display: block; width: 100%; }
.sa-prose video { width: 100%; background: #171717; }
.sa-prose .kg-gallery-row { display: flex; gap: 18px; margin-top: 18px; }
.sa-prose .kg-gallery-image { flex: 1; min-width: 0; }
.sa-media-note { max-width: 720px; margin: 28px auto 0; color: var(--sa-muted); font-size: 13px; }
.sa-prose .sa-image-note { font-size: 13px; color: var(--sa-muted); font-family: var(--sa-sans); word-spacing: .12em; }
.sa-related { margin-bottom: 36px; }
.sa-related ul { list-style: none; padding: 0; margin-top: 18px; }
.sa-related li + li { margin-top: 12px; }
.sa-viewer {
  color: var(--sa-ink); background: var(--sa-paper); border: 1px solid var(--sa-line);
  width: calc(100vw - 48px); max-width: 1600px; height: calc(100dvh - 48px);
  max-height: none; margin: auto; padding: 20px 28px;
}
.sa-viewer[open] { display: flex; flex-direction: column; }
.sa-viewer::backdrop { background: rgb(0 0 0 / .85); }
.sa-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.sa-viewer button, .sa-viewer-navigation a {
  font: inherit; font-size: 14px; color: inherit; background: none;
  border: none; padding: 10px 0; min-height: 44px; cursor: pointer;
}
.sa-viewer button:disabled { opacity: .35; cursor: default; }
.sa-viewer-figure { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 16px 0; gap: 12px; }
.sa-viewer-figure img { display: block; flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.sa-viewer-figure figcaption { flex-shrink: 0; font-size: 13px; max-height: 18vh; overflow: auto; line-height: 1.5; }
.sa-viewer-navigation { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--sa-line); }
@media (max-width: 600px) {
  .sa-viewer { width: 100vw; height: 100dvh; max-width: none; padding: 12px 16px; border: none; }
  .sa-viewer-toolbar, .sa-viewer-navigation { gap: 12px; }
  .sa-viewer-navigation button, .sa-viewer-navigation a { font-size: 12px; }
}

/* "External application" block of the posts. The sanitizer keeps its parts but not the wrapper,
   so the rules sit on the parts: a rule above, a title, a description and one action below. */
.sa-prose .app-verweis__kopf { display: flex; justify-content: space-between; gap: 16px; margin-top: 2em; padding-top: 22px; border-top: 1px solid var(--sa-line); color: var(--sa-muted); font-family: var(--sa-mono); font-size: 11px; letter-spacing: .06em; }
.sa-prose .app-verweis__text { margin-top: 14px; font-family: var(--sa-sans); word-spacing: .12em; }
.sa-prose .app-verweis__titel { margin: 0; font-size: 28px; line-height: 1.15; }
.sa-prose .app-verweis__beschreibung { margin: 8px 0 0; color: var(--sa-muted); font-size: 16px; line-height: 1.5; }
.sa-prose .app-verweis__aktion { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 2em; padding: 10px 0; border-bottom: 1px solid var(--sa-line); font-family: var(--sa-sans); word-spacing: .12em; font-size: 15px; text-decoration: none; }
.sa-prose .app-verweis__aktion:hover { color: var(--sa-accent); border-bottom-color: currentColor; }

/* Formulas are MathML from the publisher: no script, no inline style. */
.sa-prose math { font-size: 1.05em; }
.sa-prose math[display="block"] { display: block; margin: 1.2em 0; overflow-x: auto; }
