@font-face {
	font-family: serif;
	src: local("Times"), local("Apple Symbols");
}

body {
	font-size: 11pt;
}

div.tof a {
	text-decoration: none;
	color: inherit;
}

div.tof a::after {
	content: leader('. ') "   " target-counter(attr(href), page);
}

div.toc a  {
	text-decoration: none;
	color: inherit;
}

div.toc a.h1::after {
	content: leader(' ') " " target-counter(attr(href), page);
}

div.toc a.h2::after, a.h3::after, a.h4::after {
	content: leader('. ') "   " target-counter(attr(href), page);
}

a.xref::after {
	content: " (see Chapter " target-counter(attr(href), h1) ")";
}

div.toc a.h1::before {
	content: target-counter(attr(href), h1) "  ";
}

div.toc a.h2::before {
	content: target-counter(attr(href), h1) "." target-counter(attr(href), h2) "  ";
}

div.toc a.h3::before {
	content: target-counter(attr(href), h1) "." target-counter(attr(href), h2) "." target-counter(attr(href), h3) "  ";
}

div.toc a.h4::before {
	content: target-counter(attr(href), h1) "." target-counter(attr(href), h2) "." target-counter(attr(href), h3) "." target-counter(attr(href), h4) "  ";
}

div.toc a.h1 {
	font-weight: bold;
}

div.toc a.h2 {
	margin-left: 1em;
}

div.toc a.h3 {
	margin-left: 2.5em;
}


/* hack alert */
div.main div.chapterhead {
	counter-increment: h1;
	counter-reset: h2 h3;
}

div.main h2 {
	counter-increment: h2;
	counter-reset: h3;
}

div.main h3 {
	counter-increment: h3;
}

p.chapterno {
	text-align: right;
	font-size: 22pt;
}

a.chapterno {
	text-decoration: none;
	content: target-counter(attr(href), h1);
	color: inherit;
	font-size: 95pt;
	font-style: italic;
}

span.chapterno {
	
}

div.chapterhead {
	page-break-before: always;
	page-break-inside: avoid;
	margin-top: 147pt;
}

div.page {
    page-break-before: always;
    page-break-inside: avoid;
    page-break-after: always;
}

div.chapterhead h1 {
	border-top: 1pt solid black;
	border-bottom: 1pt solid black;
	margin-top: -35pt;
	margin-bottom: 1ex;
	padding-top: 10pt;
	padding-bottom: 1ex;
	font-size: 30pt;
}

div.main h2::before {
	content: counter(h1) "." counter(h2) " ";
}

div.main h3::before {
	content: counter(h1) "." counter(h2) "." counter(h3) " ";
}

h1, h2, h3 {
	page-break-after: avoid;
}

p, dl, ul, ol {
text-align: justify;
}

pre {
	font-size: 8pt;
	margin-left: 2em;
	margin-right: 1em;
	margin-top: 1ex;
	margin-bottom: 1ex;
	background: #eee;
}

@page {
	size: A4;
	@bottom-right {
		content: counter(page);
	}
}

@page titlepage {
      @bottom-right {
            content: "";
      }
}


/* title page stuff */

div.titlepage {
    page: titlepage;
    width: 100%;
    page-break-inside: avoid;
    page-break-after: always;
}

div.titleheader {
    width: 100%;
    border-bottom: 1pt solid black;
    height: 1in;
}

img#titleprimelifelogo {
    width: 4.72cm;
    float: left;
    z-index: -1;
}

div.titleheader p {
    text-align: right; 
    float: right;
    width: 65%;
    margin-top: 0.8in;
    font-size: small;
}

div.titlepagefooter {
    border-top: 1pt solid black;
    padding-top: 5pt;
}

@media print {
  div.titlepagefooter {
    position: absolute;
    bottom: 0;
  }
}

div.titlepagefooter p {
    width: 80%;
    float: left;
    font-style: italic;
    font-size: x-small;
}

img#titlefp7logo {
    width: 1.58cm;
    float: right;
}


div.title p {
    text-align: center;
    margin-top: 0.7in;
    font-size: xx-large;
}

div.subtitle p {
    text-align: center;
    margin-bottom: 0.7in;
    font-size: x-large;
}

div.frontmatter {
    margin-bottom: 0.7in;
    margin-left: 20%;
    margin-right: 20%;
 }

div.frontmatter table {
}

div.frontmatter td {
    vertical-align: top;
    padding-right: 2ex;
}

table#partnertable {
    font-size: small;
}

table#partnertable td {
    vertical-align: top;
    padding: 1ex;
}

table#partnertable tr td:first-child {
    text-align: right;
}

table#contributors td {
    vertical-align: top;
    padding-right: 1ex;
    padding-bottom: 1pt;
    padding-left: 0pt;
    font-size: small;
}

table#contributors thead td {
    font-weight: bold;
}

table#contributors tr td:first-child {
    width: 30%;
}

table#contributors tr td + td {
    width: 60%;
}

p#disclaimer {
    font-size:  x-small;
    font-style: italic;
}

@media print {
  p#disclaimer {
    position: absolute;
    bottom: 0;
  }
}

div.abstract {
    font-size: 9pt;
}

div.abstract p{
    text-align: justify;
}
