:root {
  --pico-font-size: 22px;
}

body {
  font-size: 18px;
  padding: 0.75rem;
}

@media (min-width: 1200px) {
  body {
    padding: 0;
  }
}
/* Main layout */
header.main {
  position: fixed;
  top: 0em;
  height: 4rem;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
}

header h1 {
  margin: auto;
  min-height: 2rem;
}

button#menu {
  position: fixed;
  top: 0em;
  right: 0em;
  background-color: transparent;
  border: none;
}

@media (min-width: 1200px) {
  button#menu {
    visibility: hidden;
  }
}

button.close::before,
::after {
  text-decoration: none;
}

button.close {
  text-decoration: none;
  float: right;
  border: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-position: center;
  background-size: auto 1rem;
  background-repeat: no-repeat;
  background-color: transparent;
  opacity: 0.5;
  transition: opacity var(--pico-transition);
}

aside {
  display: none;
}

@media (min-width: 1200px) {
  aside {
    display: block;
    position: fixed;
    left: 0em;
    top: 0;
    bottom: 0;
    max-width: 20%;
    overflow-y: scroll;
  }
}

div.content {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  max-width: 40rem;
}

@media (min-width: 1200px) {
  div.content {
    margin-left: 21%;
  }
}

/* Table of contents navigation */
nav a {
  display: flex;
}

span.nav_prefix {
  display: block;
}
span.nav_title {
  display: block;
}

/* Footenotes */

section[role="doc-endnotes"] {
  border-top: solid black 1px;
}

@media (min-width: 1200px) {
  section[role="doc-endnotes"] {
    margin-left: 21%;
  }
}

/* Theorem-like environments */

span.thm_head {
  font-weight: bold;
}

div.thm_body {
  padding-left: 1em;
  font-style: italic;
  margin-bottom: 1em;
}

div.rk_body {
  padding-left: 1em;
  font-style: normal;
  margin-bottom: 1em;
}

span.exo_head {
  font-weight: bold;
  margin-right: .5em;
}

div.exo_body {
  padding-left: 1em;
  margin-bottom: 1em;
}

button.solution {
  background-color: transparent;
  border: none;
  color: var(--pico-h1-color);
  padding: 0;
  font-size: 18px;
  font-style: italic;
  position: relative;
  top: -0.75em;
}

p {
  font-style: inherit;
}

.thm_body .rk_body > p {
  margin-top: 0em;
}

span.proof_head {
  font-style: italic;
}
span.rk_head {
  font-style: italic;
}

div.proof {
  margin-bottom: 1em;
}

/* General typography */

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin-top: -0.5em;
}

/* Math content */

div.diagram {
  display: flex;
  justify-content: center;
  margin-bottom: 1em;
}

div.img_wrap {
  display: flex;
  justify-content: center;
}

span.exo-icon img {
  width: 0.9em;
  height: 0.9em;
}

math {
  font-size: 1.2em;
}

div.disp_math {
  display: flex;
  justify-content: center;
  overflow-x: scroll;
}

/* FIXME: the font-family should use a pico variable */
mtext {
  font-family: var(--pico-font-family);
  font-size: 19px;
  font-weight: 400;
}
