/* ===============================
   Grundlayout & Hintergrund
================================== */
body {
    background-color: #222222;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Container für Inhalt */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.container h1 {
    font-size: 1.7em;
    text-align: center;
}

/* ===============================
   Counter-Setup & Struktur
================================== */
body {
    counter-reset: kategorie;
}

/* Kategorien (Hauptabschnitte) */
.category {
    background-color: #2a2a2a;
    border-left: 5px solid #00AAAA;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);

    counter-increment: kategorie;
    counter-reset: regel;
    scroll-margin-top: 100px;
}

/* Kategorie-Überschrift mit § */
.category h2::before {
    content: "§" counter(kategorie) " ";
    color: #00AAAA;
    display: inline-block; /* wichtig */
    font-weight: bold;
}

.category h2 {
    color: #00AAAA;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ===============================
   Erste Ebene: §X.Y
================================== */
.category ol {
    list-style: none;
    padding-left: 0;
    scroll-margin-top: 100px;
}

.category ol > li {
    counter-increment: regel;
    margin-bottom: 0.75rem;
    padding-left: 2.8rem;
    position: relative;
    scroll-margin-top: 100px;
}

.category ol > li::before {
    content: "§" counter(kategorie) "." counter(regel) " ";
    position: absolute;
    display: inline-block; /* wichtig */
    left: 0;
    color: #00AAAA;
    font-weight: bold;
}

/* ===============================
   Zweite Ebene: §X.Y.Z
================================== */
.category ol > li > ol {
    counter-reset: unterregel;
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    scroll-margin-top: 100px;
}

.category ol > li > ol > li {
    counter-increment: unterregel;
    padding-left: 3rem;
    position: relative;
    scroll-margin-top: 100px;
}

.category ol > li > ol > li::before {
    content: "§" counter(kategorie) "." counter(regel) "." counter(unterregel) " ";
    position: absolute;
    left: 0;
    color: #00AAAA;
    display: inline-block; /* wichtig */
    font-weight: bold;
}

/* ===============================
   Dritte Ebene (optional): Bullet-Aufzählung
================================== */
.category li ul {
    list-style: disc;
    padding-left: 2rem;
    margin-top: 0.5rem;
    color: #ffffff;
}

.category li ul li {
    color: #ffffff;
    position: relative;
}

/* Bullet-Farbe auf Akzentfarbe ändern */
.category li ul li::marker {
    color: #00AAAA;
}

/* ===============================
   Referenzen (z.B. „siehe §1.2“)
================================== */
/* Absatznummer (automatisch per JS eingefügt) */
.paragraph {
    color: #00AAAA;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Referenzstil */
.ref {
    color: #00AAAA;
    font-weight: bold;
    text-decoration: none;
}
.ref:hover {
    text-decoration: underline;
}

