/*************** 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;
}

div.legalnotice {
  margin: 36px;
}


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

div.book, div.preface  {
  margin-left:   36px;
  margin-right:  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;
}

/* "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:        10px;
  top:         120px;
  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 {
  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.literallayout {
  background-color: lightgray;
  font-family:      monospace;
  padding:          10px;
  border: 1px solid red;
}

/* html.xsl puts a <p> in the <div class="literallayout">. This <p>
causes an undesirable amount of space before the grammar starts. The
following hacky rule kills the space around solely this <p>. */
div.literallayout p {
  margin-top:    -20px;
  margin-bottom: 0px;
}

/* <literallayout> inside an <informalexample> is rare (e.g. ch.2),
but needs to be indented more than a top-level <literallayout>. */
div.informalexample div.literallayout {
  margin-left:   36px;
  margin-right:  36px;
  margin-bottom: 10px;
}


/*************** JVMS VERIFICATION ***************/

/* Avoid tiny titles for JVMS 4.10.1.3.x sections (JLS has no 5-deep sections :-) */
div.section h5.title {
  font-size: 100%;
}

/* Avoid tiny titles for, and further emphasize, instruction names in list of verification rules */
div.section-verification h6.title {
  font-size:        125%;
  background-color: lightgray;
  padding:          10px;
  margin-bottom:    10px;
  margin-top:       36px;
}


/*************** JVMS EXECUTION ***************/

/* 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 */
div.section-execution div.literallayout {
  margin-bottom: 14px;
}