/* Micro Reset */

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
}

button, input, select, textarea, label {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
}

/* Typography */

body {
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
  padding: 0;
  margin: 60px 0 30px;
  line-height: 1.25;
  text-align: center;
}

h1 {
  font-size: 32px;
  font-weight: normal;
}

h2 {
  font-size: 22px;
  font-weight: bold;
}

h3, h4, h5, h6 {
  font-size: 19px;
  font-weight: bold;
  text-align: left;
}

blockquote {
  margin: 1em 0;
  padding: 0 2em;
  border-left: 3px solid #ddd;
}

/* Code */

pre, code {
  font-size: .9em;
}

pre code {
  display: block;
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  padding: 1em;
  overflow-x: auto;
  line-height: 1.75;
}

code {
  background: #f9f9f9;
}

pre code {
  background: none;
}

/* Lists */

ul, ol {
  padding: 0 0 0 20px;
}

li {
  margin: 4px 0;
  padding: 0;
}

/* Links */

a {
  color: black;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid;
}

a:hover {
}

sup a {
  border-bottom: none;
}

/* Miscellanea */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid;
  margin: 50px auto;
  padding: 0;
  max-width: 300px;
}

.copyright {
  text-align: center;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

.nav-next {
  margin-left: 1em;
  text-align: right;
}

.nav-prev {
  margin-right: 1em;
}

.comments {
  margin-top: 20px;
}

/* Layout */

body {
  width: 960px;
  margin: 0 auto;
  padding: 30px 0;
}

.masthead {
  width: 260px;
  padding: 20px 50px 20px 10px;
  float: left;
}

.main {
  width: 700px;
  padding: 32px 10px 20px 50px;
  margin-left: 260px;
  border-left: 3px solid black;
  min-height: calc(100vh - 60px);
}

/* Masthead */

.masthead h1 {
  margin-top: 0;
  margin-bottom: 34px;
  padding: 0;
  text-align: right;
  font-size: 46px;
  line-height: 58px;
}

.masthead h1 a {
  border-bottom: none;
}

.masthead .tagline {
  font-style: italic;
  text-align: right;
}

.masthead .menu {
  margin-right: 20px;
  direction: rtl;
}

.masthead .menu a {
  direction: ltr;
}

.masthead .menu ul ul {
  list-style: none;
  margin-left: 10px;
  margin-right: 10px;
}

.masthead .menu li li::before {
  content: "•\00a\000a0\00a0"
}

#menu-check {
  display: none;
}

#menu-label {
  display: none;
}

/* Main */

.main .title h1 {
  margin-top: 0;
  margin-bottom: 40px;
}

.title h3 {
  font-weight: normal;
  text-align: center;
}

.subtitle {
  font-size: .9em;
  color: #666;
}

/* Footnotes */

.footnotes {
  font-size: .9em;
}

/* Tables */

table {
  margin: auto;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
}

table thead th {
  border-bottom: 1px solid #666;
}

th, td {
  padding: 5px;
}

thead, tfoot, tr:nth-child(even) {
  background: #f8f8f8;
}

/**
 * Utility Styles
 */

.unselectable {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/**
 * -------------------------------------------------------------------------
 *  Media Queries
 * -------------------------------------------------------------------------
 *
 * The @viewport tag does the same thing as
 *
 *   <meta name="viewport" content="width=device-width">
 *
 * but in the future W3C standard way. The -ms- prefix is required for
 * IE10+ to render responsive styling in Windows 8 "snapped" views;
 * IE10+ does not honour the meta tag.
 */

@-ms-viewport {
  width: device-width;
}

@viewport {
  width: device-width;
}

/* Tablet screens and smaller */

@media screen and (max-width: 960px) {

  body {
    width: auto;
    max-width: 700px;
  }

  .masthead {
    width: auto;
    float: none;
    padding: 20px 0 60px;
    text-align: center;
    margin-left: 10px;
    margin-right: 10px;
    border-bottom: 3px solid black;
  }

  .main {
    width: auto;
    padding: 40px 10px;
    margin-left: 0;
    border-left: none;
    min-height: auto;
  }

  .masthead h1 {
    text-align: center;
  }

  .masthead .tagline {
    text-align: center;
  }

  .masthead .menu {
    direction: ltr;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .masthead .menu ul {
    text-align: left;
    margin: 0;
    padding: 0;
  }

  .masthead .menu ul ul {
    margin: 0;
  }

  .masthead .menu li {
    border-bottom: 1px solid;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .masthead .menu li:first-child {
    border-top: 1px solid;
  }

  .masthead .menu li li:last-child {
    border-bottom: none;
  }

  .masthead .menu a {
    display: block;
    padding: 15px 20px;
    border-bottom: none;
  }

  .masthead .menu li li a {
    padding-left: 30px;
  }

  .masthead .menu li li::before {
    content: none;
  }

  .masthead .menu li li a::before {
    content: "•\00a0\00a0\00a0";
  }

  #menu-label {
    display: inline-block;
    padding: 0 20px;
    height: 50px;
    border: 1px solid;
    cursor: pointer;
    line-height: 50px;
    color: #333;
    font-size: 20px;
    margin-top: 10px;
  }

  #menu-label:hover, #menu-label:focus {
    border: 1px solid #888;
  }

  #menu-label .icon {
    padding-right: 8px;
    width: 30px;
  }

  #menu-check ~ label .close-icon {
    display: none;
  }

  #menu-check ~ label .open-icon {
    display: inline-block;
  }

  #menu-check:checked ~ label .close-icon {
    display: inline-block;
  }

  #menu-check:checked ~ label .open-icon {
    display: none;
  }

  #menu-check ~ ul {
    display: none;
  }

  #menu-check:checked ~ ul {
    display: block;
    margin-top: 50px;
    margin-bottom: 0;
  }
}

/* Landscape phone screens and smaller */

@media screen and (max-width: 720px) {
}

/* Portrait phone screens */

@media screen and (max-width: 480px) {

  body {
    font-size: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 18px;
  }

  h3, h4, h5, h6 {
    font-size: 16px;
  }

  pre, code {
    font-size: 12px;
  }

  .masthead {
    padding-top: 0;
  }

}
