@font-face {
  font-family: Typography Times;
  src: url("static/typography-times.ttf");
}
@font-face {
  font-family: SourceSans3 VF;
  src: url("static/SourceSans3-VariableFont_wght.ttf");
  ascent-override: 95%;
  descent-override: 25%;
}
@font-face {
  font-family: SourceSans3 VF;
  font-style: italic;
  src: url("static/SourceSans3-Italic-VariableFont_wght.ttf");
  ascent-override: 95%;
  descent-override: 25%;
}

body {
  margin: 0;
  background: white;

  font-family: SourceSans3 VF, sans-serif;
  font-size: 14.5px;
}

section {
  max-width: 850px;
  margin: auto;
  padding: 24px;
}

a {
  text-decoration: none;
}

code, pre {
  font-size: 90%;
}

/* Header */

header {
  display: flex; align-items: center;
  padding: 0 5%;
  height: 128px;
  justify-content: center;
  background: #444148;
  color: #dcdcdc;
  box-shadow: inset 0px -60px 40px -60px rgba(0, 0, 0, .3);
}
@media screen and (min-width: 960px) {
  header {
    background-size: 100% auto;
    background-position: 0 50%;
  }
}

header h1 {
  display: inline-block;
  margin: 0; padding: 0;

  font-family: Typography Times, DejaVu Sans; font-weight: bold;
  color: white; text-transform: uppercase; font-size: 31px; line-height: 38px;
  text-shadow: 0 1px 1px black, 0 3px 3px rgba(0, 0, 0, .6);
  text-align: center; letter-spacing: 2px;
}
header h1 a {
  display: block;
  color: inherit;
}
header h1 a:hover {
  text-shadow: none;
}
header h1 b {
  font-size: 14px; letter-spacing: initial; line-height: 26px;
}
@media screen and (max-width: 480px) {
  header h1 { font-size: 27px; line-height: 35px; }
  header h1 b { font-size: 13px; line-height: 22px; }
}

/* Navigation bar */

nav#home-nav {
  display: table;
  margin: 0 auto 24px auto;
}
nav#home-nav a {
  margin: 0 16px;
  padding: 4px 8px;
}

/* Body */

nav.path {
  margin: 0 0 24px 0;
}
nav.path > * {
  padding: 2px 4px;
}

nav.path a,
article h2 a,
article h3 a,
article a.ref {
  color: gray;
}
nav.path a:hover,
article h2 a:hover,
article h3 a:hover,
article a.ref:hover {
  background: #a0a0a0;
  color: white;
}

article {
  text-align: justify; line-height: 21px;
  color: #080808;
}

article h1 {
  font-weight: bold; font-size: 24px;
  padding: 0 0 8px 0;
  margin: 0 0 24px 0;
  border-bottom: 1px dotted #808080;
}
article h2 {
  display: block;
  font-weight: bold; font-size: 20px;
  margin: 32px 0 12px 0;
}
article h3 {
  font-size: inherit;
  font-weight: bold;
}

article .headerlink {
  font-size: 10px;
  margin-left: 4px;
}
article h1 .headerlink {
  display: none;
}

article .toc .toctitle {
  font-style: italic;
}
article .toc ul {
  margin-top: 0;
}

article figure {
  margin: 32px auto;
  text-align: center;
}
article figure img + img {
  margin-left: 16px;
}
article figcaption {
  font-style: italic;
}

section a {
  color: #105f9b;
}
section a:hover {
  text-decoration: none;
  background: #5896c6;
  color: white;
}

article sup, article sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}
article sub {
  top: 0.4em;
}

article ul,
article ol {
  padding-left: 24px;
}
article ul.spaced li,
article ol.spaced {
  margin-bottom: 16px;
}
article .list-intro + ul,
article .list-intro + ol,
article .list-intro + dl {
  margin-top: 0;
}

article dl dw {
  float: left;
}
article dl dd {
  margin-left: 24px;
}

article blockquote {
  margin-left: 0;
  border-left: solid 4px #e0e0e0;
  padding-left: 16px;
  color: #404040;
  font-style: italic;
}

article .math {
  font-family: DejaVu Sans, sans;
  font-size: 90%;
  line-height: initial;
}
article .math.display {
  display: block;
  text-align: center;
}

article i.desc {
  color: gray;
}

article div.formal {
  border: 1px dotted #404040;
  padding: 4px 8px;
  margin: 32px 0 24px 0;
  position: relative;
  background: #f4f4f4;
}
article div.formal > *:first-child {
  margin-top: 2px !important;
}
article div.formal > *:last-child {
  margin-bottom: 2px !important;
}

article div.formal[data-domain]:before {
  position: absolute;
  right: 0;
  top: -18px;
  height: 18px;
  line-height: 18px;

  content: attr(data-domain);
  text-transform: uppercase;
  color: gray;
  font-size: 80%;
}

article figure {
  margin: 8px 0;
}
article figcaption[aria-hidden="true"] {
  display: none;
}

article hr {
  height: 0;
  border: 0;
  border-bottom: 1px dotted #404040;
}

div.references td {
  vertical-align: top;
}
div.references td > p {
  margin: 0;
}
div.references td:first-child {
  padding-right: 8px;
  font-weight: bold;
}

div.footnote {
  margin-top: 24px;
}

/* Tables */

table:not(.codehilitetable) {
  margin: auto;
  border-collapse: collapse;
}
table:not(.codehilitetable) td, table:not(.codehilitetable) th {
  border: 1px solid #e4e6e8;
  padding: 2px 6px 2px 6px;
  vertical-align: top;
}
table:not(.codehilitetable) tr:last-child td {
  padding-bottom: 2px;
}
table:not(.codehilitetable) th {
  text-align: left;
  background: #e4e6e8;
  border: 1px solid #d0d2d4;
  font-weight: bold;
}
table:not(.codehilitetable) tr:nth-child(odd) {
  background: #f6f8fa;
}
table:not(.codehilitetable) tr:nth-child(even) {
  background: unset;
}
header table:not(.codehilitetable) tr:nth-child(odd) {
  background: unset;
}
header table:not(.codehilitetable) td {
  border: 1px solid #d0d2d4;
}

/* Extra code formatting */

pre {
  line-height: 140%;
  margin: 8px 0;
}
td.linenos {
  opacity: 0.25;
  padding: 0 4px 0 0;
}

/* Footer */

footer {
  text-align: center;
  background: #e0e0e0;
  padding: 16px 0;
  color: #a0a0a0;
  font-size: 80%;
}
footer a {
  color: inherit;
}
