/* Scoped Day/Night Mode — Day mode keeps customized light theme; Night mode applies unified dark surfaces & soft dark shadows. */
html[data-site-mood="night"]{color-scheme:dark}
html[data-site-mood="day"]{color-scheme:light}

/* Night mode CSS variable overrides (kills harsh white neumorphic glow halos) */
html[data-site-mood="night"],
html[data-site-mood="night"] body,
html[data-site-mood="night"] body.cms-public-body {
  --site-bg: #0f1623 !important;
  --site-background: #0f1623 !important;
  --site-card: #1b2434 !important;
  --site-surface-alt: #243044 !important;
  --site-text: #e6edf7 !important;
  --site-muted: #a6b6cc !important;
  --site-border: rgba(148,163,184,.24) !important;
  --site-primary: #60a5fa !important;
  --theme-bg: #0f1623 !important;
  --theme-panel-bg: #1b2434 !important;
  --theme-border: rgba(148,163,184,.24) !important;
  --theme-raised-shadow: 0 10px 26px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06) !important;
  --theme-small-shadow: 0 6px 16px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.05) !important;
  --nm-surface: #1b2434 !important;
  --nm-shadow: 0 10px 26px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06) !important;
  --gds-surface: #1b2434 !important;
  --gds-border: rgba(148,163,184,.24) !important;
  --gds-cms-card-surface: #1b2434 !important;
  --gds-cms-card-border: rgba(148,163,184,.24) !important;
  --gds-cms-card-shadow: 0 8px 22px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06) !important;
  --site-shadow: 0 8px 24px rgba(0,0,0,.42) !important;
  --ve-widget-background: #1b2434 !important;
  --cms-card-surface: #1b2434 !important;
  --cms-spacing-shadow: 0 8px 22px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06) !important;
  background: #0f1623 !important;
  color: #e6edf7 !important;
}

/* Header & Footer in Night Mode (clean dark elevation, no white glow) */
html[data-site-mood="night"] #header-placeholder .main-header,
html[data-site-mood="night"] footer,
html[data-site-mood="night"] .site-footer,
html[data-site-mood="night"] .footer-card,
html[data-site-mood="night"] .footer-box,
html[data-site-mood="night"] .footer-section,
html[data-site-mood="night"] footer :is(.card,.panel,.footer-col,.footer-widget) {
  background: #172030 !important;
  color: #e6edf7 !important;
  border-color: rgba(148,163,184,.22) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-site-mood="day"] :is(#siteLogo, img.logo, img[src*="/media/logo/"], #header-placeholder img, footer img) {
  filter: none !important;
}
html[data-site-mood="night"] :is(#siteLogo, img.logo, img[src*="/media/logo/"], #header-placeholder img, footer img) {
  filter: brightness(0) invert(1) !important;
}

/* Top Navigation Bar (#menu.menu) & Dropdowns in Night Mode */
html[data-site-mood="night"] #menu.menu,
html[data-site-mood="night"] nav.menu,
html[data-site-mood="night"] .site-menu-bar,
html[data-site-mood="night"] .navbar {
  background: #1b2434 !important;
  color: #e6edf7 !important;
  border-color: rgba(148,163,184,.22) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-site-mood="night"] #menu.menu :is(a, button, .menu-link, .dropbtn, .site-menu-account-guest, .site-menu-account-user),
html[data-site-mood="night"] nav.menu :is(a, button) {
  color: #e6edf7 !important;
}
html[data-site-mood="night"] #menu.menu :is(a:hover, button:hover, .menu-link:hover, .dropbtn:hover) {
  background: rgba(96,165,250,.16) !important;
  color: #93c5fd !important;
}
html[data-site-mood="night"] #menu.menu :is(.dropdown-content, .submenu, .sub-menu, ul ul) {
  background: #1e293b !important;
  border: 1px solid rgba(148,163,184,.26) !important;
  box-shadow: 0 14px 32px rgba(0,0,0,.55) !important;
}

/* All Page Builder Sections, Articles, Text Boxes, Image Cards & Custom Code Cards */
html[data-site-mood="night"] body.cms-public-body :is(
  .cms-panel, .panel, .card, .content-card, .cms-public-article,
  .cms-builder-section, .cms-builder-container,
  .cms-builder-widget,
  .cms-builder-widget.cms-builder-type-text,
  .cms-builder-widget.cms-builder-type-image,
  .cms-builder-widget.cms-custom-code-widget,
  .cms-builder-column.cms-column-show-more-host.cms-column-smart-scroll,
  .cms-builder-column.cms-column-show-more-host:not(.cms-column-smart-scroll) > .cms-builder-widget.cms-show-more-widget.cms-builder-type-text,
  .cms-post-card, .cms-callout, .cms-content-accordion, .cms-read-more-dialog
) {
  background: #1b2434 !important;
  background-color: #1b2434 !important;
  color: #e6edf7 !important;
  border-color: rgba(148,163,184,.24) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-site-mood="night"] body.cms-public-body .cms-builder-column.cms-column-show-more-host.cms-column-smart-scroll > .cms-builder-widget.cms-show-more-widget {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
html[data-site-mood="night"] body.cms-public-body :is(
  .cms-builder-widget p, .cms-builder-widget li, .cms-builder-widget span,
  .cms-builder-widget h1, .cms-builder-widget h2, .cms-builder-widget h3, .cms-builder-widget h4,
  .cms-content-image figcaption, .cms-public-article p, .cms-public-article h1, .cms-public-article h2
) {
  color: #e2eaf6 !important;
}
html[data-site-mood="night"] body.cms-public-body .cms-show-more-toggle {
  color: #60a5fa !important;
}

/* Pagination Buttons in Night Mode (no white glare) */
html[data-site-mood="night"] .pagination-container a,
html[data-site-mood="night"] .pagination a {
  background: #1b2434 !important;
  color: #e6edf7 !important;
  border: 1px solid rgba(148,163,184,.28) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.4) !important;
}
html[data-site-mood="night"] .pagination-container a.active,
html[data-site-mood="night"] .pagination a.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(37,99,235,.45) !important;
}
html[data-site-mood="night"] .pagination-container a:hover:not(.active),
html[data-site-mood="night"] .pagination a:hover:not(.active) {
  background: #243044 !important;
  border-color: #60a5fa !important;
}

/* Form controls in Night Mode */
html[data-site-mood="night"] body.cms-public-body :is(input,select,textarea){background:#1e293b!important;color:#e6edf7!important;border-color:rgba(148,163,184,.3)!important}

/* Fix bright readable text inside Text Boxes (.cms-content-text / .cms-show-more-content) & dark iframe canvas */
html[data-site-mood="night"] body.cms-public-body :is(
  .cms-content-text, .cms-show-more-content, .cms-content-heading, .cms-content-quote,
  .cms-builder-type-text, .cms-builder-type-text :not(a):not(button)
) {
  color: #eef4fc !important;
}
html[data-site-mood="night"] body.cms-public-body .cms-page-builder-photo-gallery-code,
html[data-site-mood="night"] body.cms-public-body .cms-page-builder-photo-gallery-code > iframe.cms-custom-code-frame {
  background: #1b2434 !important;
  color-scheme: dark !important;
}

/* Bare icon-only Day/Night toggle beside Login/Account — matches menu icon color, zero hover box/shadow */
#menu.menu > .menu-right[data-site-layout-item="account"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}
#menu.menu .site-mood-toggle,
.site-mood-toggle,
#menu.menu .site-mood-toggle:hover,
.site-mood-toggle:hover,
#menu.menu .site-mood-toggle:active,
.site-mood-toggle:active,
#menu.menu .site-mood-toggle:focus {
  box-sizing: content-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  color: var(--site-primary, #2878f4) !important;
  cursor: pointer !important;
  transition: none !important;
  outline: none !important;
}
.site-mood-toggle svg {
  width: 19px !important;
  height: 19px !important;
  display: block !important;
  pointer-events: none !important;
}
.site-mood-toggle:focus-visible {
  outline: 1px dotted var(--site-primary, #2878f4) !important;
  outline-offset: 2px !important;
}
html[data-site-mood="night"] #menu.menu .site-mood-toggle,
html[data-site-mood="night"] .site-mood-toggle,
html[data-site-mood="night"] #menu.menu .site-mood-toggle:hover,
html[data-site-mood="night"] .site-mood-toggle:hover {
  color: #fbbf24 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Keep the top header flush with the viewport on ALL public pages (matches Page 1) */
body.cms-public-body,
body.cms-public-body > #header-placeholder,
body.cms-public-body #header-placeholder > .main-header {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
body.cms-public-body,
body.cms-public-body > #header-placeholder {
  padding-top: 0 !important;
  padding-block-start: 0 !important;
}

/* Razor-clean 4 rounded corners on Homepage Banner (Day & Night mode, zero corner artifacts) */
body.cms-public-body .cms-home-banner-code {
  overflow: hidden !important;
}
body.cms-public-body .cms-home-banner-code > iframe.cms-custom-code-frame {
  border-radius: 14px !important;
  overflow: hidden !important;
  background: transparent !important;
  display: block !important;
}
html[data-site-mood="night"] body.cms-public-body .cms-home-banner-code > iframe.cms-custom-code-frame {
  color-scheme: dark !important;
  background: #1b2434 !important;
}

/* Quick Search Bar, Shortcut Pills, Search Input & Category Menu in Night Mode */
html[data-site-mood="night"] #navSearchInput {
  background: #1e293b !important;
  color: #eef4fc !important;
  border-color: rgba(148,163,184,.32) !important;
}
html[data-site-mood="night"] #navSearchInput::placeholder {
  color: #94a3b8 !important;
}
html[data-site-mood="night"] #navSearchCategoryButton {
  background: #1e293b !important;
  color: #eef4fc !important;
  border-color: rgba(148,163,184,.32) !important;
}
html[data-site-mood="night"] #navSearchCategoryButton :is(span, svg) {
  color: #eef4fc !important;
}
html[data-site-mood="night"] #navSearchCategoryMenu {
  background: #1b2434 !important;
  border-color: rgba(148,163,184,.28) !important;
  box-shadow: 0 14px 32px rgba(0,0,0,.55) !important;
}
html[data-site-mood="night"] .nav-search-category-option {
  background: transparent !important;
  color: #e6edf7 !important;
}
html[data-site-mood="night"] .nav-search-category-option:hover,
html[data-site-mood="night"] .nav-search-category-option.is-selected {
  background: rgba(96,165,250,.18) !important;
  color: #ffffff !important;
}
html[data-site-mood="night"] #navSearchDiscovery,
html[data-site-mood="night"] #navSearchQuickRow {
  background: transparent !important;
}
html[data-site-mood="night"] #menu.menu a.nav-search-shortcut,
html[data-site-mood="night"] a.nav-search-shortcut {
  background: #222e42 !important;
  color: #eef4fc !important;
  border: 1px solid rgba(148,163,184,.32) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.35) !important;
}
html[data-site-mood="night"] #menu.menu a.nav-search-shortcut span,
html[data-site-mood="night"] a.nav-search-shortcut span {
  color: #eef4fc !important;
}
html[data-site-mood="night"] #menu.menu a.nav-search-shortcut .nav-search-shortcut-icon,
html[data-site-mood="night"] a.nav-search-shortcut .nav-search-shortcut-icon {
  color: #60a5fa !important;
}
html[data-site-mood="night"] #menu.menu a.nav-search-shortcut:hover,
html[data-site-mood="night"] a.nav-search-shortcut:hover {
  background: #2b3b54 !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}
html[data-site-mood="night"] .nav-search-quick-arrow {
  background: #1e293b !important;
  color: #93c5fd !important;
  border-color: rgba(148,163,184,.28) !important;
}

/* High-specificity Night Mode override for Search Input & All Category Pill inside #menu.menu */
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill:not([hidden]),
html[data-site-mood="night"] #menu.menu.mobile-search-open > .menu-left .nav-search-pill {
  background: transparent !important;
}
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill > #navSearchInput:not([hidden]),
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill > #navSearchInput:not([hidden]):focus,
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill > #navSearchInput:not([hidden]):focus-visible {
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: #eef4fc !important;
  border: 1px solid rgba(148,163,184,.34) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.35) !important;
  caret-color: #60a5fa !important;
}
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill > #navSearchInput:not([hidden]):focus {
  border-color: #60a5fa !important;
}
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill > #navSearchInput::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill .nav-search-category-wrap > #navSearchCategoryButton,
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill #navSearchCategoryButton,
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill #navSearchCategoryButton:hover {
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: #eef4fc !important;
  border: 1px solid rgba(148,163,184,.34) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.35) !important;
}
html[data-site-mood="night"] #menu.menu .menu-left .nav-search-pill #navSearchCategoryButton :is(span, svg) {
  color: #eef4fc !important;
  stroke: #93c5fd !important;
}

/* High-specificity footer logo Day (black) / Night (pure white) */
html[data-site-mood="day"] body #footer-placeholder #site-footer .footer-logo img,
html[data-site-mood="day"] body #site-footer.footer-adaptive-enabled .footer-logo img,
html[data-site-mood="day"] body img[data-site-setting="footer.logoPath"] {
  filter: none !important;
  -webkit-filter: none !important;
}
html[data-site-mood="night"] body #footer-placeholder #site-footer .footer-logo img,
html[data-site-mood="night"] body #site-footer.footer-adaptive-enabled .footer-logo img,
html[data-site-mood="night"] body img[data-site-setting="footer.logoPath"] {
  filter: brightness(0) invert(1) !important;
  -webkit-filter: brightness(0) invert(1) !important;
}

/* High-specificity Night Mode rules for Dropdown Submenu Cards (.nm-submenu) & Hovered Menu Pills */
html[data-site-mood="night"] body #menu.menu .nm-submenu,
html[data-site-mood="night"] body #menu.menu[data-site-layout-ready="1"] .nm-submenu,
html[data-site-mood="night"] body #menu.menu .dropdown-content,
html[data-site-mood="night"] body #menu.menu ul ul {
  background: #1b2434 !important;
  background-color: #1b2434 !important;
  border: 1px solid rgba(148,163,184,.28) !important;
  box-shadow: 0 14px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-site-mood="night"] body #menu.menu .nm-submenu :is(a, button, span, li, .nm-menu-link),
html[data-site-mood="night"] body #menu.menu[data-site-layout-ready="1"] .nm-submenu :is(a, button, span, .nm-menu-link) {
  color: #eef4fc !important;
}
html[data-site-mood="night"] body #menu.menu .nm-submenu :is(a, .nm-menu-link) :is(i, svg) {
  color: #60a5fa !important;
}
html[data-site-mood="night"] body #menu.menu .nm-submenu :is(a:hover, button:hover, .nm-menu-link:hover, .nm-menu-item:hover > a) {
  background: rgba(96,165,250,.18) !important;
  background-color: rgba(96,165,250,.18) !important;
  color: #ffffff !important;
}
/* Prevent top-level hovered/active menu item pills from turning bright white in Night Mode */
html[data-site-mood="night"] body #menu.menu .nm-menu-item:hover > a,
html[data-site-mood="night"] body #menu.menu .nm-menu-item.open > a,
html[data-site-mood="night"] body #menu.menu .nm-menu-item > a:hover,
html[data-site-mood="night"] body #menu.menu[data-site-layout-ready="1"] .nm-menu-item:hover > a,
html[data-site-mood="night"] body #menu.menu[data-site-layout-ready="1"] .nm-menu-item.open > a {
  background: rgba(96,165,250,.18) !important;
  background-color: rgba(96,165,250,.18) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] body #menu.menu .nm-menu-item:hover > a span,
html[data-site-mood="night"] body #menu.menu .nm-menu-item.open > a span {
  color: #ffffff !important;
}
html[data-site-mood="night"] body #menu.menu .nm-submenu-toggle,
html[data-site-mood="night"] body #menu.menu .nm-submenu-toggle:hover {
  background: transparent !important;
  color: #93c5fd !important;
  box-shadow: none !important;
}

/* High-specificity Night Mode rules for Locked / Open Menu & Submenu Items (.is-locked, .is-open) */
html[data-site-mood="night"] body #menu.menu[data-site-layout-group="menu"] .nm-menu-item:is(.is-open,.is-locked,[data-auto-locked="1"],:hover) > :is(a, .nm-menu-link),
html[data-site-mood="night"] body #menu.menu[data-site-layout-group="menu"] .nm-submenu .nm-menu-item:is(.is-open,.is-locked,[data-auto-locked="1"],:hover) > :is(a, .nm-menu-link),
html[data-site-mood="night"] body #menu.menu .nm-menu-item:is(.is-open,.is-locked,[data-auto-locked="1"]) > :is(a, .nm-menu-link),
html[data-site-mood="night"] body #menu.menu .nm-submenu .nm-menu-item:is(.is-open,.is-locked,[data-auto-locked="1"]) > :is(a, .nm-menu-link) {
  background: #253652 !important;
  background-color: #253652 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: rgba(96,165,250,.45) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.35) !important;
}
html[data-site-mood="night"] body #menu.menu .nm-menu-item:is(.is-open,.is-locked,[data-auto-locked="1"]) > :is(a, .nm-menu-link) span {
  color: #ffffff !important;
}
html[data-site-mood="night"] body #menu.menu .nm-menu-item:is(.is-open,.is-locked,[data-auto-locked="1"]) > :is(a, .nm-menu-link) :is(i, svg) {
  color: #60a5fa !important;
}
html[data-site-mood="night"] body #menu.menu .nm-menu-item:is(.is-open,.is-locked) > .nm-submenu-toggle,
html[data-site-mood="night"] body #menu.menu .nm-submenu-toggle[aria-pressed="true"] {
  background: transparent !important;
  color: #60a5fa !important;
  box-shadow: none !important;
}

/* Flush top header on ALL pages (including Free & Paid Tools pages) */
body:has(> #header-placeholder),
body > #header-placeholder,
#header-placeholder > .main-header {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
body:has(> #header-placeholder),
body > #header-placeholder {
  padding-top: 0 !important;
  padding-block-start: 0 !important;
}

/* Full Night Mode styling for Free & Paid Tools pages (app.php) */
html[data-site-mood="night"] body :is(.card, .panel, .tool-card, .box) {
  background: #1b2434 !important;
  background-color: #1b2434 !important;
  color: #e6edf7 !important;
  border-color: rgba(148,163,184,.24) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-site-mood="night"] body :is(.stat, .status, .notice, .preview-wrap, .table-wrap) {
  background: #222e42 !important;
  color: #e6edf7 !important;
  border-color: rgba(148,163,184,.26) !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] body .card :is(h1, h2, h3, h4, label, p, span, div, strong, small, .k, .v, th, td) {
  color: #e6edf7 !important;
}
html[data-site-mood="night"] body .card :is(.muted, .hint, .sub, .k, small) {
  color: #a6b6cc !important;
}
html[data-site-mood="night"] body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: #162030 !important;
  color: #eef4fc !important;
  border-color: rgba(148,163,184,.34) !important;
}
html[data-site-mood="night"] body .card button:not(.primary):not(.btn-primary):not(.site-mood-toggle):not(.nm-submenu-toggle) {
  background: #243247 !important;
  color: #eef4fc !important;
  border-color: rgba(148,163,184,.34) !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] body .card button:not(.primary):not(.btn-primary):not(.site-mood-toggle):hover {
  background: #2d3f5a !important;
  border-color: #60a5fa !important;
}
html[data-site-mood="night"] body table,
html[data-site-mood="night"] body th,
html[data-site-mood="night"] body td {
  background-color: transparent !important;
  border-color: rgba(148,163,184,.22) !important;
  color: #e6edf7 !important;
}
html[data-site-mood="night"] body thead th {
  background: #222e42 !important;
}
html[data-site-mood="night"] body .hero :is(.pill, .badge, .chip, .tag) {
  background: rgba(15,23,42,.38) !important;
  color: #eef4fc !important;
  border: 1px solid rgba(255,255,255,.28) !important;
}
html[data-site-mood="night"] body .hero :is(h1, h2, p) {
  color: #ffffff !important;
}

/* Night Mode for tool info/note boxes & progress track */
html[data-site-mood="night"] body .idp-wrap :is(.note, .note, .info, .tip, .callout, .help-box, .helper-box, .progress) {
  background: #222e42 !important;
  background-color: #222e42 !important;
  color: #dbe6f5 !important;
  border-color: rgba(148,163,184,.28) !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] body .idp-wrap .progress > div {
  background: linear-gradient(90deg, #3b82f6, #60a5fa) !important;
}

/* Night Mode for Tool Hero Banner (.idp-wrap .hero) */
html[data-site-mood="night"] body .idp-wrap .hero,
html[data-site-mood="night"] body .hero {
  background: linear-gradient(135deg, #1b2840 0%, #152033 100%) !important;
  background-color: #1b2840 !important;
  border: 1px solid rgba(96,165,250,.28) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06) !important;
  color: #eef4fc !important;
}
html[data-site-mood="night"] body .idp-wrap .hero h1,
html[data-site-mood="night"] body .hero h1 {
  color: #ffffff !important;
}
html[data-site-mood="night"] body .idp-wrap .hero p,
html[data-site-mood="night"] body .hero p {
  color: #b5c6dc !important;
}
html[data-site-mood="night"] body .idp-wrap .hero :is(.pill, .badge, .chip, .tag),
html[data-site-mood="night"] body .hero :is(.pill, .badge, .chip, .tag) {
  background: #23334c !important;
  color: #dbeafe !important;
  border: 1px solid rgba(96,165,250,.32) !important;
  box-shadow: none !important;
}

/* ==========================================================================
   MOBILE MODE POLISH (<= 767px)
   - Center Company Name at exact middle of header, push smaller Logo far left
   - Day (Sun) & Night (Moon) icons left/right of collapse chevron (no border/shadow)
   - Remove round shadow/bg from collapse chevron
   - Hide duplicate Login/Register & Day/Night in .menu-right on mobile
   - Match #mobileMenuLogin border to Search, Home & Pause buttons
   - Fix unreadable text in mobile scrolling menu pills, quick search pills & submenu arrows
   ========================================================================== */
.mobile-mood-expand-row {
  display: none;
}
@media (max-width: 767px) {
  /* 1. Exact centered Company Name + far-left compact Logo */
  #header-placeholder .main-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 10px !important;
    min-height: 66px !important;
    box-sizing: border-box !important;
  }
  #header-placeholder .main-header .logo-section {
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 34px !important;
    max-width: 34px !important;
    flex: 0 0 auto !important;
    z-index: 2 !important;
  }
  #header-placeholder .main-header .logo-section a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }
  #header-placeholder .main-header .logo-section img,
  #header-placeholder .main-header #siteLogo {
    max-height: 30px !important;
    max-width: 34px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }
  #header-placeholder .main-header .info-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 46px !important;
    min-width: 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  #header-placeholder .main-header .info-section h1 {
    font-size: clamp(14px, 4.1vw, 17px) !important;
    line-height: 1.2 !important;
    margin: 0 0 2px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  #header-placeholder .main-header .info-section .header-identity-subtitle {
    font-size: clamp(9px, 2.55vw, 11px) !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    text-align: center !important;
  }
  #header-placeholder .main-header .info-section .header-identity-location {
    font-size: clamp(9px, 2.4vw, 10.5px) !important;
    line-height: 1.2 !important;
    margin: 1px 0 0 !important;
    text-align: center !important;
  }

  /* 2. Hide duplicate Login/Register & desktop toggle inside .menu-right on mobile */
  #menu.menu > .menu-right,
  #menu.menu.active > .menu-right,
  #menu.menu > .menu-right[data-site-layout-item="account"],
  #menu.menu.active > .menu-right[data-site-layout-item="account"] {
    display: none !important;
  }

  /* 3. Clean Day (Sun) + Collapse Chevron + Night (Moon) row — ZERO border, ZERO shadow */
  #menu.menu .mobile-mood-expand-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 22px !important;
    width: 100% !important;
    margin: 4px 0 2px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  #menu.menu #mobileMenuExpandToggle,
  #menu.menu .mobile-menu-expand,
  #menu.menu #mobileMenuExpandToggle:hover,
  #menu.menu #mobileMenuExpandToggle:active,
  #menu.menu #mobileMenuExpandToggle[aria-expanded="true"] {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #menu.menu .mobile-mood-icon-btn,
  #menu.menu .mobile-mood-icon-btn:hover,
  #menu.menu .mobile-mood-icon-btn:active,
  #menu.menu .mobile-mood-icon-btn:focus {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    cursor: pointer !important;
    outline: none !important;
    opacity: .5 !important;
  }
  #menu.menu .mobile-mood-icon-btn svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
    pointer-events: none !important;
  }
  #menu.menu .mobile-mood-icon-day {
    color: #f59e0b !important;
  }
  #menu.menu .mobile-mood-icon-night {
    color: var(--site-primary, #2878f4) !important;
  }
  #menu.menu .mobile-mood-icon-btn.is-active-mood {
    opacity: 1 !important;
  }
  html[data-site-mood="night"] #menu.menu .mobile-mood-icon-day {
    color: #fbbf24 !important;
  }
  html[data-site-mood="night"] #menu.menu .mobile-mood-icon-night {
    color: #60a5fa !important;
  }

  /* 4. Give #mobileMenuLogin the EXACT same rounded-square border as Search, Home & Pause buttons */
  #menu.menu .mobile-menu-topline > #mobileMenuLogin,
  #menu.menu .mobile-menu-topline > a.mobile-menu-login.site-menu-account-icon {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(40,120,244,.32) !important;
    background: #edf2f8 !important;
    color: var(--site-primary, #2878f4) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  html[data-site-mood="night"] #menu.menu .mobile-menu-topline > #mobileMenuLogin,
  html[data-site-mood="night"] #menu.menu .mobile-menu-topline > a.mobile-menu-login.site-menu-account-icon {
    border: 1px solid rgba(226,232,240,.55) !important;
    background: #1e293b !important;
    color: #eef4fc !important;
    box-shadow: none !important;
  }
  html[data-site-mood="night"] #menu.menu .mobile-menu-topline > #mobileMenuLogin svg {
    color: #eef4fc !important;
    stroke: #eef4fc !important;
  }

  /* 5. Night Mode fixes for Mobile Scrolling Menu Strip, Quick Search Pills & Expanded Submenu Arrows */
  html[data-site-mood="night"] #menu.menu .mobile-menu-viewport,
  html[data-site-mood="night"] #menu.menu #mobileMenuViewport {
    background: #141d2b !important;
    border: 1px solid rgba(148,163,184,.28) !important;
    box-shadow: none !important;
  }
  html[data-site-mood="night"] #menu.menu #mobileMenuTrack :is(a, button, .mobile-menu-chip, .mobile-menu-pill, .nm-menu-link) {
    background: #222e42 !important;
    background-color: #222e42 !important;
    color: #eef4fc !important;
    border: 1px solid rgba(148,163,184,.32) !important;
    box-shadow: none !important;
  }
  html[data-site-mood="night"] #menu.menu #mobileMenuTrack :is(a, button) span {
    color: #eef4fc !important;
  }
  html[data-site-mood="night"] #menu.menu #mobileMenuTrack :is(a, button) :is(i, svg) {
    color: #60a5fa !important;
  }
  html[data-site-mood="night"] #menu.menu .mobile-menu-topline > :is(.mobile-menu-search, .mobile-menu-home, .mobile-menu-motion) {
    background: #1e293b !important;
    color: #eef4fc !important;
    border: 1px solid rgba(226,232,240,.55) !important;
    box-shadow: none !important;
  }
  html[data-site-mood="night"] #menu.menu #navSearchDiscovery a.nav-search-shortcut,
  html[data-site-mood="night"] #menu.menu #navSearchQuickTrack a.nav-search-shortcut {
    background: #222e42 !important;
    background-color: #222e42 !important;
    color: #eef4fc !important;
    border: 1px solid rgba(148,163,184,.34) !important;
    box-shadow: none !important;
  }
  html[data-site-mood="night"] #menu.menu #navSearchDiscovery a.nav-search-shortcut span,
  html[data-site-mood="night"] #menu.menu #navSearchQuickTrack a.nav-search-shortcut span {
    color: #eef4fc !important;
  }
  html[data-site-mood="night"] #menu.menu.active .nm-menu-item > .nm-submenu-toggle,
  html[data-site-mood="night"] #menu.menu .nm-menu-item > .nm-submenu-toggle {
    background: #222e42 !important;
    background-color: #222e42 !important;
    color: #93c5fd !important;
    border: 1px solid rgba(148,163,184,.3) !important;
    box-shadow: none !important;
  }
  html[data-site-mood="night"] #menu.menu #mobileMenuExpandToggle svg {
    color: #cbd5e1 !important;
    stroke: #cbd5e1 !important;
  }
}

/* High-specificity Night Mode for Search Category Dropdown (#navSearchCategoryMenu) */
html[data-site-mood="night"] body #menu.menu .nav-search-category-wrap #navSearchCategoryMenu,
html[data-site-mood="night"] body #menu.menu .nav-search-category-menu,
html[data-site-mood="night"] body #navSearchCategoryMenu {
  background: #1b2434 !important;
  background-color: #1b2434 !important;
  color: #eef4fc !important;
  border: 1px solid rgba(148,163,184,.32) !important;
  box-shadow: 0 16px 36px rgba(0,0,0,.6) !important;
}
html[data-site-mood="night"] body #menu.menu .nav-search-category-search,
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-search {
  background: #141d2b !important;
  border: 1px solid rgba(148,163,184,.34) !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] body #menu.menu #navSearchCategorySearch,
html[data-site-mood="night"] body #navSearchCategorySearch {
  background: transparent !important;
  background-color: transparent !important;
  color: #eef4fc !important;
  border: 0 !important;
}
html[data-site-mood="night"] body #navSearchCategorySearch::placeholder {
  color: #94a3b8 !important;
}
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-search svg {
  color: #60a5fa !important;
  stroke: #60a5fa !important;
}
html[data-site-mood="night"] body #menu.menu .nav-search-category-options,
html[data-site-mood="night"] body #navSearchCategoryOptions {
  background: transparent !important;
}
html[data-site-mood="night"] body #menu.menu .nav-search-category-option,
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-option {
  background: transparent !important;
  background-color: transparent !important;
  color: #e6edf7 !important;
  border-color: transparent !important;
}
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-option span {
  color: #e6edf7 !important;
}
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-option svg {
  color: #60a5fa !important;
  stroke: #60a5fa !important;
}
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-option:hover,
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-option.is-selected {
  background: rgba(96,165,250,.18) !important;
  background-color: rgba(96,165,250,.18) !important;
  color: #ffffff !important;
}
html[data-site-mood="night"] body #navSearchCategoryMenu .nav-search-category-empty {
  color: #94a3b8 !important;
}

/* Prevent deep nested submenus on right-side menu items from clipping off the right screen edge */
@media (min-width: 768px) {
  /* Dynamic flip only when JS detects insufficient right-side viewport space */
  #menu.menu .nm-submenu .nm-submenu {
    left: calc(100% + 4px) !important;
    right: auto !important;
    margin-left: 0 !important;
  }
  #menu.menu .nm-submenu .nm-submenu.nm-submenu-flip-left {
    left: auto !important;
    right: calc(100% + 4px) !important;
    margin-right: 0 !important;
  }
}

/* ==========================================================================
   EXECUTIVE LOGO ANIMATION:
   1. Smooth slow entry from the far left edge of the monitor into position
   2. Periodic smooth 3D left-to-right spin (rotateY 0 -> 360deg)
   3. Radiant shadow-light glow on hover (Day: blue light, Night: bright white-blue light)
   ========================================================================== */
@keyframes cmsLogoEnterFromLeft {
  0% { opacity: 0; transform: translateX(-34vw); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes cmsLogoSpinLeftToRight {
  0%, 92% { transform: rotateY(0deg); }
  99.5%, 100% { transform: rotateY(360deg); }
}
#header-placeholder .main-header {
  overflow-x: clip !important;
}
#header-placeholder .main-header .logo-section {
  perspective: 720px !important;
  overflow: visible !important;
}
#header-placeholder .main-header .logo-section a {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  animation: cmsLogoEnterFromLeft 3s cubic-bezier(.22, 1, .36, 1) both !important;
}
#header-placeholder .main-header .logo-section a::after {
  display: none !important;
}
#header-placeholder .main-header .logo-section img,
#header-placeholder .main-header #siteLogo {
  transform-style: preserve-3d !important;
  backface-visibility: visible !important;
  animation: cmsLogoSpinLeftToRight 21s cubic-bezier(.45, .05, .55, .95) 4.5s infinite !important;
  transition: filter .28s ease, transform .28s ease !important;
  will-change: transform, filter;
}
#header-placeholder .main-header .logo-section a:hover img,
#header-placeholder .main-header .logo-section a:hover #siteLogo {
  animation-play-state: paused !important;
}
/* Radiant light-shadow glow on hover in Day Mode */
html[data-site-mood="day"] #header-placeholder .main-header .logo-section a:hover img,
html:not([data-site-mood="night"]) #header-placeholder .main-header .logo-section a:hover img {
  filter: drop-shadow(0 0 12px rgba(40,120,244,.88)) drop-shadow(0 0 26px rgba(96,165,250,.65)) !important;
}
/* Radiant light-shadow glow on hover in Night Mode */
html[data-site-mood="night"] #header-placeholder .main-header .logo-section a:hover img,
html[data-site-mood="night"] #header-placeholder .main-header .logo-section a:hover #siteLogo {
  filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(96,165,250,1)) drop-shadow(0 0 28px rgba(255,255,255,.82)) !important;
}
@media (prefers-reduced-motion: reduce) {
  #header-placeholder .main-header .logo-section a,
  #header-placeholder .main-header .logo-section img,
  #header-placeholder .main-header #siteLogo {
    animation: none !important;
  }
}

/* Mobile (<= 767px): stack Page Builder multi-column & nested grids cleanly into 1 full-width column (zero empty gaps under images) */
@media (max-width: 767px) {
  body.cms-public-body .cms-builder-columns,
  body.cms-public-body .cms-builder-columns > .cms-builder-columns-inner {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 14px !important;
    column-gap: 0 !important;
    align-items: stretch !important;
  }
  body.cms-public-body .cms-builder-columns > .cms-builder-columns-inner > .cms-builder-column {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }
  body.cms-public-body .cms-builder-column > .cms-builder-widget.cms-builder-type-image,
  body.cms-public-body .cms-builder-column > .cms-builder-widget.cms-builder-type-text {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

/* Mobile (<= 767px): keep Logo cleanly visible at left:12px ABOVE header layers (never clipped or hidden behind .info-section) */
@media (max-width: 767px) {
  #header-placeholder .main-header .logo-section {
    position: absolute !important;
    left: 12px !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    z-index: 20 !important;
    width: auto !important;
    max-width: 44px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  #header-placeholder .main-header .logo-section a,
  #header-placeholder .main-header .logo-section .site-logo-picture {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #header-placeholder .main-header .logo-section img,
  #header-placeholder .main-header #siteLogo {
    display: block !important;
    width: 34px !important;
    max-width: 34px !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
  }
  #header-placeholder .main-header .info-section {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
    padding: 0 54px !important;
  }
}

/* ==========================================================================
   BATCH 1 UI & UX FIXES (Menu Cards, Hover Bridge, Uniform Colors, Search Night)
   ========================================================================== */

/* 1. Tidy Desktop Submenu Cards + Invisible Hover Bridge (zero accidental close) */
@media (min-width: 768px) {
  #menu.menu .nm-menu-item.has-children {
    position: relative !important;
  }
  #menu.menu .nm-menu-item.has-children.is-hover-open {
    z-index: 10040 !important;
  }
  #menu.menu .nm-menu-item.is-hover-open > .nm-submenu {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  #menu.menu .nm-submenu {
    min-width: 215px !important;
    padding: 6px !important;
    border-radius: 14px !important;
    top: calc(100% + 6px) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14) !important;
  }
  /* Invisible top bridge covering the 6px gap below top-level menu item */
  #menu.menu .nm-submenu::before {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: -12px;
    height: 14px;
    background: transparent;
    pointer-events: auto;
  }
  /* Invisible side bridge for nested submenus (both right-opening and left-flipped) */
  #menu.menu .nm-submenu .nm-submenu {
    top: -6px !important;
  }
  #menu.menu .nm-submenu .nm-submenu::before {
    top: -10px;
    bottom: -10px;
    height: auto;
    left: -14px;
    right: auto;
    width: 16px;
  }
  #menu.menu .nm-submenu .nm-submenu.nm-submenu-flip-left::before {
    left: auto;
    right: -14px;
    width: 16px;
  }
  #menu.menu .nm-submenu .nm-menu-link {
    border-radius: 10px !important;
    padding: 9px 12px !important;
    white-space: nowrap !important;
    transition: background-color .16s ease, color .16s ease !important;
  }
}

/* 2. Uniform Menu Bar Icon & Text Color (Day Mode = #17243c, Night Mode = #e6edf7) */
html:not([data-site-mood="night"]) #menu.menu :is(.nm-menu-link, .nm-menu-link span, .nm-menu-link i, .nm-menu-link svg, .nm-menu-icon, .nm-menu-icon i, .nm-menu-icon svg, .nm-menu-caret, .nm-submenu-toggle, .menu-right a, .menu-right button, .menu-right i, .menu-right svg, .menu-left > button, .menu-left > a, .menu-left > button i, .menu-left > button svg, .site-mood-toggle, .site-mood-toggle svg) {
  color: #17243c !important;
}
html:not([data-site-mood="night"]) #menu.menu :is(.nm-menu-link:hover, .nm-menu-link:hover span, .nm-menu-link:hover i, .nm-menu-link:hover svg, .nm-menu-item.is-hover-open > .nm-menu-link, .nm-menu-item.is-hover-open > .nm-menu-link span, .nm-menu-item.is-hover-open > .nm-menu-link i, .nm-menu-item.is-hover-open > .nm-menu-link svg, .menu-right a:hover, .menu-right a:hover i, .menu-right a:hover svg) {
  color: #1d4ed8 !important;
}

html[data-site-mood="night"] #menu.menu :is(.nm-menu-link, .nm-menu-link span, .nm-menu-link i, .nm-menu-link svg, .nm-menu-icon, .nm-menu-icon i, .nm-menu-icon svg, .nm-menu-caret, .nm-submenu-toggle, .menu-right a, .menu-right button, .menu-right i, .menu-right svg, .menu-left > button, .menu-left > a, .menu-left > button i, .menu-left > button svg, .site-mood-toggle, .site-mood-toggle svg) {
  color: #e6edf7 !important;
}
html[data-site-mood="night"] #menu.menu :is(.nm-menu-link:hover, .nm-menu-link:hover span, .nm-menu-link:hover i, .nm-menu-link:hover svg, .nm-menu-item.is-hover-open > .nm-menu-link, .nm-menu-item.is-hover-open > .nm-menu-link span, .nm-menu-item.is-hover-open > .nm-menu-link i, .nm-menu-item.is-hover-open > .nm-menu-link svg, .menu-right a:hover, .menu-right a:hover i, .menu-right a:hover svg) {
  color: #60a5fa !important;
}

/* 3. Night Mode Search Suggestions Dropdown Panel (#navSearchSuggestions) */
html[data-site-mood="night"] body #menu.menu #navSearchSuggestions,
html[data-site-mood="night"] body #navSearchSuggestions {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.58) !important;
  color: #f1f5f9 !important;
}
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion {
  background: transparent !important;
  color: #f1f5f9 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion:hover,
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion:focus-visible,
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion.is-active {
  background: #1e293b !important;
  color: #ffffff !important;
}
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-copy,
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-copy strong,
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-title {
  color: #f1f5f9 !important;
}
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-kind {
  color: #94a3b8 !important;
}
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-icon,
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-icon :is(i, svg) {
  background: #1e293b !important;
  color: #60a5fa !important;
  border-color: #334155 !important;
}
html[data-site-mood="night"] body #navSearchSuggestions .nav-search-suggestion-empty {
  color: #94a3b8 !important;
}


/* ============================================================================
 * Dot-to-Dot Maker (#d2d-app) Night Mode Polish (keeps drawing canvas white)
 * ============================================================================ */
html[data-site-mood="night"] #d2d-app {
  --paper: #131c2e !important;
  --soft: #162135 !important;
  --mint: #1f2e4a !important;
  --edge: rgba(148, 163, 184, 0.24) !important;
  --ink: #e2e8f0 !important;
  --muted: #94a3b8 !important;
  color: #e2e8f0 !important;
}
html[data-site-mood="night"] #d2d-app :is(.d2d-modebar, .d2d-canvas-tip, .d2d-accordion-header, .d2d-accordion-content, .d2d-stat, .d2d-canvas-color-controls, .d2d-spacing-settings, .d2d-joint-help, .d2d-dot-menu, .d2d-spacing-preview, .d2d-skip-menu) {
  background: #131c2e !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}
html[data-site-mood="night"] #d2d-app .d2d-stage-wrap {
  background: #0b1120 !important;
}
html[data-site-mood="night"] #d2d-app .d2d-stage {
  background: #ffffff !important;
}
html[data-site-mood="night"] #d2d-app :is(button, .d2d-file-label, .d2d-control-hub button, .d2d-control-hub .d2d-file-label, .d2d-dot-menu button, .d2d-cancel-spacing):not(.d2d-primary):not(.d2d-danger):not(.d2d-active) {
  background: #1c283d !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] #d2d-app :is(button, .d2d-file-label, .d2d-control-hub button):not(.d2d-primary):not(.d2d-danger):hover {
  background: #253652 !important;
  color: #93c5fd !important;
}
html[data-site-mood="night"] #d2d-app button.d2d-active,
html[data-site-mood="night"] #d2d-app .d2d-control-hub button.d2d-active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: none !important;
}
html[data-site-mood="night"] #d2d-app button.d2d-danger {
  background: #b91c1c !important;
  color: #ffffff !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
}
html[data-site-mood="night"] #d2d-app :is(.d2d-input, .d2d-select, .d2d-spacing-inputs input) {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}
html[data-site-mood="night"] #d2d-app :is(.d2d-label, .d2d-checkbox, .d2d-small-note, .d2d-hint, .d2d-modebar label, .d2d-modebar span) {
  color: #cbd5e1 !important;
}
html[data-site-mood="night"] #d2d-app .d2d-kbd {
  background: #1c283d !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}


/* ============================================================================
 * Menu Bar Blue Identity (Day & Night), Blue Logos in Night Mode,
 * and Clean No-Shadow Hover on Login / Register Button
 * ============================================================================ */

/* A. All Logos Blue in Night Mode (Header, Footer, Global) */
html[data-site-mood="night"] :is(#siteLogo, img.logo, img[src*="/media/logo/"], #header-placeholder img, footer img),
html[data-site-mood="night"] body #footer-placeholder #site-footer .footer-logo img,
html[data-site-mood="night"] body #site-footer.footer-adaptive-enabled .footer-logo img,
html[data-site-mood="night"] body img[data-site-setting="footer.logoPath"] {
  filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(2400%) hue-rotate(194deg) brightness(110%) contrast(101%) !important;
  -webkit-filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(2400%) hue-rotate(194deg) brightness(110%) contrast(101%) !important;
}
html[data-site-mood="night"] #header-placeholder .main-header .logo-section a:hover img,
html[data-site-mood="night"] #header-placeholder .main-header .logo-section a:hover #siteLogo {
  filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(2400%) hue-rotate(194deg) brightness(110%) contrast(101%) drop-shadow(0 0 12px rgba(77,163,255,.95)) drop-shadow(0 0 26px rgba(96,165,250,.65)) !important;
  -webkit-filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(2400%) hue-rotate(194deg) brightness(110%) contrast(101%) drop-shadow(0 0 12px rgba(77,163,255,.95)) drop-shadow(0 0 26px rgba(96,165,250,.65)) !important;
}

/* B. Menu Bar Distinct Blue Color in Day Mode (matches Footer blue accents) */
html:not([data-site-mood="night"]) #menu.menu :is(.nm-menu-link, .nm-menu-link span, .menu-right a, .menu-right a span, .site-menu-account-guest, .site-menu-account-user) {
  color: #1d56c4 !important;
  font-weight: 650 !important;
}
html:not([data-site-mood="night"]) #menu.menu :is(.nm-menu-link i, .nm-menu-link svg, .nm-menu-icon, .nm-menu-icon i, .nm-menu-icon svg, .nm-menu-caret, .nm-submenu-toggle, .menu-right i, .menu-right svg, .menu-left > button, .menu-left > a, .menu-left > button i, .menu-left > button svg, .site-mood-toggle, .site-mood-toggle svg) {
  color: #2878f4 !important;
}
html:not([data-site-mood="night"]) #menu.menu :is(.nm-menu-link:hover, .nm-menu-link:hover span, .nm-menu-link:hover i, .nm-menu-link:hover svg, .nm-menu-item.is-hover-open > .nm-menu-link, .nm-menu-item.is-hover-open > .nm-menu-link span, .nm-menu-item.is-hover-open > .nm-menu-link i, .nm-menu-item.is-hover-open > .nm-menu-link svg, .menu-right a:hover, .menu-right a:hover span, .menu-right a:hover i, .menu-right a:hover svg) {
  color: #1348b5 !important;
}

/* C. Menu Bar Distinct Sky-Blue Color in Night Mode (matches Footer blue accents) */
html[data-site-mood="night"] #menu.menu :is(.nm-menu-link, .nm-menu-link span, .menu-right a, .menu-right a span, .site-menu-account-guest, .site-menu-account-user) {
  color: #93c5fd !important;
  font-weight: 650 !important;
}
html[data-site-mood="night"] #menu.menu :is(.nm-menu-link i, .nm-menu-link svg, .nm-menu-icon, .nm-menu-icon i, .nm-menu-icon svg, .nm-menu-caret, .nm-submenu-toggle, .menu-right i, .menu-right svg, .menu-left > button, .menu-left > a, .menu-left > button i, .menu-left > button svg, .site-mood-toggle, .site-mood-toggle svg) {
  color: #60a5fa !important;
}
html[data-site-mood="night"] #menu.menu :is(.nm-menu-link:hover, .nm-menu-link:hover span, .nm-menu-link:hover i, .nm-menu-link:hover svg, .nm-menu-item.is-hover-open > .nm-menu-link, .nm-menu-item.is-hover-open > .nm-menu-link span, .nm-menu-item.is-hover-open > .nm-menu-link i, .nm-menu-item.is-hover-open > .nm-menu-link svg, .menu-right a:hover, .menu-right a:hover span, .menu-right a:hover i, .menu-right a:hover svg) {
  color: #dbeafe !important;
}

/* D. Remove hover/focus background pill & shadow on Login / Register button (Day & Night) */
html body #menu.menu .menu-right :is(a, button, .site-menu-account-guest, .site-menu-account-user, .site-menu-account-action),
html body #menu.menu .menu-right :is(a, button, .site-menu-account-guest, .site-menu-account-user, .site-menu-account-action):is(:hover, :focus, :focus-visible, :active),
html[data-site-mood="night"] body #menu.menu .menu-right :is(a, button, .site-menu-account-guest, .site-menu-account-user, .site-menu-account-action):is(:hover, :focus, :focus-visible, :active) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}


/* ============================================================================
 * Mobile Login/Register Button (#mobileMenuLogin) = Exact Match to Play/Pause
 * (.mobile-menu-motion) in both Day Mode and Night Mode
 * ============================================================================ */
@media (max-width: 768px) {
  html:not([data-site-mood="night"]) body #menu.menu .mobile-menu-topline > #mobileMenuLogin,
  html:not([data-site-mood="night"]) body #menu.menu .mobile-menu-topline > a.mobile-menu-login.site-menu-account-icon,
  html:not([data-site-mood="night"]) body #menu.menu[data-site-layout-group="menu"] .mobile-menu-topline > #mobileMenuLogin {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border: 1px solid var(--site-menu-border, var(--site-border, #ffffff)) !important;
    border-radius: var(--site-button-radius, 13px) !important;
    background: var(--site-surface-alt, #e5edf7) !important;
    color: var(--site-menu-search-icon, var(--site-primary, #2878f4)) !important;
    box-shadow: var(--theme-small-shadow, 5px 5px 12px rgba(75, 96, 128, 0.16), -5px -5px 12px rgba(255, 255, 255, 0.94)) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  html[data-site-mood="night"] body #menu.menu .mobile-menu-topline > #mobileMenuLogin,
  html[data-site-mood="night"] body #menu.menu .mobile-menu-topline > a.mobile-menu-login.site-menu-account-icon,
  html[data-site-mood="night"] body #menu.menu .mobile-menu-topline > :is(.mobile-menu-search, .mobile-menu-home, .mobile-menu-motion) {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    border-radius: var(--site-button-radius, 13px) !important;
    background: #1e293b !important;
    color: #60a5fa !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  }

  html[data-site-mood="night"] body #menu.menu .mobile-menu-topline > #mobileMenuLogin svg,
  html[data-site-mood="night"] body #menu.menu .mobile-menu-topline > :is(.mobile-menu-search, .mobile-menu-home, .mobile-menu-motion) svg {
    color: #60a5fa !important;
    stroke: #60a5fa !important;
  }
}

/* ==========================================================================
   SUBMENU VIBRATION / FLICKER FIX v2 (Uniform display:block, Zero Gap, No ::before)
   ========================================================================== */
@media (min-width: 768px) {
  #menu.menu .nm-menu-item:is(:hover, :focus-within, .is-open, .is-locked, .is-hover-open) > .nm-submenu,
  .main-header .header-main-nav .nm-menu-item:is(:hover, :focus-within, .is-open, .is-locked, .is-hover-open) > .nm-submenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #menu.menu .nm-menu-item > .nm-submenu,
  .main-header .header-main-nav .nm-menu-item > .nm-submenu {
    top: 100% !important;
    margin: 0 !important;
    padding: 6px !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
  }
  #menu.menu .nm-submenu .nm-menu-item > .nm-submenu {
    top: 0 !important;
    left: 100% !important;
  }
  #menu.menu .nm-submenu > .nm-menu-item + .nm-menu-item {
    margin-top: 3px !important;
  }
  #menu.menu .nm-submenu::before,
  #menu.menu .nm-submenu::after,
  #menu.menu .nm-submenu .nm-submenu::before,
  #menu.menu .nm-submenu .nm-submenu::after {
    content: none !important;
    display: none !important;
    pointer-events: none !important;
  }
  #menu.menu .nm-menu-item:hover,
  #menu.menu .nm-menu-link:hover,
  #menu.menu .nm-submenu .nm-menu-link:hover,
  #menu.menu .nm-submenu-toggle:not([aria-pressed="true"]):hover {
    transform: none !important;
  }
}

/* Mobile anti-vibration & locked-search menu stack safeguard (2026-11-24) */
@media (max-width: 768px) {
  #menu.menu.active.mobile-search-open,
  #menu.menu.active.mobile-search-open[data-site-layout-ready="1"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-x: hidden !important;
  }
  #menu.menu.active.mobile-search-open > .menu-center.nm-menu-tree {
    display: flex !important;
    flex-direction: column !important;
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px 0 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }
  button:hover, .btn:hover, .modal-btn:hover, a:hover {
    transform: none !important;
  }
}

/* Global Anti-Vibration Lock (Desktop + Mobile): eliminate vertical translateY hover jitter
   while preserving smooth shadow, border, and color hover highlights (2026-11-24) */
button:hover,
.btn:hover,
.modal-btn:hover,
.register-btn:hover,
.primary-button:hover,
.login-btn:hover,
.submit-btn:hover,
.profile-card:hover,
.service-card:hover,
.team-card:hover,
.feature-card:hover,
.contact-card:hover,
.info-card:hover,
.post-card:hover,
.cms-post-card:hover,
.cms-builder-widget:hover,
.cms-builder-hover-lift:hover,
.cms-public-body .cms-builder-hover-lift:hover,
.cms-public-body .cms-content-button.cms-button-hover-lift:hover,
.cms-public-body .cms-icon-box:hover,
.cms-public-body .cms-icon-box-anchor:hover > .cms-icon-box,
#menu.menu .menu-left .nav-search-shortcut:hover {
  transform: none !important;
}
