@font-face {
  font-family: fira;
  src: url(FiraSansCondensed-Light.otf);
}

@keyframes sweep {
  0% { opacity: 0; margin-left: -1em }
  100%  { opacity: 1; margin-left: 0 }
}


/* Page */

html {
  background: white;
  color: #444;
  font-family: fira, sans;
  padding: 2em;
}

body {
  margin: auto;
  max-width: 80em;
  padding: 1em;
}

h1, h2, h3, h4 {
  font-weight: normal;
}

h1 {
  margin-top: 0;
}


/* Menus */

nav {
  display: flex;
  position: absolute;
  right: 0;
  top: 0;
}

nav ul {
  display: flex;
  margin: 0;
}

nav li {
  display: block;
}

nav a {
  color: #ccc;
  display: block;
  padding: 0.5em 1em;
  text-decoration: inherit;
}

nav li.active a,
nav li a:focus,
nav li a:hover {
  color: inherit;
}


/* Groups */

article {
  border: 1px solid #eee;
  padding: 0.1em 1em;
  position: relative;
}

article + article {
  border-top: none;
}

article [data-status=info] {
  background-color: #44E680;
}
article [data-status=warning] {
  background-color: #F5BC26;
}
article [data-status=error] {
  background-color: #E93933;
}
article [data-status=critical] {
  background-color: #E93933;
}
article [data-status=unknown] {
  background-color: #D3E9F2;
}

article > h2,
article > h3 {
  margin: 0.5em 0 0.25em;
}

.status-bar {
  display: flex;
}

.status {
  flex: 1;
  height: 1.5em;
  margin: 0.5px;
}

.status aside {
  font-size: 0;
}

.status section {
  background: white;
  border: 1px solid;
  border-radius: 0.5em;
  box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
  display: none;
  font-size: 0.8em;
  margin: 1em 0;
  padding: 0.8em;
  position: absolute;
  transform: translate(-50%, 0);
  width: max-content;
  z-index: 1;
}

.status:hover section {
  display: block;
}

.status section * {
  margin: 0;
}

.status section h3,
.status section h4 {
  font-size: 1em;
  margin-bottom: 0.5em;
  white-space: pre-line;
}

.status section h3:first-line {
  font-size: 1.2em;
}

.status section dt,
.status section dd {
  display: inline;
}

.status section dt:after {
  content: ':';
}

.status section dd:after {
  content: '\A';
  white-space: pre-line;
}


/* Legend */

.legend {
  color: #999;
  display: flex;
  font-size: 0.8em;
  justify-content: space-between;
  margin: 0.25em 0;
}

.legend dt {
  display: none;
}

.legend dd {
  flex: 1 0 0;
  margin: 0;
}

.legend dd:nth-child(4) {
  text-align: right;
  order: 10;
}

.legend dd:nth-child(6) {
  text-align: center;
}


/* Details */

details {
  font-size: 0.8em;
  margin: 1em 0;
}

summary {
  color: #999;
  cursor: pointer;
  font-size: 0;
  outline: none;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

summary::before {
  align-items: center;
  border: 1px solid #eee;
  content: '+';
  display: flex;
  font-size: 1.5rem;
  height: 0.7em;
  justify-content: center;
  width: 0.7em;
}

details[open] summary::before {
  content: '-';
}

details[open] summary ~ * {
  animation: sweep .5s ease-in-out;
}


/* Responsive */

@media (max-width: 800px) {
  html {
    padding: 0;
  }

  h1 {
    font-size: 1.5rem;
  }

  nav {
    display: block;
    font-size: 0.8em;
    padding-top: 0.5em;
  }

  nav ul {
    justify-content: flex-end;
  }

  .status {
    margin: 0;
  }

  nav a {
    padding: 0.1em 0.5em;
  }
}
