body {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
}

code,
kbd,
samp,
pre,
tt,
var,
textarea {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
}

#headlines .source,
.nwords,
.ts {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 300;
}

figure {
  padding: 0.5em;
}

.feed-item a {
  color: #000;
  text-decoration: none;
}

.navbar-list a {
  padding: 0.01em;
  color: black;
}

div.item-content-body a {
  color: #212529;
  text-decoration: none;
}

div.navbar-toggler a {
  border: none;
}

.feed-item a:hover {
  color: #000;
  text-decoration: none;
}

div.item-preview img {
  max-width: 100%;
  height: auto;
  width: auto;
}

div.item-preview-small img {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 10em;
  margin-bottom: 1.5em;
  padding-right: 1.5em;
}

div.navbar-toggler {
  border: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

div.item-content .orig-content {
  font-weight: 300;
}

/* phone */
@media (width <= 768px) {
  div.item-content-body h1,
  h2,
  h3,
  h4 {
    padding-top: 0.2em;
    text-align: left;
  }

  div.item-content-body h1 {
    font-size: 1.5rem;
  }

  div.item-content-body h2 {
    font-size: 1.4rem;
  }

  div.item-content-body h3 {
    font-size: 1.3rem;
  }

  div.item-content-body h4 {
    font-size: 1.2rem;
  }

  div.item-content-body {
    font-family: "IBM Plex Serif", serif;
    font-size: 0.9rem;
    line-height: 1.9;
    max-width: 60ch;
    margin: auto;
    padding-bottom: 1.5em;
    overflow: hidden;
  }
}

/* tablet  */
@media (width >= 769px) and (width <= 991px) {
  div.item-content-body {
    font-family: "IBM Plex Serif", serif;
    line-height: 1.9;
    max-width: 60ch;
    margin: auto;
  }

  div.item-content-body h1,
  h2,
  h3,
  h4 {
    padding-top: 0.8em;
    padding-bottom: 0.2em;
    text-align: left;
    font-weight: 600;
  }
}

/* standard desktop */
@media (width >= 992px) and (width <= 1700px) {
  div.item-content-body {
    font-family: "IBM Plex Serif", serif;
    line-height: 1.9;
    max-width: 60ch;
    margin: auto;
  }

  div.item-content-body h1,
  h2,
  h3,
  h4 {
    padding-top: 0.8em;
    padding-bottom: 0.2em;
    text-align: left;
    font-weight: 600;
  }
}

/* large desktop */
@media (width >= 1700px) {
  div.item-content-body {
    font-family: "IBM Plex Serif", serif;
    line-height: 1.8;
    columns: 40ch;
    margin-right: 5em;
    overflow-x: scroll;
    height: calc(100vh - 9em);
  }

  div.item-content-body h1,
  h2,
  h3,
  h4 {
    padding-top: 0.8em;
    padding-bottom: 0.2em;
    text-align: left;
    font-weight: 600;
  }
}

div.item-content-body .orig-content {
  text-align: left;
}

div.item-content-body img {
  max-width: 95%;
  height: auto;
  width: auto;
}

div.item-content-body blockquote {
  background: #f9f9f9;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  box-shadow: 2px 2px 2px #ccc;
  font-style: italic;
}

div.item-content-body pre {
  font-size: 0.7rem;
  background: #f9f9f9;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  box-shadow: 2px 2px 2px #ccc;
}

div.item-content-body a::after {
  position: relative;
  content: "\FEFF†";

  /* ° † */
  margin-left: 0.1em;
  font-size: 80%;
  top: -0.5em;
  color: #f83;
  font-feature-settings: "caps" 1;
}

div.item-content-body a:hover {
  text-decoration: underline;
  transition-property: background;
  transition-duration: 0.2s;
}

div.item-content-body a:visited {
  color: #aaa;
}

div.item-content-body table {
  font-size: 0.9rem;
}

div.item-content-body p > code {
  color: black;
}

.hyphenate {
  hyphens: auto;
}

.feather {
  width: 18px;
  height: 18px;
  vertical-align: text-bottom;
}

/*
 * Sidebar
 */

.sidebar {
  padding-top: 2em;
}

@media (width <= 768px) {
  nav {
    z-index: 10000;
  }

  .sidebar-right {
    padding-top: 0.5rem;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden auto;
    right: 0;
    background: white;
  }

  .sidebar-right #right-nav {
    padding-bottom: 4em;
  }

  main {
    overflow-x: hidden;
  }

  .sidebar-left {
    padding-top: 0.5rem;
    position: fixed;
    width: 100%;
    background: white;
    height: 100%;
    overflow-y: auto;
  }

  .sidebar-left #left-nav {
    padding-bottom: 4em;
  }
}

/* tablet */
@media (width >= 500px) and (width <= 800px) {
  .sidebar-right {
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgb(0 0 0 / 10%);
    position: fixed;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow: hidden auto;
    padding-bottom: 32px;
    width: 30%;
    right: 0;
  }

  main {
    overflow-x: hidden;
  }

  .sidebar-left {
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgb(0 0 0 / 10%);
    position: fixed;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow: hidden auto;
    padding-bottom: 32px;
    width: 30%;
  }
}

/* standard desktop */
@media (width >= 800px) {
  .sidebar-right {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 100; /* Behind the navbar */
    padding-left: 0.2em;
    padding-bottom: 1em;
    box-shadow: inset 1px 0 0 rgb(0 0 0 / 10%);
    top: 48px; /* Height of navbar */
    padding-top: 0.5rem;
    overflow: hidden auto; /* Scrollable contents if viewport is shorter than content. */
  }

  .sidebar-left {
    z-index: 100; /* Behind the navbar */
    padding: 0;
    box-shadow: inset -1px 0 0 rgb(0 0 0 / 10%);
    position: sticky;
    top: 48px; /* Height of navbar */
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow: hidden auto; /* Scrollable contents if viewport is shorter than content. */
    padding-bottom: 32px;
  }

  #sourcenav {
    display: block;
  }

  #groupnav {
    display: block;
  }
}

.word-cloud > span {
  display: inline-block;
  border-radius: 500rem;
  line-height: 1;
  vertical-align: baseline;
  padding: 0.5em;
  text-align: center;
  margin: 0 0.5em 0 0;
}

.sidebar .nav-item span {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-link {
  font-size: 0.66em;
  padding-bottom: 0;
  color: #333;
}

.sidebar .nav-link-secondary {
  padding-bottom: 0;
  color: #a6acaf;
}

.sidebar-heading {
  font-size: 0.8em;
  font-weight: 400;
  font-variant: small-caps;
}

.sidebar-heading-2 {
  font-size: 1em;
  font-style: italic;
}

.sidebar .nav-link-secondary .feather {
  margin-right: 4px;
  color: #999;
}

.sidebar .nav-link.active {
  color: #f2711c;
}

.sidebar .nav-link-secondary.active {
  color: #f2711c;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
  color: inherit;
}

.sidebar .nav-link-secondary:hover .feather,
.sidebar .nav-link-secondary.active .feather {
  color: inherit;
}

.navbar-brand {
  font-size: 1rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

#navbar .path {
  margin: 0;
  font-size: 0.8em;
  background-color: rgb(0 0 0 / 0%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (width <= 768px) {
  #navbar .path {
    height: unset;
  }
}

.form-control-dark {
  color: #fff;
  background-color: rgb(255 255 255 / 10%);
  border-color: rgb(255 255 255 / 10%);
}

.feed-item {
  padding-bottom: 2em;
  columns: 40em;
}

.word-cloud {
  break-inside: avoid;
  page-break-inside: avoid;
}

.word-cloud .sz-a {
  font-size: 0.6rem;
}

.word-cloud .sz-b {
  font-size: 0.8rem;
}

.word-cloud .sz-c {
  font-size: 1rem;
}

.word-cloud .sz-d {
  font-size: 1.1rem;
}

.word-cloud .sz-e {
  font-size: 1.2rem;
}

.word-cloud .sz-f {
  font-size: 1.3rem;
}

.word-cloud .word {
  background-color: #b5cc18;
  color: #fff;
}

.word-cloud .name {
  background-color: #f2711c;
  color: #fff;
}

.word-cloud .url {
  background-color: #2185d0;
  color: #fff;
}

.word-cloud .source-key {
  background-color: #ccc;
  color: #fff;
}

.feed-item .description {
  font-family: "IBM Plex Serif", serif;
}

.navbar-list {
  margin: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: #6c757d;
}

@media (width >= 1500px) {
  .navbar ol {
    display: -webkit-inline-box;
    overflow: hidden;
  }
}

.navbar ol li {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.viewport-pivot::before {
  font-family: "IBM Plex Mono", monospace;
  content: "↲";
  color: #aaa;
  position: absolute;
  left: 1em;
  font-size: 1.2em;
}

.viewport-bottom::before {
  font-family: "IBM Plex Mono", monospace;
  content: "⇣";
  color: #aaa;
  position: absolute;
  left: 1em;
  font-size: 1.2em;
}

.viewport-bottom[view="out"]::before {
  font-family: "IBM Plex Mono", monospace;
  content: "⇊";
  color: #aaa;
  position: absolute;
  left: 1em;
  font-size: 1.2em;
}

@media (width <= 768px) {
  .viewport-bottom::before,
  .viewport-pivot::before {
    left: 0;
  }
}

.icon-is-set {
  color: #f83;
}

/* Annotation highlights (CSS Custom Highlight API) */
::highlight(llar-annotation) {
  background-color: #e67e22;
  color: inherit;
}

#annotation-bottom-bar {
  z-index: 1030;
}

#btn-annotation-mode.active {
  color: #e67e22;
}

.annotation-mode-active {
  columns: unset !important;
}

#annotation-highlight-list a {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.75rem;
  text-decoration: none;
}

#headlines td,
#headlines th {
  border-top: none;
}

#gallery a {
  color: black;
  font-weight: 400;
}

#saved-items a {
  color: black;
  text-decoration: none;
  font-weight: 400;
}

#navbar .path a {
  color: #fff;
  text-decoration: none;
}

#headlines .toolbox a {
  font-size: 0.8em;
  margin: 0;
  padding: 0.2em;
  color: #555;
}

#headlines .toolbox {
  text-wrap: nowrap;
}

#gallery a:hover {
  color: #000;
  text-decoration: none;
}

#gallery .toolbox a {
  font-size: 0.5em;
  margin: 0;
  padding: 0.2em;
  color: #555;
}

#headlines .title a {
  color: #16161d;
  font-weight: 400;
  text-decoration: unset;
}

#headlines .title {
  color: #16161d;
  font-weight: 400;
  max-width: 60ch;
  overflow: hidden;
}

#headlines .title a:hover {
  color: #000;
  text-decoration: none;
}

#headlines .ts {
  font-size: 0.8em;
  color: #555;
}

#headlines .source {
  font-size: 0.8em;
  color: #555;
  font-style: italic;
}

#headlines .nwords {
  font-size: 0.8em;
  color: #555;
}

#pagemap {
  position: fixed;
  width: 200px;
  height: 100%;
  z-index: 100;
  left: 65%;
  top: 3em;
}

table td.details-control::before {
  content: "\f152";
  font-family: "Font Awesome\ 5 Free", sans-serif;
  cursor: pointer;
  font-size: 22px;
  color: #55a4be;
}

table tr.shown td.details-control::before {
  content: "\f150";
  color: black;
}

.clj-pprint {
  background: #666;
}

table.exception-chain tr {
  vertical-align: top;
}

@media (width >= 800px) {
  .item-content-nav {
    top: 43px;
    padding-top: 0.5em;
    height: 3em;
    background: white;
    font-weight: 300;
    position: sticky;
  }

  nav {
    scrollbar-width: none; /* Firefox */
  }

  #groupnav.mode-show-item,
  #sourcenav.mode-show-item {
    filter: opacity(23%) blur(3px);
  }

  #groupnav.mode-show-item:hover,
  #sourcenav.mode-show-item:hover {
    filter: none;
  }
}

@media (width <= 768px) {
  nav {
    font-family: "IBM Plex Sans Condensed", sans-serif;
  }

  .btn-toolbar {
    font-family: "IBM Plex Sans Condensed", sans-serif;
  }

  .navbar-toggler-title {
    font-size: 80%;
  }
}

figure figcaption {
  font-size: 80%;
}
