/* Dark mode polish v14 — visual refinements only */
html.dark-mode,
body.dark-mode{
  color-scheme: dark;
}

html.dark-mode body,
body.dark-mode{
  background:#091320 !important;
  color:#eef4ff !important;
}

/* Global text clarity */
html.dark-mode body,
html.dark-mode p,
html.dark-mode li,
html.dark-mode span,
html.dark-mode label,
html.dark-mode small,
html.dark-mode strong,
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6,
body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode label,
body.dark-mode small,
body.dark-mode strong,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6{
  color:#eef4ff;
}

html.dark-mode a,
body.dark-mode a{
  color:#dcecff;
}

/* Header */
html.dark-mode .topbar.unified-topbar,
body.dark-mode .topbar.unified-topbar{
  background:rgba(7,18,34,.94) !important;
  border-bottom:1px solid rgba(148,163,184,.14) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.28) !important;
}

html.dark-mode .topbar-inner,
body.dark-mode .topbar-inner{
  background:transparent !important;
  box-shadow:none !important;
}

html.dark-mode .brand-text strong,
html.dark-mode .brand-text span,
html.dark-mode .nav a,
html.dark-mode .menu-btn,
html.dark-mode .menu-btn span,
html.dark-mode .menu-btn i,
html.dark-mode #darkModeToggle,
html.dark-mode #darkModeToggle i,
body.dark-mode .brand-text strong,
body.dark-mode .brand-text span,
body.dark-mode .nav a,
body.dark-mode .menu-btn,
body.dark-mode .menu-btn span,
body.dark-mode .menu-btn i,
body.dark-mode #darkModeToggle,
body.dark-mode #darkModeToggle i{
  color:#f4f8ff !important;
}

html.dark-mode .nav a,
body.dark-mode .nav a{
  opacity:.92;
}

html.dark-mode .nav a:hover,
html.dark-mode .nav a.active,
body.dark-mode .nav a:hover,
body.dark-mode .nav a.active{
  background:rgba(96,165,250,.12) !important;
  color:#ffffff !important;
}

html.dark-mode .topbar .btn,
html.dark-mode .topbar .menu-btn,
body.dark-mode .topbar .btn,
body.dark-mode .topbar .menu-btn{
  background:rgba(255,255,255,.04) !important;
  border:1px solid rgba(148,163,184,.18) !important;
  color:#f4f8ff !important;
}

html.dark-mode .topbar .btn.primary,
body.dark-mode .topbar .btn.primary{
  background:linear-gradient(180deg,#14365b,#0e2745) !important;
  border-color:rgba(96,165,250,.28) !important;
}

html.dark-mode .topbar .btn:hover,
html.dark-mode .topbar .menu-btn:hover,
body.dark-mode .topbar .btn:hover,
body.dark-mode .topbar .menu-btn:hover{
  background:rgba(96,165,250,.10) !important;
  border-color:rgba(96,165,250,.24) !important;
}

/* Drawer */
html.dark-mode .drawer,
body.dark-mode .drawer{
  background:#0a1627 !important;
  border-color:rgba(148,163,184,.18) !important;
}

html.dark-mode .drawer-brand strong,
html.dark-mode .drawer-brand span,
html.dark-mode .drawer-nav a,
html.dark-mode .drawer-nav a i,
html.dark-mode .drawer-pill,
html.dark-mode .drawer-pill i,
html.dark-mode .drawer-close,
body.dark-mode .drawer-brand strong,
body.dark-mode .drawer-brand span,
body.dark-mode .drawer-nav a,
body.dark-mode .drawer-nav a i,
body.dark-mode .drawer-pill,
body.dark-mode .drawer-pill i,
body.dark-mode .drawer-close{
  color:#eef4ff !important;
}

html.dark-mode .drawer-nav a,
html.dark-mode .drawer-pill,
html.dark-mode .drawer-close,
body.dark-mode .drawer-nav a,
body.dark-mode .drawer-pill,
body.dark-mode .drawer-close{
  background:rgba(255,255,255,.03) !important;
  border-color:rgba(148,163,184,.16) !important;
}

html.dark-mode .drawer-nav a:hover,
html.dark-mode .drawer-pill:hover,
body.dark-mode .drawer-nav a:hover,
body.dark-mode .drawer-pill:hover{
  background:rgba(96,165,250,.08) !important;
  border-color:rgba(96,165,250,.24) !important;
}

/* Generic surfaces */
html.dark-mode .card,
html.dark-mode .post-card,
html.dark-mode .focus-card,
html.dark-mode .team-card,
html.dark-mode .sector-card,
html.dark-mode .contact-card,
html.dark-mode .article-container,
html.dark-mode .article-header,
html.dark-mode .article-body,
html.dark-mode .share-bar,
html.dark-mode .filters form,
body.dark-mode .card,
body.dark-mode .post-card,
body.dark-mode .focus-card,
body.dark-mode .team-card,
body.dark-mode .sector-card,
body.dark-mode .contact-card,
body.dark-mode .article-container,
body.dark-mode .article-header,
body.dark-mode .article-body,
body.dark-mode .share-bar,
body.dark-mode .filters form{
  background:#0d1a2b !important;
  border-color:rgba(148,163,184,.15) !important;
  box-shadow:0 18px 34px rgba(0,0,0,.18) !important;
}

html.dark-mode .muted,
html.dark-mode .sec-head p,
html.dark-mode .article-meta,
html.dark-mode .archive-intro,
body.dark-mode .muted,
body.dark-mode .sec-head p,
body.dark-mode .article-meta,
body.dark-mode .archive-intro{
  color:#b8c8df !important;
}

html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select{
  background:#0a1524 !important;
  border-color:rgba(148,163,184,.18) !important;
  color:#eef4ff !important;
}

html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder{
  color:#8ea4c3 !important;
}

html.dark-mode .btn:not(.primary),
body.dark-mode .btn:not(.primary){
  background:rgba(255,255,255,.04) !important;
  border-color:rgba(148,163,184,.16) !important;
  color:#eef4ff !important;
}

/* Footer precision */
html.dark-mode .site-footer.unified-site-footer,
body.dark-mode .site-footer.unified-site-footer,
html.dark-mode .site-footer,
body.dark-mode .site-footer{
  background:linear-gradient(180deg,#08182d 0%, #061324 100%) !important;
  border-top:1px solid rgba(148,163,184,.14) !important;
}

html.dark-mode .site-footer .foot-card,
html.dark-mode .site-footer .foot-col,
html.dark-mode .site-footer .foot-brand,
html.dark-mode .site-footer .foot-cta-box,
body.dark-mode .site-footer .foot-card,
body.dark-mode .site-footer .foot-col,
body.dark-mode .site-footer .foot-brand,
body.dark-mode .site-footer .foot-cta-box{
  background:rgba(255,255,255,.035) !important;
  border:1px solid rgba(148,163,184,.14) !important;
}

html.dark-mode .site-footer .foot-title,
html.dark-mode .site-footer .foot-brand-copy strong,
html.dark-mode .site-footer .foot-links a,
html.dark-mode .site-footer .foot-contact div,
html.dark-mode .site-footer .foot-contact span,
html.dark-mode .site-footer .foot-brand-desc,
html.dark-mode .site-footer .muted,
html.dark-mode .site-footer .foot-bottom,
html.dark-mode .site-footer .foot-bottom span,
html.dark-mode .site-footer .foot-bottom a,
body.dark-mode .site-footer .foot-title,
body.dark-mode .site-footer .foot-brand-copy strong,
body.dark-mode .site-footer .foot-links a,
body.dark-mode .site-footer .foot-contact div,
body.dark-mode .site-footer .foot-contact span,
body.dark-mode .site-footer .foot-brand-desc,
body.dark-mode .site-footer .muted,
body.dark-mode .site-footer .foot-bottom,
body.dark-mode .site-footer .foot-bottom span,
body.dark-mode .site-footer .foot-bottom a{
  color:#edf4ff !important;
}

html.dark-mode .site-footer .foot-brand-desc,
html.dark-mode .site-footer .muted,
html.dark-mode .site-footer .foot-bottom,
html.dark-mode .site-footer .foot-contact span,
body.dark-mode .site-footer .foot-brand-desc,
body.dark-mode .site-footer .muted,
body.dark-mode .site-footer .foot-bottom,
body.dark-mode .site-footer .foot-contact span{
  color:#bdd0e7 !important;
}

html.dark-mode .site-footer .foot-links a,
body.dark-mode .site-footer .foot-links a{
  background:rgba(255,255,255,.04) !important;
  border:1px solid rgba(148,163,184,.14) !important;
}

html.dark-mode .site-footer .foot-links a:hover,
body.dark-mode .site-footer .foot-links a:hover{
  background:rgba(96,165,250,.10) !important;
  border-color:rgba(96,165,250,.24) !important;
  color:#ffffff !important;
}

html.dark-mode .site-footer .soc,
body.dark-mode .site-footer .soc{
  background:rgba(255,255,255,.05) !important;
  border-color:rgba(148,163,184,.16) !important;
  color:#edf4ff !important;
}

html.dark-mode .site-footer .soc i,
body.dark-mode .site-footer .soc i{
  color:#edf4ff !important;
}

html.dark-mode .site-footer .soc:hover,
body.dark-mode .site-footer .soc:hover{
  background:rgba(96,165,250,.12) !important;
  border-color:rgba(96,165,250,.26) !important;
}

html.dark-mode .site-footer .foot-cta,
body.dark-mode .site-footer .foot-cta{
  background:#f8fbff !important;
  color:#0b2f56 !important;
  border:1px solid rgba(255,255,255,.22) !important;
}

html.dark-mode .site-footer .foot-cta i,
body.dark-mode .site-footer .foot-cta i{
  color:#0b2f56 !important;
}

html.dark-mode .site-footer .foot-cta:hover,
body.dark-mode .site-footer .foot-cta:hover{
  background:#ffffff !important;
  color:#082448 !important;
}

html.dark-mode .site-footer .foot-bottom,
body.dark-mode .site-footer .foot-bottom{
  border-top:1px solid rgba(148,163,184,.12) !important;
}


/* Details page dark-mode readability fix */
html.dark-mode .article-breadcrumb-wrapper,
body.dark-mode .article-breadcrumb-wrapper{
  color:#d7e6fb !important;
}

html.dark-mode .article-header,
body.dark-mode .article-header{
  background:#0d1a2b !important;
}

html.dark-mode .article-header h1,
body.dark-mode .article-header h1{
  color:#f7fbff !important;
  opacity:1 !important;
  text-shadow:none !important;
}

html.dark-mode .article-header p,
html.dark-mode .article-header .muted,
html.dark-mode .article-header .article-intro,
body.dark-mode .article-header p,
body.dark-mode .article-header .muted,
body.dark-mode .article-header .article-intro{
  color:#d7e6fb !important;
  opacity:1 !important;
}

html.dark-mode .article-meta span,
body.dark-mode .article-meta span{
  background:rgba(255,255,255,.06) !important;
  color:#f3f8ff !important;
  border:1px solid rgba(148,163,184,.18) !important;
}

html.dark-mode .article-body,
html.dark-mode .article-body p,
html.dark-mode .article-body li,
html.dark-mode .article-body strong,
html.dark-mode .article-body blockquote,
body.dark-mode .article-body,
body.dark-mode .article-body p,
body.dark-mode .article-body li,
body.dark-mode .article-body strong,
body.dark-mode .article-body blockquote{
  color:#eaf2ff !important;
  opacity:1 !important;
}

html.dark-mode .article-body h2,
html.dark-mode .article-body h3,
html.dark-mode .article-body h4,
body.dark-mode .article-body h2,
body.dark-mode .article-body h3,
body.dark-mode .article-body h4{
  color:#ffffff !important;
}
