/*
 * Common HTML elements (extremely specific to override UCam style defaults).
 */
.dept div#container { position: relative; }
.dept div#content-primary h1 { margin-top: 1.5em; }
.dept div#content-primary h1.title { margin-top: 0em; }

.dept div#content-primary h3 { margin-top: 1em; }

h1, h2, h3, h4, h5, h6 { color: rgb(0, 51, 102); }

/*
 * Increase font size of inline code to match surrounding text.
 *
 * The font size in code listings is already big enough.
 */
code { font-size: 130%; }
code.listing { font-size: 100%; }


/*
 * Nice figures.
 */
.figure img {
	border: 1px solid;
	margin: 1.5em;
	margin-left: auto;
	margin-right: auto;
	padding: .5em;
}

.caption {
	position: relative;
	top: -1em;

	font-size: smaller;
	font-style: italic;
	text-align: center;
}


/*
 * TESLA logo.
 */
#tesla-logo {
	position: absolute;
	bottom: 6em;
	right: 2em;
	width: 20%;
}


/*
 * Warning messages of various kinds.
 */
div.severe, div.warning, div.note {
	border: 1px dashed;
	margin: 2em;
	padding-left: 1em;
	padding-right: 1em;
	position: relative;
}

div.severe:before, div.warning:before, div.note:before {
	font-family: sans-serif;
	font-size: smaller;
	font-weight: bold;
	text-align: right;
	position: absolute;
	top: -1.5em;
	left: 0;
}

.severe		{ background-color: #fdd; }
.warning	{ background-color: #ffd; }
.note		{ background-color: #eee; }

div.severe:before	{ content: "Warning";	color: #711; }
div.warning:before	{ content: "Warning";	color: #993; }
div.note:before		{ content: "Note";	color: #666; }

/*
 * Center tables.
 */
table {
	margin-left: auto;
	margin-right: auto;
}

/*
 * Simulation of console output.
 */
.console {
	background-color: black;
	color: #ccc;
}

code.listing {
	background-color: #ffe;
	display: block;
}

.console, code {
	font-family: monospace;
	white-space: pre-wrap;
}

div.console, code.listing {
	border: 1px solid;
	margin: .5em;
	padding: .5em;
}

.console .bold { font-weight: bold; }
.console .white { color: white; }
.console .red { color: #f99; }
.console .green { color: #9f9; }
.console .blue { color: #99f; }
.console .purple { color: #f9f; }

/*
 * Code syntax highlighting.
 */
.comment       { color: #33c; }
.keyword       { color: #696; }
.keywordtype   { color: #696; }
.keywordflow   { color: #966; }
.preprocessor  { color: #c3c; }
.literal       { color: #c66; }
.stringliteral { color: #c66; }
.charliteral   { color: #c66; }

/*
 * Simulation of coloured diff output.
 */
.diff .add { color: #3c3; }
.diff .del { color: #c33; }

/*
 * A pretty table format.
 */
table.pretty {
	border-spacing: 3px;
	text-align: center;
}

table.pretty thead {
	font-weight: bold;
}

table.pretty td {
	background-color: #eee;
	padding: .25em;
}
