/*
Project Gutenberg common docutils stylesheet.

This stylesheet contains styles common to HTML and EPUB.  Put styles
that are specific to HTML and EPUB into their relative stylesheets.

:Author: Marcello Perathoner (webmaster@gutenberg.org)
:Copyright: This stylesheet has been placed in the public domain.

This stylesheet is based on:

  :Author: David Goodger (goodger@python.org)
  :Copyright: This stylesheet has been placed in the public domain.

  Default cascading style sheet for the HTML output of Docutils.

*/

/* ADE 1.7.2 chokes on !important and throws all css out. */

/* FONTS */

.italics    { font-style: italic }
.no-italics { font-style: normal }

.bold       { font-weight: bold }
.no-bold    { font-weight: normal }

.small-caps { } /* Epub needs italics */
.gesperrt   { } /* Epub needs italics */
.antiqua    { font-style: italic } /* what else can we do ? */
.monospaced { font-family: monospace }

.smaller    { font-size: smaller }
.larger     { font-size: larger }

.xx-small   { font-size: xx-small }
.x-small    { font-size: x-small }
.small      { font-size: small }
.medium     { font-size: medium }
.large      { font-size: large }
.x-large    { font-size: x-large }
.xx-large   { font-size: xx-large }

.text-transform-uppercase { text-transform: uppercase }
.text-transform-lowercase { text-transform: lowercase }
.text-transform-none      { text-transform: none }

.red        { color: red }
.green      { color: green }
.blue       { color: blue }
.yellow     { color: yellow }
.white      { color: white }
.gray       { color: gray }
.black      { color: black }

/* ALIGN */

.left       { text-align: left }
.justify    { text-align: justify }
.center     { text-align: center; text-indent: 0 }
.centerleft { text-align: center; text-indent: 0 }
.right      { text-align: right;  text-indent: 0 }

/* LINE HEIGHT */

body        { line-height: 1.5 }
p           { margin: 0;
	      text-indent: 2em }

/* PAGINATION */

.title, .subtitle     { page-break-after:  avoid }

.container, .title, .subtitle, #pg-header
                      { page-break-inside: avoid }

/* SECTIONS */

body         { text-align: justify }

p.pfirst, p.noindent {
    text-indent: 0
}

.boxed         { border: 1px solid black; padding: 1em }
.topic, .note  { margin: 5% 0; border: 1px solid black; padding: 1em }
div.section    { clear: both }

div.line-block       { margin: 1.5em 0 }  /* same leading as p */
div.line-block.inner { margin: 0 0 0 10% }
div.line             { margin-left: 20%; text-indent: -20%; }
.line-block.noindent div.line { margin-left: 0; text-indent: 0; }

hr.docutils          { margin: 1.5em 40%; border: none; border-bottom: 1px solid black; }
div.transition       { margin: 1.5em 0 }

.vfill, .vspace      { border: 0px solid white }

.title               { margin: 1.5em 0 }
.title.with-subtitle { margin-bottom: 0 }
.subtitle            { margin: 1.5em 0 }

/* header font style */
/* http://dev.w3.org/csswg/css3-fonts/#propdef-font-size */

h1.title                        { font-size: 200%; }  /* for book title only */
h2.title, p.subtitle.level-1    { font-size: 150%; margin-top: 4.5em;  margin-bottom: 2em }
h3.title, p.subtitle.level-2    { font-size: 120%; margin-top: 2.25em; margin-bottom: 1.25em }
h4.title, p.subtitle.level-3    { font-size: 100%; margin-top: 1.5em;  margin-bottom: 1.5em;  font-weight: bold; }
h5.title, p.subtitle.level-4    { font-size:  89%; margin-top: 1.87em; margin-bottom: 1.69em; font-style: italic; }
h6.title, p.subtitle.level-5    { font-size:  60%; margin-top: 3.5em;  margin-bottom: 2.5em }

/* title page */

h1.title, p.subtitle.level-1,
h2.title, p.subtitle.level-2    { text-align: center }

#pg-header,
h1.document-title               { margin: 10% 0 5% 0 }
p.document-subtitle             { margin:  0  0 5% 0 }

/* PG header and footer */
#pg-machine-header { }
#pg-produced-by { }

li.toc-entry            { list-style-type: none }
ul.open li, ol.open li  { margin-bottom: 1.5em }

.attribution            { margin-top: 1.5em }

.example-rendered {
    margin: 1em 5%; border: 1px dotted red;  padding: 1em; background-color: #ffd }
.literal-block.example-source   {
    margin: 1em 5%; border: 1px dotted blue; padding: 1em; background-color: #eef }

/* DROPCAPS */

/* BLOCKQUOTES */

blockquote { margin: 1.5em 10% }

blockquote.epigraph { }

blockquote.highlights { }

div.local-contents { margin: 1.5em 10% }

div.abstract { margin: 3em   10% }
div.image    { margin: 1.5em  0  }
div.caption  { margin: 1.5em  0 }
div.legend   { margin: 1.5em  0 }

.hidden { display: none }

.invisible { visibility: hidden; color: white } /* white: mozilla print bug */

a.toc-backref {
  text-decoration: none ;
  color: black }

dl.docutils dd {
  margin-bottom: 0.5em }

div.figure { margin-top: 3em; margin-bottom: 3em }

img { max-width: 100% }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.sidebar {
  margin: 0 0 0.5em 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

ol.simple, ul.simple { margin: 1.5em 0 }

ol.toc-list,    ul.toc-list    { padding-left:  0  }
ol ol.toc-list, ul ul.toc-list { padding-left:  5% }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title, p.admonition-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font: inherit }

.literal-block, .doctest-block {
  margin-left: 2em ;
  margin-right: 2em; }

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 100% }

table { margin-top: 1.5em; margin-bottom: 1.5em; border-spacing: 0 }
table.align-left, table.align-right { margin-top: 0 }

table.table                { border-collapse: collapse; }

table.table.hrules-table thead          { border: 1px solid black; border-width: 2px 0 0 }
table.table.hrules-table tbody          { border: 1px solid black; border-width: 2px 0 }
table.table.hrules-rows  tr             { border: 1px solid black; border-width: 0 0 1px }
table.table.hrules-rows  tr.last        { border-width: 0 }
table.table.hrules-rows  td,
table.table.hrules-rows  th             { padding: 1ex 1em; vertical-align: middle }

table.table tr             { border-width: 0 }
table.table td,
table.table th             { padding: 0.5ex 1em }
table.table tr.first td    { padding-top: 1ex }
table.table tr.last td     { padding-bottom: 1ex }
table.table tr.first th    { padding-top: 1ex }
table.table tr.last th     { padding-bottom: 1ex }


table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 3em 4em }

table.docutils { }

div.footnote-group          { margin: 1em 0 }
table.footnote td.label     { width: 2em; text-align: right; padding-left: 0 }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding: 0 0.5em;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "!important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 } /* FIXME: was !important */

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

ul.auto-toc {
  list-style-type: none }
