/* The published pages carry no stylesheet at all.  They are bare HTML --
 * <H3>, <H4>, <CENTER>, <TABLE BORDER=1> -- rendered with the browser's
 * own defaults, full width, no navigation and no footer.  This sheet puts
 * Sphinx's markup back to that, so the conversion changes how the pages
 * are written without changing how they look.
 *
 * Everything here is presentation parity with the site as published.  Any
 * restyling is a separate change, and this file is where it would go. */

/* -- the page itself ---------------------------------------------------
 *
 * basic.css caps the text column at 800px and indents it for a sidebar
 * that this project does not use.  The published pages run the full width
 * of the window inside the browser's default 8px body margin. */

body {
    margin: 8px;
}

div.document,
div.documentwrapper,
div.bodywrapper {
    margin: 0;
    width: auto;
}

div.body {
    min-width: 0;
    max-width: none;
    padding: 0;
}

/* The navigation bar, the sidebar and the "Created using Sphinx" footer
 * are the theme's, not the site's.  The site's own navigation is the
 * table on the front page and the "SPARTA WWW Site" banner each page
 * carries, both of which are content and stay. */
div.related,
div.sphinxsidebar,
div.footer {
    display: none;
}

/* -- headings ----------------------------------------------------------
 *
 * The sources write ":h3" for a page title and ":h4" for a section, which
 * txt2html published as <H3> and <H4>.  reST has no absolute levels, so
 * those became the first and second heading levels, which Sphinx writes
 * as <h1> and <h2> and the browser would otherwise draw at 2em and 1.5em.
 * These are the browser's own <H3> and <H4> metrics. */

div.body h1 {
    font-size: 1.17em;
    font-weight: bold;
    margin: 1em 0;
}

div.body h2 {
    font-size: 1em;
    font-weight: bold;
    margin: 1.33em 0;
}

div.body h3,
div.body h4,
div.body h5,
div.body h6 {
    font-size: 1em;
    font-weight: bold;
    margin: 1.33em 0;
}

/* -- centring ----------------------------------------------------------
 *
 * ":c" in the sources, <CENTER> as published: the page banner on twelve
 * pages, and on the front page the title, the two epigraphs and the two
 * section headings.
 *
 * A class on a section lands on the <section> element, so the heading is
 * selected as a child rather than by centring the section itself, which
 * would centre everything inside it. */

p.center,
img.center {
    text-align: center;
}

section.center > h1,
section.center > h2,
section.center > h3,
section.center > h4 {
    text-align: center;
}

/* -- line breaks -------------------------------------------------------
 *
 * ":b" is a <BR>, and there are 1539 of them -- almost every line of
 * every benchmark page ends in one.  They are line blocks in reST, which
 * basic.css spaces apart like paragraphs; as published the lines sit hard
 * against each other. */

div.line-block {
    margin: 0;
}

div.line-block div.line-block {
    margin-left: 1.5em;
}

/* -- tables ------------------------------------------------------------
 *
 * txt2html wrote every table as <DIV ALIGN=center><TABLE BORDER=1>, and
 * all 522 tables on the site are that: centred on the page, with a border
 * on the table and on every cell.  BORDER=1 is an outset rule around the
 * table and an inset one around each cell, separated by 2px -- the
 * HTML4 rendering, which is what the site was written against.
 *
 * basic.css instead draws docutils tables with no frame and a single rule
 * under the head, which is why they came out looking like plain text. */

table.docutils {
    border: 1px outset;
    border-collapse: separate;
    border-spacing: 2px;
    margin-left: auto;
    margin-right: auto;
}

table.docutils td,
table.docutils th {
    border: 1px inset;
    padding: 1px;
    vertical-align: top;
    /* basic.css sets "div.body td { text-align: left }"; the published
     * cells carry no rule at all, which is "start". */
    text-align: start;
}

table.docutils th {
    background: none;
    font-weight: bold;
}

/* ":tb(...,ea=c)" centres every cell -- <TR ALIGN="center"> as published.
 * Five tables use it: the navigation table on the front page and four on
 * the benchmark page. */
table.center-cells td,
table.center-cells th {
    text-align: center;
}

/* ":tb(...,ca1=c)" centres one column and leaves the rest alone --
 * <TD ALIGN ="center"> on that column only.  The list of contributed
 * features on authors.html centres its date column this way. */
table.col1-center td:first-child,
table.col1-center th:first-child {
    text-align: center;
}

/* -- preformatted text -------------------------------------------------
 *
 * ":pre" was published as a bare <PRE>: monospace, no frame, no tint.
 * Sphinx wraps a literal block in a tinted, bordered box. */

div.highlight,
div.highlight pre,
pre {
    background: none;
    border: 0;
    padding: 0;
    margin: 1em 0;
    line-height: normal;
}

/* -- odds and ends -----------------------------------------------------
 *
 * The published pages have no per-heading permalinks, and their <HR> runs
 * the full width rather than being drawn as a centred rule. */

a.headerlink {
    display: none;
}

hr.docutils {
    width: auto;
    height: 0;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 0.5em 0;
    background: none;
}
