/*************** GENERAL ***************/

body {
  font-family:  Arial, Helvetica, sans-serif;
  font-size:    12px;
  line-height:  140%;
  background:   #ffffff;
  color:        #000000;
  margin:       0px;
}

#logo {
  margin:    10px;
  font-size: 90%;
}

.navheader, .navfooter {
  margin: 10px;
}

.draft-header {
  text-align:  center;
  font-size:   90%;
  padding:     6px;
  line-height: initial;
  display:     block;
  background-color: lavender;
}

/*************** BOOK-LEVEL ***************/

div.book, div.legalnotice, div.preface, div.appendix, div.index {
  margin:  36px;
}

/* Style the book title, edition, and authors like in the FO */
div.book div.titlepage h1.title {
  font-size:   30pt;
  color:       #ff0000;
  text-align:  center;
  line-height: 100%;
}
div.book div.titlepage p.edition {
  font-size:   24pt;
  font-style:  italic;
  color:       #ff0000;
  text-align:  center;
  line-height: 100%;
}
div.book div.titlepage h3.author {
  font-size:  18pt;
  text-align: center;
}
div.book div.titlepage h4 {
  text-align: center;
}

/* "Table of Contents" and "List of Examples"*/
div.book div.toc p, div.book div.list-of-examples p {
  font-size: 18pt;
}


/**************** CHAPTER-LEVEL ***************/

/* Chapter-level TOCs */
div.chapter div.toc {
  position:    absolute;
  left:        -290px;
  top:         -11px;
  width:       250px;
  line-height: 125%;
  font-size:   90%;
}

/* Don't indent subsection titles in the left-hand TOC too much */
div.chapter div.toc dd {
  margin-left: 10px;
  border: 0px solid blue;
}

div.chapter {
  position: relative; /* no direct effect, but influences toc positioning */
  margin-left:  300px;
  margin-right: 72px;
}

div.chapter h2, div.chapter h3, div.chapter h4 {
  margin-top:  36px;
  margin-left: -36px;
  color:       #ff0000;
}


/*************** PARAGRAPHS, EXAMPLES, AND PROGRAMS ***************/

p.norm-error {
  font-weight: bold;
}

p.note {
  font-size:  85%;
  font-style: italic;
}

div.example, div.informalexample {
  background-color: lavender;
  margin-left:      36px;
  margin-right:     36px;
  margin-top:       10px;
  padding-left:     10px;
  padding-right:    10px;
  border: 1px solid black;
}

pre.programlisting, pre.screen {
  padding:          10px;
  background-color: lightyellow;
  border: 1px solid red;
}

/* The default left margin for list items is excessive */
ol li { margin-left: -20px; }
ul li { margin-left: -20px; }


/*************** GRAMMARS ***************/

div.productionset {
  background-color: lightgray;
  font-family:      monospace;
  padding:          10px;
  margin-bottom:    10px;
  border: 1px solid red;
}

div.production {
  font-style:    italic;
  margin-top:    1em;
  margin-bottom: 1em;
}

div.production code.literal {
  font-style: normal;
}

div.production-note, div.productionrecap-note {
  font-size:  85%;
  font-style: italic;
}

div.rhs {
  margin-left: 1em;
}


/*************** JVMS ***************/

/* Emphasize instruction names in list of verification rules */
div.section-verification h5.title {
  font-size:        125%;
  background-color: lightgray;
  padding:          10px;
  margin-bottom:    10px;
  margin-top:       36px;
}

/* Emphasize instruction names in list of bytecodes */
div.section-execution h3.title {
  background-color: lightgray;
  padding:          10px;
  color:            #000000;
}

/* The unnumbered sub-instruction sections ("Operation", "Format", "Forms", etc)
   are titled by h4, and should be pulled closer together than normal numbered
   4-deep sections, i.e. undo 36px margin-top desired by div.section h4 */
div.section-execution h4 {
  margin-top: 0px;
}

/* The "Format" section's literallayout needs some room (also ch.7) */
div.literallayout {
  background-color: lightgray;
  font-family:      monospace;
  padding:          10px;
  border:           1px solid red;
}

/* html.xsl puts a <p> in <div class="literallayout">, which causes
undesirable empty space. The following rule removes the space. */
div.literallayout p {
  margin-top:    -20px;
  margin-bottom: 0px;
}
