.wrapper {
  display: grid;
  grid-template-rows: minmax(min-content, 7.5vh) calc(100vh - 7.5vh);
  grid-template-columns: 1fr;
}

.sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 10vh 1fr;
}

@media (min-width: 768px) {
  .sub-grid {
    grid-template-columns: 25vw 1fr;
    grid-template-rows: auto;
  }
}

nav {
  display: grid;
  grid-template-columns: 5vw 1fr 15vw;
  gap: min(2vw, var(--verticalSpacingMultiple));
}

nav .logo {
  min-width: 2.5vw;
  justify-self: center;
  align-self: center;
}

/* Sidebar lower docs */
nav a[href$="docs"] {
  justify-self: center;
  align-self: center;
}

nav h1 {
  font-weight: 300;
  font-size: 1.2rem;
  margin: 0;
  line-height: 1;
  justify-self: left;
  align-self: center;
  color: #fff;
}

nav a {
  color: rgba(255, 255, 255, 0.8);
}

main {
  margin: 0 min(2vw, var(--verticalSpacingMultiple));
}

footer {
  text-align: center;
}

footer img {
  width: 30px;
  height: auto;
  opacity: 0.35;
}

footer small {
  color: var(--navBorder);
  font-size: .9rem;
}

.head {
  padding: calc(var(--verticalSpacingMultiple) / 2) 0;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--veryLightGrey);
}

.subject {
  width: 50%;
  flex: 1;
  font-weight: 300;
  font-size: 1rem;
  margin: 0;
}

.view-as-json {
  flex: 1;
  width: 50%;
  text-align: right;
}

.email-body {
  padding-top: 1rem;
}

.alternative-nav {
  flex-flow: row nowrap;
  display: flex;
  border-bottom: 1px solid var(--veryLightGrey);
}

.alternative-nav a {
  flex: 1 auto;
  text-align: center;
  line-height: 3rem;
}

.alternative-nav[data-showing='text'] .text,
.alternative-nav[data-showing='html'] .html {
  border-bottom: 2px solid var(--lightPurple);
}

.alternative-nav a:first-of-type::empty {
  border-right: none;
}

.header-toggle {
  padding: 1rem 0;
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
}

.headers {
  padding-bottom: 1rem;
}

.headers+a {
  display: block;
}

.attachments-wrapper {
  padding-top: 1rem;
  border-top: 1px solid var(--veryLightGrey);
}

iframe {
  border: 0;
  margin-top: .5rem;
}

b {
  margin-right: 5px;
}

.mailbox pre {
  display: inline-block;
}

.helper-text {
  color: #999;
  font-size: 0.8rem;
  margin: 0;
  padding: 0;
  margin-top: 2rem;
  text-align: center;
}

.helper-text img {
  max-width: 75px;
  opacity: 0.3;
  margin-bottom: 1.5rem;
}

.helper-text ul {
  margin: 0;
  padding: 0;
}

.helper-text li {
  margin-bottom: 1rem;
  list-style: none;
}

@media (min-width: 768px) {
  .helper-text {
    font-size: 1.2rem;
    margin-top: 7rem;
    width: 100%;
  }
}

.helper-text small {
  display: block;
  margin-top: 4rem;
  opacity: 0.75;
}

.attachments {
  border-bottom: 1px solid var(--veryLightGrey);
  padding-bottom: 1rem;
  display: flex;
}

.attachments::after {
  content: ' ';
  display: table;
  clear: both;
}

.attachment {
  padding: 1% 2%;
  position: relative;
  border: 1px solid #9eb0d9;
  border-radius: 0.2rem;
  padding-left: 40px;
  margin-bottom: 1vh;
  overflow: hidden;
  width: min-content(10vw);
}

.attachment .mime-type {
  opacity: 0.7;
  font-size: 0.6rem;
}

.attachment::before {
  content: ' ';
  background: url(/images/file-3921230dcb8ecfa3593270c9f8384d89.svg?vsn=d) center center/60% no-repeat;
  left: 0;
  width: 40px;
  position: absolute;
  height: 35px;
}

.mails {
  display: flex;
  justify-content: flex-start;
  flex-flow: row;
  background: var(--veryVeryLightGrey);
}

.mails .mail {
  width: 10%;
  padding: 0;
  display: flex;
  flex-flow: column;
  text-align: center;
  justify-content: center;
  position: relative;
}

.mails .mail span {
  display: none;
}

.mails .mail::before {
  content: attr(data-i);
}

.mails .mail.active::after {
  background: var(--navBorder);
  content: ' ';
  position: absolute;
  transition: background .15s ease-in-out;
  height: 1vh;
  right: 0;
  bottom: 0;
  width: 100%;
}

@media (min-width: 768px) {

  .mails {
    flex-flow: column;
    justify-content: flex-start;
  }

  .mails .mail {
    height: calc((100vh - 9vh - 2px) / 10);
    width: 100%;
    display: flex;
    flex-flow: column;
    text-align: left;
    padding: 1rem;
  }

  .mails .mail span {
    display: block;
  }

  .mails .mail::before {
    display: none;
  }

  .mails .mail:nth-child(odd) {
    background: var(--veryLightGrey);
  }

  .mails .mail:nth-child(1n + 6) {
    opacity: .9;
  }

  .mails .mail:nth-child(1n + 7) {
    opacity: .8;
  }

  .mails .mail:nth-child(1n + 8) {
    opacity: .6;
  }

  .mails .mail:nth-child(1n + 9) {
    opacity: .4;
  }

  .mails .mail:nth-child(1n + 10) {
    opacity: .3;
  }

  .mails .mail.active,
  .mails .mail:hover {
    color: var(--lightBluePurple);
  }

  .mails .mail.active::after,
  .mails .mail:hover::after {
    background: var(--navBorder);
    content: ' ';
    position: absolute;
    transition: background .15s ease-in-out;
    height: 9vh;
    right: 0;
    top: 0;
    width: 2vh;
  }

  .mails .mail:hover::after {
    background: var(--lightBluePurple);
  }
}

.offline-notice {
  position: absolute;
  bottom: 0;
  height: 9vh;
  text-align: center;
  background: var(--veryVeryLightGrey);
  color: rgba(0, 0, 0, 0.4);
  width: 100%;
  font-size: 0.8rem;
  line-height: 8vh;
}