@import 'reset.css';

:root {
  --background: #fff;
  --foreground: #111;
  --background-secondary: #f1f1f1;
  --foreground-secondary: #ccc;
}

[data-mode='night'] {
  --background: #111;
  --foreground: #f1f1f1;
  --background-secondary: #071500;
  --foreground-secondary: #555;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
  font-size: 14px;
  color: var(--foreground);
  background: var(--background);
}

.flex {
  display: flex;
}

article h1,
article h2,
article h3 {
  margin-bottom: 8px;
}

#sidebar {
  width: 300px;
  padding: 16px;
  margin-right: 16px;
  background-color: var(--background-secondary);
  min-height: 100vh;
  position: relative;
}

#sidebar nav a {
  display: block;
  margin-bottom: 6px;
}

#sidebar::after {
  content: '';
  position: absolute;
  width: 30px;
  top: 0;
  bottom: 0;
  right: -15px;
  background-image: url(/vines.png);
  background-repeat: repeat-y;
  background-size: 30px;
}

#sidebar h1 {
  margin: 0;
  margin-bottom: 8px;
}

#main-content {
  padding: 16px;
  flex: 1;
  max-width: 800px;
}

a {
  color: inherit;
}

.content-box {
  margin-top: 12px;
}

.content-box p {
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-column-gap: 8px;
  margin-bottom: 8px;
}

.fact-box {
  padding: 12px;
  color: #fff;
}

.fact-box p {
  margin: 0;
  font-size: 18px;
}

.blue {
  background-color: #74b9ff;
}

.orange {
  background-color: #e84118;
}

.green {
  background-color: #27ae60;
}

@media only screen and (max-width: 50rem) {
  .facts {
    grid-template-columns: 1fr 1fr;
    grid-row-gap: 8px;
  }

  #sidebar {
    width: 100%;
    margin-bottom: 16px;
    margin-right: 0;
    min-height: auto;
  }

  #sidebar::after {
    right: 0;
  }

  #main-content {
    width: 100%;
  }

  .flex {
    flex-direction: column;
  }

  .gallery {
	display: block !important;
  }

  .gallery>div {
    margin-right: 0 !important;
    margin-bottom: 12px;
  }
}


table {
  margin-right: 12px;
  margin-bottom: 12px;
}


table,
th,
td {
  border: 1px solid;
  width: auto;
}

table th,
table td {
  padding: 6px;
}

.gallery {
  display: flex;
}

.gallery>div {
  flex-basis: 50%;
  margin-right: 12px;
}

.gallery img, .gallery video {
  object-fit: contain;
  width: 100%;
}

pre {
  margin: 0;
}

pre code {
  display: block;
  background: none;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
  overflow-x: scroll;
  max-width: 100%;
  min-width: 100px;
  padding: 0;
}

.table-wrap {
  align-items: flex-start;
  justify-content: space-between;
}
