@import url("http://ldots.org/style/technical.css");
/************/
/* Headings */
/************/
h1, h2, h3, h4, h5, h6, p#author {
  clear: both;
}
h1:before, h2:before, h3:before, h4:before, h5:before, h6:before {
  content: "";
}
/* Make sure the headings in any "div" don't have a line */
/*   underneath, as it will look kind of naff as most of the */
/*   divs have quite thick borders around them so it looks */
/*   strange if there is a line underneath. */
div.xosd h2, div.xosd h3, div.xosd h4, div.xosd h5, div.cups h2, div.cups h3, div.cups h4, div.cups h5{
  border-bottom: none;
  margin-left: 0%;
  width: 100%;
}
/* The "author" line. */
p#author {
  font-family: sans-serif;
  font-weight: bold;
  text-align: left;
}
div.introcol, div.contents{ 
  margin-top: 0em;   /* To make the contents "h2" line up with the*/
                      /*    h2 for the "Introduction" h2. */
  padding-top: 0em;
  padding-left: 1em;
  margin-left: 1em;
  padding-bottom: 1em;
  margin-bottom: 1em;
}
/* The contents is in a floating div which appears next to the */
/*   introduction.  The dashed border separates the contents from the */
/*    text on the left (the Introduction). */
div.contents {
  background: white;
  border-top: dashed thin black;
  border-left: dashed thin black;
  border-bottom: dashed thin black;
  
  float: right;
  width: 40%;
  z-index: 3;
}
h2#introduction, h2#contents {
  padding-top: 0.25em;
}
/* Even though the contents is in a "div", we put a line underneath the */
/*   heading as it looks good in this case. */
h2#contents { 
  border-bottom: thin solid black;
  margin-left: 0.25em;
}
/* We want the contents to appear next to the "introduction" and */
/* "summary" so we don't "clear" the floats, and make the */
/*  width 60% (100% - the width of the contents "div"). */
h2#introduction, h3#summary {
  clear: none;
  width: 60%;
}
/*****************/
/* Body Contents */
/*****************/
/* The normal padding around paragraphs and lists is too large when */
/*   they appear as part of a description, so we alter the size of
/*   the margin and padding slightly. */
dd p, dd p + ul {
  margin-top: 0ex;
  margin-bottom: 0ex;
  padding-top: 0ex;
}
/* All the preformed elements are code listings, so use a */
/*   monospace font with generous padding around the side so it */
/*   looks good.*/
pre {
  margin-left: 2em;
  margin-right: 1em;
  padding: 1em 1em 1em 1em;
  font-family: monospace;
}
/* The three languages have different coloured backgrounds so they */
/*   can be more easily distinguished. */
/* Pyrex code has a silver background, which is the easiest to */
/*   read. */
pre, code.pyrex { 
  background-color: #d2d2d2;
  color: black;
}
/* C code has a aqua background. */
pre.c, code.c {
  background-color: #97ccd2;
  color: black;
}
/* Python code has a lime background. */
pre.python, code.python {
  background-color: #97d29b;
  color: black;
}
/* Bourne-shell code has a yellow background. */
pre.sh, code.sh {
  background-color: #eced95;
  color: black;
}
/* User input into the shell. */
pre.sh span.user {
  font-weight: bold;
}
/* The shell prompt */
pre.sh span.prompt {
  font-weight: normal;
}
.keyword {
  font-family: monospace;
  font-weight: bold;
  color: blue;
  background-color: inherit;
}
/* For paragraphs that start with "Note: ". */
.note {
  font-family: sans-serif;
  font-weight: bold;
}
/* Small-caps. */
.sc { 
  font-variant: small-caps;
}
/* The divs that show which examples belong to which library. */
/* Each div is made up of two parts.  The first is the main border, */
/*   which is a thick, solid and coloured to easily distinguish it */
/*   from the surrounding text.  The large "padding-left" is to give */
/*   space for the title, which "hangs" vertically on the */
/*   left-hand side. */
/* The second part is the "title" that displays then name of the */
/*   library. The background colour of the title is the same as the
/*   border colour, so it appears as if the title is part of the */
/*   border. */
div.xosd, div.cups { 
  border-top: none;
  border-left: 3px solid;
  border-right: 3px solid;
  border-bottom: 3px solid;
  
  padding: 0em 0em 1em 0em;
  margin-bottom: 1em;
  margin-top: 1em;
  min-height: 18ex;
}
/* The fist child of the a XOSD or CUPS div has different margins because */
/*   it forms the top of the border. */
div.xosd > h2:first-child, div.cups > h2:first-child {
  width: auto;
  margin-top: 0em;
  margin-left: 0em;
  padding-top: 0em;
}
/* Now set the colours for the borders and titles. */
/* XOSD is purple. */
div.xosd {
  border-color: #a2aae1;
}
div.xosd > h2:first-child { 
  color: black;
  background-color: #a2aae1;
}
/* CUPS is khaki. */
div.cups {
  border-color: #cccc98;
}
div.cups > h2:first-child {
  color: black;
  background-color: #cccc98;
}
/* Move the headings and paragraphs up so they line up with the */
/*   title. Make sure we don't clear the floats as the "title" floats */
/*   to the left. */
div.xosd p, div.cups p, div.xosd h2, div.cups h2, div.xosd h3, div.cups h3, div.cups dl, div.xosd dl{
  clear: none;
  margin-top: 0.5em;
  margin-left: 0.5em;
  padding-top: 0em;
}
/* A sidebar to hold "todo" lists and the line. */
div.sidebar {
  float: right;
  width: 25%;
  margin-left: 0.5em;
  padding: 0.5em 0.5em 0.5em 0.5em;
  color: black;
  background: silver;
  border: 2px solid black;
}
/* Pull-quotes beak up large bodies of text. */
p.pullquote {
  visibility: hidden;
  
  float: right;
  width: 20%;
  
  margin-right: 1em;
  padding: 0.5em 0.5em 0.5em 0.5em;
  
  border-top: 4px solid black;
  border-bottom: 4px solid black
}
/**************/
/* The Footer */
/**************/
/* The footer is made up of two parts.  The "navfooter" at */
/*   the bottom holds the "previous", "contents", "next" links */
/*   that are such a pain to maintain by hand.  At the very bottom */
/*   is the "footer" which contains the author's name and the */
/*   modification date. */
/* Both the "navfooter" and "footer" hang in the same way as the */
/*   same way as the headings (see the top of this file). */
div.navfooter {
  font-family: sans-serif;
  font-weight: bold;
  font-variant: small-caps;
  color: white;
  background: black;
  clear: both;    /* Make sure all floats have been */
                  /*   displayed before the footer. */
}
/* Make the table take up all the avaliable space in the footer. */
div.navfooter table { 
  width: 100%;
}
/* Make the links in the footer white on black, regardless of */
/*   weather they have been visited or not. */
div.navfooter * a, div.navfooter * a:visited, div.navfooter * td{
  font-weight: bold;
  font-variant: small-caps;
  color: white;
  background: black;
}
@media print { 
  body { 
    color: black;
    background-color: white;
    margin: 3cm 3cm 3cm 10%;
  }
  h1, h2, h3, h4, h5, h6{
    font-family: sans-serif;
    font-weight: bold;
    
    margin: 0em 0em 0em 0em;
    border-bottom: thin solid black;
  }
  h1, p#author { 
    width: 110%;
    margin-left: -10%;
  }
  h2 {
    page-break-inside: avoid;
  }
  div.contents { 
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-right: none;
    float: none;
    width: 100%;
    page-break-after: always;
  }
  p.navfooter { 
    display: none;
  }
  div.xosd, div.cups { 
    border-bottom: thick solid black;
    border-left: thick solid black;
    border-right: thick solid black;
    page-break-inside: auto;
  }
  div.xosd > h2:first-child, div.cups > h2:first-child {
    color: white;
    background: black;
    width: 100%;
    margin-top: 0em;
    margin-left: 0em;
    padding-top: 0em;
  }
  
  .keyword {
    color: black;
    background: inherit;
  }
}