:root {
  --body-background-color: #111111;
  --body-font-color: #DADADA;
  
  --link-color: #989898;
  --alt-link-color:#005696;
  --alt-box-bg-color: rgba(0, 114, 206, 0.25);
  --content-background-color: #2F2F2F;
  --content-box-table-cell-border-color: #111111;
  --content-box-table-cell-active-text-color: white;
  --highlight-border-color: #4D4D4D;
  --button-color: #66bebe;
  --button-hover-color: #51a5a5;
  --button-text-color: #222222;
  --menu-active-bg: #222222;
  --logo-filter: invert(0.87);
  --category-menu-item-bg-color: #191919;
  --category-menu-view-more-button-bg-color: #222222;

  --smart-search-cont-bg-color: #222222;
  --smart-search-icon-stroke: #4D4D4D;
  --smart-search-item-bg-color-hover: #2F2F2F;

  --top-navigation-background-color: #2F2F2F;
  --top-navigation-selector-color: #DADADA;
  --top-navigation-selector-box-shadow-color: rgba(17, 17, 17, 0.1);
  --top-navigation-menu-border-color: #111111;
  --top-navigation-arrow-filter: brightness(0) invert(69%) sepia(7%) saturate(0%) hue-rotate(162deg) brightness(88%) contrast(83%);;
  
  --header-background-color: #111111;
  --header-tabs-icon-active-filter: brightness(1); 
  --header-search-form-title-color: #DADADA;
  --header-icon-fill: #989898;

  --form-disabled-background-color: #2F2F2F;
  --form-disabled-border-color: #c4c4c4;
  --form-checked-background-color: #51a5a5;
  --form-checked-background-color-hover: #51a5a5;
  --form-checked-background-color-active: #51a5a5;
  --form-checked-text-color: #222222;
  --form-background-color: #424242;
  --form-field-line-color: #51a5a5;
  --form-field-line-color-hover: #51a5a5;
  --form-field-line-color-focus: #51a5a5;
  --form-error-background-color: #742327;
  --form-error-text-color: #d7c0c0;

  --featured-no-sidebar-background-color: #222222;
  --featured-background-color: #222222;
  --featured-title-color: #ffffff;
  --featured-accounts-background-color: #222222;

  --listing-card-icon-color: #51a5a5;
  --listing-card-active-icon-color: #b3b3b3;

  --listing-print-icon: url("../img/print-dark.svg");
  --listing-favorite-icon: url("../img/like-dark.svg");
  --listing-favorite-icon-active: url("../img/like-dark-active.svg");
  --listing-compare-icon: url("../img/compare-dark.svg");
  --listing-compare-icon-active: url("../img/compare-dark-active.svg");
  --listing-gallery-media-background-color: #2e2e2e;
  --listing-mask-background-color: rgba(34, 34, 34, 0.6);
  --listing-thumbnail-background-color: #4D4D4D;
  --listing-background-color: #2F2F2F;

  --info-field-color: #999999;
  --empty-category-color: #DADADA;
  --fieldset-header-background-color: #2F2F2F;
  --icon-favorite-fill: #a8a8a8;
  --icon-favorite-fill-active: #51a5a5;
  --icon-filter: brightness(2.5);
  --icon-filter-background: brightness(0) invert(23%) sepia(90%) saturate(0%) hue-rotate(233deg) brightness(101%) contrast(90%);
  --icon-filter-img-background: brightness(0) invert(72%) sepia(99%) saturate(393%) hue-rotate(356deg) brightness(91%) contrast(83%);
  --upload-zone-background-color: #222222;
  --plans-border-color: #111111;
  --steps-background-color: #51a5a5;
  --popup-mask-background-color: rgba(0, 0, 0, 0.6);
  --table-list-border-color: #989898;
  --table-list-me-border-color: #989898;
  --tabs-active-background-color: #222222;
  --tabs-side-block-active-background-color: #111111;
  --tabs-side-block-border-color: #111111;
  --favorite-background-color: #222222;
  --listings-box-background-color: #2F2F2F;
  --placeholder-color: #989898;
  --border-color: #111111;
  --menu-shadow: 0 5px 17px rgba(17, 17, 17, 0.2), 0 17px 41px rgba(17, 17, 17, 0.2), 0 47px 80px rgba(17, 17, 17, 0.2);
  --dropdown-arrow: url("../img/dropdown-arrow-dark.svg");

  --card-corner-svg: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2017%2016%22%3E%3Cpath%20d%3D%22M0%200c8.837%200%2016%207.163%2016%2016h1V-1H0v1Z%22%20fill%3D%22%23222%22%2F%3E%3C%2Fsvg%3E');

  --footer-background-color: #2F2F2F;
  --footer-text-color: #989898;
  --footer-title-color: #DADADA;
  --footer-link-color: #989898;
  --footer-link-hover-color: #777777;
  --footer-link-active-color: #DADADA;
  --footer-icon-color: #707070;

  --invert: invert(1);
}

/* Custom (2026-07-25): dark-mode text for "bt-" content boxes (BioTechnologies etc.).
   Scoped to bt- section heading + intro that sit on the dark page bg; card text left alone. */
.content_block .bt-head h2 { color: #00ffff; }
.content_block .bt-crumb,
.content_block .bt-crumb a,
.content_block .bt-lede { color: #cdd6d9; }

/* Custom (2026-07-25): dark-mode logo — EMA #00ffff, ENGINEERING light grey.
   Swap to the dark SVG and drop the invert filter (which turned EMA orange). */
div#logo img { filter: none !important; content: url("../img/logo-dark.svg") !important; }

/* === Content-box dark-mode contrast fixes (2026-08-05) === */
/* These boxes hardcode light-mode text colors in their own inline <style>;
   the .content_block prefix out-specifies those inline rules in dark mode. */

/* Repligen featured box — title was #2c3e50 (navy), intro/section grey on black */
.content_block .ema-rp-section  { color: #c9d3d7; }
.content_block .ema-rp-title-lg { color: #f1f6f8; }
.content_block .ema-rp-intro    { color: #a7b3b9; }

/* Technology-partners strip — title was #1a1a1a (near-black) on black */
.content_block .ema-partners-h-title { color: #e7eef1; }
.content_block .ema-partners-h a { color: #6fc3cd; }
.content_block .ema-partners-h a:hover,
.content_block .ema-partners-h a:focus-visible { color: #a3dbe1; }
.content_block .ema-partners-h li:not(:last-child)::after { color: #5f6f77; }

/* Contact page (contact_us.tpl): headings/address lines hardcode dark ink
   (#28251D / #555) -> invisible on dark. .mt-contact prefix out-specifies
   the base .mt-* rules in style.css (which loads after dark.css). */
.mt-contact .mt-h       { color: #eef3f4; }
.mt-contact .mt-company { color: #dbe3e6; }
.mt-contact .mt-line    { color: #aab4b9; }

/* === Dark-mode readability: homepage boxes + news articles (2026-10-12) ===
   Homepage content boxes set #333/#666 ink in their own inline <style>; the
   .content_block prefix out-specifies them. White cards keep dark ink. */
.content_block .ema-section { color: #dadada; }
.content_block .ema-text    { color: #b9c3c8; }
.content_block .ema-title-lg { color: #6fc3cd; }
.content_block .ema-card    { color: #333; }
.content_block .ema-card .ema-text { color: #666; }

/* News article body (controllers/news/news.css defines light ink on .ema-news).
   html prefix beats the later-loading news.css variable block. */
html .ema-news {
  --ema-ink: #e4eaed;
  --ema-ink-soft: #b3bec4;
  --ema-accent: #6fc3cd;
  --ema-rule: #4d4d4d;
  --ema-tint: #262b2e;
}
html .ema-news-heading { color: #e4eaed; border-bottom-color: #4d4d4d; }

/* News listing cards (custom/news.css) */
html .ema-newsgrid { --ema-ink: #e4eaed; --ema-muted: #b3bec4; --ema-faint: #8f9ba2; --ema-border: #4d4d4d; --ema-teal: #6fc3cd; --ema-accent: #6fc3cd; --ema-accent-ink: #a3dbe1; }
.ema-newsgrid .ema-newscard { background: #2F2F2F; }
.ema-newsgrid .ema-newscard__media { background: #222; }
