html, body {
  height: 100%;
  width: 100%;
}
body {
  font: 16px/1.5em "Helvetica Neue", Helvetica, sans-serif;
  box-sizing: border-box;
  line-height: 1.5;
  color: #373a3c;
  margin: 0;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  text-rendering: optimizeLegibility;
  text-decoration-skip: ink;
  min-width: 360px;
}
header {
  background-color: #325;
}
a {
  cursor: pointer;
  color: #4682B4;
}
a:not(:hover) {
  text-decoration: none;
}
footer {
  border-top: 1px solid #eee;
  padding: 1em 0 1em 0;
  /* for safari */
  min-height: 40px;
}
footer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
blockquote {
  padding: 0 15px;
  color: #777;
  border-left: 4px solid #ddd;
  margin: 0;
}
dt {
  font-weight: bold;
  color: #777;
}
dd {
  margin-bottom: 10px;
}

/* Table */

.page-content table {
  padding: 0;
  border-collapse: collapse;
}
.page-content table tr {
  border-top: 1px solid #cccccc;
  background-color: white;
  margin: 0;
  padding: 0;
}
.page-content table tr:nth-child(2n) {
  background-color: #f8f8f8;
}
.page-content table tr th {
  font-weight: bold;
  border: 1px solid #cccccc;
  text-align: left;
  margin: 0;
  padding: 6px 13px;
}
.page-content table tr td {
  border: 1px solid #cccccc;
  text-align: left;
  margin: 0;
  padding: 6px 13px;
}
.page-content table tr th:first-child, .page-content table tr td:first-child {
  margin-top: 0;
}
.page-content table tr th:last-child, .page-content table tr td:last-child {
  margin-bottom: 0;
}

.page-content table {
  width: 100%;
}
.page-content .small-table {
  width: auto;
}

.page-content table p {
  margin: .5em 0;
}
.page-content table p:first-child {
  margin-top: 0;
}
.page-content table p:last-child {
  margin-bottom: 0;
}

/* Table with proeprty definitons */

.doc-table td:nth-child(2), .doc-table th:nth-child(2) {
  text-align: center;
}

/* Headers */

h1, h2, h3, h4 {
  margin: 0.7em 0 0.3em 0;
}
h1 {
  vertical-align: middle;
  color: black;
  display: inline-block;
  font-weight: 300;
  font-size: 2.5em;
  margin: 0.7em 0 0.3em 0;
}
h2 {
  font-size: 1.75em;
  font-weight: 500;
  border-bottom: 1px solid #cccccc;
  color: black;
  margin-top: 1.5em;
  padding-bottom: 1px;
  /* more padding between heading and line */
}
h3 {
  font-size: 1.5em;
}
h4 {
  font-size: 1.3em;
  color: #333;
}
h5 {
  font-size: 1.1em;
}
h6 {
  color: #777777;
  font-size: 1.1em;
}
.anchor {
  display: inline-block;
  margin-left: -22px;
  width: 22px;
  color: black;
  outline: 0;
}
h2 .octicon-link, h3 .octicon-link, h4 .octicon-link, h5 .octicon-link, h6 .octicon-link {
  color: #000;
  vertical-align: middle;
  visibility: hidden;
}
h2:hover .anchor .octicon-link, h3:hover .anchor .octicon-link, h4:hover .anchor .octicon-link, h5:hover .anchor .octicon-link, h6:hover .anchor .octicon-link {
  visibility: visible;
}

/* Code */
code, tt {
  margin: 0 2px;
  padding: 0 4px;
  background: #f6f6f6;
  border: 1px solid #ddd;
  font-family: monospace;
  font-size: 0.8em;
}
pre code {
  margin: 0;
  padding: 0;
  white-space: pre;
  border: none;
  background: transparent;
  font-family: monospace;
}
pre {
  line-height: 1em;
  background: #F9F9F9;
  border: 1px solid #eee;
  padding: 8px 10px;
}
.hljs {
  padding: 0;
  background-color: transparent;
}

/* Nav */

nav {
  display: flex;
  align-items: baseline;
  align-content: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
  line-height: 54px;
}

nav a {
  color: #eee;
  padding-right: 2em;
  display:inline-block;
}
nav a:last-child {
  padding-right: 0px;
}
nav a.active {
  font-weight: bold;
  color: #fff;
}
nav a:hover {
  color: #e5b928;
  text-decoration: none;
}

/* Special classes */

.page-centered {
  /* 1000px - 20px = 960px */
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}
.page-main {
  display: flex;
  flex-direction: column;
  flex-flow: initial;
}
.page-content {
  padding-bottom: 3em;
  flex: 1 1 auto;
}
.page-sidebar {
  width: 200px;
  flex: 0 0 auto;
  margin-top: 1.7em;
  padding-right: .2em;
}
.sub-nav {
  background-color: #624e88;
}

.sidebar-nav {
  display: block;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  display: block;
}
.sidebar-nav-item a {
  display: block;
  padding: 0.5em 0;
  color: #666;
}
.sidebar-nav-item a.active {
  font-weight: bold;
}
.sidebar-nav-item a:hover {
  color: #4682B4;
  text-decoration: none;
}

.sub-menu-nav {
  padding: 0;
}

.sub-item {
  padding-left: 1em;
  padding-top: 0.25em;
  border-left: 2px solid #eee;
}

.sub-item a {
  padding: 0;
  font-size: 0.9em;
}

.sub-sub-nav {
  padding-left: 0px;
}

.title h1 {
  margin-top: 0.3em;
}

nav > .dropdown {
  flex: 0 0 auto;
  margin: 0 20px 0px -20px;
}

.vl-title {
  padding: 0 20px 2px 20px;
  font-weight: bold;
  font-size: 1.4em;
  color: #eee;
}

.vl-links {
  flex: 1 0 auto;
  max-width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.primary-links {
  text-align: left;
  display: inline-block;
  flex: 1 0 auto;
  max-width: 100%;
}

.secondary-links {
  float: right;
  text-align: right;
  flex: 0 0 auto;
  max-width: 100%;
}

.edit-page {
  font-size: 0.9em;
  color: #aaa;
  padding-top: 30px;
  line-height: 3em;
  margin: 0.7em 0 0.3em 0;
  vertical-align: text-top;
  text-align: right;
  float: right;
}

footer .edit-page {
  padding: 0;
  margin: 0;
}

.lead {
  font-size: 1.3em;
  font-weight: 300;
}
.idl-logo {
  float: right;
}
.idl-logo img {
  height: 40px;
}
.fill {
  flex: 1 0 auto;
}
.float-right {
  float: right;
}
.hidden {
  display: none;
}
.lead-columns {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: stretch;
}
.lead-columns > span:first-child {
  margin-right: 60px;
}
.lead-buttons {
  flex: 0 0 auto;
}
.lead-buttons a {
  display: block;
  width: 250px;
  padding: 8px 16px;
  margin: 1em 0;
  text-align: center;
  background-color: steelblue;
  border: 1px solid #357ebd;
  color: white;
  border-radius: 4px;
  font-size: 1.2em;
}
.lead-buttons a:last-child {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}
.lead-buttons a:hover {
  text-decoration: none;
  background-color: #285e8e;
}
.lead-buttons a:last-child:hover {
  text-decoration: none;
  background-color: #ebebeb;
}
.note-line {
  font-size: 0.9em !important;
  margin-top: 8px;
  display: block;
}

/* Announcement */
.announcement {
  padding: .6em 0;
  background-color: #b53e3e;
  color: white;
  text-align: center;
}

.announcement a {
  color: white;
  text-decoration: underline;
}

/* Example Gallery */
.preview {
  display: block;
  float: left;
  padding: 0.5em 0;
  padding-right: 0.5em;
}
.preview .image {
  width: 180px;
  height: 100px;
  background-position: left top;
  background-size: cover;
  overflow: hidden;
  transition: background-position 2s;
}
.preview:hover .image {
  background-position: right bottom;
}
.preview a {
  font-size: 0.9em;
}

/* Example Showcase */
#showcase {
  width: 100%;
  height: 300px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  position: relative;
}
#showcase:after,
#showcase:before {
  content: "";
  display: block;
  width: 100%;
  position: absolute;
  background: white;
  height: 16px;
  z-index: 2;
}
#showcase:before {
  bottom: -16px;
  box-shadow: 0px -8px 16px rgba(0,0,0,0.3);
}
#showcase:after {
  top: -16px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
}
#showcase .examples {
  margin: 0 auto;
  height: 300px;
  width: 1300px;
  line-height: 0;
}
#showcase .preview {
  width: 180px;
  height: 100px;
  padding: 0;
  outline: 1px solid #ddd;
  background-position: left top;
  background-size: cover;
  overflow: hidden;
  position: relative;
  z-index: 0;
  transition: background-position 2s;
}
#showcase .preview:hover {
  background-position: right bottom;
  outline: 2px solid #4682B4;
  z-index: 1;
}

/* Gallery */

.gallery {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}
.gallery .imagegroup {
  display: inline-block;
  position: relative;
  /* Show 4 images per row, each image has 18px horizontal margin */
  width: calc(25% - 36px);
  margin: 12px 18px;
  /* For small screens */
  min-width: 140px;
}

.gallery .imagegroup:hover {
  text-decoration: none;
}
.gallery .image {
  background-size: cover;
  display: block;
  width: 100%;
  /* hack to make height depend on width, golden ratio*/
  padding-bottom: 75%;
  background-repeat: no-repeat;
  margin-bottom: 5px;
  overflow: hidden;
  transition: background-position 2s;
}
.gallery .image:hover {
  background-position: right bottom;
}

.gallery .image-title {
  font-size: .95em;
}

/* Code Examples */
.example {
  display: flex;
  align-items: stretch;
  margin-top: 1em;
  flex-flow: row wrap;
  width: 100%;
  max-width: 786px;
  overflow: auto;
}
.example .example-vis {
  flex: 1 1 0;
  margin-right: 10px;
  text-align: center;
  background-color: white;
  margin-bottom: 1em;
  align-self: center;
}
.example .example-code {
  flex: 1.618 1 0;
  margin: 0;
  align-self: flex-start;
  min-width: 350px;
}
.example .example-code code {
  white-space: pre-wrap;
}
.example .vega-actions {
  font-size: .8em;
  opacity: 0.8;
}
.example .vega-actions:hover {
  opacity: 1;
}
.example canvas, .example svg {
  border: 1px dashed #ddd;
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
}

.slide {
  display: none;
}

.slide[data-state=active] {
  display: block;
}

.slide .example .example-vis {
  align-self: flex-start;
}

.slide.video-demo .example-vis {
  visibility: hidden;
}

.slide.video-demo video {
  position: absolute;
  top: 65px;
  border: 1px dashed #ddd;
}

.indicators {
  position: absolute;
  top: -40px;
  width: 100%;
  text-align: right;
}

.indicator {
  cursor: pointer;
}

.slide-nav[data-state=active] {
  color: #373a3c;
  font-weight: bold;
}

.next-slide {
  padding: 3px 5px;
  margin-left: 2em;
  color: #333;
  font-weight: 600;
  background-color: #f8f8f8;
  border: 1px solid #999;
  border-radius: 2px;
  font-size: .8em;
}

.next-slide:hover {
  background-color: #ebebeb;
  color: #000;
}

/* Page styles */

.applications ul {
  list-style: none;
  padding-left: 0;
}
.applications li {
  margin: 0.2em 0;
}

/* Dropdown */
nav .dropdown-content {
  position: absolute;
  display: none;
  z-index: 1;
  min-width: 141px;
}

nav .dropdown-content a {
  display: block;
  font-weight: 600;
  font-size: 1.2em;
  padding-left: 20px;
}

nav > .dropdown:hover {
  box-shadow: 0px 51px 20px 5px rgba(0,0,0,0.2);
}

nav > .dropdown:hover .dropdown-content {
  display: block;
}

nav > .dropdown:hover a {
  background-color: #e2e2e2;
  color: #666;
}

nav > .dropdown:hover a:hover {
  color: #000;
}

/* Media queries */

@media (max-width:900px) {
  body {
    font-size: 14px;
  }
  nav .dropdown-content {
    min-width: 129px;
  }
}

@media (max-width:640px) {
  .page-main {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .page-centered, .page-content {
    max-width: 100%;
  }
  .lead-columns {
    flex-direction: column;
  }
  .lead-columns span:first-child {
    margin-right: 0px;
  }
  .lead-buttons a {
    width: inherit;
  }
  .example .example-vis, .example .example-code {
    flex: 1 1 auto;
    max-width: 100%;
    overflow-x: auto;
  }
  .example .example-code code {
    min-width: 600px;
  }
  .highlight {
    overflow-x: auto;
  }
}
