body {
    display:flex;
    flex-direction: column;
    justify-content:flex-start;
    gap:1rem;
    background:beige;
    font-family:sans-serif;
    padding:1em;
    border:1em #D4AF37 solid;
    margin:0;
    align-items:center;
}

h1, h2, h3, h4, h5, h6, caption, label, figcaption, legend, summary, dt {
    font-family:serif;
    color:black;
    border-bottom:0.25em #D4AF37 dotted;
    margin-top:2em;
    margin-bottom:1em;
    margin-left:0.6em;
    margin-right:0.6em;
    width:fit-content;
    max-width:fit-content;
}

/* ---------------------------------------------------------
   1. Initialize Counters on the Body/Main Container
--------------------------------------------------------- */
main {
    /* Create counters for h1, figures, and tables */
    counter-reset: h1-counter figure-counter table-counter;
  }
  
  /* ---------------------------------------------------------
     2. Hierarchical Heading Numbering (h1 - h6)
  --------------------------------------------------------- */
  
  /* H1 */
  main h1 {
    counter-reset: h2-counter; /* Reset H2 when a new H1 starts */
  }
  main h1::before {
    counter-increment: h1-counter;
    content: counter(h1-counter) ". ";
  }
  
  /* H2 */
  main h2 {
    counter-reset: h3-counter; /* Reset H3 when a new H2 starts */
  }
  main h2::before {
    counter-increment: h2-counter;
    content: counter(h1-counter) "." counter(h2-counter) " ";
  }
  
  /* H3 */
  main h3 {
    counter-reset: h4-counter; /* Reset H4 when a new H3 starts */
  }
  main h3::before {
    counter-increment: h3-counter;
    content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) " ";
  }
  
  /* H4 */
  main h4 {
    counter-reset: h5-counter;
  }
  main h4::before {
    counter-increment: h4-counter;
    content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) " ";
  }
  
  /* H5 */
  main h5 {
    counter-reset: h6-counter;
  }
  main h5::before {
    counter-increment: h5-counter;
    content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "." counter(h5-counter) " ";
  }
  
  /* H6 */
  main h6::before {
    counter-increment: h6-counter;
    content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "." counter(h5-counter) "." counter(h6-counter) " ";
  }
  
  /* ---------------------------------------------------------
     3. Figure Numbering
  --------------------------------------------------------- */
  main figure {
    counter-increment: figure-counter;
  }
  
  main figcaption::before {
    content: "Figure " counter(figure-counter) ": ";
    font-weight: bold;
  }
  
  /* ---------------------------------------------------------
     4. Table Numbering
  --------------------------------------------------------- */
  main table {
    counter-increment: table-counter;
  }
  
  main table caption::before {
    content: "Table " counter(table-counter) ": ";
    font-weight: bold;
  }