body {
	/*background: transparent url(./pics/lhpc.gif) no-repeat;*/
	background-position: top right;
	background-color: rgb(98%,100%,100%); color: black;
}
td {border-width: 0; padding: 0;}


td#banner {
border-bottom: 2px solid rgb(60%, 50%, 40%);
}
td#banner h1 {
	color: rgb(60%, 30%, 20%);
	margin: 0;
	padding: 0.25em  0.125em 0;
	font: bold 110% sans-serif; 
	letter-spacing: 0.0997em;
}

td#navi {
	vertical-align: top;
	border-bottom: 0px solid rgb(50%, 40%, 30%);
	border-top: 0px solid rgb(50%, 40%, 30%);
}
td#navi a {display: block;
	text-decoration: none;
	color: brown;
	margin: 0; padding: 4px;
	font: bold 100% Arial, Verdana, sans-serif;
	border-right: 1px solid rgb(60%, 50%, 40%);
	border-bottom: 0px solid rgb(50%, 40%, 30%);
	border-top: 0px solid rgb(50%, 40%, 30%);
}
td#navi a#current{
	background-color: rgb(100%, 95%, 78%); color: black;
	border: 1px solid rgb(60%, 50%, 40%);
	border-right-width: 4px; padding-right: 7px;
}

/*
td#rightpanel {
	background: transparent url(./pics/lhpc.png) 50pt no-repeat;
	background-position: text-top right;
	padding: 7em;
	padding-top: -5em;
}
*/

td#body {background-color: transparent; color: black;
	padding: 1em; 
	margin: 3em 2.5em;
	vertical-align: top;
	font: 95% Times, serif;
	font-size: 110%;
	}
td#body h2 {
	font: bold 135% sans-serif;
	margin: -0.25em 1em; padding: 0;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	}

/*dataset header*/
td#hdataset {background-color: transparent; color: black;
	padding: 0.5em; 
	font: 95% Times, serif;
	font-size: 80%;
	font-weight: 600;
	vertical-align: top;
	text-align: center;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	border-right: 1px solid rgb(80%, 75%, 70%);
	border-top: 1px solid rgb(80%, 75%, 70%);
	border-left: 1px solid rgb(80%, 75%, 70%);
}
td#ldataset {background-color: transparent; color: black;
	padding: 0.5em; 
	font: 95% Times, serif;
	font-size: 80%;
	vertical-align: top;
	text-align: left;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	border-right: 1px solid rgb(80%, 75%, 70%);
	border-top: 1px solid rgb(80%, 75%, 70%);
	border-left: 1px solid rgb(80%, 75%, 70%);
}
td#dataset {background-color: transparent; color: black;
	padding: 0.5em; 
	font: 95% Times, serif;
	font-size: 80%;
	vertical-align: top;
	text-align: center;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	border-right: 1px solid rgb(80%, 75%, 70%);
	border-top: 1px solid rgb(80%, 75%, 70%);
	border-left: 1px solid rgb(80%, 75%, 70%);
}
td#dataset.green {background-color: transparent; color: green;
	padding: 0.5em; 
	font: 95% Times, serif;
	font-size: 80%;
	vertical-align: top;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	border-right: 1px solid rgb(80%, 75%, 70%);
	border-top: 1px solid rgb(80%, 75%, 70%);
	border-left: 1px solid rgb(80%, 75%, 70%);
}
td#dataset.red{background-color: transparent; color: red;
	padding: 0.5em; 
	font: 95% Times, serif;
	font-size: 80%;
	vertical-align: top;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	border-right: 1px solid rgb(80%, 75%, 70%);
	border-top: 1px solid rgb(80%, 75%, 70%);
	border-left: 1px solid rgb(80%, 75%, 70%);
}
td#dataset.blue{background-color: transparent; color: blue;
	padding: 0.5em; 
	font: 95% Times, serif;
	font-size: 80%;
	vertical-align: top;
	border-bottom: 1px solid rgb(80%, 75%, 70%);
	border-right: 1px solid rgb(80%, 75%, 70%);
	border-top: 1px solid rgb(80%, 75%, 70%);
	border-left: 1px solid rgb(80%, 75%, 70%);
}

p#dataset {background-color: transparent; color: black;
	font-size: 80%;
	font: 95% Times, serif;
}

td#footer {
	background-color: transparent; color: rgb(70%, 60%, 50%);
	border-top: 2px solid rgb(60%, 50%, 40%);
	text-align: center; 
	padding-top: 0.33em; 
	font-size: 80%;
	font-style: italic;
}
table.image caption {caption-side:bottom; }

pre#bibtex {
	font-size: 80%;
}


/* ------------------------------------------------------------------------
   The reference manual.

   Everything above this line is the stylesheet the hand-written pages of
   web.mit.edu/qlua already use, unchanged, so replacing that file with this
   one leaves those pages as they were.  What follows is what a long
   generated document needs and they never did: headings below h2, code,
   data tables, a table of contents and an index.  md2html-public.py writes
   no style into the page itself, so this is the only place to change how
   the manual looks.
   ------------------------------------------------------------------------ */

td#body {
	max-width: 54em;	/* a text measure, not the window */
}

/* A section heading needs more air above it than a subsection heading, and
   the rule is 1.5 times as much -- measured in base ems, not in the heading's
   own, because the two are set at different sizes.  h3 is 115% with a 1.6em
   top margin, so 1.84 base ems; 1.5 times that is 2.76, which at h2's 135%
   is 2.05em.

   :not(:first-of-type) leaves the hand-written pages of the site alone:
   each of them has exactly one h2, the title in the body panel, and it
   should stay where it has always been -- indent and all.  In the manual
   that first h2 is the title too, and every later one opens a section; a
   section heading is flush with its own text, not indented like a title. */
td#body h2:not(:first-of-type) {
	margin: 2.05em 0 0.3em;
}

td#body h3 {
	font: bold 115% sans-serif;
	color: rgb(40%, 20%, 13%);
	margin: 1.6em 0 0.3em; padding: 0;
	border-bottom: 1px solid rgb(88%, 85%, 82%);
}

td#body h4 {
	font: bold 100% "Courier New", Courier, monospace;
	color: rgb(35%, 25%, 15%);
	background-color: rgb(97%, 95%, 90%);
	margin: 1.4em 0 0.35em; padding: 0.25em 0.5em;
	border-left: 3px solid rgb(60%, 50%, 40%);
}

td#body p { margin: 0.5em 0; }

/* Code.  The body panel is serif at 110%; code drops back to 100% so that a
   monospace line of the same nominal size does not tower over the prose. */
td#body code {
	font: 100% "Courier New", Courier, monospace;
	color: rgb(25%, 20%, 15%);
}
td#body pre {
	font: 95% "Courier New", Courier, monospace;
	background-color: rgb(97%, 97%, 94%);
	border: 1px solid rgb(85%, 82%, 78%);
	border-left-width: 3px;
	border-left-color: rgb(60%, 50%, 40%);
	margin: 0.6em 0; padding: 0.5em 0.7em;
	overflow-x: auto;
	line-height: 1.35;
}
td#body pre code { font-size: 100%; }

/* Data tables.  One rule for all of them, unlike the td#dataset ids above,
   which were written for a page that had exactly one table. */
td#body table.data {
	border-collapse: collapse;
	margin: 0.8em 0;
	font-size: 90%;
}
td#body table.data th,
td#body table.data td {
	border: 1px solid rgb(80%, 75%, 70%);
	padding: 0.3em 0.6em;
	vertical-align: top;
	text-align: left;
}
td#body table.data th {
	background-color: rgb(96%, 94%, 88%);
	font-weight: 600;
}

/* A note: an aside the reader may skip without losing the thread. */
td#body .note {
	background-color: rgb(100%, 99%, 93%);
	border-left: 3px solid rgb(75%, 68%, 45%);
	margin: 0.8em 0; padding: 0.4em 0.8em;
}
/* The line under a page's title saying what the page is for.  The heading
   above it carries a negative bottom margin, so the gap asked for here is
   that much larger than it reads. */
td#body p.subtitle {
	font-style: italic;
	color: rgb(40%, 35%, 30%);
	margin-top: 0.8em;
}

/* Table of contents.  Built by the converter, not by a script: these pages
   carry no JavaScript. */
td#body .toc {
	background-color: rgb(98%, 97%, 94%);
	border: 1px solid rgb(85%, 82%, 78%);
	padding: 0.5em 1em 0.8em;
	margin: 1em 0;
	font-size: 92%;
}
td#body .toc h3 {
	font: bold 100% sans-serif;
	margin: 0.4em 0 0.2em; padding: 0;
	border-bottom: 0;
}
td#body .toc ul { margin: 0.2em 0; padding-left: 1.4em; }
td#body .toc ul ul { font-size: 95%; color: rgb(30%, 25%, 20%); }
td#body .toc li { margin: 0.1em 0; }
td#body .toc a { text-decoration: none; color: brown; }
td#body .toc a:hover { text-decoration: underline; }

/* The index.  Several short columns, because the entries are names. */
td#body .index h3 {
	font: bold 125% sans-serif;
	color: rgb(60%, 30%, 20%);
	margin: 1em 0 0.2em;
	border-bottom: 1px solid rgb(88%, 85%, 82%);
}
td#body p.index-jump {
	font: bold 110% sans-serif;
	margin: 0.6em 0;
}
td#body ul.index-list {
	list-style: none;
	margin: 0.3em 0; padding: 0;
	-moz-column-width: 19em; -webkit-column-width: 19em; column-width: 19em;
	column-gap: 1.5em;
}
/* A long name must wrap inside its column rather than run across the gap
   into the next one: a code span has no break opportunities of its own. */
td#body ul.index-list li,
td#body ul.index-list a,
td#body ul.index-list code {
	margin: 0.05em 0;
	break-inside: avoid;
	display: block;
	overflow-wrap: anywhere;
	word-wrap: break-word;
	word-break: break-word;
}
td#body ul.index-list a { text-decoration: none; color: brown; }
td#body ul.index-list a:hover { text-decoration: underline; }

td#body a { color: brown; }


/* ------------------------------------------------------------------------
   The tutorials.

   The reference manual and the tutorials are one page set and share this
   file; the two copies of it, in qlua/doc and in the tutorials' doc, are
   kept identical, so whichever is copied to the server last is the right
   one.  What follows is what the tutorials need and the manual did not:
   figures, displayed mathematics, and a list item that holds a block.
   ------------------------------------------------------------------------ */

/* Figures.  The gather and scatter tutorials show three diagrams side by
   side, as cells of a table that carries no rule and no header band. */
td#body img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}
td#body table.data td img {
	display: block;
	margin: 0.2em auto;
}

/* Displayed mathematics.  MathJax sets the formula itself; this only gives
   it room and lets a wide one scroll rather than widen the page.

   The max-width is what does that.  The body panel is a table cell with a
   measure of 54em, but a cell in an auto-layout table grows to whatever its
   contents prefer, and a formula four gauge links long prefers half as much
   again -- overflow-x alone does not stop it, because the cell has already
   been made wide enough that nothing overflows.  Capping the formula's own
   box caps what the cell can be asked for; 48em leaves room for the panel's
   padding inside the 54em measure. */
td#body .math {
	margin: 0.9em 0;
	max-width: 48em;
	overflow-x: auto;
	overflow-y: hidden;
}

/* A list item may hold a paragraph or an example of its own.  Its first
   paragraph sits on the bullet, so the blocks under it are what need the
   space, and the example keeps the item's own left edge. */
td#body li > p:first-child { margin-top: 0; }
td#body li > pre { margin: 0.5em 0; }
td#body li > p { margin: 0.4em 0; }

/* A lattice drawn as a table: one captioned grid, a cell per site, small
   enough that three of them stand side by side and wrap when they cannot.
   The gather tutorial's six drawings are these; as tables the numbers are
   text, so they scale with the page and can be read aloud or copied. */
td#body table.grid {
	display: inline-table;
	border-collapse: collapse;
	vertical-align: top;
	margin: 0.9em 1.1em 0.9em 0;
	font: 95% "Courier New", Courier, monospace;
}
td#body table.grid caption {
	font: bold 95% sans-serif;
	color: rgb(40%, 20%, 13%);
	padding-bottom: 0.25em;
	text-align: center;
}
td#body table.grid td {
	border: 1px solid rgb(45%, 42%, 38%);
	padding: 0.3em 0.35em;
	text-align: center;
	min-width: 1.1em;
	background-color: white;
}
td#body table.grid sub {
	font-size: 70%;
	color: rgb(25%, 23%, 20%);
}

/* The eight destination sites of the gather example.  Eight of the nine
   colors of Paul Tol's light qualitative scheme, which was built to stay
   legible under color blindness; the ninth, its blue, is dropped because
   under tritanopia it comes within dE 2 of the mint.  Simulating protanopia
   and deuteranopia over what is left, the closest pair -- the olive and the
   pear -- stays dE 11 apart, and under tritanopia the closest is the pink
   and the yellow at dE 6, which is why those two are given sites that
   hardly ever touch.  Black text on any of them clears 8:1 for contrast.

   Color is never the only channel here: the two index grids say the same
   thing in numbers, and every cell of a result carries its coordinates. */
td#body table.grid td.g-0-0 { background-color: #99ddff; }
td#body table.grid td.g-1-0 { background-color: #ee8866; }
td#body table.grid td.g-2-0 { background-color: #aaaa00; }
td#body table.grid td.g-3-0 { background-color: #dddddd; }
td#body table.grid td.g-0-1 { background-color: #bbcc33; }
td#body table.grid td.g-1-1 { background-color: #eedd88; }
td#body table.grid td.g-2-1 { background-color: #44bb99; }
td#body table.grid td.g-3-1 { background-color: #ffaabb; }


/* ------------------------------------------------------------------------
   The tutorials as a set of pages rather than one: the navigation panel
   lists them, the index page lists them with a line of description each,
   and a name the reference manual defines links to where it defines it.
   ------------------------------------------------------------------------ */

/* The set sits under the Tutorials entry, one step to the right.  #current
   is more specific, so the page being read is still lit up the way the
   site's own entries are, and only the indent and the weight come from here.
   */
td#navi a.sub {
	padding-left: 1.3em;
	font-weight: normal;
	font-size: 92%;
	white-space: nowrap;
}

/* The index page: every tutorial, and the line saying what it is for. */
td#body dl.tutorials { margin: 1em 0 0; }
td#body dl.tutorials dt {
	margin-top: 0.8em;
	font: bold 100% sans-serif;
}
td#body dl.tutorials dt a { text-decoration: none; }
td#body dl.tutorials dt a:hover { text-decoration: underline; }
td#body dl.tutorials dd {
	margin: 0.35em 0 0 1.6em;
	color: rgb(30%, 25%, 20%);
}

/* A name the manual defines.  In prose it is a code span that happens to be
   a link, so it takes the color links have; inside an example it would turn
   the program into a field of color, so there it keeps the color of the
   code and says it is a link with a dotted rule instead. */
td#body a.api { text-decoration: none; }
td#body a.api code { color: brown; }
td#body a.api:hover { text-decoration: underline; }
td#body pre a.api {
	color: inherit;
	border-bottom: 1px dotted rgb(62%, 57%, 52%);
}
td#body pre a.api:hover { border-bottom-style: solid; }

/* ------------------------------------------------------------------------
   The hand-written pages of the site.
   ------------------------------------------------------------------------ */

/* A cell that is a label rather than prose -- a document name, a version, a
   target -- and reads worse broken across lines than the column does made
   wide enough to hold it.  Only the cells that say so, never a whole table:
   a column of sentences must still wrap. */
td#body table.data td.label,
td#body table.data th.label { white-space: nowrap; }
