/* A GitHub-flavoured style for gridmicrotex markdown.
 *
 * Copy this file and point markdown_style(css = "your-copy.css") at it to
 * use it as a starting point. Every property here is one gridmicrotex
 * honours; anything else you add is parsed and then ignored, the way a
 * browser ignores a property it does not implement.
 *
 * Lengths: rem is a multiple of the body font size, em a multiple of the
 * element's own.
 */

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  margin-top: 1.2rem;
}

/* GitHub sets headings on a gentler ladder than the LaTeX default. */
h1 { font-size: 2rem }
h2 { font-size: 1.5rem }
h3 { font-size: 1.25rem }
h4 { font-size: 1rem }
h5 { font-size: 0.875rem }
h6 { font-size: 0.85rem; color: #59636E }

p  { margin-top: 0.8rem }

blockquote {
  color: #59636E;
  border-left: 0.25rem solid #D1D9E0;
  padding-left: 1rem;
  margin-top: 0.8rem;
}

pre {
  font-family: monospace;
  line-height: 1.45;
  margin-top: 0.8rem;
  background: #F6F8FA;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Syntax highlighting inside a fenced code block naming a language.
 *
 * The selectors are the short class names skylighting emits, which is
 * what knitr already writes into HTML output -- so any Pandoc syntax
 * theme can be pasted in here in place of these rules. Only `color` is
 * read; a class with no rule keeps the block's own colour.
 *
 * available_highlighters() lists the languages that reach these. */
.co { color: #59636E }  /* comment      */
.ot { color: #59636E }  /* other        */
.st { color: #0A3069 }  /* string       */
.ch { color: #0A3069 }  /* character    */
.kw { color: #CF222E }  /* keyword      */
.cf { color: #CF222E }  /* control flow */
.pp { color: #CF222E }  /* preprocessor */
.cn { color: #0550AE }  /* constant     */
.dv { color: #0550AE }  /* decimal      */
.bn { color: #0550AE }  /* base-N       */
.fl { color: #0550AE }  /* float        */
.at { color: #0550AE }  /* attribute    */
.sc { color: #0550AE }  /* special char */
.fu { color: #8250DF }  /* function     */
.bu { color: #8250DF }  /* built-in     */
.dt { color: #953800 }  /* data type    */
.va { color: #953800 }  /* variable     */

/* A link cannot be clicked in a grob, only styled to look like one. */
a { color: #0969DA; text-decoration: underline }

/* Footnotes are set smaller at the foot of the document. */
footnote { font-size: 0.85rem; color: #59636E }

/* Display math -- a paragraph that is nothing but $$...$$. */
math { margin-top: 1rem; text-align: center }

hr {
  height: 1rem;
  border-top: 0.25rem solid #D1D9E0;
  margin-top: 1.5rem;
}

ul, ol { margin-top: 0.8rem; marker-gap: 0.5rem }
li     { margin-top: 0.25rem }

/* Tables. GitHub rules every row and shades alternate ones; a shaded
 * header plus row rules is the closest the tabular primitives get. */
table { margin-top: 0.8rem; border-color: #D1D9E0 }
th    { font-weight: bold; background: #F6F8FA }
tr    { border-bottom: 1px solid #D1D9E0 }
td    { padding-left: 0.6rem }
