body {
    /*counter-reset: my-chap-counter;*/
    counter-reset: my-sec-counter;
    
}

.chapter::before {
    font-size: 2em;
    font-weight: bolder;
    font-style: normal;
    
    counter-reset: my-def-counter;
    
    content: "Chapter " counter(my-chap-counter);
}

.section {
    /* Increment counters */
    counter-increment: my-sec-counter;
    /* Set counters to 0 */
    counter-reset: my-exmpl-counter;
}

.section::before {
    font-weight: bolder;
    font-style: normal;
    font-size: 1.17em;
    counter-reset: my-bmthm-counter;
    
    content: "Section " counter(my-chap-counter) "." counter(my-sec-counter);
}

.section::after{
    counter-reset: my-def-counter;
}

.latex sub, .latex sup {
  text-transform: uppercase;
}

.latex sub {
  vertical-align: -0.5ex;
  margin-left: -0.1667em;
  margin-right: -0.125em;
}

.big_latex, .latex sub {
  font-size: 1.5em;
}

.small_latex, .latex sub {
  font-size: 1em;
}

.latex sup {
  font-size: 0.85em;
  vertical-align: 0.15em;
  margin-left: -0.36em;
  margin-right: -0.15em;
}

.inlinedefinition {
    display: block;
    margin: 12px 0;
    font-style: normal;
}

.inlinedefinition::before {
    font-weight: bold;
    font-style: normal;
}

.inlinedefinition p {
    display: inline;
}

.definition {
    display: block;
    margin: 12px 0;
    font-style: normal;
}

.definition::before {
    font-weight: bold;
    font-style: normal;
    content: "Definition. ";
}

.definition p {
    display: inline;
}

.theorem {
    display: block;
    margin: 12px 0;
    font-style: normal;
}

.theorem::before {
    content: "Theorem. ";
    font-weight: bold;
    font-style: normal;
}

.theorem p {
    display: inline;
}

.lemma {
    display: block;
    margin: 12px 0;
    font-style: normal;
}

.lemma::before {
    content: "Lemma. ";
    font-weight: bold;
    font-style: normal;
}

.lemma p {
    display: inline;
}

.corollary {
    display: block;
    margin: 12px 0;
    font-style: normal;
}

.corollary::before {
    content: "Corollary. ";
    font-weight: bold;
    font-style: normal;
}

.corollary p {
    display: inline;
}

.proof {
    text-indent: 25px;
    display: block;
    margin: 12px 0;
    font-style: normal;
    position: relative;
}

.proof::before {
    content: "Proof. ";
    font-weight: lighter;
    font-style: italic;
}

.proof p {
    display: inline;
}

.proof::after {
    content: "\25FC	";
    position: absolute;
    width: 1em;
    height: 1em;
    bottom: 0;
    right: 0;
}

.beamertheorem {
  width: 100%;
  margin: 0 auto;
  display: block;
  font-style: normal;
  /*font-size: 24px;*/
  color: black;
  border-radius: 10px;
  background-color: rgb(222,222,231);
  box-shadow: 5px 10px 8px #888888;
}

.beamertheorem::before {
  content: "Theorem. ";
  font-weight: bold;
  font-style: normal;
  display: flex;
  /*display: inline-block;*/
  /*width: -webkit-fill-available;*/
  color: white;
  border-radius: 10px 10px 0 0;
  padding: 10px 5px 5px 15px;
  background-color: rgb(38, 38, 134);
}

.beamertheorem p {
    padding: 15px 15px 15px 15px;
}

.beamertheorem ol {
    padding-right: 15px;
}

.countbeamertheorem {
  width: 100%;
  margin: 0 auto;
  display: block;
  font-style: normal;
  /*font-size: 24px;*/
  color: black;
  border-radius: 10px;
  background-color: rgb(222,222,231);
  box-shadow: 5px 10px 8px #888888;
}

.countbeamertheorem::before {
  
  font-weight: bold;
  font-style: normal;
  display: flex;
  /*display: inline-block;*/
  /*width: -webkit-fill-available;*/
  color: white;
  border-radius: 10px 10px 0 0;
  padding: 10px 5px 5px 15px;
  background-color: rgb(38, 38, 134);
  
  counter-increment: my-bmthm-counter;
  content: "Theorem " counter(my-chap-counter) "." counter(my-sec-counter) "." counter(my-bmthm-counter) ". ";
}

.countbeamertheorem p {
    padding: 15px 15px 15px 15px;
}

.countbeamertheorem ol {
    padding-right: 15px;
}

.example {
    display: block;
    margin: 12px 0;
    font-style: normal;
    position: relative;
}

.example::before {
    content: "Example. ";
    font-weight: bold;
    font-style: normal;
}

.example p {
    display: inline;
}

.example::after {
    font-style: normal;
    content: "\25FB";
    position: absolute;
    width: 1em;
    height: 1em;
    bottom: 0;
    right: 0;
}

.countexample {
    display: block;
    margin: 12px 0;
    font-style: normal;
    position: relative;
}

.countexample::before {
    font-weight: bold;
    font-style: normal;
    
    counter-increment: my-exmpl-counter;
    content: "Example " counter(my-chap-counter) "." counter(my-sec-counter) "." counter(my-exmpl-counter) ". ";
}

.countexample p {
    display: inline;
}

.countexample::after {
    font-style: normal;
    content: "\25FB";
    position: absolute;
    width: 1em;
    height: 1em;
    bottom: 0;
    right: 0;
}

.exercises {
    display: block;
    margin: 12px 0;
    font-style: normal;
    position: relative;
    text-align: center;
}

.exercises::before {
    font-weight: bold;
    font-style: normal;
    font-size: 1.5rem;
    
    content: "Exercises for Section " counter(my-chap-counter) "." counter(my-sec-counter) " ";
}

.countdefinition {
    display: block;
    margin: 12px 0;
    font-style: normal;
}

.countdefinition::before {
    font-weight: bold;
    font-style: normal;
    
    counter-increment: my-def-counter;
    content: "Definition " counter(my-chap-counter) "." counter(my-sec-counter) "." counter(my-def-counter);
}

.countdefinition p {
    display: inline;
}