@media (prefers-color-scheme: dark) {

  body {
    background: #1a1b26;
    color: #c8c8d4;
  }

  h1, h2, h3, h4, h5, h6,
  #toctitle,
  .sidebarblock > .content > .title {
    color: #7eb3d8;
  }

  #header > h1:first-child,
  #content > h1:first-child:not([class]) {
    color: #7eb3d8;
  }

  .subheader,
  .admonitionblock td.content > .title,
  .listingblock > .title,
  .literalblock > .title,
  .imageblock > .title {
    color: #7eb3d8;
  }

  a { color: #5fa8d3; }
  a:hover, a:focus { color: #4dcfc4; }

  code { color: #a8c8e8; }
  pre, pre > code { color: #c8c8d4; }

  .literalblock pre,
  .literalblock pre[class],
  .listingblock pre,
  .listingblock pre[class] {
    background: #22232e;
    border-color: rgba(95, 168, 211, 0.2);
  }

  kbd {
    background-color: #22232e;
    border-color: #4a4a5a;
    color: #c8c8d4;
    box-shadow: 0 1px 0 rgba(0,0,0,0.5), 0 0 0 0.1em #2e2e3e inset;
  }

  hr { border-color: rgba(255, 255, 255, 0.1); }

  blockquote { border-color: #3a3a4a; }
  blockquote, blockquote p { color: #8888a0; }

  table {
    background: #22232e;
    border-color: rgba(255, 255, 255, 0.08);
  }
  table thead, table tfoot { background: rgba(95, 168, 211, 0.1); }
  table tr th, table tr td,
  table thead tr th, table thead tr td,
  table tfoot tr th, table tfoot tr td { color: #c8c8d4; }
  tbody tr th { background: rgba(95, 168, 211, 0.1); color: #c8c8d4; }
  table tr.even, table tr.alt, table tr:nth-of-type(even) { background: rgba(95, 168, 211, 0.05); }

  .sidebarblock {
    background: #22232e;
    border-color: #3a3a4a;
  }

  #content #toc,
  #toc.toc2 {
    background: #22232e;
    border-color: #3a3a4a;
  }

  #toctitle { color: #7eb3d8; }

  .admonitionblock > table td.content {
    color: #b8b8c8;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .paragraph.lead > p,
  #preamble > .sectionbody > .paragraph:first-of-type p {
    color: #c8c8d4;
  }

  mark {
    background: #4a3a00;
    color: #f0d080;
  }

  abbr, acronym {
    color: #c8c8d4;
    border-color: #4a4a5a;
  }

  .admonitionblock td.icon .icon-note:before    { color: #5ab4d4; }
  .admonitionblock td.icon .icon-tip:before     { color: #d4c84d; text-shadow: 1px 1px 2px rgba(180, 160, 0, 0.6); }
  .admonitionblock td.icon .icon-warning:before { color: #f0a040; }
  .admonitionblock td.icon .icon-caution:before { color: #f07040; }
  .admonitionblock td.icon .icon-important:before { color: #f05050; }
}
