/* typewritten.org online manuals style sheet v.20 */

@font-face {
	font-family: "CMU Bright";
	font-weight: normal;
	font-style: normal;
	src: url(./fonts/cmu/cmunbmr.otf) format(opentype),
	     url(./fonts/cmu/cmunbmr.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Bright";
	font-weight: normal;
	font-style: italic;
	src: url(./fonts/cmu/cmunbmo.otf) format(opentype),
	     url(./fonts/cmu/cmunbmo.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Bright";
	font-weight: bold;
	font-style: normal;
	src: url(./fonts/cmu/cmunbsr.otf) format(opentype),
	     url(./fonts/cmu/cmunbsr.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Bright";
	font-weight: bold;
	font-style: italic;
	src: url(./fonts/cmu/cmunbso.otf) format(opentype),
	     url(./fonts/cmu/cmunbso.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Sans";
	font-weight: normal;
	font-style: normal;
	src: url(./fonts/cmu/cmunss.otf) format(opentype),
	     url(./fonts/cmu/cmunss.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Sans";
	font-weight: normal;
	font-style: italic;
	src: url(./fonts/cmu/cmunsi.otf) format(opentype),
	     url(./fonts/cmu/cmunsi.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Sans";
	font-weight: bold;
	font-style: normal;
	src: url(./fonts/cmu/cmunsx.otf) format(opentype),
	     url(./fonts/cmu/cmunsx.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Sans";
	font-weight: bold;
	font-style: italic;
	src: url(./fonts/cmu/cmunso.otf) format(opentype),
	     url(./fonts/cmu/cmunso.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Serif";
	font-weight: normal;
	font-style: normal;
	src: url(./fonts/cmu/cmunrm.otf) format(opentype),
	     url(./fonts/cmu/cmunrm.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Serif";
	font-weight: normal;
	font-style: italic;
	src: url(./fonts/cmu/cmunti.otf) format(opentype),
	     url(./fonts/cmu/cmunti.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Serif";
	font-weight: bold;
	font-style: normal;
	src: url(./fonts/cmu/cmunbx.otf) format(opentype),
	     url(./fonts/cmu/cmunbx.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Serif";
	font-weight: bold;
	font-style: italic;
	src: url(./fonts/cmu/cmunbi.otf) format(opentype),
	     url(./fonts/cmu/cmunbi.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Typewriter";
	font-weight: normal;
	font-style: normal;
	src: url(./fonts/cmu/cmuntt.otf) format(opentype),
	     url(./fonts/cmu/cmuntt.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Typewriter";
	font-weight: normal;
	font-style: italic;
	src: url(./fonts/cmu/cmunit.otf) format(opentype),
	     url(./fonts/cmu/cmunit.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Typewriter";
	font-weight: bold;
	font-style: normal;
	src: url(./fonts/cmu/cmuntb.otf) format(opentype),
	     url(./fonts/cmu/cmuntb.ttf) format(truetype);
}

@font-face {
	font-family: "CMU Typewriter";
	font-weight: bold;
	font-style: italic;
	src: url(./fonts/cmu/cmuntx.otf) format(opentype),
	     url(./fonts/cmu/cmuntx.ttf) format(truetype);
}

#selenium {
	margin: 0;
	padding: 0;
	font-family: "CMU Serif";
}

.htbody {
	background: white;
	padding: 2em 4em;
	border: 1px solid black;
	margin-right: 1.2em; /* h4x - odd size to avoid safari/chrome subpixel positioning bug */
}

.htbody #man pre {
	margin-left: 0;
}

/* allows the apropos box to be immediately under the window header */
.body {
        padding-top: 0;
}

#man {
	font-family: "CMU Serif", serif;
	/* font-size: 10pt; */
	font-size: 12pt;
	color: black;
	background-image: url("/ts-watermark.gif");
	background-repeat: no-repeat;
	background-position: center;
	background-attachment: fixed;
	zoom: 1;		/* I hate IE */
	/* min-width: 8.5in; */
}

.body #man h2 { /* safari won't override this unless .body is explicitly specified here. why? */
	font-style: normal;
}

.body #man h3 {
	font-size: 12pt;
	background: white;
	font-style: italic;
	font-weight: bold;
	border-bottom: 1px solid gray;
	padding: 0.25em 1em 0.25em 0em;
	margin: 1em 4em 1em 3em;
	width: 35%;
}

.body #man h4 {		/* alternate h3 */
	font-size: 12pt;
	background: white;
	font-weight: bold;
	border-bottom: 0;
	/*padding: 0.25em 1em 0.25em 0em; */
	margin: 1em 4em 0em 3.25em;
}

#man p {
	margin-bottom: 0;
}

#man p.monospace {
	margin-bottom: 0;
	font-family: "CMU Typewriter", monospace;
}

#man pre {
	border: none;
	background: none;
	color: black;
	box-shadow: none;
	-moz-box-shadow: none;
	-webkit-box-shadow: none;
	border-radius: 0;
	-moz-border-radius: 0;
	/* margin: 1em 4em 1em 6em; */
	/* REVIEW off-center for nroff. does this mess up troff .cs margins? */
	margin: 1em 3em 1em 3em;
	padding: 0em 0em 0em 0em;
	overflow: visible;
	font-family: "CMU Typewriter", monospace;
	line-height: 1.2em;
}

#man pre strong {
	color: black;
	font-weight: bold;
}

#man pre em {
	/*color: darkslateblue;*/
	color: midnightblue;
	/*font-style: italic;*/
	font-style: normal;
	font-weight: bold;
}

#man pre.n + pre.n {    /* Nroff page gutter TODO better */
        border-top: 1px solid black;
        padding-top: 1.2em;
}

#man tt {
	font-family: "CMU Typewriter", monospace;
}

#man .halfline {
	margin: 0;
	line-height: 50%;
}

#man .u {
	color: red;
}

#man .clash {
	color: red;
	display: inline-block;
	text-align: center;
	line-height: 0;
	text-indent: 0; /* don't inherit this from the enclosing block */
	max-width: 1em; /* keeps selenium from measuring width: 100% owing to <br />s */
}

#man .ul {
	color: black;
	font-weight: normal;
	text-decoration: underline;
}

#man table {
	border: none;
	background: none;
	border-spacing: 0;
	padding: 0;
	/*margin-left: 2em; /* TODO align this and padding with <p> */
	/* margin-left: 4em;
	margin-right: 4em; */
	/* padding-left: 2em;
	padding-right: 2em; */ /* this padding is no good, it goes inside the table border and rules don't extend through it. TODO redo <p> without padding, just margin. and update the margin calculations in tslroff */
	margin-top: 0; /* bottom 0 too? */
	font-size: inherit;
	empty-cells: show;	/* man Safari 9 has a lot of rendering bugs */
}

#man td {
	padding: 0.1em 0.75em 0.1em 0.75em;
	vertical-align: top;
}

#man .flushleft td:first-child {
    /* top right bottom left */
	padding: 0.1em 0.75em 0.1em 0em;
	vertical-align: top;
}

#man tr:nth-child(even) td {
	background: none;
}

#man tr:nth-child(odd) td {
	background: none;
}

#man .synopsis {
	word-spacing: 0.4em;  /* Safari 9 fucks this up?! */
}

#man .foot {
	margin: 4em 0 0 0;
	text-align: center;
	color: silver;
}

#man .vs {		/* troff vertical motion */
	display: block;
	width: 100%;
}

#man .tab {		/* also used for horizontal motion - REVIEW be careful if it starts to look like more than just inline-block */
	display: inline-block;
	text-indent: 0;		/* this is inheriting from <p> */
	/* this is only good if the element is a direct child of a block.
	breaks again if it's in, say, <strong>, or another <span> */
	/*margin-left: inherit;  /* look at this more closely. I think it's wrong in tar.1 - where was it I did this for? bc.? bs.1? */
	white-space: nowrap;
}

#man table .nalign {	/* tbl numerical column alignment  */
	width: 50%;
	display: inline-block;
}

#man .sub {
	position: relative;
	top: 0.5em;
}

#man .sup {
	position: relative;
	bottom: 0.5em;
}

#man .tl_left {	/* for troff .tl ("three part titles") */
    display: inline-block;
    width: 15%;
    text-align: left;
    white-space: nowrap;
    overflow: visible;
}

#man .tl_center {
    display: inline-block;
    width: 55%;
	text-align: center;
    white-space: nowrap;
    overflow: visible;
}

#man .tl_right {
    display: inline-block;
    width: 15%;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
    direction: rtl;
}

#man .apropos {
        margin: auto;
        margin-bottom: 1em;
        padding: 1em 0.5em 1em 0.5em;
        background-color: lightgray;
        border-top: 1px outset silver;
        border-bottom: 1px outset silver;
}

#man .apropos form {
        margin-left: 2em;
        margin-right: 2em;
        margin-bottom: 0;
}

#man .apropos form input {
        width: 35em;
        border: 2px inset silver;
}

.eqn-column { /* for piles, matrix columns */
	display: inline-block;
	text-indent: 0;
	padding-right: 1em;
	/* line-height: 1.5em; /* this for matrix only */
}

.eqn-subscript {
	display: inline-block;
	position: relative;
	text-indent: 0;
	line-height: 0;
	top: 0.25em;
}

.eqn-superscript {
	display: inline-block;
	position: relative;
	text-indent: 0;
	line-height: 0;
	top: -0.4em;
}

.eqn-radical-xtnd {
	display: inline-block;
	border-top: 1px solid;
	margin: 0;
	position: relative;
	/* this is exact position to extend palatino 12 &radic; on safari */
	/* padding-top: 0.1em; */
	/* top: 0.15em; */
	/* adjusted for CMU Serif on safari */
	top: 0.3em;
}

/* cribbed these fraction styles from wikipedia */
.eqn-fraction {
	display: inline-block;
	vertical-align: -0.75em;
	/* font-size: 85%; */
	text-align: center;
	text-indent: 0;
	white-space: nowrap;
}

.eqn-fraction .eqn-denominator {
	border-top: 1px solid;
	display: block;
	/* line-height: 1em; */
	margin: 0 0.1em 0 0.1em;
	/*padding-top: 0.25em; /* border-top gap */
	/*padding-top: 0.1em; /* border-top gap */
	padding: 0 0.2em 0 0.2em;
}

.eqn-fraction .eqn-numerator {
	display: block;
	/* line-height: 1em; */
	margin: 0 0.1em 0 0.1em;
	/*padding-bottom: 0.1em; */
	padding: 0 0.2em 0 0.2em;
}

.eqn-fraction .eqn-fraction-rule {
	border: 0;
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	clip: rect(0,0,0,0);
}

.nrs {		/* troff 1/6em narrow space */
	display: inline-block;
	width: 0.167em;
}

.hns {		/* troff 1/12em half-narrow space */
	display: inline-block;
	width: 0.083em;
}

