.legalDocument {
    counter-reset: section;

    ol {
        list-style-type: none;
        padding-left: 0;
        margin: 0;
    }

    li {
        display: block;
        /* Platz für die Nummerierung */
        padding-left: 3.5rem; 
        text-indent: -3.5rem; 
        margin-bottom: 1em;
    }

    /* Die Nummerierung wird über ::before erzeugt */
    li::before {
        display: inline-block;
        width: 3.5rem;
        text-indent: 0;
        font-weight: bold;
        /* Verhindert, dass der Text direkt an der Nummer klebt */
        padding-right: 0.5rem; 
        box-sizing: border-box;
    }

    /* --- EBENE 1 (1., 2. ...) --- */
    > ol > li {
        counter-increment: section;
        counter-reset: subsection;
    }

    > ol > li::before {
        content: counter(section) ".";
    }

    /* --- EBENE 2 (1.1, 1.2 ...) --- */
    ol li ol {
        counter-reset: subsubsection;
        margin-top: 0.5em;
        /* Unterliste soll bündig unter dem Text der Ebene 1 starten */
        text-indent: 0; 
    }

    ol li ol > li {
        counter-increment: subsection;
        /* Gleicher Einzug wie oben für saubere Kanten */
        padding-left: 3.5rem;
        text-indent: -3.5rem;
    }

    ol li ol > li::before {
        content: counter(section) "." counter(subsection);
        font-weight: normal;
    }

    /* --- EBENE 3 (1.1.1 ...) --- */
    ol li ol li ol > li {
        counter-increment: subsubsection;
    }

    ol li ol li ol > li::before {
        content: counter(section) "." counter(subsection) "." counter(subsubsection);
    }

    /* Korrektur für Links und Absätze innerhalb der Liste */
    li p, li a {
        text-indent: 0; /* Verhindert, dass Links/Absätze innerhalb der Zeile springen */
    }
}