<div class="container">
  <ol data-name="counter()">
    <li class="list-item">Ordered list item</li>
    <li class="list-item">
      Ordered list item
      <ol>
        <li class="list-item">
          Ordered list item
          <ol>
            <li class="list-item">Ordered list item</li>
            <li class="list-item">Ordered list item</li>
            <li class="list-item">Ordered list item</li>
          </ol>
        </li>
        <li class="list-item">Ordered list item</li>
        <li class="list-item">Ordered list item</li>
        <li class="list-item">Ordered list item</li>
      </ol>
    </li>
    <li class="list-item">Ordered list item</li>
    <li class="list-item">Ordered list item</li>
  </ol>

  <ol data-name="counters()">
    <li class="list-item">Ordered list item</li>
    <li class="list-item">
      Ordered list item
      <ol>
        <li class="list-item">
          Ordered list item
          <ol>
            <li class="list-item">Ordered list item</li>
            <li class="list-item">Ordered list item</li>
            <li class="list-item">Ordered list item</li>
          </ol>
        </li>
        <li class="list-item">Ordered list item</li>
        <li class="list-item">Ordered list item</li>
        <li class="list-item">Ordered list item</li>
      </ol>
    </li>
    <li class="list-item">Ordered list item</li>
    <li class="list-item">Ordered list item</li>
  </ol>
</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");

* {
  box-sizing: border-box;
}

body {
  inline-size: 100vw;
  min-block-size: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Exo", Arial, sans-serif;
  background-color: #f7f7f7;
  line-height: 2;
}

.container {
  padding: 10px 20px;
  background: #fff;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
  min-width: 50vw;
  max-width: 50vw;
  border-radius: 5px;
  position: relative;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  place-content: center;
  place-items: center;
}

.container > ol {
  position: relative;
}

.container > ol::before {
  content: attr(data-name);
  font-weight: 900;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  color: #090f89;
  text-shadow: 1px 1px 0 rgb(0 0 0 / 0.5);
}

li::marker {
  color: #09f;
}

ol:nth-child(1) li::marker {
  content: "Step" counter(list-item) ":";
}

ol:nth-child(2) li::marker {
  content: "Step" counters(list-item, ".") ":";
}

li li::marker {
  color: #f36;
}

li li li::marker {
  color: #90f;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.