html {
  color: #222;
  font-size: 1em;
  line-height: 1.5;
  margin: 0;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

body {
  background-color: #fcfcfc;
  font-family: "mb-charter";
  margin: 0 24px;
  text-align: center;
}

a {
  color: inherit;
}

a:hover {
  color: rgb(0, 150, 255); /* Bright blue */
  transition: color 0.05s;
}

nav a {
  color: rgb(0, 150, 255);
}

/* Use .imagelink for <a> tags that wrap an image. */
a.imagelink {
  border: 1px solid rgb(0, 150, 255);
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6,
hgroup,
ul,
ol,
dd,
p,
figure,
pre,
table,
fieldset,
hr {
  margin: 0 0 24px 0;
}

li > ul,
li > ol {
  margin-bottom: 0; /* Don't add extra space in nested lists. */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  color: #333;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Roboto,
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  color: inherit;
  font-weight: inherit;
}

h1 {
  color: #000;
  font-size: 36px;
  margin-bottom: 24px;
}

h1 a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

h3 {
  color: #4f4f4f;
  font-size: 18px;
  margin-bottom: 4px;
}

h4 {
  color: #4f4f4f;
  font-size: 16px;
  margin-bottom: 4px;
}

#header,
#content,
#footer {
  margin-left: auto;
  margin-right: auto;
  max-width: 40rem;
}

#header,
#content {
  text-align: left;
}

blockquote {
  border-left: 2px solid #ddd;
  color: #666;
  font-style: italic;
  margin-left: 0;
  padding-left: 24px;
}

/* Inline code blocks */
code:not([class*="language-"]) {
  background-color: #f3f3f3;
  display: inline-block;
  line-height: 1.2;
  padding: 0 2px;
}

/* Fenced code blocks */
pre:not([class*="language-"]) > code {
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  display: block;
  padding: 0.75rem 0.75rem;
  font-size: small;
}

/* Format differently (using prismjs) if the lang is specified. */
.use-prismjs pre[class*="language-"] {
  background-color: #262626; /* Make bg slightly lighter for vsc-dark-plus theme */
  border-radius: 0.25rem;
  font-size: small;
  margin-bottom: 1.5rem;
}

ul {
  padding-left: 1.5em;
}

#header {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  margin-bottom: 48px;
  position: relative;
}

#header a {
  text-decoration: none;
}

a[rel="home"] #title-text {
  vertical-align: -webkit-baseline-middle;
  vertical-align: -moz-middle-with-baseline;
}

/* Swap out the header image when the link is being clicked. */
a[rel="home"] .selected-image {
  display: none;
}
a[rel="home"]:active .selected-image {
  display: inline;
}
a[rel="home"]:active .normal-image {
  display: none;
}

nav {
  bottom: 1px;
  display: inline-block;
  font-size: 12px;
  line-height: 12px;
  position: absolute;
  right: 0;
  text-transform: uppercase;
  vertical-align: bottom;
}

nav ul {
  display: inline-block;
  padding: 0;
  margin: 0;
}

nav li {
  display: inline;
  margin-left: 0.5em;
}

#footer {
  margin-top: 48px;
}

.post .date,
#footer,
li .item-info {
  color: #999;
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Roboto,
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
}
li p.item-info {
  font-style: italic;
}

/* Ensure no post images, videos, etc. are wider than the column. */
.post img,
.post iframe {
  max-width: 100%;
}

/* Conservatively match top-level images in posts, and center them. */
.post > p > img:only-child,
.post > p > a:only-child > img:only-child {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.post > iframe {
  margin: 0 0 24px 0;
}

li span.item-info::before {
  content: "\2013\a0"; /* &ndash;&nbsp; */
}
li p.item-info::before {
  content: "\2605"; /* 'BLACK STAR' */
  margin-right: 1px;
  font-size: 13px;
  font-style: normal;
}

#footer a {
  color: inherit;
}

/*
  A class that used to make an element (e.g. a div or img) take up the same
  space as other top-level block content.
*/
.block-item {
  display: block;
  margin: 0 0 24px 0;
}

img.centered,
video.centered {
  display: block;
  margin: 0 auto 24px auto;
}

.bg-highlight {
  background-color: #fffacc;
  padding-left: 0.3em;
  padding-right: 0.3em;
}

.footnote-ref {
  margin-left: 2px;
}

.emergency-broadcast {
  background-color: white;
  border: 2px dashed #999;
  border-radius: 4px;
  color: #333;
  margin-bottom: 1em;
  padding: 1em;
  text-align: left;
}

.emergency-broadcast p:last-child {
  margin-bottom: 0.5em;
}

.broadcast-header {
  font-size: 16px;
  margin-bottom: 12px;
}

.footnote > hr {
  margin-left: auto;
  margin-right: auto;
  margin-top: 48px;
  width: 85%;
}

.footnote > ol {
  color: #666;
  display: table;
  list-style: none;
  font-size: 13px;
  margin-bottom: 0;
  margin-left: 0;
  padding-left: 0;
  padding-right: 16px;
}

.footnote > ol > li {
  display: table-row;
  counter-increment: step-counter;
}

.footnote > ol > li:last-child > p {
  margin-bottom: 0;
}

.footnote > ol > li::before {
  content: counter(step-counter) ".";
  display: table-cell;
  padding-right: 0.4em;
  text-align: right;
}

/* A class to use for content that needs an outline against a light background. */
.light-bg-protect,
.light-bg-protect {
  border: 0;
  outline: 1px solid #ccc;
}

.dinkus:before {
  color: #666;
  content: "\b7\a0\a0\b7\a0\a0\b7";
  display: block;
  text-align: center;
}

.pill {
  background-color: #ddd;
  border-radius: 3px;
  color: #666;
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Roboto,
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  margin-right: 4px;
  padding: 0 6px;
}

figcaption {
  color: #999;
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Roboto,
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  margin-top: 1em;
}

/* Full and half-width images */
.w-640 {
  width: 640px;
}
.w-320 {
  width: 320px;
}
.w-full {
  width: 100%;
}
.w-half {
  width: 50%;
}

/* Fix <details> styles which are reset by normalize.css */

details > summary:first-of-type {
  cursor: pointer;
  display: list-item;
  list-style: inside disclosure-closed;
}

details[open] > summary:first-of-type {
  list-style: inside disclosure-open;
}

/* ==========================================================================
   Web fonts
   ========================================================================== */

@font-face {
  font-family: "mb-charter";
  src: url("./webfonts/Charter/charter_regular-webfont.eot");
  src: url("./webfonts/Charter/charter_regular-webfont.eot?#iefix")
      format("embedded-opentype"),
    url("./webfonts/Charter/charter_regular-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "mb-charter";
  src: url("./webfonts/Charter/charter_bold_italic-webfont.eot");
  src: url("./webfonts/Charter/charter_bold_italic-webfont.eot?#iefix")
      format("embedded-opentype"),
    url("./webfonts/Charter/charter_bold_italic-webfont.woff") format("woff");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "mb-charter";
  src: url("./webfonts/Charter/charter_bold-webfont.eot");
  src: url("./webfonts/Charter/charter_bold-webfont.eot?#iefix")
      format("embedded-opentype"),
    url("./webfonts/Charter/charter_bold-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "mb-charter";
  src: url("./webfonts/Charter/charter_italic-webfont.eot");
  src: url("./webfonts/Charter/charter_italic-webfont.eot?#iefix")
      format("embedded-opentype"),
    url("./webfonts/Charter/charter_italic-webfont.woff") format("woff");
  font-weight: normal;
  font-style: italic;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 */

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
  content: " "; /* 1 */
  display: table; /* 2 */
}

.clearfix:after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print, (min-resolution: 1.25dppx), (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   http://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after,
  *:first-letter,
  *:first-line {
    background: transparent !important;
    color: #000 !important; /* Black prints faster:
                   http://www.sanbeiji.com/archives/953 */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  abbr[title]:after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */

  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }

  :not(use-prismjs) pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * http://css-discuss.incutio.com/wiki/Printing_Tables
   */

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
