/* Dark mode for the reading panel. Active when <html data-theme="dark">
   (set by the toggle button in _includes/custom-foot.html). The sidebar is already dark. */

html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="dark"] .container,
html[data-theme="dark"] .content {
  background: #111111;
  color: #d4d4d4;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .post-title,
html[data-theme="dark"] strong { color: #f0f0f0; }

html[data-theme="dark"] a,
html[data-theme="dark"] a:hover,
html[data-theme="dark"] input[type="submit"] { color: #6cb6f0; }

html[data-theme="dark"] table,
html[data-theme="dark"] td,
html[data-theme="dark"] th { border-color: #333333; }
html[data-theme="dark"] tbody tr:nth-child(odd) td,
html[data-theme="dark"] tbody tr:nth-child(odd) th { background-color: #181818; }

html[data-theme="dark"] hr { border-top-color: #333333; border-bottom-color: #111111; }
html[data-theme="dark"] blockquote { color: #a8a8a8; border-left-color: #333333; }
html[data-theme="dark"] abbr { color: #bbbbbb; }
html[data-theme="dark"] .message { background-color: #1a1a1a; color: #b0b0b0; }
html[data-theme="dark"] .post-meta,
html[data-theme="dark"] .post-meta *,
html[data-theme="dark"] .posts-list small { color: #9a9a9a; }

html[data-theme="dark"] .pagination > a { background: #111111; border-color: #333333; }
html[data-theme="dark"] .pagination > a:hover { background-color: #222222; }

/* code */
html[data-theme="dark"] code { background-color: #1c1c1c; color: #f08d95; }
html[data-theme="dark"] pre code { background-color: transparent; color: inherit; }
html[data-theme="dark"] .highlight,
html[data-theme="dark"] pre { background-color: #181818; color: #dcdcdc; }

/* syntax colours (rouge token classes) */
html[data-theme="dark"] .highlight .c,
html[data-theme="dark"] .highlight .c1,
html[data-theme="dark"] .highlight .cm,
html[data-theme="dark"] .highlight .cs { color: #7f8c8d; }
html[data-theme="dark"] .highlight .k,
html[data-theme="dark"] .highlight .kc,
html[data-theme="dark"] .highlight .kd,
html[data-theme="dark"] .highlight .kn,
html[data-theme="dark"] .highlight .kp,
html[data-theme="dark"] .highlight .kr,
html[data-theme="dark"] .highlight .ow { color: #c792ea; }
html[data-theme="dark"] .highlight .s,
html[data-theme="dark"] .highlight .s1,
html[data-theme="dark"] .highlight .s2,
html[data-theme="dark"] .highlight .sd,
html[data-theme="dark"] .highlight .sa,
html[data-theme="dark"] .highlight .si { color: #c3e88d; }
html[data-theme="dark"] .highlight .m,
html[data-theme="dark"] .highlight .mi,
html[data-theme="dark"] .highlight .mf,
html[data-theme="dark"] .highlight .mh,
html[data-theme="dark"] .highlight .il { color: #f78c6c; }
html[data-theme="dark"] .highlight .nf,
html[data-theme="dark"] .highlight .fm { color: #82aaff; }
html[data-theme="dark"] .highlight .nc,
html[data-theme="dark"] .highlight .nb,
html[data-theme="dark"] .highlight .bp { color: #ffcb6b; }
html[data-theme="dark"] .highlight .nd { color: #89ddff; }
html[data-theme="dark"] .highlight .o,
html[data-theme="dark"] .highlight .p,
html[data-theme="dark"] .highlight .n,
html[data-theme="dark"] .highlight .nn,
html[data-theme="dark"] .highlight .nv,
html[data-theme="dark"] .highlight .go { color: #dcdcdc; }
html[data-theme="dark"] .highlight .err,
html[data-theme="dark"] .highlight .gr { background-color: transparent; color: #ff6b6b; }
/* tokens whose light-mode colours are too dark for this background */
html[data-theme="dark"] .highlight .na { color: #ffcb6b; }
html[data-theme="dark"] .highlight .nl { color: #82aaff; }
html[data-theme="dark"] .highlight .ni,
html[data-theme="dark"] .highlight .nt { color: #f07178; }
html[data-theme="dark"] .highlight .mo { color: #f78c6c; }
html[data-theme="dark"] .highlight .cp { color: #89ddff; }
html[data-theme="dark"] .highlight .gt,
html[data-theme="dark"] .highlight .sr,
html[data-theme="dark"] .highlight .ss { color: #c3e88d; }
html[data-theme="dark"] .highlight .w { color: #7f8c8d; }
html[data-theme="dark"] .highlight .kt { color: #c792ea; }
html[data-theme="dark"] .highlight .no,
html[data-theme="dark"] .highlight .ne { color: #ffcb6b; }
html[data-theme="dark"] .highlight .gp { color: #89ddff; }
html[data-theme="dark"] .highlight .sb,
html[data-theme="dark"] .highlight .sc,
html[data-theme="dark"] .highlight .se,
html[data-theme="dark"] .highlight .sh,
html[data-theme="dark"] .highlight .sx { color: #c3e88d; }
html[data-theme="dark"] .highlight .gh,
html[data-theme="dark"] .highlight .gu,
html[data-theme="dark"] .highlight .vc,
html[data-theme="dark"] .highlight .vg,
html[data-theme="dark"] .highlight .vi { color: #dcdcdc; }
html[data-theme="dark"] .highlight .hll { background-color: #2a2a2a; }

/* the toggle button, fixed at the top right.
   Hydeout's base `button` rule adds padding: 1em 1.5em, which with border-box
   sizing blows the 2.5rem circle up into an oval and shoves the glyph into a
   corner; reset it and centre the glyph with flex. */
.theme-toggle {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid #cccccc;
  background: #ffffff;
  color: #313131;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}
/* override Hydeout's button:hover (solid link-blue fill, white text) */
.theme-toggle:hover {
  background: #f0f0f0;
  border-color: #999999;
  color: #313131;
}
html[data-theme="dark"] .theme-toggle {
  background: #1e1e1e;
  border-color: #444444;
  color: #f0f0f0;
}
html[data-theme="dark"] .theme-toggle:hover {
  background: #2a2a2a;
  border-color: #666666;
  color: #ffffff;
}
