/*
 * Dark mode: off by default (media="not all"); the top-bar switch turns it
 * on and the choice is remembered per browser. Mostly token swaps; the red stays for the header and
 * buttons, links get a lighter red that reads on dark backgrounds.
 */

:root {
	color-scheme: dark;

	--jw-text: #e5e7eb;
	--jw-text-muted: #9ca3af;
	--jw-border: #2a313b;
	--jw-surface: #0f1419;
	--jw-bg: #171c23;
	--jw-red-tint: #3b1518;
	--jw-link: #f1868c;
}

a,
.jw-more,
.jw-pill,
.jw-card-title a:hover,
.jw-card-title a:focus,
.jw-obit-list a:hover strong,
.jw-obit-list a:focus strong,
.jw-wed-list time,
.jw-breaking-list time,
.jw-flash time,
.jw-hero-more,
.jw-rainfall-table th {
	color: var(--jw-link);
}

a:hover,
a:focus {
	color: #f8b4b8;
}

.jw-card-title a,
.jw-opinion h3 a,
.jw-obit-list a,
.jw-services a,
.jw-tags a,
.nav-links .page-numbers:not(.current) {
	color: var(--jw-text);
}

/* GeneratePress pieces that use their own light colours */
body,
.site,
.site-content {
	background: var(--jw-surface);
	color: var(--jw-text);
}

.inside-article,
.sidebar .widget,
.page-header,
.comments-area,
.main-navigation,
.main-navigation ul ul,
.jw-bottom-bar,
.jw-search form {
	background: var(--jw-bg);
	color: var(--jw-text);
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle {
	color: var(--jw-text);
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a {
	color: var(--jw-link);
	box-shadow: inset 0 -3px 0 var(--jw-link);
}

input,
select,
textarea {
	background: var(--jw-surface);
	color: var(--jw-text);
	border-color: var(--jw-border);
}

.jw-bottom-bar a[aria-current="page"] {
	color: var(--jw-link);
}

/* Section underline and rain card */
.jw-section-head,
.jw-archive-head {
	border-bottom-color: var(--jw-red);
}

.jw-rain-card,
.jw-weather-forecast {
	background: #083e5f;
}

.jw-pill-village {
	background: #13283a;
	color: #9cc6e6;
}

.jw-contact-done {
	background: #0f2a1c;
	border-color: #1f5a39;
}

.jw-contact-error {
	color: #f8b4b8;
	border-color: #5c2226;
}

/* Footer is already dark; make it sit apart from the page */
.jw-footer {
	background: #0b0f14;
	border-top: 1px solid var(--jw-border);
}

.site-info {
	background: #07090c;
}

/* Photos: slightly dimmed so they don't glare */
.jw-card-img img,
.jw-article-image img {
	filter: brightness(.92);
}

/* Old posts pasted from Word carry inline white backgrounds and black text */
.entry-content [style*="background-color: #fff"],
.entry-content [style*="background-color: #FFF"],
.entry-content [style*="background-color: white"],
.entry-content [style*="background: #fff"],
.entry-content [style*="background: white"] {
	background-color: transparent !important;
}

.entry-content [style*="color: #000"]:not([style*="background-color: #000"]),
.entry-content [style*="color: black"]:not([style*="background-color: black"]),
.entry-content font[color="#000000"],
.entry-content font[color="black"] {
	color: inherit !important;
}

.jw-service-icon {
	color: var(--jw-link);
}

.jw-services a:hover,
.jw-services a:focus-visible {
	box-shadow: 0 6px 18px rgb(0 0 0 / .35);
}

.jw-home-weather {
	--jw-strip: #121c26;
}

.jw-home-videos {
	--jw-strip: #2a0a0d;
}

.jw-home-archive {
	--jw-strip: #1f1a14;
	--jw-text-muted: #a8a29e;
}

.jw-onthisday b {
	color: var(--jw-link);
}


.jw-archive-head.jw-news-head {
	--jw-band: #1b2430;
	--jw-band-muted: #aeb6c2;
}

.jw-card-writer,
.jw-opinion-writer {
	color: #9cc3dd;
}

/* Ad placeholder: a darker shimmer. */
.jw-ad:not(.is-loaded) { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); }
