/* -- file start -- */


/* single-column layout */
html  {
  margin: 0;
  padding: 2%;			/* adaptive */
  font-family: sans-serif;
}
body  {
  position: relative;
  top: .3em;
  left: .3em;			/* cannot make this relative as div.main has different width */
  min-width: 120px;		/* worst case */
  max-width: 40em;		/* should depend on font size */
  margin: 0 auto;		/* center */
}
div#main  { 
  z-index: 10;
  position: relative;
  top: -.3em;
  left: -.3em;
  padding: 3%;			/* adaptive */
            /* check overflow of content blocks */
}

/* general */
a  { 
  text-decoration: none;
}
a:hover  { 
  text-decoration: underline;
}
div#main p, div#main blockquote  { 
  text-align: justify;
}
blockquote:lang(en) { 
  quotes: "»" "«" '"' '"';
}
blockquote:before  { 
  content: open-quote;
}
blockquote:after  { 
  content: close-quote;
}
samp  { 
  font-size: 1em;
}

/* headers */
h1  { 
  margin-top: 0;
}
h3:before  { 
  content: counter( h3) "\00A0\00A0";
}
#toc  {
  counter-reset: h3 -1;
}
h3  { 
  margin-top: 1.5em;
  counter-increment: h3;
  counter-reset: h4;
}
h4:before  { 
  content: counter( h3) "." counter( h4) "\00A0\00A0";
}
h4  { 
  counter-increment: h4;
}
/* footer */
hr  { 
  margin-top: 3em;
}

/* meta data */
#author, #date  { 
  font-style: italic;
}
#author var, #date var  { 
  font-style: normal;
}
#author  { 
  margin-bottom: 0;
}
#date  { 
  margin-top: 0;
}

/* ToC */
#toc  { 
  float: right;
  min-width: 35%;
  max-width: 60%;
  margin: 0 0 1em 2em;
  padding: .5em;
}
#toc h3  { 
  margin: 0 auto .5em;
}
#toc h3:before  { 
  display: none;
}
#toc ul  { 
  margin: 0 auto;
  padding-left: 0;
  list-style-type: none;
  counter-reset: toc;
}
#toc ul li:before  { 
  content: counters( toc, ".") "\00A0\00A0";
}
#toc ul li  { 
  counter-increment: toc;
}
#toc ul ul  { 
  margin-left: 1em;
}

/* lists */
dd ul  { 
  padding-left: 0;
}
dd  { 
  margin-left: 8%;
}
dd + dt, dt + dt  { 
  margin-top: .5em;
}

/* images */
.figure  { 
  margin: 1.5em auto;
}
.figure img  { 
  max-width: 100%;
  height: auto;
}
.figure .caption:before  { 
  content: "Figure " counter(figureCaption) ". ";
  font-weight: bold;
}
.figure .caption  { 
  counter-increment: figureCaption;
}

/* colors */
html  {
  background-color: #ffe;	/* window (background) color, otherwise background color of body is inherited */
}
body  {
  background-color: #eec;	/* page shadow */
}
div#main  { 
  border: 1px solid #ccc;
  color: #333;
  background-color: #fffff6;	/* sheet color */
}
#toc  { 
  border: 1px solid #ccf;
  background-color: #eef;
}


/* -- file end -- */
