/*
 * List Continue Paragraph Block
 *
 * This CSS enables ordered list numbering to continue across multiple
 * paragraph blocks, even when images or other blocks are placed between
 * list items.
 *
 * Usage: Apply .list-continue-wrapper to a parent container, and
 * .list-continue-paragraph to each child paragraph block.
 */

/* Parent wrapper initializes the counter */
.list-continue-wrapper {
    counter-reset: list-counter;
}

/* Ordered lists within continue the count (don't reset) */
.list-continue-wrapper ol {
    counter-reset: none;
    list-style: none;
    padding-left: 2rem;
}

/* Each list item increments the shared counter */
.list-continue-wrapper ol > li {
    counter-increment: list-counter;
    position: relative;
}

/* Custom counter display */
.list-continue-wrapper ol > li::before {
    content: counter(list-counter) ". ";
    position: absolute;
    left: -2rem;
    font-weight: 500;
}

/* Nested ordered lists should have their own counters */
.list-continue-wrapper ol ol {
    counter-reset: nested-counter;
    padding-left: 2rem;
}

.list-continue-wrapper ol ol > li {
    counter-increment: nested-counter;
}

.list-continue-wrapper ol ol > li::before {
    content: counter(nested-counter, lower-alpha) ". ";
}
