#toc ul { margin-left: 0, padding-left: 2em }
#toc ol { margin-left: 0, padding-left: 2em }
#toc { counter-reset: toc1 }
#toc li { list-style: none; text-indent: -1em }
#toc li { counter-increment: toc1; counter-reset: toc2 }
#toc li li { counter-increment: toc2;  counter-reset: toc3 }
#toc li li li { counter-increment: toc3; counter-reset: toc4 }
#toc li:before { content: counter(toc1) " " }
#toc li li:before { content: counter(toc1) "." counter(toc2) " " }
#toc li li li:before { content: counter(toc1) "." counter(toc2) "." counter(toc3) " " }

@media print {
  font-size: 10pt
  pre { font-size: 8pt; }
  #toc a:after {
    content: leader('.\0000a0') "\0000a0" target-counter(attr(href), page)
  }
  .page { page-break-before: always}
  pre { font-size: 80% }
}

@media screen {
  body {
    font-size: 16pt;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }
  pre { font-size: 14pt; }
  p.figure img {
    width: 100%;
  }
}


@page {
  size: A4;
  @top-left {
    font-size: 11pt;
    content: "customize";
  }
  @top-right {
    font-size: 11pt;
    content: "customize";
  }
  @bottom-left {
    font-size: 11pt;
    content: "customize"
  }
  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
  }
}

@page titlepage {
  @bottom-right {
    content: "";
  }
}

body { counter-reset: toc1; counter-reset: toc2; counter-reset: toc3 }

h2 { counter-increment: toc1; counter-reset: toc2; page-break-after: avoid }
h3 { counter-increment: toc2; counter-reset: toc3; page-break-after: avoid }
h4 { counter-increment: toc3; page-break-after: avoid }

h2:before { content: counter(toc1) " " }
h3:before { content: counter(toc1) "." counter(toc2) " " }
h4:before { content: counter(toc1) "." counter(toc2) "." counter(toc3) " " }

#toc a { color: black; text-decoration: none }
#toc a:visited { color: black; text-decoration: none }
#toc a:hover { color: blue; text-decoration: underline; background-color: white }

h2 { page-break-before: always }
h2.no-toc { page-break-before: avoid }

h1 { text-align: center }
.center h2 { text-align: center }

h5, h6 { font-size: 100% }

#Abstract, #Table_of_Contents { page-break-before: avoid }

.no-toc:before { content: "" }
#Abstract:before { content: "" }
#Table_of_Contents:before { content: "" }
#toc:after { counter-reset: toc1; page-break-after: always }
#Introduction { counter-reset: toc1; page-break-before: always }

p.fig-caption { font-weight: bold }

.center { text-align: center }

p.figure.small img {
  margin-left: 30%;
  width: 30%;
}

blockquote {
  margin-left: 3%;
  margin-right: 3%;
  padding-left: 0.5em;
  padding-right: 0.5em;
  border: solid black thin;
  font-family: sans-serif;
  font-style: italic;
  background-color: rgb(240,240,240);
}

dt { margin-top: 0.3em; font-weight: bold; }
dd { margin-top: 0.3em }

table {
 border-collapse: separate; 
 border-spacing: 0; 
 border: solid 1px black;
 }
td,th { border: solid 1px gray; padding: 0.2em; background-color: white; }
td.yes { background-color: #DFD }
td.no { background-color: #FDD }

p.copyright { font-size: smaller }

img { max-width: 100% }
