header {
  --header-background-color: #fff;
  --input-background-color: #eee;

  display: flex;
  background-color: var(--header-background-color);
  color: white;
  position: sticky;
  z-index: 1;
  top: 0;
  border-bottom: 3px solid #fff;
}

header h1 {
  grid-column: 2/3;
  grid-row: 1/2;
  color: inherit;

  margin: 0;
  font-size: 1.125rem;
  align-self: center;
  text-align: right;
}

@media (min-width: 55em) {
  /* The breakpoint when the navigation is in the left column */
  header {
    grid-template-columns: calc(1.45em * 9) auto max-content; /* The width of the left column */
    grid-column-gap: 2.9em;
  }
  header h1 {
    text-align: left;
  }
}

header > .search {
  display: grid;
  grid-template-rows: auto 1fr;
  max-height: 100vh;
  grid-column: 1/3;
  grid-row: 1/2;
  --whitespace: 1.25rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

header > .search .input {
  background-color: var(--header-background-color);
  color: #fff;
  display: grid;
}

header > .search .input input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 0;
  outline: none;
  background: var(--input-background-color);
  padding: 0.1rem var(--whitespace);
  grid-row: 1/-1;
  grid-column: 1/-1;
}

header .icon-search {
  fill: currentColor;
  grid-row: 1/-1;
  grid-column: 1/-1;
  align-self: center;
  margin-left: 0.3rem;
  width: 1em;
  height: 1em;
  font-size: 0.6em;
  color: #000;
  position: relative;
  z-index: 1;
}

header > .search .input input::placeholder {
  color: #000;
}

header > .search .results {
  overflow-y: auto;
  margin: 0;
  background: white;
  color: black;
  list-style: none;
  padding: 0 var(--whitespace);
  width: 100%;
}

header > .search .results li:first-child {
  padding-top: var(--whitespace);
}
header > .search .results li:last-child {
  padding-bottom: var(--whitespace);
  margin-bottom: 0;
}

header > .search .results li:last-child {
  border-bottom: 3px solid #eee;
}

header > .search a {
  color: inherit;
  background: none;
  display: block;
}

header > .search a:hover,
header > .search a:focus {
  text-decoration: underline;
}

header > button {
  grid-row: 1/2;
  grid-column: -2/-1;
  background: transparent;
  color: #ddd;
  border: 0;
  padding: 0 1rem;
  cursor: pointer;
  height: 2rem;
}

header > button:hover,
header > button:active,
header > button:focus {
  color: #1ca086;
}

/* Set table-layout: fixed for small screens where table contents can break out of their container */
table {
  table-layout: fixed;
}

/* Hide the navigation toggle button on big screens, since it’s not needed */
@media (min-width: 55em) {
  /* --wide-enough-for-two-columns */
  header > .search {
    grid-column: 1/-1;
  }

  header button {
    display: none !important;
  }
}

header > button > svg {
  fill: currentColor;
  vertical-align: middle;
}

/* override prism default css */
main :not(pre) > code[class*="language-"] {
  color: #000;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  white-space: normal;
  background: #1b1f230d;
  text-shadow: none;
  font-size: 85%;
  overflow-wrap: break-word;
  word-break: break-word;
}
