/* Settings */

:root {
  --heading-flow-list-number-width: 1.5em;
  --heading-flow-list-number-gap: 0.3em;
  --knotis-list-bullet-disc: 0.45em;
  --knotis-list-bullet-line-height: 1.5;
  --knotis-list-bullet-size: calc(var(--knotis-list-bullet-disc) * 1.2);
  --knotis-list-bullet-slot: calc(var(--heading-flow-list-number-width) + var(--heading-flow-list-number-gap));
  --knotis-list-bullet-left: calc(-1 * var(--knotis-list-bullet-slot) + var(--heading-flow-list-number-width) - var(--knotis-list-bullet-size));
  --knotis-list-bullet-top-prose: calc((var(--knotis-list-bullet-line-height) * 1em - var(--knotis-list-bullet-size)) / 2);
  --knotis-list-bullet-top-table: calc(var(--knotis-list-bullet-top-prose) + 0.625em);
  --heading-flow-h2-after-gap: 0.25rem;
  --heading-flow-nested-heading-gap: 0.25rem;
  --heading-flow-nested-list-indent: 0.4em;
  --heading-flow-ul-ol-indent: 0.1em;
  --heading-flow-ol-level1-indent: -1.3em;
  --heading-flow-ol-level1-marker-width: var(--heading-flow-list-number-width);
  --heading-flow-ol-level1-gap: var(--heading-flow-list-number-gap);
  --heading-flow-ol-level2-indent: -2.3em;
  --heading-flow-ol-level2-marker-width: 2.95em;
  --heading-flow-ol-level2-gap: var(--heading-flow-list-number-gap);
  --heading-flow-ol-level3-indent: -2.05em;
  --heading-flow-ol-level3-marker-width: 3.45em;
  --heading-flow-ol-level3-gap: var(--heading-flow-list-number-gap);
  --heading-flow-ol-level4-indent: -2.15em;
  --heading-flow-ol-level4-marker-width: 4em;
  --heading-flow-ol-level4-gap: var(--heading-flow-list-number-gap);
  --heading-flow-ol-level5-indent: -1.85em;
  --heading-flow-ol-level5-marker-width: 4.50em;
  --heading-flow-ol-level5-gap: var(--heading-flow-list-number-gap);
  --heading-flow-ol-level6-indent: -1.8em;
  --heading-flow-ol-level6-marker-width: 5.25em;
  --heading-flow-ol-level6-gap: var(--heading-flow-list-number-gap);
  --heading-flow-ol-level7-indent: -1.95em;
  --heading-flow-ol-level7-marker-width: 6.15em;
  --heading-flow-ol-level7-gap: var(--heading-flow-list-number-gap);
}

/* Shared Tokens */

:root {
  --knotis-card-radius-sm: 6px;
  --knotis-card-radius-md: 12px;
  --knotis-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.07);
  --knotis-module-gap: 1.1rem;
  --knotis-title-size: 1.0rem;
  --knotis-title-weight: 750;
}

[data-md-color-scheme="slate"] {
  --knotis-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 22px rgba(0, 0, 0, 0.5);
}

.md-typeset {
  --heading-indent-h1: 0rem;
  --heading-indent-h2: 0rem;
  --heading-indent-h3: 1rem;
  --heading-indent-h4: 2rem;
  --heading-indent-h5: 3rem;
  --heading-indent-h6: 4rem;
  --heading-bullet-padding-h1: 0rem;
  --heading-bullet-padding-h2: 0rem;
  --heading-bullet-padding-h3: 0rem;
  --heading-bullet-padding-h4: 0rem;
  --heading-bullet-padding-h5: 0rem;
  --heading-bullet-padding-h6: 0rem;
  counter-reset: h2;
}

/* Ordered Lists */

:root:not([data-knotis-structured-lists="false"]) .md-content ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level1-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level1-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level1-gap);
  list-style-type: none;
  counter-reset: level1;
  padding-left: calc(var(--heading-flow-ol-indent) + var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap));
  margin-left: 0;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level2-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level2-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level2-gap);
  counter-reset: level2;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level3-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level3-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level3-gap);
  counter-reset: level3;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level4-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level4-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level4-gap);
  counter-reset: level4;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level5-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level5-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level5-gap);
  counter-reset: level5;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level6-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level6-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level6-gap);
  counter-reset: level6;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level7-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level7-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level7-gap);
  counter-reset: level7;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol {
  list-style-type: none;
  position: relative;
  left: 0;
  padding-left: calc(var(--heading-flow-ol-indent) + var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap));
  margin-left: 0;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol > li::before {
  position: absolute;
  left: calc(-1 * (var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap)));
  margin-left: 0;
  width: var(--heading-flow-ol-marker-width);
  text-align: right;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol > li {
  position: relative;
  padding-left: 0;
  counter-increment: level1;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol > li {
  counter-increment: level2;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol > li {
  counter-increment: level3;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol > li {
  counter-increment: level4;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol > li {
  counter-increment: level5;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol ol > li {
  counter-increment: level6;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol ol ol > li {
  counter-increment: level7;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol > li::before {
  content: counter(level1) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol > li::before {
  content: counter(level1) "." counter(level2) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) "." counter(level6) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ol ol ol ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) "." counter(level6) "." counter(level7) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ol {
  counter-reset: level1;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ol > li {
  counter-increment: level1;
  padding-left: calc(0.5em + var(--heading-flow-ul-ol-indent));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ol > li::before {
  content: counter(level1) ". ";
  width: 1.5em;
}

/* Bullet Lists */

:root:not([data-knotis-structured-lists="false"]) .md-content ul {
  list-style: disc outside;
  margin-left: 0;
  margin-right: 0;
  padding-left: calc(var(--heading-flow-ol-level1-indent) + var(--heading-flow-ol-level1-marker-width) + var(--heading-flow-ol-level1-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul > li::marker {
  font-size: 1.2em;
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ul {
  padding-left: calc(var(--heading-flow-ol-level2-indent) + var(--heading-flow-ol-level2-marker-width) + var(--heading-flow-ol-level2-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ul ul {
  padding-left: calc(var(--heading-flow-ol-level3-indent) + var(--heading-flow-ol-level3-marker-width) + var(--heading-flow-ol-level3-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ul ul ul {
  padding-left: calc(var(--heading-flow-ol-level4-indent) + var(--heading-flow-ol-level4-marker-width) + var(--heading-flow-ol-level4-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ul ul ul ul {
  padding-left: calc(var(--heading-flow-ol-level5-indent) + var(--heading-flow-ol-level5-marker-width) + var(--heading-flow-ol-level5-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ul ul ul ul ul {
  padding-left: calc(var(--heading-flow-ol-level6-indent) + var(--heading-flow-ol-level6-marker-width) + var(--heading-flow-ol-level6-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content ul ul ul ul ul ul ul {
  padding-left: calc(var(--heading-flow-ol-level7-indent) + var(--heading-flow-ol-level7-marker-width) + var(--heading-flow-ol-level7-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content .grid.cards > :is(ul, ol) {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> .wl-sec-code-block:first-child) > .wl-sec-code-block:first-child {
  display: block;
  max-width: 100%;
  width: 100%;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> .wl-sec-table-wrap:first-child) > .wl-sec-table-wrap:first-child {
  display: inline-table;
  max-width: 100%;
  vertical-align: top;
  width: 100%;
}

/* Pane context reuses the same structured-list rules via wrapPaneMarkdownSurface(). */
:is(.wikilink-card__context, .wikilink-card__gap-body, .wikilink-card__continuation-body) .md-content {
  margin: 0;
}

:is(.wikilink-card__context, .wikilink-card__gap-body, .wikilink-card__continuation-body) .md-content .heading-flow__content > :first-child {
  margin-top: 0;
}

/* Heading Typography */

.md-typeset :is(h1, h2, h3, h4, h5, h6) {
  font-weight: bold;
}

.md-typeset :is(h4, h5, h6) {
  color: var(--md-default-fg-color);
  font-size: 1em;
  letter-spacing: 0;
  line-height: 1.5;
  margin: 1em 0;
  text-transform: none;
}

.md-typeset :is(p, li) {
  line-height: 1.5;
}

.md-content :is(.md-typeset, .heading-flow__content) img {
  height: auto;
  margin-bottom: 0.5rem;
  max-width: 100%;
}

/* Heading Placement */

.md-typeset h2 {
  margin-left: var(--heading-indent-h2);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.3rem;
}

/* YAML-title pages: body # → h1 in .heading-flow--h2, body ## → h2 in .heading-flow--h3. */

.md-typeset > h1#__skip {
  margin: 0 0 1.6em;
  color: var(--md-default-fg-color);
}

.md-typeset .heading-flow--h2 > h1 {
  margin-left: var(--heading-indent-h2);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.3rem;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.4;
  color: var(--md-default-fg-color);
  margin-bottom: var(--heading-flow-h2-after-gap);
}

.md-typeset .heading-flow--h3 > h2 {
  margin-left: var(--heading-indent-h3);
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: var(--md-default-fg-color);
  margin-top: var(--heading-flow-nested-heading-gap);
  margin-bottom: 0.5rem;
}

.md-typeset .heading-flow--h4 > h3 {
  margin-left: var(--heading-indent-h4);
  font-size: 1em;
  font-weight: 700;
  color: var(--md-default-fg-color);
  letter-spacing: 0;
  line-height: 1.5;
  margin-top: var(--heading-flow-nested-heading-gap);
  margin-bottom: 0.5rem;
  text-transform: none;
  border-bottom: none;
  padding-bottom: 0;
}

.md-typeset .heading-flow--h5 > h4 {
  margin-left: var(--heading-indent-h5);
  margin-top: var(--heading-flow-nested-heading-gap);
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

.md-typeset .heading-flow--h6 > h5 {
  margin-left: var(--heading-indent-h6);
  margin-top: var(--heading-flow-nested-heading-gap);
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

.md-typeset h3 {
  margin-left: var(--heading-indent-h3);
}

.md-typeset h4 {
  margin-left: var(--heading-indent-h4);
}

.md-typeset h5 {
  margin-left: var(--heading-indent-h5);
}

.md-typeset h6 {
  margin-left: var(--heading-indent-h6);
}

.md-typeset :is(h3, h4, h5, h6) {
  margin-bottom: 0.5rem;
}

.md-typeset img + .heading-flow--h2,
.md-typeset img + .heading-flow--h3 {
  margin-top: 0;
}

/* Heading Flow */

.heading-flow,
.heading-flow__content {
  display: flow-root;
}

.heading-flow,
.heading-flow__content > :first-child,
.heading-flow__content > .heading-flow + .heading-flow > :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-top: 0;
}

/* First numbered section after the page title. */
.md-typeset > h1:not(#__skip) + .heading-flow--h2 > h2 {
  margin-top: var(--heading-flow-nested-heading-gap);
}

/* YAML title pages: match legacy h1+h2 collapsed gap (1.6em), not h1+h1 (1.25em). */
.md-typeset > h1#__skip + h1:not(#__skip) {
  margin-top: 0;
}

.md-typeset > h1#__skip + .heading-flow--h2 > h1 {
  margin-top: 0;
}

/* Top-level sibling sections (e.g. between 1. and 2.). */
.md-typeset > .heading-flow--h2 + .heading-flow--h2 > :is(h1, h2) {
  margin-top: 1.6em;
}

.heading-flow--h2 {
  --heading-flow-indent: var(--heading-indent-h2);
  --heading-flow-bullet-padding: var(--heading-bullet-padding-h2);
  counter-reset: h3;
  counter-increment: h2;
}

.heading-flow--h3 {
  --heading-flow-indent: var(--heading-indent-h3);
  --heading-flow-bullet-padding: var(--heading-bullet-padding-h3);
  counter-reset: h4;
  counter-increment: h3;
}

.md-typeset .heading-flow--h2 > h2 {
  margin-bottom: var(--heading-flow-h2-after-gap);
}

.md-typeset .heading-flow--h2 > h2,
.md-typeset .heading-flow--h3 > h2,
.md-typeset .heading-flow--h3 > h3,
.md-typeset .heading-flow--h4 > h4,
.md-typeset .heading-flow--h5 > h5 {
  margin-top: var(--heading-flow-nested-heading-gap);
}

.heading-flow--h4 {
  --heading-flow-indent: var(--heading-indent-h4);
  --heading-flow-bullet-padding: var(--heading-bullet-padding-h4);
  counter-reset: h5;
  counter-increment: h4;
}

.heading-flow--h5 {
  --heading-flow-indent: var(--heading-indent-h5);
  --heading-flow-bullet-padding: var(--heading-bullet-padding-h5);
  counter-reset: h6;
  counter-increment: h5;
}

.heading-flow--h6 {
  --heading-flow-indent: var(--heading-indent-h6);
  --heading-flow-bullet-padding: var(--heading-bullet-padding-h6);
  counter-increment: h6;
}

.heading-flow__content {
  --heading-flow-child-origin: var(--heading-flow-indent, 0rem);
  margin-left: var(--heading-flow-indent, 0);
}

:root:not([data-knotis-heading-guides="false"]) .md-typeset:not([data-knotis-heading-guides="false"]) :is(
  .heading-flow--h3,
  .heading-flow--h4,
  .heading-flow--h5
) > .heading-flow__content {
  --heading-flow-child-origin: calc(var(--heading-flow-indent, 0rem) + 0.85rem + 1px);
  border-left: 1px solid color-mix(in srgb, var(--knotis-concept-color, var(--md-primary-fg-color)) 18%, transparent);
  padding-left: 0.85rem;
}

:root:not([data-knotis-heading-guides="false"]):not([data-knotis-extended-heading-guides="false"]) .md-typeset:not([data-knotis-extended-heading-guides="false"]) .heading-flow--h2 > .heading-flow__content {
  --heading-flow-child-origin: calc(var(--heading-flow-indent, 0rem) + 0.85rem + 1px);
  border-left: 1px solid color-mix(in srgb, var(--knotis-concept-color, var(--md-primary-fg-color)) 18%, transparent);
  padding-left: 0.85rem;
}

.heading-flow__content > .heading-flow {
  margin-left: calc(-1 * var(--heading-flow-child-origin, 0rem));
}

:root:not([data-knotis-heading-guides="false"]) .md-typeset:not([data-knotis-heading-guides="false"])[data-knotis-extended-heading-guides="false"] .heading-flow__content > .heading-flow {
  background: var(--md-default-bg-color);
}

.heading-flow__content > :is(p, ul, ol) {
  margin-left: 0;
}

:root[data-knotis-structured-lists="false"] .heading-flow__content > ul {
  padding-left: var(--heading-flow-bullet-padding, 0);
}

:root[data-knotis-structured-lists="false"] .heading-flow__content ul {
  list-style-position: outside;
}

:root[data-knotis-structured-lists="false"] .heading-flow__content ul ul {
  padding-left: var(--heading-flow-nested-list-indent);
}

.heading-flow__content li > p:first-child {
  margin-top: 0;
}

.heading-flow__content li > :last-child {
  margin-bottom: 0;
}

/* Heading Flow Ordered Lists */

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content > ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level1-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level1-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level1-gap);
  padding-left: calc(var(--heading-flow-ol-indent) + var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap));
  margin-left: 0;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level2-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level2-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level2-gap);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level3-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level3-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level3-gap);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level4-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level4-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level4-gap);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level5-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level5-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level5-gap);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level6-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level6-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level6-gap);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol ol {
  --heading-flow-ol-indent: var(--heading-flow-ol-level7-indent);
  --heading-flow-ol-marker-width: var(--heading-flow-ol-level7-marker-width);
  --heading-flow-ol-gap: var(--heading-flow-ol-level7-gap);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol {
  list-style: none !important;
  position: relative;
  left: 0;
  padding-left: calc(var(--heading-flow-ol-indent) + var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap));
  margin-left: 0;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol > li {
  position: relative;
  padding-left: 0;
  list-style: none !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol > li::marker {
  content: "";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol > li::before {
  display: block;
  left: calc(-1 * (var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap)));
  margin-right: 0;
  min-width: var(--heading-flow-list-number-width);
  position: absolute;
  width: var(--heading-flow-ol-marker-width);
  text-align: right;
  white-space: nowrap;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol {
  counter-reset: level2;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol {
  counter-reset: level3;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol {
  counter-reset: level4;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol {
  counter-reset: level5;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol {
  counter-reset: level6;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol ol {
  counter-reset: level7;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol > li {
  counter-increment: level2;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol > li {
  counter-increment: level3;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol > li {
  counter-increment: level4;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol > li {
  counter-increment: level5;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol > li {
  counter-increment: level6;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol ol > li {
  counter-increment: level7;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content > ol > li::before {
  content: counter(level1) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol > li::before {
  content: counter(level1) "." counter(level2) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) "." counter(level6) ". ";
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol ol ol ol ol ol > li::before {
  content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) "." counter(level6) "." counter(level7) ". ";
}

/* Heading Flow Lists */

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content :is(ul, ol) {
  left: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: var(--heading-flow-bullet-padding, 0);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content :is(ul, ol) ul {
  left: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: var(--heading-flow-nested-list-indent);
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ol ol {
  padding-left: calc(var(--heading-flow-ol-indent) + var(--heading-flow-ol-marker-width) + var(--heading-flow-ol-gap));
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ul > li > ol ol {
  --heading-flow-ol-indent: -2.3em;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ul {
  list-style: disc outside;
}

:root:not([data-knotis-structured-lists="false"]) .md-content .heading-flow__content ul > li::marker {
  font-size: 1.2em;
}

:root:not([data-knotis-markerless-bullets="true"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details):first-child)::marker,
:root:not([data-knotis-markerless-bullets="true"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child)::marker,
:root:not([data-knotis-markerless-bullets="true"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child)::marker,
.md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(h1, h2, h3, h4, h5, h6):first-child)::marker {
  content: "";
}

:root:not([data-knotis-markerless-bullets="true"]):not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details):first-child)::before,
:root:not([data-knotis-markerless-bullets="true"]):not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child)::before,
:root:not([data-knotis-markerless-bullets="true"]):not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child)::before,
:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(h1, h2, h3, h4, h5, h6):first-child)::before {
  content: none;
}

:root:not([data-knotis-markerless-bullets="true"]):not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child),
:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(h1, h2, h3, h4, h5, h6):first-child) {
  list-style: none !important;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child) {
  display: list-item;
  list-style: disc outside !important;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child)::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child)::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child)::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child)::marker {
  font-size: 1.2em;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child)::before,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child)::before,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child)::before {
  content: none;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> .md-typeset__scrollwrap:first-child) > .md-typeset__scrollwrap,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(.wl-sec-mermaid, .mermaid, .admonition, details, .wl-sec-admonition):first-child) > :is(.wl-sec-mermaid, .mermaid, .admonition, details, .wl-sec-admonition) {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  width: 100%;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> img:first-child) > img,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child) > p,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child) > p {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

/* :has() cannot contain another :has() in its own argument (incl. via :not()) —
   the spec disallows nesting it, so a relative selector list with only that one
   entry is invalid. Chromium parses these leniently and matches anyway; Safari
   correctly treats the whole selector as invalid and drops the rule, which is
   why e.g. the "margin: 0" below silently never applied in Safari. Rewritten
   to a plain `li > .highlight:first-child:has(...)` so :has() is used only
   once per selector — same match set in every browser, not a Safari-only fix. */
/* display: block, not inline-table: .highlighttable's own layout already comes
   from the theme (display: flow-root on the table, display: flex on its <tr>,
   display: block + min-width: 0 on its <td class="code">) which lets the long
   non-wrapping code line scroll inside its own column. inline-table forces
   *this* element back into table-layout sizing, where max-width: 100% does not
   reliably cap a table whose content has an unbreakable run wider than the
   container (CSS table auto-layout takes the larger of max-width and content's
   minimum width) — that broke page-level horizontal containment for any
   linenums= code block whose line is longer than its column, in every browser,
   not just Safari. block respects max-width normally and still keeps the
   marker fix above working (verified). */
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > .highlight:first-child:has(.highlighttable) {
  display: block;
  max-width: 100%;
  width: 100%;
}

/* Native Safari paints outside markers for block-led linenumbered code <li>
   rows above the code box. Keep Chromium/Firefox on the block layout. */
:root[data-knotis-webkit-engine="true"][data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > .highlight:first-child:has(.highlighttable) {
  display: inline-block;
  vertical-align: top;
}

/* Safari/WebKit can count the empty first span in Pygments line-number
   gutters during first layout; JS forces a remeasure after this layout. */
:root[data-knotis-webkit-engine="true"] .md-typeset .highlighttable .linenodiv pre {
  display: flex;
  flex-direction: column;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > .highlight:first-child:not(:has(.highlighttable)),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> pre:first-child:not(.mermaid)) > pre:first-child {
  display: block;
  max-width: 100%;
  width: 100%;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > .highlight:first-child:not(:has(.highlighttable)) > pre,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> pre:first-child:not(.mermaid)) > pre:first-child {
  display: block;
  margin: 0;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > .highlight:first-child:not(:has(.highlighttable)) > pre > code,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> pre:first-child:not(.mermaid)) > pre:first-child > code {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  width: 100%;
}

/* WebKit/Safari still mispositions this li's native disc marker (drawn beside
   a later nested <li>'s marker instead of its own box top) for non-table code
   whose <code> needs its own horizontal scroll (overflow-x: auto, long lines)
   — even with the display/margin fixes above. Only a block-first item that
   also owns a nested list shows this (no second marker to collide with
   otherwise). .highlighttable (linenums) code does not need this: it already
   renders correctly with `outside` once display: inline-table applies above,
   and `inside` breaks it there (marker drops onto its own line above the
   inline-table instead of beside it), so this is explicitly scoped to
   :not(:has(.highlighttable)). This only changes where the <li> marker sits —
   it does not touch the code box's own white-space/overflow, so long lines
   keep scrolling horizontally instead of wrapping. Chained, non-nested
   :has() per the rule above. Gated to real Safari/iOS; Chromium already
   renders this correctly with `outside` and is untouched. */
:root[data-knotis-webkit-engine="true"][data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> .highlight:first-child):has(> ul, > ol):not(:has(.highlighttable)),
:root[data-knotis-webkit-engine="true"][data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> pre:first-child:not(.mermaid)):has(> ul, > ol) {
  list-style-position: inside !important;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(table, .md-typeset__table):first-child) > :is(table, .md-typeset__table) {
  display: inline-table;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child) > :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel):first-child,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(table, .md-typeset__table, .md-typeset__scrollwrap):first-child) > :is(table, .md-typeset__table, .md-typeset__scrollwrap):first-child :is(table, .highlighttable),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > img:only-child) > p:first-child,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child > a:only-child > img:only-child) > p:first-child {
  margin-top: 0 !important;
}

/* Hidden slide markers inside <li> still match :first-child; mirror block-first
   markerless alignment when slide-start precedes the teaching block (module page). */
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel)),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > img:only-child),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel)),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> [data-knotis-slide-marker] + p > img:only-child),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child) {
  display: list-item;
  list-style: disc outside !important;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel))::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > img:only-child)::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child)::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel))::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> [data-knotis-slide-marker] + p > img:only-child)::marker,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content ul > li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child)::marker {
  font-size: 1.2em;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel))::before,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > img:only-child)::before,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child)::before {
  content: none;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(table, .md-typeset__table)) > [data-knotis-slide-marker] + :is(table, .md-typeset__table) {
  display: inline-table;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + .md-typeset__scrollwrap) > [data-knotis-slide-marker] + .md-typeset__scrollwrap,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(.wl-sec-mermaid, .mermaid, .admonition, details, .wl-sec-admonition)) > [data-knotis-slide-marker] + :is(.wl-sec-mermaid, .mermaid, .admonition, details, .wl-sec-admonition) {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  width: 100%;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + img) > [data-knotis-slide-marker] + img,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > img:only-child) > [data-knotis-slide-marker] + p,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child) > [data-knotis-slide-marker] + p {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel)) > [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel),
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > img:only-child) > [data-knotis-slide-marker] + p,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child) > [data-knotis-slide-marker] + p,
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(table, .md-typeset__table, .md-typeset__scrollwrap)) > [data-knotis-slide-marker] + :is(table, .md-typeset__table, .md-typeset__scrollwrap) :is(table, .highlighttable) {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + :is(img, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition, .wl-sec-code-block, .wl-sec-table-wrap, .wl-sec-tab-panel)) > :is(ul, ol),
:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > img:only-child) > :is(ul, ol),
:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> [data-knotis-slide-marker] + p > a:only-child > img:only-child) > :is(ul, ol) {
  margin-top: var(--knotis-markerless-block-child-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) {
  --knotis-markerless-block-child-gap: 0.1rem;
  --knotis-markerless-prose-block-gap: 0.5em;
  --knotis-markerless-prose-code-gap: var(--knotis-markerless-block-child-gap);
  --knotis-markerless-prose-table-gap: 1em;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p:first-child + :is(ul, ol) > li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition)) > p:first-child {
  margin-bottom: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) > :is(ul, ol) {
  margin-top: var(--knotis-markerless-block-child-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) > :is(ul, ol) > li:first-child {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) > :is(ul, ol) > li:first-child > :is(p, .highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol) > li:first-child > .highlight:first-child :is(table, .highlighttable) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol):has(> li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid):first-child) {
  margin-top: var(--knotis-markerless-prose-code-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol):has(> li:first-child > :is(table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) {
  margin-top: var(--knotis-markerless-prose-table-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol):has(> li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) > li:first-child {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li:has(> p) + li:has(> :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) {
  margin-top: var(--knotis-markerless-prose-block-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol):has(> li:first-child > :is(.admonition, details, .wl-sec-admonition):first-child) > li:first-child {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol) > li:first-child > :is(table, .md-typeset__table, .md-typeset__scrollwrap):first-child :is(table) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li > p + :is(ul, ol):has(> li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) > li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) ol > li > p + :is(ul, ol):has(> li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid):first-child) {
  margin-top: var(--knotis-markerless-prose-code-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) ol > li > p + :is(ul, ol):has(> li:first-child > :is(table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) {
  margin-top: var(--knotis-markerless-prose-table-gap) !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) ol > li > p + :is(ul, ol):has(> li:first-child > :is(.highlight, pre, .wl-sec-mermaid, .mermaid, table, .md-typeset__table, .md-typeset__scrollwrap, .admonition, details, .wl-sec-admonition):first-child) > li:first-child {
  margin-top: 0 !important;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) ol > li > p:first-child {
  display: inline;
  margin: 0;
}

:root:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) ol > li > p:first-child + * {
  margin-top: 0.1rem;
}

/* Wrapper list items that only contain a nested list (no lead text) should not show a phantom bullet. */
:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li.knotis-nested-list-shell {
  list-style: none !important;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li.knotis-nested-list-shell::marker {
  content: none;
}

:root[data-knotis-markerless-bullets="true"]:not([data-knotis-structured-lists="false"]) .md-content :is(.md-typeset, .heading-flow__content) li.knotis-nested-list-shell::before {
  content: none !important;
}


:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h2 > h1::before {
  content: counter(h2) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h3 > h2::before {
  content: counter(h2) "." counter(h3) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h4 > h3::before {
  content: counter(h2) "." counter(h3) "." counter(h4) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h5 > h4::before {
  content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h6 > h5::before {
  content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h2 > h2::before {
  content: counter(h2) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h3 > h3::before {
  content: counter(h2) "." counter(h3) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h4 > h4::before {
  content: counter(h2) "." counter(h3) "." counter(h4) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h5 > h5::before {
  content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". ";
}

:root:not([data-knotis-heading-numbering="false"]) .md-typeset:not([data-knotis-heading-numbering="false"]) .heading-flow--h6 > h6::before {
  content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". ";
}

:root[data-knotis-heading-numbering="false"] .md-typeset :is(h1, h2, h3, h4, h5, h6)::before {
  content: none;
}

.md-typeset[data-knotis-heading-numbering="false"] :is(h1, h2, h3, h4, h5, h6)::before {
  content: none;
}
