/* colours */
:root {
  --header-background: #0f204f;
  --header-text: #fff;
  --nav-background: #0f204f;
  --nav-text: #fff;
  --nav-highlight: #05498f;
  --body-text: #444;
  --body-links: #05498f;
  --figure-background: #f0f0ec;
  --footer-background: #f0f0ec;
  --footer-text: #444;
}
 
/* basic settings */
* {
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 16px;
  color: var(--body-text);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow-y: scroll;
}

/* container */
.container {
  padding: 0 1em;
}

/* header */
.header {
  background: var(--header-background);
  color: var(--header-text);
}

.header .container {
  padding: .5em;
  display: flex;
  align-items: center;
}

.header h1 {
  font-size: 2em;
  font-weight: 400;
  margin: 0;
  flex: 1; /* make the title fill as much space as possible */
}

.header a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

header img {
  margin-left: .5em;
  width: 4em;
  border: 1px solid #fff;
}

/* navigation menu */
.nav {
  background: var(--nav-background);
  color: var(--nav-text);
}

.nav .container {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding: 0;
}

.site-menu-button {
  padding: .75rem 1rem;
  cursor: pointer;
}

.site-menu-button:hover {
  background: var(--nav-highlight);
}

.site-menu, .site-sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
}

.site-menu.open {
  display: block;
  position: absolute;
  z-index: 1;
  top: 2.75em;
  background: var(--nav-background);
  width: 100%;
}

.site-menu a {
  display: block;
  text-decoration: none;
  padding: .5em 1em;
  color: inherit;
}

.site-menu a.active, .site-menu a:hover {
  background: var(--nav-highlight);
}

.site-menu .fa-caret-down {
  display: inline-block;
  margin-left: 1em;
  margin-bottom: .125em;
}

.site-sub-menu {
  display: none;
}

.site-sub-menu.open {
  display: block;
  position: absolute;
  width: 100%;
  z-index: 2;
  background: var(--nav-background);
  padding-left: 1em;
}

/* main page content */
.main {
  display: block;
  line-height: 1.5;
}

.main .container {
  padding: 1em;
}
 
.main a {
  color: var(--body-links);
}
 
.main a:hover {
  text-decoration: underline;
}
    
/* text content */
article h1, article h2, article h3, article h4 {
  font-weight: 400;
}

article h1 {
  font-size: 1.75em;
  margin-top: 0;
}

article h2 {
  font-size: 1.5em;
}

article h3 {
  font-size: 1.25em;
}

article h4 {
  font-size: 1.125em;
}

article p {
  text-align: justify;
}

figure {
  text-align: center;
}

table {
  width: 100%;
  overflow: auto;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: .25em;
}

ul.splash {
  list-style: none;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 2em 0 1em;
  padding: 0;
}

ul.splash li {
  flex: 1;
  text-align: center;
}

ul.splash figure {
  margin: 0 0 1em;
}
 
ul.splash img {
  height: 8em;
}

/* sidebar */
aside {
  display: none; /* don't show it on small screens */
}
 
/* footer */
.footer {
  background: var(--footer-background);
  color: var(--footer-text);
  font-size: .9375em;
}
 
.footer .container {
  display: flex;
  align-items: center;
  padding: 4em 1em 1em;
}
 
.footer .container a {
  display: block;
}
 
.footer .container p {
  flex: 1;
}
 
/* changes for larger screens */
@media (min-width: 38rem) {
  .container {
    max-width: 36rem;
    margin: 0 auto;
  }

  .header .container {
    padding: 1em;
  }

  .header h1 {
    font-size: 2.5em;
  }

  .header img {
    margin-left: 1em;
    width: 5em;
  }

  .nav .container {
    padding: 0 1em;
  }
}

@media (min-width: 56rem) {
  .container {
    max-width: 54rem;
  }

  .header img {
    margin-left: 1em;
    width: 6em;
  }

  .nav {
    position: sticky;
    top: 0;
  }

  .nav .container {
    justify-content: flex-start;
  }

  .site-menu-button {
    display: none;
  }

  .site-menu {
    display: flex;
    position: initial;
    top: 0;
  }

  .site-sub-menu.open {
    width: 13em;
    padding: 0;
    box-shadow: 0 2px 3px rgba(10,10,10,0.1), 0 0 0 1px rgba(10,10,10,0.1);
  }

  .main .container {
    display: grid;
    grid-template-columns: 1fr 13em;
    gap: 2em;
  }

  aside {
    display: block;
  }

  aside figure {
    margin: 0 0 2em;
    padding: 1em;
    transition: background .3s;
  }

  aside a:hover {
    text-decoration: none;
  }

  aside a:hover figure, aside figure.bordered {
    background: var(--figure-background);
  }

  aside figure img {
    width: 100%;
  }

  aside figure figcaption {
    text-align: center;
  }
}

@media (min-width: 75rem) {
  .container {
    max-width: 73rem;
  }

  .header img {
    width: 7rem;
  }

  .site-menu > li > a {
    padding: .75em 1.25em;
  }

  .site-sub-menu.open {
    width: 20em;
  }

  .main .container {
    grid-template-columns: 1fr 15em;
    gap: 4em;
  }

  article {
    padding: 0 1em;
  }

  aside figure {
    padding: 1em 2em;
  }
}
