/* =====================================================================
   Artikel-Inhalt – wird sowohl auf der Seite als auch im Editor geladen
   ===================================================================== */
.wiki-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #202122;
}
.wiki-text p { margin: 0.5em 0 0.6em; }
.wiki-text a { color: #0645ad; text-decoration: none; }
.wiki-text a:hover { text-decoration: underline; }
.wiki-text a:visited { color: #0b0080; }
.wiki-text a[href^="http"]:not([href*="lsc-babenhausen"])::after {
    content: "↗"; font-size: 0.75em; margin-left: 2px; color: #72777d;
}

.wiki-text h2, .wiki-text h3, .wiki-text h4 { color: #000; background: none; font-weight: normal; margin: 1.1em 0 0.3em; overflow: hidden; }
.wiki-text h2 {
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    font-size: 1.5em; line-height: 1.3; border-bottom: 1px solid #a2a9b1; padding-bottom: 0.1em;
}
.wiki-text h3 { font-size: 1.2em; font-weight: bold; line-height: 1.6; }
.wiki-text h4 { font-size: 1em; font-weight: bold; }

/* Absätze eines Paragraphen (§-Ordnungen): (1), (2), (3) … */
.doc-paragraph > ol,
.doc-paragraph section > ol,
body.doc-paragraph > ol {
    list-style: none;
    counter-reset: abs;
    margin: 0.4em 0 0.8em;
    padding-left: 2.6em;
}
.doc-paragraph > ol > li,
.doc-paragraph section > ol > li,
body.doc-paragraph > ol > li {
    counter-increment: abs;
    position: relative;
    margin-bottom: 0.65em;
}
.doc-paragraph > ol > li::before,
.doc-paragraph section > ol > li::before,
body.doc-paragraph > ol > li::before {
    content: "(" counter(abs) ")";
    position: absolute;
    left: -2.6em;
    width: 2.2em;
    text-align: right;
    color: #54595d;
    font-variant-numeric: tabular-nums;
}
/* Kapitel-Ordnungen: normale nummerierte Listen 1., 2., 3. */
:where(.wiki-text) ol { padding-left: 2em; margin: 0.4em 0 0.8em; }
:where(.wiki-text) ol > li { margin-bottom: 0.3em; }
/* Unterpunkte a., b., c. … */
.wiki-text ol ol { list-style: lower-alpha; padding-left: 1.8em; margin: 0.35em 0 0.2em; }
.wiki-text ol ol li { margin-bottom: 0.25em; padding-left: 0.2em; }
.wiki-text ol ol ol { list-style: lower-roman; }
.wiki-text ul { list-style: square; padding-left: 1.6em; margin: 0.3em 0 0.6em; }
.wiki-text ul li { margin-bottom: 0.2em; }

/* Sprungziel hervorheben (z.B. nach Klick auf "§ 6 (2)") */
.wiki-text li:target, .wiki-text h2:target, .wiki-text h3:target {
    background: #eaf3ff;
    outline: 4px solid #eaf3ff;
    border-radius: 1px;
    animation: target-fade 3s ease-out 1;
}
@keyframes target-fade { from { background: #fef6c4; outline-color: #fef6c4; } }

.wiki-text mark { background: #fef6a2; color: inherit; padding: 0 1px; }
.wiki-text u { text-decoration-thickness: 1px; }
.wiki-text blockquote { border-left: 4px solid #eaecf0; margin: 0.8em 0; padding: 0.2em 1em; color: #333; }
.wiki-text code { background: #f8f9fa; border: 1px solid #eaecf0; padding: 1px 4px; border-radius: 2px; font-size: 0.95em; }
.wiki-text hr { border: 0; border-top: 1px solid #a2a9b1; margin: 1em 0; }

/* Eigene Formate */
.wiki-text p.lead { font-size: 1.15em; margin-bottom: 0.9em; }
.wiki-text p.signatur { margin-top: 1.4em; font-style: italic; color: #54595d; text-align: right; }
.wiki-text p.hinweis, .wiki-text .box-info {
    background: #eaf3ff; border: 1px solid #a3c3ec; border-left: 4px solid #36c; padding: 0.5em 0.9em; margin: 0.9em 0;
}
.wiki-text p.warnung, .wiki-text .box-warnung {
    background: #fef6e7; border: 1px solid #fc3; border-left: 4px solid #fc3; padding: 0.5em 0.9em; margin: 0.9em 0;
}

/* Tabellen */
.wiki-text table { border-collapse: collapse; margin: 0.8em 0; }
.wiki-text table.wikitable, .wiki-text table:not([class]) {
    background: #f8f9fa; border: 1px solid #a2a9b1;
}
.wiki-text table.wikitable td, .wiki-text table.wikitable th,
.wiki-text table:not([class]) td, .wiki-text table:not([class]) th {
    border: 1px solid #a2a9b1; padding: 0.25em 0.5em;
}
.wiki-text table.wikitable th, .wiki-text table:not([class]) th { background: #eaecf0; text-align: center; }

/* Unterschriftsfelder (Anerkennungserklärung) */
.wiki-text table.unterschrift { width: 100%; max-width: 40em; margin: 1.2em 0 1.4em; table-layout: fixed; }
.wiki-text table.unterschrift td { height: 2.6em; border-bottom: 1px solid #202122; }
.wiki-text table.unterschrift td + td { border-left: 1.5em solid transparent; background-clip: padding-box; }
.wiki-text table.unterschrift th { text-align: left; font-weight: normal; font-size: 0.85em; color: #54595d; padding-top: 0.2em; }
.wiki-text table.unterschrift th + th { padding-left: 1.5em; }

/* Editor (TinyMCE) */
body.wiki-text { margin: 1rem 1.25rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px; }

/* Tabellen in Kapitel-Ordnungen (Kontakte, Bankkonten, …) */
.wiki-text table.wikitable { font-size: 0.95em; max-width: 100%; }
.wiki-text table.wikitable td { vertical-align: top; }
.wiki-text h4 { margin-top: 1em; }
.wiki-text blockquote p { margin: 0.3em 0; }
.wiki-text a[href^="tel:"] { white-space: nowrap; }
