/**
 * Dark mode — follows the browser / OS prefers-color-scheme setting.
 */

html {
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
	}

	.featured-hero-section__subscribe {
		background: #fff;
		color: #111;
		border-color: #d0d0d0;
	}

	.featured-hero-section__subscribe:hover {
		background: #f5f5f5;
		color: #000;
		border-color: #111;
	}

	body {
		background: #121212;
		color: #e8e8e8;
	}

	.contain,
	.column,
	#main {
		background: transparent;
	}

	/* ─── Page shells ─── */
	.featured-hero-section,
	.article-feed-section,
	.featured-article-card,
	.compact-article-grid-section,
	.single-page,
	.contact-page,
	.terms-page,
	.category-archive {
		background: #121212;
	}

	.compact-article-grid-section__inner,
	.featured-article-card__inner {
		border-top-color: #333;
	}

	.single-reading-block + .single-reading-block,
	.single-page > .single-reading-block + #single-infinite:not(:empty),
	.homepage-infinite .single-reading-block + .single-reading-block {
		border-top-color: #333;
	}

	.homepage-infinite,
	#single-infinite,
	.single-reading-block,
	.homepage-infinite-sentinel {
		background: #121212;
	}

	.homepage-infinite-status {
		width: 100%;
		max-width: none;
		box-sizing: border-box;
		margin: 0;
		padding: 16px 24px;
		background: #121212;
		color: #c8c8c8;
	}

	/* ─── Article feeds & cards ─── */
	.article-feed-section__item {
		border-bottom-color: #2e2e2e;
	}

	.article-feed-section__title a,
	.featured-article-card__title a,
	.compact-article-grid-section__title a {
		color: #f0f0f0;
	}

	.article-feed-section__excerpt,
	.featured-article-card__excerpt,
	.compact-article-grid-section__excerpt {
		color: #a8a8a8;
	}

	.article-feed-section__more,
	.featured-article-card__more {
		color: #f0f0f0;
	}

	.article-feed-section__category,
	.featured-article-card__category {
		background: #c8e600;
		color: #000;
	}

	/* ─── Category archives ─── */
	.category-archive__title {
		color: #f0f0f0;
	}

	.category-archive__description,
	.category-archive__empty {
		color: #a8a8a8;
	}

	.category-archive__pagination .nav-links a,
	.category-archive__pagination .nav-links span {
		color: #e8e8e8;
	}

	/* ─── Single article ─── */
	.single-article__title {
		color: #f0f0f0;
	}

	.single-article__author {
		color: #d8d8d8;
	}

	.single-article__time,
	.single-article__meta-sep,
	.single-article__engagement {
		color: #9a9a9a;
	}

	.single-article__stat:hover,
	.single-article__share.is-shared {
		color: #e8e8e8;
	}

	.single-article__stat:focus-visible {
		outline-color: #c8e600;
	}

	.single-article__share-menu {
		background: #1e1e1e;
		border-color: #3a3a3a;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
	}

	.single-article__share-option {
		color: #e0e0e0;
	}

	.single-article__share-option:hover,
	.single-article__share-option:focus-visible {
		background: #2a2a2a;
	}

	.single-article__content {
		color: #d4d4d4;
	}

	.single-article__content h1,
	.single-article__content h2,
	.single-article__content h3,
	.single-article__content h4,
	.single-article__content h5,
	.single-article__content h6 {
		color: #f0f0f0;
	}

	.single-article__content strong,
	.single-article__content b {
		color: #f0f0f0;
	}

	.single-article__content a {
		color: #d8ee5a;
	}

	.single-article__content a:hover {
		color: #c8e600;
	}

	.single-article__content .wp-caption-text,
	.single-article__content figcaption {
		color: #a8a8a8;
	}

	.single-article__writer-bio {
		border-top-color: #333;
	}

	.single-article__writer-bio-label {
		color: #9a9a9a;
	}

	.single-article__writer-bio-name {
		color: #f0f0f0;
	}

	.single-article__writer-bio-text {
		color: #c8c8c8;
	}

	.single-article__writer-bio-avatar {
		background: #2a2a2a;
	}

	/* Story drawer stays light so full article remains readable */
	.story-viewer__drawer-sheet,
	.story-viewer__drawer-article,
	.story-viewer__drawer-article .single-article {
		background: #fff;
		color: #111;
		color-scheme: light;
	}

	.story-viewer__drawer-article .single-article__title,
	.story-viewer__drawer-article .single-article__content h1,
	.story-viewer__drawer-article .single-article__content h2,
	.story-viewer__drawer-article .single-article__content h3,
	.story-viewer__drawer-article .single-article__content h4,
	.story-viewer__drawer-article .single-article__content h5,
	.story-viewer__drawer-article .single-article__content h6,
	.story-viewer__drawer-article .single-article__content strong,
	.story-viewer__drawer-article .single-article__content b,
	.story-viewer__drawer-article .single-article__writer-bio-name {
		color: #111;
	}

	.story-viewer__drawer-article .single-article__author,
	.story-viewer__drawer-article .single-article__writer-bio-text {
		color: #333;
	}

	.story-viewer__drawer-article .single-article__time,
	.story-viewer__drawer-article .single-article__meta-sep,
	.story-viewer__drawer-article .single-article__engagement,
	.story-viewer__drawer-article .single-article__writer-bio-label,
	.story-viewer__drawer-article .single-article__content .wp-caption-text,
	.story-viewer__drawer-article .single-article__content figcaption {
		color: #666;
	}

	.story-viewer__drawer-article .single-article__content {
		color: #222;
	}

	.story-viewer__drawer-article .single-article__content a {
		color: #0b57d0;
	}

	.story-viewer__drawer-article .single-article__content a:hover {
		color: #0842a0;
	}

	.story-viewer__drawer-article .single-article__share-menu {
		background: #fff;
		border-color: #e5e5e5;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	}

	.story-viewer__drawer-article .single-article__share-option {
		color: #222;
	}

	.story-viewer__drawer-article .single-article__share-option:hover,
	.story-viewer__drawer-article .single-article__share-option:focus-visible {
		background: #f3f3f3;
	}

	.story-viewer__drawer-article .single-article__writer-bio {
		border-top-color: #e5e5e5;
	}

	.story-viewer__drawer-article .single-article__writer-bio-avatar {
		background: #eee;
	}

	/* ─── Footer ─── */
	.site-footer {
		background: #1a1a1a;
	}

	.site-footer__subscribe-label,
	.site-footer__subscribe-checkbox {
		color: #a8a8a8;
	}

	.site-footer__subscribe-input {
		background: #252525;
		border-color: #444;
		color: #f0f0f0;
	}

	.site-footer__subscribe-input::placeholder {
		color: #777;
	}

	.site-footer__subscribe-input:focus {
		border-color: #666;
	}

	.site-footer__subscribe-message {
		color: #9fd44a;
	}

	.site-footer__subscribe-message.is-error {
		color: #ff6b6b;
	}

	.site-footer__divider {
		border-top-color: #333;
	}

	.site-footer__logo img {
		filter: brightness(0) invert(1);
	}

	.site-footer__partner-logo {
		filter: none;
	}

	.site-footer__back-to-top {
		background: #c8e600;
		color: #fff;
	}

	.site-footer__back-to-top:hover,
	.site-footer__back-to-top:focus-visible {
		background: #b6d200;
		color: #fff;
	}

	.site-footer__member-badge {
		background: #252525;
		border: 1px solid #333;
	}

	.site-footer__nav a {
		color: #a8a8a8;
	}

	.site-footer__nav a:hover {
		color: #fff;
	}

	.site-footer__legal {
		color: #c8c8c8;
	}

	/* ─── Contact page ─── */
	.contact-page__title,
	.contact-page__card-title,
	.contact-page__office-title {
		color: #f0f0f0;
	}

	.contact-page__intro,
	.contact-page__card-line,
	.contact-page__card-label,
	.contact-page__office-label,
	.contact-page__office-address {
		color: #a8a8a8;
	}

	.contact-page__card,
	.contact-page__office-card {
		background: #1e1e1e;
		border-color: #333;
	}

	.contact-page__card-line a,
	.contact-page__office-address a {
		color: #e8e8e8;
		border-bottom-color: #555;
	}

	.contact-page__card-line a:hover,
	.contact-page__office-address a:hover {
		color: #c8e600;
		border-bottom-color: #c8e600;
	}

	.contact-page__office-label {
		border-bottom-color: #333;
	}

	/* ─── Terms page ─── */
	.terms-page__toc-title {
		color: #a8a8a8;
	}

	.terms-page__toc-list {
		scrollbar-color: #c8e600 #2a2a2a;
	}

	.terms-page__toc-list::-webkit-scrollbar-track {
		background: #2a2a2a;
	}

	.terms-page__toc-list a {
		color: #a8a8a8;
	}

	.terms-page__toc-list a:hover {
		background: #252525;
		color: #f0f0f0;
	}

	.terms-page__toc-list a.is-active {
		background: #2a3010;
		color: #e8f0a0;
		box-shadow: inset 3px 0 0 #c8e600;
	}

	.terms-page__toc-mobile-toggle {
		background: #1e1e1e;
		color: #a8a8a8;
	}

	.terms-page__toc-mobile-list {
		background: #1a1a1a;
		border-color: #333;
	}

	.terms-page__toc-mobile-list a {
		color: #a8a8a8;
		border-bottom-color: #333;
	}

	.terms-page__toc-mobile-list a:active,
	.terms-page__toc-mobile-list a.is-active {
		color: #e8f0a0;
	}

	.terms-page__title,
	.terms-page__privacy-divider-title {
		color: #f0f0f0;
	}

	.terms-page__block-title {
		background: #1e1e1e;
		color: #f0f0f0;
	}

	.terms-page__block-content p,
	.terms-page__block-content li {
		color: #a8a8a8;
	}

	.terms-page__block-content a {
		color: #d8ee5a;
	}

	.terms-page__block-content a:hover {
		color: #c8e600;
	}

	.terms-page__note {
		background: #252a14;
		border-color: #4a5520;
	}

	.terms-page__note p {
		color: #c8e600 !important;
	}

	.terms-page__privacy-divider-line {
		background: #333;
	}

	/* ─── Search overlay ─── */
	.site-search__dialog {
		background: #1e1e1e;
		box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
	}

	.site-search__title,
	.site-search__close {
		color: #f0f0f0;
	}

	.site-search__form {
		border-bottom-color: #333;
	}

	.site-search__input {
		background: #252525;
		border-color: #444;
		color: #f0f0f0;
	}

	.site-search__input:focus {
		border-color: #c8e600;
	}

	.site-search__submit {
		background: #c8e600;
		color: #000;
	}

	.site-search__submit:hover {
		background: #d8ee5a;
	}

	.site-search__empty,
	.site-search__loading {
		color: #a8a8a8;
	}

	.site-search__result {
		border-bottom-color: #2e2e2e;
	}

	.site-search__result:hover,
	.site-search__result.is-active {
		background: #252525;
	}

	.site-search__result-thumb {
		background: #333;
	}

	.site-search__result-type {
		color: #9a9a9a;
	}

	.site-search__result-title {
		color: #f0f0f0;
	}

	.site-search__view-all {
		color: #e8e8e8;
		background: #252525;
	}

	.site-search__view-all:hover {
		background: #2e2e2e;
	}
}
