/*
Theme Name: Lemire
Theme URI: https://github.com/lemire/lemiretheme
Template: twentyfifteen
Author: Daniel Lemire
Author URI: https://lemire.me/en/
Description: A child theme of Twenty Fifteen for Daniel Lemire's blog. It keeps the look of the blog and fixes the details that matter for technical posts: code blocks scroll instead of wrapping, wide benchmark tables scroll on phones, display math does not overflow, and readers whose system is set to dark mode get a dark version (including legacy code that carries its own inline colors).
Version: 2.5.5
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lemire
*/

/* ------------------------------------------------------------------ */
/* Code                                                                */
/* ------------------------------------------------------------------ */

/* Twenty Fifteen wraps long code lines (pre-wrap), which breaks indentation.
   Keep lines intact and let the block scroll sideways instead. */
pre {
	white-space: pre;
	overflow-wrap: normal;
	word-wrap: normal;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	line-height: 1.5;
	tab-size: 4;
	background-color: #f8f8f8 !important; /* posts set #fff or #f8f8f8 inline; use one */
}

/* Pygments puts the background on a wrapping div; let the pre carry it. */
.highlight {
	background: transparent !important;
	margin-bottom: 1.6em;
}
.highlight pre {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Tables                                                              */
/* ------------------------------------------------------------------ */

/* js/tables.js wraps each table so it can scroll sideways on phones. */
.table-scroll {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 0 1.6em;
}
.table-scroll > table {
	margin-bottom: 0 !important;
}

/* Twenty Fifteen uses a fixed table layout, which squeezes benchmark columns. */
.entry-content table,
.comment-content table {
	table-layout: auto;
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Math                                                                */
/* ------------------------------------------------------------------ */

math[display="block"] {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
}

/* ------------------------------------------------------------------ */
/* Newsletter form in the sidebar                                      */
/* ------------------------------------------------------------------ */

.wp-block-tnp-minimal {
	padding: 0 !important;
}
.tnp-subscription-minimal {
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
}
.tnp-subscription-minimal form {
	display: flex !important;
	gap: 0.5em;
	text-align: left !important;
}
.tnp-subscription-minimal .tnp-email {
	flex: 1;
	min-width: 0;
	width: auto !important;
	margin: 0 !important;
}
.tnp-subscription-minimal .tnp-submit {
	width: auto !important;
	margin: 0 !important;
}
/* A short reassurance under the form (a paragraph with class "newsletter-note"). */
.newsletter-note {
	margin: 0.6em 0 0;
	font-size: 12px;
	opacity: 0.8;
}

/* ------------------------------------------------------------------ */
/* Light/dark toggle                                                   */
/* ------------------------------------------------------------------ */

/* Phones and tablets: a square button just left of "Menu and widgets",
   with the same size and border at each breakpoint. */
.site-branding .theme-toggle {
	position: absolute;
	top: 50%;
	right: 50px;
	width: 42px;
	height: 42px;
	padding: 0;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	font-family: "Noto Sans", sans-serif;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1;
	cursor: pointer;
}
.site-branding .theme-toggle:hover,
.site-branding .theme-toggle:focus {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.3);
}
.site-branding .theme-toggle:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.6);
	outline-offset: 2px;
}
.site-branding .theme-toggle svg {
	flex: none;
}
.site-branding .theme-toggle-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}
/* Moon in light mode (switch to dark), sun in dark mode (switch to light). */
.theme-toggle .icon-sun,
html[data-theme="dark"] .theme-toggle .icon-moon {
	display: none;
}
html[data-theme="dark"] .theme-toggle .icon-sun {
	display: block;
}
/* Leave room for the two buttons next to the blog title. */
.site-branding {
	padding-right: 102px;
}
@media screen and (min-width: 38.75em) {
	.site-branding { padding-right: 108px; }
}
@media screen and (min-width: 46.25em) {
	.site-branding .theme-toggle { width: 56px; height: 56px; right: 64px; }
	.site-branding { padding-right: 132px; }
}
@media screen and (min-width: 55em) {
	.site-branding .theme-toggle { width: 64px; height: 64px; right: 72px; }
	.site-branding { padding-right: 148px; }
}

/* Desktop (fixed sidebar): a small labelled button under the description. */
@media screen and (min-width: 59.6875em) {
	.site-branding {
		padding-right: 0;
	}
	.site-branding .theme-toggle {
		position: static;
		transform: none;
		width: auto;
		height: auto;
		margin-top: 32px;
		padding: 0.5em 0.9em;
		border-color: rgba(255, 255, 255, 0.3);
		color: rgba(255, 255, 255, 0.85);
	}
	.site-branding .theme-toggle:hover,
	.site-branding .theme-toggle:focus {
		border-color: rgba(255, 255, 255, 0.6);
		color: #fff;
	}
	.site-branding .theme-toggle-label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}
	.site-branding .theme-toggle svg {
		width: 15px;
		height: 15px;
	}
}

/* Without JavaScript the toggle cannot work, so hide it. */
.no-js .theme-toggle {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Profile icons at the top of the sidebar (sidebar.php)               */
/* ------------------------------------------------------------------ */

.profile-links {
	/* Phones and tablets: inside the "Menu and widgets" panel, aligned with the widgets. */
	margin: 30px 0 0;
}
.profile-links ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 1.1em;
}
.profile-links li {
	margin: 0;
	padding: 0;
	border: 0;
}
.profile-links a {
	display: block;
	padding: 0.2em 0;
	border: 0;
	opacity: 0.85;
	transition: opacity 0.15s;
}
.profile-links a:hover,
.profile-links a:focus {
	opacity: 1;
}
.profile-links svg {
	display: block;
	width: 22px;
	height: 22px;
}
/* The home icon is drawn on a wider grid; keep its visual size in line. */
.profile-links li:first-child svg {
	width: 24px;
}
/* ------------------------------------------------------------------ */
/* Sidebar spacing on desktop. Twenty Fifteen puts a 20% margin (about */
/* 83px) under the header and under every widget, which pushed the     */
/* profile icons away from the header they belong to and stretched the */
/* sidebar. Group title, description, toggle and icons (32px apart),   */
/* then use one 76px gap between all the sections that follow.         */
/* ------------------------------------------------------------------ */
@media screen and (min-width: 59.6875em) {
	.site-header {
		margin-bottom: 32px;
	}
	.profile-links {
		margin: 0 20% 76px;
	}
	.widget {
		margin-bottom: 76px;
	}
}

/* Widgets left empty (for example an empty paragraph block) take no space. */
.widget_block:has(> p:empty:only-child),
.widget_block:empty {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Book covers (same markup as https://lemire.me/en/):                 */
/* <div class="book-covers">                                           */
/*   <div class="book-cover"><a href="…"><img …>                       */
/*     <span class="book-ref"><span>Reference</span>                   */
/*     <span class="book-isbn">ISBN …</span></span></a></div> …        */
/* </div>                                                              */
/* The reference appears over the cover on hover or keyboard focus.    */
/* ------------------------------------------------------------------ */

/* Covers do not share one aspect ratio, so they share a height instead and
   keep their natural widths (no cropping). Two fit side by side in the sidebar. */
.book-covers {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 1.6em;
}
.book-cover a {
	position: relative;
	display: block;
	overflow: hidden;
	border: 0;
	border-radius: 3px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.book-cover img {
	display: block;
	width: auto;
	height: 170px;
	max-width: none;
}
.book-ref {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 0.5em;
	text-align: center;
	font-family: "Noto Sans", sans-serif;
	font-size: 11px;
	line-height: 1.35;
	color: #fff;
	background: rgba(0, 0, 0, 0.85);
	opacity: 0;
	transition: opacity 0.2s;
	pointer-events: none;
}
.book-cover a:hover .book-ref,
.book-cover a:focus .book-ref {
	opacity: 1;
}
.book-ref .book-isbn {
	margin-top: 0.7em;
	font-size: 0.82em;
	white-space: nowrap; /* do not split the ISBN at its hyphen */
	color: #ccc;
}
@media (prefers-reduced-motion: reduce) {
	.book-ref { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Archives: a grid of years in the sidebar, and the months of a year  */
/* in the header of a yearly archive (see functions.php).              */
/* Colors follow the surrounding text, so this works on the blue       */
/* sidebar, in the phone panel and in dark mode.                       */
/* ------------------------------------------------------------------ */

.year-grid,
.month-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}
.year-grid {
	grid-template-columns: repeat(auto-fill, minmax(3.4em, 1fr));
}
.month-list {
	grid-template-columns: repeat(auto-fill, minmax(3.6em, 1fr));
	max-width: 30em;
	margin-top: 1em;
}
.year-grid li,
.month-list li {
	margin: 0;
	padding: 0;
	border: 0;
}
.widget .year-grid a,
.year-grid a,
.page-header .month-list a {
	display: block;
	padding: 0.3em 0;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 2px;
	font-family: "Noto Sans", sans-serif;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.15s, border-color 0.15s;
}
.widget .year-grid a:hover,
.widget .year-grid a:focus,
.year-grid a[aria-current="page"],
.page-header .month-list a:hover,
.page-header .month-list a:focus {
	border-color: currentColor;
	background-color: color-mix(in srgb, currentColor 12%, transparent);
}
.year-grid a[aria-current="page"] {
	font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Sponsor button (a link with class "sponsor-button" in a widget).    */
/* Colors follow the surrounding text; the heart uses GitHub pink.     */
/* ------------------------------------------------------------------ */

.sponsor-button,
.widget .sponsor-button,
.textwidget .sponsor-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.2em;
	padding: 0.45em 0.95em;
	border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 2px;
	font-family: "Noto Sans", sans-serif;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s;
}
.sponsor-button:hover,
.sponsor-button:focus,
.widget .sponsor-button:hover,
.widget .sponsor-button:focus {
	border-color: currentColor;
	background-color: color-mix(in srgb, currentColor 12%, transparent);
}
.sponsor-button svg {
	flex: none;
	color: #db61a2;
}

/* Twenty Fifteen hyphenates text automatically; in the narrow sidebar that
   splits ordinary words ("advertise-ment"). Keep words whole there. */
.widget {
	-webkit-hyphens: manual;
	hyphens: manual;
}

/* ------------------------------------------------------------------ */
/* Dark mode. A small script in <head> sets data-theme on <html> from  */
/* the reader's choice (toggle button) or, by default, their system   */
/* setting. Twenty Fifteen prints its color scheme as inline CSS after */
/* this file; the attribute selector gives these rules precedence.    */
/* ------------------------------------------------------------------ */
html[data-theme="dark"] body {
	background-color: #10161b;
	color: #d5dde4;
}

/* Sidebar strip (desktop) and header bar (phones): a dark blue-gray that recedes,
   instead of the bright blue of the light theme. */
html[data-theme="dark"] body:before,
html[data-theme="dark"] .site-header {
	background-color: #17222c;
}
@media screen and (min-width: 59.6875em) {
	html[data-theme="dark"] body:before {
		box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
	}
}

/* White panels become dark panels. */
html[data-theme="dark"] .post-navigation,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .hentry,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .comments-area,
html[data-theme="dark"] .widecolumn {
	background-color: #182129;
}
html[data-theme="dark"] .entry-footer {
	background-color: #141c23;
}
html[data-theme="dark"] .hentry {
	box-shadow: none;
}
/* On wide screens the sidebar sits on the blue strip (body:before), as in the parent. */
@media screen and (min-width: 59.6875em) {
	html[data-theme="dark"] .site-header,
	html[data-theme="dark"] .secondary {
		background-color: transparent;
	}
}

/* Text and links. */
html[data-theme="dark"] body,
html[data-theme="dark"] a,
html[data-theme="dark"] blockquote cite,
html[data-theme="dark"] blockquote small,
html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .entry-title a,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .comments-title,
html[data-theme="dark"] .comment-reply-title,
html[data-theme="dark"] .comment-author,
html[data-theme="dark"] .post-navigation .post-title,
html[data-theme="dark"] .entry-content h1, html[data-theme="dark"] .entry-content h2, html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4, html[data-theme="dark"] .entry-content h5, html[data-theme="dark"] .entry-content h6 {
	color: #d5dde4;
}
html[data-theme="dark"] .entry-content a,
html[data-theme="dark"] .entry-summary a,
html[data-theme="dark"] .page-content a,
html[data-theme="dark"] .comment-content a,
html[data-theme="dark"] .textwidget a {
	color: #8ccdf2;
	border-color: #8ccdf2;
}
html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus,
html[data-theme="dark"] blockquote,
html[data-theme="dark"] .entry-footer,
html[data-theme="dark"] .entry-footer a,
html[data-theme="dark"] .comment-metadata,
html[data-theme="dark"] .comment-metadata a,
html[data-theme="dark"] .post-navigation .meta-nav,
html[data-theme="dark"] .wp-caption-text,
html[data-theme="dark"] .main-navigation .menu-item-description,
html[data-theme="dark"] .image-navigation,
html[data-theme="dark"] .image-navigation a,
html[data-theme="dark"] .comment-navigation,
html[data-theme="dark"] .comment-navigation a,
html[data-theme="dark"] .author-heading,
html[data-theme="dark"] .taxonomy-description,
html[data-theme="dark"] .page-links > .page-links-title,
html[data-theme="dark"] .entry-caption,
html[data-theme="dark"] .pingback .edit-link,
html[data-theme="dark"] .pingback .edit-link a,
html[data-theme="dark"] .post-password-form label,
html[data-theme="dark"] .comment-form label,
html[data-theme="dark"] .comment-notes,
html[data-theme="dark"] .comment-awaiting-moderation,
html[data-theme="dark"] .logged-in-as,
html[data-theme="dark"] .form-allowed-tags,
html[data-theme="dark"] .no-comments,
html[data-theme="dark"] .site-info,
html[data-theme="dark"] .site-info a,
html[data-theme="dark"] .gallery-caption,
html[data-theme="dark"] .comment-list .reply a,
html[data-theme="dark"] .widecolumn label,
html[data-theme="dark"] .widecolumn .mu_register label {
	color: rgba(213, 221, 228, 0.7);
}
/* Their hover and focus states use the main text color. */
html[data-theme="dark"] .image-navigation a:hover,
html[data-theme="dark"] .image-navigation a:focus,
html[data-theme="dark"] .comment-navigation a:hover,
html[data-theme="dark"] .comment-navigation a:focus,
html[data-theme="dark"] .entry-footer a:hover,
html[data-theme="dark"] .entry-footer a:focus,
html[data-theme="dark"] .comment-metadata a:hover,
html[data-theme="dark"] .comment-metadata a:focus,
html[data-theme="dark"] .pingback .edit-link a:hover,
html[data-theme="dark"] .pingback .edit-link a:focus,
html[data-theme="dark"] .comment-list .reply a:hover,
html[data-theme="dark"] .comment-list .reply a:focus,
html[data-theme="dark"] .site-info a:hover,
html[data-theme="dark"] .site-info a:focus,
html[data-theme="dark"] .dropdown-toggle:after {
	color: #d5dde4;
}
html[data-theme="dark"] .comment-list .reply a:hover,
html[data-theme="dark"] .comment-list .reply a:focus,
html[data-theme="dark"] .logged-in-as a:hover,
html[data-theme="dark"] .comment-author a:hover {
	border-color: rgba(213, 221, 228, 0.7);
}
html[data-theme="dark"] blockquote {
	border-color: rgba(213, 221, 228, 0.5);
}

/* The blog title and sidebar links stay white on the blue strip, as in light mode. */
html[data-theme="dark"] .site-title a,
html[data-theme="dark"] .secondary a {
	color: #ffffff;
}
html[data-theme="dark"] .secondary a:hover,
html[data-theme="dark"] .secondary a:focus {
	color: rgba(255, 255, 255, 0.7);
}

/* Rules and borders. */
html[data-theme="dark"] hr {
	background-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] pre,
html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .post-navigation,
html[data-theme="dark"] .post-navigation div + div,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .comment-navigation,
html[data-theme="dark"] .comment-list article,
html[data-theme="dark"] .comment-list .pingback,
html[data-theme="dark"] .comment-list .trackback,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .no-comments,
html[data-theme="dark"] abbr[title],
html[data-theme="dark"] .main-navigation ul,
html[data-theme="dark"] .main-navigation li,
html[data-theme="dark"] .widget_categories .children,
html[data-theme="dark"] .widget_nav_menu .sub-menu,
html[data-theme="dark"] .widget_pages .children,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .hentry + .hentry,
html[data-theme="dark"] .author-info,
html[data-theme="dark"] .entry-content .page-links a,
html[data-theme="dark"] .page-links > span,
html[data-theme="dark"] .comments-area,
html[data-theme="dark"] .comment-list + .comment-respond,
html[data-theme="dark"] .comment-list .reply a {
	border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] a:focus,
html[data-theme="dark"] button:focus,
html[data-theme="dark"] input:focus {
	outline-color: rgba(213, 221, 228, 0.4);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus {
	border-color: rgba(213, 221, 228, 0.4);
}

/* Buttons and form fields. */
html[data-theme="dark"] button:not(.secondary-toggle):not(.theme-toggle):not(.dropdown-toggle),
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] input[type="reset"],
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] .pagination .prev,
html[data-theme="dark"] .pagination .next,
html[data-theme="dark"] .page-links a,
html[data-theme="dark"] .sticky-post {
	background-color: #d5dde4;
	color: #10161b;
}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea {
	background-color: #10161b;
	color: #d5dde4;
}

/* Plain code blocks and inline code. */
html[data-theme="dark"] pre {
	background-color: #10161b !important;
	color: #d5dde4;
}
html[data-theme="dark"] code,
html[data-theme="dark"] kbd,
html[data-theme="dark"] tt {
	color: #d5dde4;
}

/* Code that carries its own light-theme colors (Pygments and older exporters):
   invert it with a hue rotation so keywords, strings and comments stay distinct. */
html[data-theme="dark"] .highlight pre,
html[data-theme="dark"] pre[style*="color"],
html[data-theme="dark"] pre.code_syntax,
html[data-theme="dark"] pre:has(span[style*="color"]) {
	background-color: #f4f2ee !important;
	color: #111 !important;
	border-color: #dcd9d3;
	filter: invert(0.92) hue-rotate(180deg);
}

/* Tables with light inline colors on rows and cells. */
html[data-theme="dark"] .entry-content table,
html[data-theme="dark"] .entry-content tr,
html[data-theme="dark"] .entry-content th,
html[data-theme="dark"] .entry-content td,
html[data-theme="dark"] .comment-content table,
html[data-theme="dark"] .comment-content tr,
html[data-theme="dark"] .comment-content th,
html[data-theme="dark"] .comment-content td {
	background: transparent !important;
	color: #d5dde4 !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .entry-content thead,
html[data-theme="dark"] .entry-content thead th,
html[data-theme="dark"] .entry-content thead td {
	background: #1f2a33 !important;
}

/* Images with transparent backgrounds (diagrams) stay legible. */
html[data-theme="dark"] .entry-content img[src$=".png"],
html[data-theme="dark"] .entry-content img[src$=".svg"],
html[data-theme="dark"] .entry-content img[src$=".gif"] {
	background-color: #ffffff;
}

/* Phones and tablets: the sidebar is the "Menu and widgets" panel. Twenty Fifteen
   colors widget text there with its dark ink (on desktop it uses white on the blue
   strip), which is unreadable once the panel turns dark. */
@media screen and (max-width: 59.6875em) {
	html[data-theme="dark"] .widget,
	html[data-theme="dark"] .widget blockquote,
	html[data-theme="dark"] .widget .wp-caption-text,
	html[data-theme="dark"] .widget .gallery-caption {
		color: rgba(213, 221, 228, 0.75);
	}
	html[data-theme="dark"] .widget-title,
	html[data-theme="dark"] .widget blockquote cite,
	html[data-theme="dark"] .widget blockquote small {
		color: #d5dde4;
	}
	html[data-theme="dark"] .widget li,
	html[data-theme="dark"] .widget input,
	html[data-theme="dark"] .widget textarea {
		border-color: rgba(255, 255, 255, 0.12);
	}
}

/* The newsletter plugin's email field stays bright white otherwise. */
html[data-theme="dark"] .tnp-subscription-minimal .tnp-email {
	background-color: #10161b !important;
	color: #d5dde4 !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
	color: rgba(213, 221, 228, 0.5) !important;
	opacity: 1;
}

/* ------------------------------------------------------------------ */
/* Dark mode: pieces that bring their own light colors.               */
/* ------------------------------------------------------------------ */

/* Citation box printed after each post (inline .wpcp style is #f7f7f7). */
html[data-theme="dark"] .wpcp {
	background: #141c23;
	color: rgba(213, 221, 228, 0.85);
}

/* BibTeX dialog: built by a script with inline light colors. */
html[data-theme="dark"] #global-bibtex-modal {
	background: #182129;
	color: #d5dde4;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}
html[data-theme="dark"] #global-bibtex-modal > div {
	background: transparent !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] #global-bibtex-modal pre {
	background: #10161b !important;
	color: #d5dde4;
	padding: 0.8em;
}
html[data-theme="dark"] #global-bibtex-modal button {
	color: #d5dde4 !important;
}
html[data-theme="dark"] #global-bibtex-modal #bibtex-copy-btn {
	background: #d5dde4 !important;
	color: #10161b !important;
}

/* Date line above each post (its plugin CSS uses #767676). */
html[data-theme="dark"] .post-dateline {
	color: rgba(213, 221, 228, 0.7);
}

/* Highlighted and inserted text use a pale yellow background. */
html[data-theme="dark"] mark,
html[data-theme="dark"] ins {
	background: #5a4d12;
	color: #f3ead0;
}

/* Block editor content. */
html[data-theme="dark"] .wp-block-quote__citation,
html[data-theme="dark"] .wp-block-latest-comments__comment-date,
html[data-theme="dark"] [class^="wp-block-"] figcaption {
	color: rgba(213, 221, 228, 0.7);
}
html[data-theme="dark"] [class^="wp-block-"] blockquote {
	border-color: rgba(213, 221, 228, 0.5);
}
html[data-theme="dark"] .wp-block-preformatted,
html[data-theme="dark"] .wp-block-table td {
	border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .wp-block-button__link:not(.has-background),
html[data-theme="dark"] .wp-block-file a.wp-block-file__button {
	background-color: #d5dde4;
	color: #10161b;
}
html[data-theme="dark"] .is-style-outline .wp-block-button__link:not(.has-text-color) {
	background-color: transparent;
	color: #d5dde4;
}
/* Light block backgrounds keep dark text when no text color was chosen. */
html[data-theme="dark"] .has-white-background-color:not(.has-text-color),
html[data-theme="dark"] .has-light-gray-background-color:not(.has-text-color),
html[data-theme="dark"] .has-light-blue-background-color:not(.has-text-color),
html[data-theme="dark"] .has-light-pink-background-color:not(.has-text-color),
html[data-theme="dark"] .has-yellow-background-color:not(.has-text-color) {
	color: #22313f;
}

/* Lemire Newsletter subscription form. */
html[data-theme="dark"] .lemire-nl-form input[type="email"] {
	background: #10161b;
	border-color: rgba(255, 255, 255, 0.2);
	color: #d5dde4;
}
html[data-theme="dark"] .lemire-nl-form input[type="submit"] {
	background: #d5dde4;
	color: #10161b;
}
