/* Course Stylesheet */

@namespace url(http://academia.hixie.ch/xmlns/courses);
@namespace course url(http://academia.hixie.ch/xmlns/courses);
@namespace html url(http://www.w3.org/1999/xhtml);
@namespace math url(http://www.w3.org/1998/Math/MathML);


/* Layout: Form */

course, html|title, section, eg, ol, ul { display: block; }
section > math|math, i > math|math { display: block; }
h, p, f, math { display: block; }
li { display: list-item; }
pl { display: table; }
i { display: table-row; }
i > :first-child { display: table-cell; }
eg:before { display: block; }
* { vertical-align: top; }
table { display: table; }
tr { display: table-row; }
td { display: table-cell; }
course > section:not([id="revision"]) { display: none; }


/* Layout: Sizes */

course { margin: 0 0 1em 0; padding: 0; }
html|title { padding: 0.2em 0.2em 0 0.2em; margin: 0; }
section { margin: 0.5em 1em 1em 1em; padding: 0; }
h { margin: 0 0 0 0; padding: 0 0 0 0; }
p { margin: 1em 0 0 0; padding: 0 0 0 0; }
f { margin: 0 0 0 2em; padding: 0 0 0 0; } /* all f elements start with a blank line */
math { margin: 1em 0 0 2em; padding: 0 0 0 0; } /* Math that isn't MathML */
pl { margin: 1em 0 0 0; padding: 0 0 0 0; border-spacing: 1em 0.25em; width: 100%; }
pl > i > h { width: 25%; }
eg { margin: 1em 1em 0 1em; padding: 0.5em; }
eg:before { margin: 0 0 0.5em 0; padding: 0; }
table { margin: 1em 0 0 0; padding: 0 0 0 0; border-spacing: 1em 0; }
ol, ul { margin: 0; padding: 0 0 0 2em; }
i > h + *, eg > *:first-child { margin-top: 0; }
i > h + f, eg > f:first-child { margin-top: -1em; } /* all f elements start with a blank line */
section > h + p, p + pl { margin-top: 0.4em; }
section > h + f { margin-top: -0.5em; }
* { padding: 0; margin: 0; border-spacing: 0; }
course *:last-child { margin-bottom: 0; }
*:table, *:table-cell { padding: 0; margin: 0; border-spacing: 0; }


/* Text Formatting */

p, h { white-space: normal; }
f, math { white-space: pre; }
p, f, h, math { white-space: -moz-pre-wrap; } /* Override for Gecko-based products */
f { font: 1em/1em monospace; } 
html|title { font: 900 2.5em/0.75 Verdana, sans-serif; letter-spacing: -0.1em; }
section > h { font: 2em Verdana, sans-serif; }
section section > h { font-size: 1.4em; }
section section section > h { font-size: 1.2em; }
pl > i > h { text-align: right; font-weight: bolder; }
eg:before { font-weight: bolder; }
eg { font-style: italic; }
eg > h { font: inherit; }
sub { vertical-align: sub; font-size: 0.6em; }
sup { vertical-align: super; font-size: 0.6em; }
f sub { vertical-align: -0.5em; font-size: 1em; line-height: 0; margin: 0 0.2em 0 -0.2em; }
f sup { vertical-align: 0.5em; font-size: 1em; line-height: 0; margin: 0 0.2em 0 -0.2em; }
em { font-weight: bold; }


/* Decoration */

html|title { border-bottom: solid 0.1em; }
eg { border: 0.05em solid; }
eg:before { content: 'Example'; border-bottom: solid 0.05em; }
dfn { border-bottom: dotted 0.05em; }
v, math|mi[course|type="vector"] { text-decoration: underline; font-style: normal; }
m { border-bottom: double; }
ol { list-style: decimal outside; counter-reset: -moz-li; }
li { counter-increment: -moz-li; } /* don't ask! */
ul { list-style: disc outside; }


/* Color */

course { background: white; color: black; }
dfn { background: transparent; color: green; }
em { background: transparent; color: navy; }