/* static/css/terms.css */

/* Reset counters */
body {
  counter-reset: section;
}

/* Section (h2) */
h2 {
  counter-reset: subsection;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h2::before {
  counter-increment: section;
  content: counter(section) ". ";
  font-weight: bold;
}

/* Subsection (h3) */
h3 {
  counter-reset: subsubsection;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h3::before {
  counter-increment: subsection;
  content: counter(section) "." counter(subsection) " ";
  font-weight: bold;
}

/* Sub-subsection (h4) */
h4 {
  counter-reset: subsubsubsection;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

h4::before {
  counter-increment: subsubsection;
  content: counter(section) "." counter(subsection) "." counter(subsubsection) " ";
  font-weight: bold;
}


/* Style nested ordered list */
ol.paragraph-list {
  /* Turn off default numbers */
  list-style: none;
  /* Reset for each new list under a heading */
  counter-reset: paragraph;
  /* Optional: align visually */
  padding-left: 0;
}

/* Increment paragraph counter for each list item */
ol.paragraph-list>li {
  counter-increment: paragraph;
  margin-left: 2em;
  display: block;
  position: relative;
}

/* Render the full hierarchical number */
ol.paragraph-list>li::before {
  content: counter(section) "." counter(paragraph) " ";
  font-weight: bold;
  position: absolute;
  left: -2em;
}


/* Style nested ordered list */
ol.sub-list {
  /* Turn off default numbers */
  list-style: none;
  /* Reset for each new list under a heading */
  counter-reset: item;
  /* Optional: align visually */
  padding-left: 0;
}

/* Increment paragraph counter for each list item */
ol.sub-list>li {
  counter-increment: item;
  margin-left: 4em;
  display: block;
  position: relative;
}

/* Render the full hierarchical number */
ol.sub-list>li::before {
  content: counter(section) "." counter(paragraph) "." counter(item) " ";
  font-weight: bold;
  position: absolute;
  left: -4em;
}
