/* Appearance only. Oxygen retains the native layout and the light palette. */
html[data-ea-theme="dark"] {
  color-scheme: dark;
  --ea-night-bg:#101b25;
  --ea-night-surface:#192833;
  --ea-night-raised:#203340;
  --ea-night-text:#eaf2ee;
  --ea-night-muted:#b4c8bf;
  --ea-night-link:#8cdbb9;
  --ea-night-border:#3b4f5c;
  --ea-hero-soft-rgb:16,27,37;--ea-hero-rgb:16,27,37;--ea-hero-mobile-rgb:16,27,37;--ea-hero-end:rgba(16,27,37,.8);
  --ea-color-primary:#8cdbb9;--ea-color-editorial:#eaf2ee;--ea-color-background:#101b25;
  --ea-color-text:#eaf2ee;--ea-color-soft-mint:#203340;--ea-color-border:#3b4f5c;
  background:var(--ea-night-bg);
}
html[data-ea-theme="dark"] body { background:var(--ea-night-bg)!important;color:var(--ea-night-text)!important; }
html[data-ea-theme="dark"] body > :is(header,footer),
html[data-ea-theme="dark"] .ct-inner-content > .ct-section {background-color:var(--ea-night-bg)!important;}
html[data-ea-theme="dark"] [data-ea-role="header"] {background:var(--ea-night-bg)!important;border-color:var(--ea-night-border)!important;}
html[data-ea-theme="dark"] :is([data-ea-role="header-actions"] > button,[data-ea-role="header-actions"] > a,.ea-header-search__form,.ou-off-canvas-panel,.oxy-pro-menu .sub-menu) {background-color:var(--ea-night-surface)!important;color:var(--ea-night-text)!important;}
html[data-ea-theme="dark"] :is(.oxy-pro-menu,.ou-accordion-menu) a {color:var(--ea-night-text)!important;}
html[data-ea-theme="dark"] :is(.oxy-pro-menu,.ou-accordion-menu) a:hover {color:var(--ea-night-link)!important;background-color:var(--ea-night-raised)!important;}
html[data-ea-theme="dark"] :is(input,select,textarea,.ea-header-search__close) {background-color:var(--ea-night-surface)!important;color:var(--ea-night-text)!important;border-color:var(--ea-night-border)!important;}
html[data-ea-theme="dark"] input::placeholder,html[data-ea-theme="dark"] textarea::placeholder {color:var(--ea-night-muted)!important;opacity:1;}
html[data-ea-theme="dark"] [data-ea-role="newsletter-section"] {background-color:var(--ea-night-raised)!important;background-blend-mode:multiply;}
html[data-ea-theme="dark"] [data-ea-role="header-actions"] :is(button,a) > img {filter:brightness(0) invert(1);}
/* Keep the original transparent logo artwork in dark mode. */
html[data-ea-theme="dark"] :is(header,footer,.ou-off-canvas-panel) img[src*="EcoArabic"] {background:transparent!important;}
html[data-ea-theme="dark"] :is(.ea-editorial-template,.ea-template-content,.entry-content,.article-content) {color:var(--ea-night-text);}
html[data-ea-theme="dark"] :is(.ea-editorial-template,.ea-template-content,.entry-content,.article-content) :is(h1,h2,h3,h4,h5,h6,p,li,blockquote) {color:var(--ea-night-text);}
html[data-ea-theme="dark"] :is(.ea-editorial-template,.ea-template-content,.entry-content,.article-content) a {color:var(--ea-night-link);}
html[data-ea-theme="dark"] :is(.ea-header-search__form label,.ea-header-search__close) {color:var(--ea-night-text)!important;}
html[data-ea-theme="dark"] :is(a,button,input,select,textarea):focus-visible {outline-color:#95e3c4!important;}
/* The two picture banners keep dark lettering over their light artwork. */
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 #div_block-5-219837 :is(.ct-headline,.ct-text-block) {color:#123d31!important;}
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 :is(#div_block-4-219837,#div_block-99-219837,#div_block-650-219837) {background-color:var(--ea-night-surface)!important;border-color:var(--ea-night-border)!important;}
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 :is(.ep-v51-chart-grid,.ep-v51-chart-line) {stroke:var(--ea-night-border);}
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 :is(.ep-v51-chart-label,.ep-v51-axis-label) {fill:var(--ea-night-muted);}
/* Sun stays in its existing native position in both directions. */
[data-ea-role="contrast-toggle"] {touch-action:manipulation;}
html[data-ea-theme="dark"] [data-ea-role="contrast-toggle"] {box-shadow:inset 0 0 0 1px #76c6a5;}
/* Keep the native hero control divider visible over dark slide artwork. */
html[data-ea-theme="dark"] .ecoarabic-homepage-hero-slider__controls > :is(#div_block-50-214421,#div_block-50-11,#div_block-50-214422) {background-color:#eaf2ee!important;}
@media(max-width:767px){html:not([data-ea-theme="dark"]){--ea-hero-shade-rgb:248,252,250;--ea-hero-shade-alpha:.65;--ea-hero-soft-alpha:.7;}html[data-ea-theme="dark"]{--ea-hero-shade-rgb:16,27,37;--ea-hero-shade-alpha:.6;--ea-hero-soft-alpha:.75;}}
/* Populated lists clone computed colors; bind text back to the active palette.
   Light fallbacks also prevent dark colors sticking after a dark-first load. */
html :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) :is([data-ea-curation-field="title"],.ecoarabic-analysis-post-link) {color:#10221d!important;}
html :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) [data-ea-curation-field="category"] {color:#66766f!important;}
html :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) .ecoarabic-analysis-arrow-link {color:#006b43!important;}
html[data-ea-theme="dark"] :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) :is([data-ea-curation-field="title"],.ecoarabic-analysis-post-link) {color:#eaf2ee!important;}
html[data-ea-theme="dark"] :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) [data-ea-curation-field="category"] {color:#b4c8bf!important;}
html[data-ea-theme="dark"] :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) .ecoarabic-analysis-arrow-link {color:#8cdbb9!important;}
html :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) :is([data-ea-curation-field="title"],[data-ea-curation-field="category"],.ecoarabic-analysis-post-link,.ecoarabic-analysis-arrow-link) {-webkit-text-fill-color:currentColor!important;}
html[data-ea-theme="dark"] :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) :is(.ecoarabic-analysis-post-link,.ecoarabic-analysis-arrow-link):is(:hover,:focus-visible) {color:#b5f1d7!important;}
html[data-ea-theme="dark"] :is([data-ea-most-read="native"],[data-ea-anchor="analysis"]) :is(.ecoarabic-analysis-post-link,.ecoarabic-analysis-arrow-link):focus-visible {outline:2px solid #95e3c4!important;outline-offset:2px;}
html[data-ea-theme="dark"] :is([data-ea-most-read-position],[data-ea-analysis-position],.ecoarabic-most-read-news-list) {border-color:var(--ea-night-border)!important;}
/* White type stays readable on the existing green Earth Pulse action. */
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 #link_text-104-219837 {color:#fff!important;}
/* Keep both strokes of the EN/FR Explore toggle white on its green button. */
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51:is([data-lang="en"],[data-lang="fr"]) #_toggle-100-219837 .oxy-expand-collapse-icon::before,
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51:is([data-lang="en"],[data-lang="fr"]) #_toggle-100-219837 .oxy-expand-collapse-icon::after {background-color:#fff!important;}
/* Outline all eight Details controls on dark card surfaces. */
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 .ct-link-button:not(.oxy-close-modal) {border:1px solid #91a6b5!important;}
/* All eight native Earth Pulse dialogs share the dark surface. */
html[data-ea-theme="dark"] .ecoarabic-earth-pulse-v51 .ct-modal {background-color:#192833!important;color:#eaf2ee!important;border-color:#647f8e!important;}
/* Keep the article's At a glance outline visible on dark surfaces. */
html[data-ea-theme="dark"] body.single-post #div_block-33-single {border-color:#91a6b5!important;}
/* Define the article sidebar newsletter card against the dark page surface. */
html[data-ea-theme="dark"] body.single-post #div_block-30-single {border:1px solid #647f8e!important;}
/* Keep the localized login modal and standalone login submit buttons outlined. */
html[data-ea-theme="dark"] .ea-editorial-login-dialog #wp-submit,
html[data-ea-theme="dark"] body.page-id-216061 #_login_form-3-216061 #wp-submit {border:1px solid #91a6b5!important;}
/* The editorial application shares the public appearance preference. */
html[data-ea-theme="dark"] .eaew {
  --eaew-green:#8cdbb9;--eaew-green-dark:#eaf2ee;--eaew-text:#eaf2ee;
  --eaew-muted:#b4c8bf;--eaew-border:#3b4f5c;--eaew-mint:#203340;--eaew-accent:#f0b58d;
}
html[data-ea-theme="dark"] .eaew :is(.eaew-button,.eaew-author-admin-form .button-primary,.eaew-account__avatar) {background:#21684e;color:#fff!important;border-color:#74bba3;}
html[data-ea-theme="dark"] .eaew .eaew-button:hover {background:#174d3b;color:#fff!important;border-color:#8cdbb9;}
html[data-ea-theme="dark"] .eaew :is(.eaew-button--secondary,.eaew-author-admin-form .button:not(.button-primary)) {background:#192833;color:#8cdbb9!important;border-color:#647f8e;}
html[data-ea-theme="dark"] .eaew .eaew-button--secondary:hover {background:#203340;color:#b5f1d7!important;}
html[data-ea-theme="dark"] .eaew .eaew-button--danger {background:#8c352e;border-color:#e7a29c;}
html[data-ea-theme="dark"] .eaew .eaew-button--danger:hover {background:#702922;}
html[data-ea-theme="dark"] .eaew :is(.eaew-field-error,.eaew-ai-error-text,.eaew-text-button) {color:#ffb4aa!important;}
html[data-ea-theme="dark"] body.eaew-body :is(.mce-panel,.mce-toolbar-grp,.mce-statusbar,.quicktags-toolbar,.wp-editor-tabs .wp-switch-editor,.mce-menu,.mce-menu-item,.mce-container .mce-btn,#wp-link-wrap,#wp-link .link-search-wrapper,#wp-link .submitbox) {background:#192833!important;color:#eaf2ee!important;border-color:#3b4f5c!important;}
html[data-ea-theme="dark"] body.eaew-body :is(.mce-ico,.mce-btn button,.mce-btn .mce-txt,.mce-menu-item .mce-text,.mce-statusbar .mce-path-item,.mce-wordcount,.mce-close,#wp-link-wrap label,#wp-link-wrap h1) {color:#eaf2ee!important;text-shadow:none!important;}
html[data-ea-theme="dark"] body.eaew-body :is(.mce-btn:hover,.mce-btn.mce-active,.mce-menu-item:hover,.html-active .switch-html,.tmce-active .switch-tmce) {background:#203340!important;}
html[data-ea-theme="dark"] body.eaew-body .mce-caret {border-top-color:#b4c8bf!important;}
html[data-ea-theme="dark"] body.eaew-body .mce-colorbutton .mce-preview {border-color:#647f8e!important;}
html[data-ea-theme="dark"] .eaew .ea-geo-panel {--ea-geo-green:#8cdbb9;--ea-geo-text:#eaf2ee;--ea-geo-muted:#b4c8bf;--ea-geo-border:#3b4f5c;}
html[data-ea-theme="dark"] .eaew .ea-geo-panel .ea-geo-confirm {background:#21684e;color:#fff;}
html[data-ea-theme="dark"] .eaew .ea-geo-panel .ea-geo-confirm:hover {background:#174d3b;}
html[data-ea-theme="dark"] body.eaew-body :is(.media-modal-content,.media-frame-content,.media-frame-toolbar .media-toolbar,.media-frame-router,.media-sidebar,.media-frame-menu,.media-menu,.media-menu-item,.media-frame .attachments-browser .media-toolbar,.media-frame .uploader-inline,.media-frame .attachment-preview,.media-frame .attachment .filename,.media-frame .attachment-details,.media-frame .compat-item) {background:#192833!important;color:#eaf2ee!important;border-color:#3b4f5c!important;}
html[data-ea-theme="dark"] body.eaew-body :is(.media-modal h1,.media-modal h2,.media-modal h3,.media-modal label,.media-modal .setting span,.media-modal .attachment-details .details,.media-modal .description,.media-modal .media-menu-item,.media-modal .media-router a,.media-modal .media-modal-close,.media-modal .media-modal-close::before) {color:#eaf2ee!important;}
html[data-ea-theme="dark"] body.eaew-body .media-modal a {color:#8cdbb9!important;}
html[data-ea-theme="dark"] body.eaew-body :is(.media-menu .active,.media-menu-item:hover,.media-router .active) {background:#203340!important;border-color:#647f8e!important;}
html[data-ea-theme="dark"] body.eaew-body .media-modal .button {background:#203340;color:#eaf2ee;border-color:#647f8e;}
html[data-ea-theme="dark"] body.eaew-body .media-modal .button-primary {background:#21684e;color:#fff;border-color:#74bba3;}
html[data-ea-theme="dark"] body.eaew-body .media-modal .button:disabled {background:#203340!important;color:#b4c8bf!important;border-color:#3b4f5c!important;text-shadow:none!important;}

/* Keep existing category card outlines and separators visible in dark mode. */
html[data-ea-theme="dark"] body.category :is([data-ea-template] article,.ea-editorial-card,.ea-subcategory-card) {
  border-color:#647f8e!important;
}
