/* =========================================================================
 * krypteia documentation — section numbering only.
 *
 * Per-page convention:
 *   h1  →  page / chapter title   (unnumbered)
 *   h2  →  I, II, III, ...
 *   h3  →  I.1, I.2, ...
 *   h4  →  I.1.a, I.1.b, ...
 *
 * Theme styling is left to the base Read-the-Docs theme — this file only
 * injects the numbering counters. A richer cyber-crypto-underground
 * palette will come back in a later pass.
 * ========================================================================= */

.rst-content {
    counter-reset: krypt-sec krypt-subsec krypt-subsubsec;
}

.rst-content h1 {
    counter-reset: krypt-sec krypt-subsec krypt-subsubsec;
}

.rst-content h2 {
    counter-increment: krypt-sec;
    counter-reset: krypt-subsec krypt-subsubsec;
}
.rst-content h2::before {
    content: counter(krypt-sec, upper-roman) ". ";
    margin-right: 0.3em;
}

.rst-content h3 {
    counter-increment: krypt-subsec;
    counter-reset: krypt-subsubsec;
}
.rst-content h3::before {
    content: counter(krypt-sec, upper-roman) "."
             counter(krypt-subsec) ". ";
    margin-right: 0.3em;
}

.rst-content h4 {
    counter-increment: krypt-subsubsec;
}
.rst-content h4::before {
    content: counter(krypt-sec, upper-roman) "."
             counter(krypt-subsec) "."
             counter(krypt-subsubsec, lower-alpha) ". ";
    margin-right: 0.3em;
}

/* Don't number headings inside local TOCs / admonitions / sidebars. */
.rst-content .contents h2::before,
.rst-content .contents h3::before,
.rst-content .contents h4::before,
.rst-content .admonition h2::before,
.rst-content .admonition h3::before,
.rst-content .admonition h4::before,
.rst-content aside h2::before,
.rst-content aside h3::before,
.rst-content aside h4::before {
    content: none;
}
