@font-face {
  font-family: "Agave";
  src: url("./fonts/Agave-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Agave";
  src: url("./fonts/Agave-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

/* make sure the terminal area actually uses it */
pre.bbs {
  font-family: Agave, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14pt;
  line-height: calc(14pt * 1.1);
  color: #dbdde4;  /* default text color */
  white-space: pre-wrap;
  margin: 0;
}

@keyframes blink {
  0%   { opacity: 1.0; }
  50%  { opacity: 0.0; }
  100% { opacity: 1.0; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
main {
  width: 100%;
}

body {
  background: #080808;
  backdrop-filter: blur(32px);
  color: #b4b4b4;
  font-family: Agave, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14pt;
  line-height: calc(14pt * 1.1);
  position: relative;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Agave, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
}

h1 {
  font-size: 22pt;
  line-height: calc(22pt * 1.1);
}

@media (max-width: 768px) {
  h1 {
    font-size: 18pt;
    line-height: calc(18pt * 1.1);
  }
}

h2 {
  font-size: 20pt;
  line-height: calc(20pt * 1.1);
}

@media (max-width: 768px) {
  h2 {
    font-size: 16pt;
    line-height: calc(16pt * 1.1);
  }
}

h3 {
  font-size: 18pt;
  line-height: calc(18pt * 1.1);
}

@media (max-width: 768px) {
  h3 {
    font-size: 14pt;
    line-height: calc(14pt * 1.1);
  }
}

h4 {
  font-size: 16pt;
  line-height: calc(16pt * 1.1);
}

@media (max-width: 768px) {
  h4 {
    font-size: 12pt;
    line-height: calc(12pt * 1.1);
  }
}

h5 {
  font-size: 14pt;
  line-height: calc(14pt * 1.1);
}

@media (max-width: 768px) {
  h5 {
    font-size: 10pt;
    line-height: calc(10pt * 1.1);
  }
}

h6 {
  font-size: 12pt;
  line-height: calc(12pt * 1.1);
}

@media (max-width: 768px) {
  h6 {
    font-size: 8pt;
    line-height: calc(8pt * 1.1);
  }
}

hr {
  border: 0;
  border-bottom: 2px solid #312a1e;
  clear: both;
  display: block;
  position: relative;
  top: 6px;
  height: 2px;
  width: 98.5%;
  margin: 0 0 14px;
}

img {
  border: 0;
  vertical-align: middle;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
  padding: 0;
}

table caption {
  color: #646361;
  caption-side: bottom;
  margin: 0 auto;
  padding-top: 1ch;
  width: 80%;
}

table thead {
  color: #dbdde4;
  font-weight: bold;
}

s {
  text-decoration-thickness: 3px;
  text-decoration-color: rgba(190, 25, 25, 0.65);
}

header {
  padding: 0 1ch;
  position: relative;
  text-align: center;
}

header figure {
  position: absolute;
  width: 80ch;
  bottom: 1.25ch;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 0 7ch;
  text-align: right;
  vertical-align: bottom;
  z-index: 1;
}

header figure figcaption {
  display: inline-block;
  padding-left: 1ch;
  font-size: 12pt;
  line-height: calc(12pt * 1.1);
}

header figure img {
  position: relative;
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  header figure {
    font-size: 7.2pt;
    line-height: calc(7.2pt * 1.1);
    bottom: 2ch;
    padding: 0 4ch;
    min-width: 60ch;
    width: 100%;
  }

  header figure figcaption {
    font-size: 7.2pt;
    line-height: calc(7.2pt * 1.1);
  }
}

header label.search-input {
  font-size: 12pt;
  line-height: calc(12pt * 1.1);
  position: relative;
  display: block;
  margin: 0 auto;
  padding-bottom: 1ch;
  width: 32ch;
  z-index: 5;
}

header label.search-input input#search {
  font: inherit;
  font-weight: bold;
  height: 1.75em;
  width: 100%;
  margin: 0;
  outline: 0;
  padding: 0.25ch 0.5ch 0;
  text-indent: 3.5ch;
  border: 0;
  border-radius: 0.5ch;
  background: #1a1a1a;
  color: #dbdde4;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.4);
}

header label.search-input input#search:focus {
  border-color: #aaaebc;
}

header label.search-input input#search::-webkit-input-placeholder {
  padding-left: 3ch;
}

header label.search-input svg.search-icon {
  position: absolute;
  left: 0.45em;
  top: 0.4em;
  margin: auto auto auto 0;
  width: 1em;
  height: 1em;
  z-index: 1;
  fill: #717790;
}

@media (max-width: 768px) {
  header label.search-input {
    font-size: 10pt;
    line-height: calc(10pt * 1.1);
  }
}

header h4 {
  color: #ffaa3e;
  font-weight: bold;
}

header h4 a {
  color: #b4b4b4;
  text-decoration: none;
}

header h4 a:hover {
  cursor: pointer;
  background-color: #222946;
}

header img#logo {
  display: inline-block;
  margin: 0 auto;
  padding: 2ch 0 1ch;
  width: 640px;
}

@media (max-width: 768px) {
  header img#logo {
    width: 100%;
  }
}

main {
  display: block;
  padding: 2ch 3ch;
  background: #000;
  border: solid 1px rgba(51, 61, 105, 0.25);
  margin: 0 auto;
  border-radius: .5ch;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.4);
  white-space: pre-wrap;
  min-height: 25em;
  width: 80ch;
}

@media (max-width: 768px) {
  main {
    font-size: 7.2pt;
    line-height: calc(7.2pt * 1.1);
    min-width: 60ch;
    width: 100%;
  }
}

main a {
  color: #b4b4b4;
  text-decoration: none;
}

main a:hover {
  cursor: pointer;
  background-color: #222946;
}

@media (max-width: 768px) {
  main img {
    max-width: 100%;
  }
}

main #tabs {
  white-space: normal;
}

main #tabs input {
  position: absolute;
  left: -10000px;
}

main #tabs .flex-tabs {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

main #tabs .flex-tabs .tab {
  flex-grow: 1;
  max-height: 2em;
}

main #tabs .flex-tabs .panel {
  display: none;
  width: 100%;
  flex-basis: auto;
  white-space: pre-wrap;
}

main #tabs .tab {
  display: inline-block;
  padding: 0.5ch;
  text-align: center;
  vertical-align: middle;
  cursor: hand;
  cursor: pointer;
  border-bottom: 0.5ch solid #212121;
  margin-bottom: 1ch;
}

main #tabs .tab:hover {
  color: #258f8f;
  font-weight: bold;
}

main #tabs #tab-one:checked ~ .tabs #tab-one-label,
main #tabs #tab-two:checked ~ .tabs #tab-two-label,
main #tabs #tab-three:checked ~ .tabs #tab-three-label,
main #tabs #tab-four:checked ~ .tabs #tab-four-label,
main #tabs #tab-five:checked ~ .tabs #tab-five-label {
  color: #4dc5dc;
  cursor: default;
  border-bottom-color: #434343;
  font-weight: bold;
}

main #tabs #tab-one:checked ~ .tabs #tab-one-panel,
main #tabs #tab-two:checked ~ .tabs #tab-two-panel,
main #tabs #tab-three:checked ~ .tabs #tab-three-panel,
main #tabs #tab-four:checked ~ .tabs #tab-four-panel,
main #tabs #tab-five:checked ~ .tabs #tab-five-panel {
  display: block;
}

@media (max-width: 600px) {
  main #tabs .flex-tabs {
    flex-direction: column;
  }

  main #tabs .flex-tabs .tab {
    border-bottom: 0.25ch solid #212121;
    font-size: 8pt;
    line-height: calc(8pt * 1.1);
  }

  main #tabs .flex-tabs .tab:last-of-type {
    border-bottom: none;
  }

  main #tabs .flex-tabs #tab-one-label  { order: 1; }
  main #tabs .flex-tabs #tab-two-label  { order: 3; }
  main #tabs .flex-tabs #tab-three-label{ order: 5; }
  main #tabs .flex-tabs #tab-four-label { order: 7; }
  main #tabs .flex-tabs #tab-five-label { order: 9; }

  main #tabs .flex-tabs #tab-one-panel  { order: 2; }
  main #tabs .flex-tabs #tab-two-panel  { order: 4; }
  main #tabs .flex-tabs #tab-three-panel{ order: 6; }
  main #tabs .flex-tabs #tab-four-panel { order: 8; }
  main #tabs .flex-tabs #tab-five-panel { order: 10; }
}

main #stats {
  text-align: center;
}

main #stats span.title {
  position: relative;
  left: -0.52ch;
}

main #stats img {
  position: relative;
  left: 2ch;
}

main #top {
  display: none;
  text-align: right;
  white-space: normal;
}

main #cursor {
  animation: blink 1s step-end infinite;
}

main #error {
  display: block;
  margin: 0 auto;
  padding-top: 12ch;
  width: 256px;
}

footer {
  margin: 1em 0;
  text-align: center;
  width: 100%;
  font-size: 10pt;
  line-height: calc(10pt * 1.1);
}

@media (max-width: 768px) {
  footer {
    font-size: 8pt;
    line-height: calc(8pt * 1.1);
  }
}

footer a img {
  filter: grayscale(100%);
  opacity: 0.6;
  margin-bottom: 1em;
}

footer a img:hover {
  filter: grayscale(0%);
  opacity: 1.0;
}

.bg      { color: #131313; }
.black   { color: #222946; }
.white   { color: #dbdde4; }
.blue    { color: #3a57d7; }
.cyan    { color: #258f8f; }
.green   { color: #1aaa13; }
.grey    { color: #646361; }
.magenta { color: #be007f; }
.red     { color: #be1919; }
.yellow  { color: #ffaa3e; }

.h_blue    { color: #507cff; }
.h_cyan    { color: #4dc5dc; }
.h_green   { color: #5dce33; }
.h_grey    { color: #aeaeae; }
.h_magenta { color: #e671d3; }
.h_red     { color: #dc2f32; }
.h_yellow  { color: #fadd2d; }

.img_red {
  filter: invert(20%) sepia(100%) saturate(3061%) hue-rotate(352deg) brightness(76%) contrast(95%);
}

.img_green {
  filter: invert(46%) sepia(33%) saturate(2974%) hue-rotate(84deg) brightness(95%) contrast(86%);
}

.bold   { font-weight: bold; }
.center { text-align: center; }
.right  { text-align: right; }
.pre    { white-space: pre; }
.float_r{ float: right; }

.document {
  background: #258f8f;
  color: #000;
  font-weight: bold;
  padding: 1.5ch 1ch 1.25ch;
  display: block;
}

.tspace {
  font-size: 12pt;
  line-height: calc(12pt * 1.1);
  margin: 0 auto;
}

.tspace caption {
  font-size: 10pt;
  line-height: calc(10pt * 1.1);
}

.tspace tbody > tr:hover {
  background-color: #161616;
}

.tspace thead > tr > th,
.tspace tbody > tr > td {
  padding: 0 0.8em;
}

.tdouble tbody > tr > td {
  height: 36px;
  vertical-align: middle;
}


/* Holodeck adjustments: search spacing & header status centering */
header figure,
header figure figcaption {
  text-align: center;
}

.search-spacer-top,
.search-spacer-bottom {
  display: block;
  height: 0.75ch;
}
