body {
  font-family: Verdana, sans-serif;
}

/* FIXME: Not really sure if the border-collapse setting is useful here. */
table {
  border-collapse: collapse;
  border: 1px solid #aaaaff;
  border-spacing: 0;
}

th {
  background-color: #eeeeff;
}

div.toc, div.sect1, div.sect2, div.glossary, div.bibliography,
div.appendix {
  background-color: white;
  padding: 0 1em 0;
  /* Make most of the text a comfortable width for reading (40 is roughly 12
   * to 15 words per line) and centre it horizontally on the page. */
  margin: 1em auto;
  width: 40em;
}

div.toc {
  border-width: 1px;
  border-style: solid;
  border-color: #aaaaff;
  /* Undo some of the earlier settings so that the TOC spans the width of the
   * page (more or less). */
  margin-left: 1em;
  margin-right: 1em;
  width: auto;
}

div.abstract {
  border-width: 1px;
  border-style: solid;
  border-color: #aaaaff;
  margin-bottom: 1em;
  padding: 0 1em;
}

div.appendix div.sect1 {
  border-style: none;
}

.navheader td, .navfooter td {
  background-color: #eeeeff;
}

/* Make the revhistory box blend into the title box. */
.revhistory table {
  border-collapse: collapse;
  margin-top: 1em;
}

.revhistory th {
  background-color: #ddddff;
  text-align: center;
}

.revhistory td {
  padding: 0.25em;
}

/* There are a bunch of horizontal rules that are useful in an unstyled
 * setting, but just clash with the borders that our style renders. */
.titlepage hr, .navheader hr, .navfooter hr {
  display: none;
}

.programlisting {
  background-color: #fff;
  padding: 1em;
}

.example td {
  padding: 0;
}

p {
  text-align: justify;
}

/* Full justification for bibliography entries often leads to awkward
 * inter-word spacing, since the words are typically longer than average and
 * less prone to easy layout. So we don't fight nature on this one. */
.bibliography p {
  text-align: left;
}

a {
  color: #3333ff;
  text-decoration: none;
}

a:hover {
  color: #000077;
  text-decoration: underline;
}

.toc a {
  color: #0000ff;
}

.toc a:hover {
  color: #000055;
}

/* FIXME: Probably need to set "color" here as well, since IE is broken. */
div.footnotes hr {
  background-color: #aaaaff;
  width: 70%;
  height: 1px;
  border: 0;
}

.footnotes {
  font-size: smaller;
}

.legalnotice p {
  margin-left: 1em;
  margin-right: 1em;
}

/* The Norm Walsh stylesheets allow the legal notice to go on a separate page,
 * but they don't add any real styling to it -- it appears just the same as if
 * it were inline on the title page. So we force some style onto it in the
 * following elements. */
p.legalnotice-title {
  text-align: center;
  font-size: x-large;
  background-color: #eeeeff;
  border: 1px solid #aaaaff;
  padding: 0.5em;
  margin-left: 0;
  margin-right: 0;
}

.legalnotice blockquote.blockquote {
  border: 1px solid black;
}

/* This makes the copyright line itself stand out from the rest of the license
 * text (except on IE, which is known to suck). */
.legalnotice blockquote.blockquote > p:first-child {
  background-color: #eeeeff;
  margin: 0;
  padding: 1em 1em 0.5em 1em;
}
