/* ==========================================================================
   Elhamd Plast — appearance layer (light/dark tokens, bilingual controls, a11y)
   Light mode: preserves the existing brand design (Cairo / Space Grotesk,
   navy #004481/#005BAA, electric cyan #00B4D8, ice white surfaces, no green).
   Dark mode: scoped under html[data-theme="dark"] with !important overrides so
   it beats module stylesheets regardless of load order. No image invert filters.
   ========================================================================== */

:root {
    --eh-font-ar: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --eh-font-num: 'Space Grotesk', 'Plus Jakarta Sans', 'Cairo', monospace;
    --eh-primary: #005BAA;
    --eh-primary-deep: #062866;
    --eh-cyan: #00B4D8;
    --eh-ice: #F8FAFC;
    --eh-frost: #F0F3FF;
    --eh-line: #E2E8F0;
    --eh-slate: #0E1C2F;
    --eh-radius: 12px;
    --eh-shadow: 0 4px 16px -2px rgba(11, 25, 44, 0.06);
    --eh-focus: 0 0 0 3px rgba(0, 180, 216, 0.45);
    /* surface tokens (light defaults — used by dark overrides too) */
    --eh-bg: #F8FAFC;
    --eh-bg-2: #F9F9FF;
    --eh-surface: #FFFFFF;
    --eh-surface-2: #F0F3FF;
    --eh-surface-3: #E7EEFF;
    --eh-text: #0E1C2F;
    --eh-text-2: #475569;
    --eh-text-3: #64748B;
    --eh-border: #E2E8F0;
    --eh-border-2: #DCEAF4;
}

/* =============================== LIGHT (default, preserved) ================= */
html[data-theme="light"] {
    color-scheme: light;
}

/* =============================== DARK TOKENS =============================== */
html[data-theme="dark"] {
    color-scheme: dark;
    /* re-tint Botble header/link variables (used with white text elsewhere) */
    --color-2nd: #A9D8F7;
    --header-text-color: #E7EEFF;
    --header-text-accent-color: #E7EEFF;
    --header-text-hover-color: #4CC3F0;

    --eh-bg: #0A1524;
    --eh-bg-2: #0B192C;
    --eh-surface: #10233A;
    --eh-surface-2: #14304C;
    --eh-surface-3: #1A3B5C;
    --eh-text: #E8EFF8;
    --eh-text-2: #B7C7DB;
    --eh-text-3: #93A7C0;
    --eh-border: #23415F;
    --eh-border-2: #27507A;
    --eh-primary: #2E8BE0;
    --eh-primary-deep: #9AD8F5;
    --eh-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.55);
    --eh-focus: 0 0 0 3px rgba(76, 214, 251, 0.5);
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: #0A1524 !important;
    color: #E8EFF8 !important;
    font-family: 'Cairo', system-ui, sans-serif !important;
}

html[data-theme="dark"] #main-content,
html[data-theme="dark"] main,
html[data-theme="dark"] .eh-site,
html[data-theme="dark"] .ep-site {
    background-color: transparent !important;
    color: #E8EFF8 !important;
}

html[data-theme="dark"] *::selection {
    background: rgba(0, 180, 216, 0.35);
    color: #FFFFFF;
}

/* Skip link + focus visibility (both modes) */
.eh-skip:focus-visible,
.ep-skip:focus-visible,
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #00B4D8 !important;
    outline-offset: 2px !important;
    box-shadow: var(--eh-focus) !important;
}

/* =========================== DARK: PAGE MODULES ============================ */

/* Headings, paragraphs, generic text */
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html[data-theme="dark"] .section-title, html[data-theme="dark"] .ps-section__title {
    color: #F2F7FF !important;
}
html[data-theme="dark"] p:not([class]), html[data-theme="dark"] li:not([class]),
html[data-theme="dark"] span:not([class]), html[data-theme="dark"] label:not([class]),
html[data-theme="dark"] em:not([class]),
html[data-theme="dark"] .ps-grid__content, html[data-theme="dark"] .ps-post__content {
    color: #E8EFF8;
}
html[data-theme="dark"] p:not([class]), html[data-theme="dark"] .ps-post__content p { color: #C7D6E8 !important; }
html[data-theme="dark"] small:not([class]), html[data-theme="dark"] .text-muted, html[data-theme="dark"] .ps-meta {
    color: #9FB3CB !important;
}

/* ---- DARK: BUTTON / PILL LABEL INHERITANCE ----
   The generic copy rule above also targets plain span labels inside CTA pills.
   Re-anchor those direct labels to the component's own foreground colour so
   light-surface outline buttons keep navy text and primary/dark-surface
   buttons keep white text in default, hover and focus states.
   Classed arrow discs, badges and inline-styled glyphs are excluded so their
   own white/blue treatment is preserved. */
html[data-theme="dark"] :is(
    .pill-btn-primary,
    .btn-signature-pill,
    .header-cta-btn,
    .hero-action,
    .calc-submit-btn,
    .pill-btn-outline,
    .ep-btn-outline,
    .btn-outline,
    .hero-action-secondary,
    .pill-btn-wa,
    .hero-action-wa,
    .ep-btn-wa,
    .header-phone,
    .ep-btn,
    .btn,
    .btn-primary,
    .eh-btn,
    .tnw-btn,
    .eh-nav__quote,
    .eh-drawer__quote,
    .eh-util__wa,
    .eh-list__wa,
    .eh-list__b2b,
    .eh-list__quote-btn,
    .eh-card-atc__btn,
    .eh-card-wa,
    .eh-product-wa,
    .whatsapp-btn,
    .quick-contact-pill,
    .phone-pill,
    .wa-pill
) > span:not([class]):not([style]) {
    color: inherit !important;
}

/* Dark outline / light-surface buttons: the global dark `a:hover` cyan would
   otherwise override their pale-surface foreground. Keep brand navy text,
   a readable border, and an accessible focus ring without touching primary
   or dark-surface CTAs. */
html[data-theme="dark"] :is(.pill-btn-outline, .ep-btn-outline, .btn-outline):is(:hover, :focus-visible) {
    color: #005BAA !important;
    border-color: #005BAA !important;
}
html[data-theme="dark"] :is(.pill-btn-outline, .ep-btn-outline, .btn-outline):is(:hover, :focus-visible) > span:not([class]):not([style]) {
    color: inherit !important;
}
html[data-theme="dark"] :is(.pill-btn-outline, .ep-btn-outline, .btn-outline):focus-visible {
    outline-color: #005BAA !important;
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.35) !important;
}

/* Homepage dark sections keep their intro copy light; intentional inline
   light tones (e.g. the navy CTA panel) keep their own colour. */
html[data-theme="dark"] .elheiba-home .unified-intro:not([style*="color"]) {
    color: #C7D6E8 !important;
}
html[data-theme="dark"] .elheiba-home .unified-intro[style*="0d274d" i] {
    color: #C7D6E8 !important;
}

/* Technical numbers / SKU codes keep Space Grotesk */
.bdi-spec, html[data-theme="dark"] .bdi-spec, html[data-theme="dark"] .bdi-spec * {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', monospace !important;
}
html[data-theme="dark"] .ps-product__price,
html[data-theme="dark"] [class*="spec-value"],
html[data-theme="dark"] .bdi-spec { color: #4CC3F0; }

/* Generic cards / sections / containers — inline light backgrounds covered */
html[data-theme="dark"] .ps-section,
html[data-theme="dark"] section,
html[data-theme="dark"] .eh-card, html[data-theme="dark"] .eh-panel,
html[data-theme="dark"] .ps-block, html[data-theme="dark"] .widget,
html[data-theme="dark"] .card, html[data-theme="dark"] [class*="-card"]:not([class*="credit"]):not([class*="id-card"]),
html[data-theme="dark"] .ps-box {
    background-color: #10233A !important;
    border-color: #23415F !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ps-block__header,
html[data-theme="dark"] .widget--blog .widget__header {
    background-color: #14304C !important;
    border-color: #23415F !important;
    color: #F2F7FF !important;
}

/* Known inline light backgrounds (bg declared in the style attribute) */
html[data-theme="dark"] [style*="background:#fff" i],
html[data-theme="dark"] [style*="background:#ffffff" i],
html[data-theme="dark"] [style*="background: #fff" i],
html[data-theme="dark"] [style*="background: #ffffff" i],
html[data-theme="dark"] [style*="background:#f8faff" i],
html[data-theme="dark"] [style*="background:#f9f9ff" i],
html[data-theme="dark"] [style*="background:#f0f7ff" i],
html[data-theme="dark"] [style*="background:#f0f3ff" i] {
    background-color: #10233A !important;
}
html[data-theme="dark"] [style*="color:#062866" i],
html[data-theme="dark"] [style*="color:#0E1C2F" i],
html[data-theme="dark"] [style*="color:#333" i] {
    color: #E8EFF8 !important;
}

/* Links */
html[data-theme="dark"] a { color: #7FC7FF; }
html[data-theme="dark"] a:not([class*="btn"]):not([class*="cta"]):not([class*="pill"]):not([class*="action"]) {
    color: #9AD8F5;
}
html[data-theme="dark"] a:hover { color: #4CC3F0 !important; }

/* Keep Botble sidebar/category widgets readable (they pair --color-2nd with #fff) */
html[data-theme="dark"] .widget_sidebar ul li a:hover,
html[data-theme="dark"] .widget_sidebar ul li a.active,
html[data-theme="dark"] .widget--blog.widget--categories ul li a:hover,
html[data-theme="dark"] .widget--blog.widget--categories ul li.active a,
html[data-theme="dark"] .bb-product-filter-link.active {
    background-color: #0E3A6B !important;
    color: #EAF4FF !important;
}
html[data-theme="dark"] .bb-product-form-filter .bb-product-filter {
    background: #10233A !important;
}
html[data-theme="dark"] .bb-product-form-filter .bb-product-filter a,
html[data-theme="dark"] .bb-product-form-filter .bb-product-filter label { color: #B7C7DB !important; }
html[data-theme="dark"] .bb-product-form-filter .bb-product-filter a:hover { color: #4CC3F0 !important; }
html[data-theme="dark"] .bb-product-form-filter .bb-product-filter input[type="checkbox"],
html[data-theme="dark"] .bb-product-form-filter .bb-product-filter input[type="radio"] { accent-color: #00B4D8; }

/* =========================== DARK: HEADER + NAV ============================ */
html[data-theme="dark"] header.main-site-header,
html[data-theme="dark"] #site-header,
html[data-theme="dark"] header.header--1,
html[data-theme="dark"] .tnw-mobile-header {
    background-color: #0E1C2F !important;
    border-bottom-color: #23415F !important;
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9) !important;
}
html[data-theme="dark"] .navigation.desktop-nav .nav-link,
html[data-theme="dark"] .nav-dropdown-trigger { color: #DCE9F9 !important; }
html[data-theme="dark"] .navigation.desktop-nav .nav-link:hover,
html[data-theme="dark"] .navigation.desktop-nav .nav-link.active,
html[data-theme="dark"] .nav-dropdown-trigger:hover,
html[data-theme="dark"] .nav-dropdown-trigger.active { color: #4CC3F0 !important; }

html[data-theme="dark"] .nav-dropdown-menu {
    background: rgba(14, 28, 47, 0.98) !important;
    border-color: #27507A !important;
    box-shadow: 0 24px 50px -14px rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(16px) !important;
}
html[data-theme="dark"] .nav-dropdown-menu .dropdown-item:hover {
    background: #16304C !important;
    border-color: #2E8BE0 !important;
}
html[data-theme="dark"] .dropdown-item strong,
html[data-theme="dark"] .nav-dropdown-menu .dropdown-item strong { color: #EAF4FF !important; }
html[data-theme="dark"] .nav-dropdown-menu .dropdown-item small { color: #9FB3CB !important; }
html[data-theme="dark"] .dropdown-item-icon { background: #123A5E !important; color: #4CC3F0 !important; }
html[data-theme="dark"] .dropdown-tag { background: #0E3A6B !important; color: #7FD8F5 !important; }
html[data-theme="dark"] .dropdown-bottom-banner {
    background: #0E3A6B !important;
    color: #BFE6FA !important;
    border-color: #27507A !important;
}

html[data-theme="dark"] .header-social-btn {
    background: #123A5E !important;
    border-color: #27507A !important;
    color: #9AD8F5 !important;
}
html[data-theme="dark"] .header-social-btn:hover {
    background: #0B6FC4 !important;
    color: #FFFFFF !important;
    border-color: #4CC3F0 !important;
}
html[data-theme="dark"] .header-social-btn .bdi-spec { background: #0E3A6B !important; color: #7FD8F5 !important; }
html[data-theme="dark"] .header-social-btn:hover .bdi-spec { background: #FFFFFF !important; color: #062866 !important; }

html[data-theme="dark"] .header-phone {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #CFE6FA !important;
}
html[data-theme="dark"] .header-phone:hover { border-color: #00B4D8 !important; color: #4CC3F0 !important; }
html[data-theme="dark"] .header-phone .phone-svg { stroke: #00B4D8 !important; }

html[data-theme="dark"] .header-cta-btn,
html[data-theme="dark"] .btn-signature-pill {
    background: #0B6FC4 !important;
    border-color: #0B6FC4 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .header-cta-btn:hover { background: #0C7EDF !important; }
html[data-theme="dark"] .btn-signature-pill .btn-circle-arrow { background: #FFFFFF !important; color: #0B63C4 !important; }

html[data-theme="dark"] .mobile-toggle-btn {
    background: #123A5E !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] .mobile-toggle-btn .toggle-bar { background: #CFE6FA !important; }
html[data-theme="dark"] .mobile-toggle-btn:hover { background: #16304C !important; }

/* ====================== DARK: MOBILE DRAWER ================================ */
html[data-theme="dark"] .mobile-nav-drawer {
    background: #0E1C2F !important;
    border-inline-start-color: #23415F !important;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.7) !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .mobile-nav-backdrop { background: rgba(4, 10, 18, 0.72) !important; }
html[data-theme="dark"] .drawer-link {
    color: #DCE9F9 !important;
    background: #10233A !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .drawer-link:hover,
html[data-theme="dark"] .drawer-link.active {
    background: #0E3A6B !important;
    color: #FFFFFF !important;
    border-color: #2E8BE0 !important;
}
html[data-theme="dark"] .drawer-close-btn {
    background: #123A5E !important;
    border-color: #27507A !important;
    color: #EAF4FF !important;
}
html[data-theme="dark"] .drawer-cta-btn { background: #0B6FC4 !important; color: #FFFFFF !important; border-color: #0B6FC4 !important; }
html[data-theme="dark"] .drawer-contact-item {
    background: #10233A !important;
    border-color: #23415F !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .drawer-contact-item small { color: #9FB3CB !important; }
html[data-theme="dark"] .drawer-social-card {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #DCE9F9 !important;
}
html[data-theme="dark"] .drawer-social-card:hover { background: #16304C !important; border-color: #00B4D8 !important; }
html[data-theme="dark"] .drawer-social-card .card-icon { background: #0E3A6B !important; color: #7FD8F5 !important; }
html[data-theme="dark"] .drawer-social-card .card-info small { color: #9FB3CB !important; }
html[data-theme="dark"] .drawer-social-card .card-info bdi { color: #7FD8F5 !important; }
html[data-theme="dark"] .drawer-social-section { border-top-color: #23415F !important; }
html[data-theme="dark"] .drawer-social-title { color: #9FB3CB !important; }
html[data-theme="dark"] .drawer-trust-tags span {
    background: #0E3A6B !important;
    color: #BFE6FA !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] .drawer-brand img { filter: none !important; }

/* ================== DARK: FORMS, INPUTS, SELECT, TABLES ==================== */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .ps-form input,
html[data-theme="dark"] .ps-form select,
html[data-theme="dark"] .ps-form textarea {
    background-color: #0B192C !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
    caret-color: #00B4D8 !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #7E93AD !important; opacity: 1; }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    background-color: #0E1C2F !important;
    border-color: #00B4D8 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] select option,
html[data-theme="dark"] option { background-color: #0E1C2F !important; color: #E8EFF8 !important; }
html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"] { accent-color: #00B4D8 !important; }
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] button[type="submit"],
html[data-theme="dark"] .ps-btn--primary,
html[data-theme="dark"] .btn-primary {
    background-color: #0B6FC4 !important;
    border-color: #0B6FC4 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .ps-form__group label { color: #CFE6FA !important; }

/* Select2 + custom dropdowns */
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background: #0B192C !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .select2-container--default .select2-results__options { background: #10233A !important; }
html[data-theme="dark"] .select2-container--default .select2-results__option { color: #E8EFF8 !important; }
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #0B6FC4 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .select2-dropdown { background: #10233A !important; border-color: #27507A !important; }
html[data-theme="dark"] .select2-search__field {
    background: #0B192C !important;
    color: #E8EFF8 !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] .ps-dropdown-menu,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .ps-dropdown .ps-dropdown-menu {
    background: #10233A !important;
    border-color: #27507A !important;
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8) !important;
}
html[data-theme="dark"] .ps-dropdown-menu > li > a,
html[data-theme="dark"] .dropdown-menu > li > a,
html[data-theme="dark"] .ps-dropdown-menu a { color: #DCE9F9 !important; }
html[data-theme="dark"] .ps-dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:hover { background: #16304C !important; color: #4CC3F0 !important; }

/* Tables */
html[data-theme="dark"] table,
html[data-theme="dark"] .ps-table,
html[data-theme="dark"] .table {
    background: #10233A !important;
    border-color: #23415F !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] table th, html[data-theme="dark"] .ps-table th, html[data-theme="dark"] .table th {
    background: #14304C !important;
    color: #F2F7FF !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] table td, html[data-theme="dark"] .ps-table td, html[data-theme="dark"] .table td {
    color: #D7E4F3 !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] table tbody tr:nth-child(even) { background: #0E2135 !important; }
html[data-theme="dark"] table tbody tr:hover { background: #16304C !important; }

/* Forms / validation states (error + success) */
html[data-theme="dark"] .alert-success,
html[data-theme="dark"] .ps-alert--success,
html[data-theme="dark"] [class*="success"] {
    background: #0B3A4F !important;
    border-color: #1F7A9E !important;
    color: #BEEBFF !important;
}
html[data-theme="dark"] .alert-danger, html[data-theme="dark"] .alert-error,
html[data-theme="dark"] .ps-alert--error, html[data-theme="dark"] .invalid-feedback,
html[data-theme="dark"] .text-danger, html[data-theme="dark"] .is-invalid,
html[data-theme="dark"] [class*="error"] {
    background: #3A1418 !important;
    border-color: #D92D20 !important;
    color: #FFC9C4 !important;
}
html[data-theme="dark"] .invalid-feedback { display: block; }
html[data-theme="dark"] .text-success { color: #6ED9F5 !important; }
html[data-theme="dark"] .has-error input,
html[data-theme="dark"] .has-error select,
html[data-theme="dark"] .has-error textarea { border-color: #D92D20 !important; }

/* ===================== DARK: BREADCRUMBS / PAGINATION ====================== */
html[data-theme="dark"] .ps-breadcrumb,
html[data-theme="dark"] .breadcrumbs { background: #10233A !important; border-color: #23415F !important; }
html[data-theme="dark"] .ps-breadcrumb a, html[data-theme="dark"] .breadcrumbs a { color: #9AD8F5 !important; }
html[data-theme="dark"] .ps-pagination a,
html[data-theme="dark"] .ps-pagination span.current {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #DCE9F9 !important;
}
html[data-theme="dark"] .ps-pagination a:hover,
html[data-theme="dark"] .ps-pagination span.current { background: #0B6FC4 !important; color: #FFFFFF !important; border-color: #0B6FC4 !important; }

/* ==================== DARK: PRODUCT / CATALOG MODULES ===================== */
html[data-theme="dark"] .ps-product,
html[data-theme="dark"] .eh-pdp,
html[data-theme="dark"] .product-detail,
html[data-theme="dark"] .ps-product__inner,
html[data-theme="dark"] .ps-box--product {
    background: #10233A !important;
    border-color: #23415F !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ps-product__name,
html[data-theme="dark"] .ps-product__title { color: #F2F7FF !important; }
html[data-theme="dark"] .ps-product:hover { border-color: #2E8BE0 !important; box-shadow: 0 14px 34px -18px rgba(0, 180, 216, 0.5) !important; }
html[data-theme="dark"] .ps-product__actions .ps-btn,
html[data-theme="dark"] .eh-card-atc__btn { background: #0B6FC4 !important; color: #FFFFFF !important; border-color: #0B6FC4 !important; }
html[data-theme="dark"] .product-content, html[data-theme="dark"] .product-summary { color: #C7D6E8 !important; }
html[data-theme="dark"] .ps-block--product-banner,
html[data-theme="dark"] .product-banner { background: #0E2135 !important; border-color: #23415F !important; }
html[data-theme="dark"] .bb-product-gallery-images { background: #0B192C !important; }
html[data-theme="dark"] .quantity-cart .cart,
html[data-theme="dark"] .quantity { background: #0B192C !important; border-color: #27507A !important; }
html[data-theme="dark"] .quantity input.qty-input { background: #0B192C !important; color: #FFFFFF !important; }

/* ======================= DARK: FOOTER (Elhamd) ============================= */
html[data-theme="dark"] footer.mega-site-footer,
html[data-theme="dark"] .mega-site-footer,
html[data-theme="dark"] .light-bento-footer,
html[data-theme="dark"] .ps-footer {
    background: #0B192C !important;
    color: #D7E4F3 !important;
    border-top: 1px solid #23415F !important;
}
html[data-theme="dark"] .footer-top-accent { background: linear-gradient(90deg, #00B4D8, #0B6FC4, #062866) !important; }
html[data-theme="dark"] .footer-heading { color: #FFFFFF !important; }
html[data-theme="dark"] .footer-desc, html[data-theme="dark"] .footer-col p { color: #AEC1D8 !important; }
html[data-theme="dark"] .footer-links a { color: #BFD4EA !important; }
html[data-theme="dark"] .footer-links a:hover { color: #4CC3F0 !important; }
html[data-theme="dark"] .footer-link-tag { background: #0E3A6B !important; color: #7FD8F5 !important; }
html[data-theme="dark"] .footer-links .bullet { color: #00B4D8 !important; }
html[data-theme="dark"] .footer-cert-tags span {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #BFE6FA !important;
}
html[data-theme="dark"] .footer-quick-actions a,
html[data-theme="dark"] .footer-quick-action {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #EAF4FF !important;
}
html[data-theme="dark"] .footer-bottom-bar {
    background: #0A1524 !important;
    border-top-color: #23415F !important;
}
html[data-theme="dark"] .copyright-text { color: #93A7C0 !important; }
html[data-theme="dark"] .bottom-social-link {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #CFE6FA !important;
}
html[data-theme="dark"] .back-to-top { background: #10233A !important; border-color: #27507A !important; color: #9AD8F5 !important; }
html[data-theme="dark"] .meta-row { color: #AEC1D8 !important; }
html[data-theme="dark"] .footer-col a, html[data-theme="dark"] .footer-brand { color: inherit; }
html[data-theme="dark"] .footer-logo-img { filter: none !important; }
html[data-theme="dark"] .ps-footer__copyright,
html[data-theme="dark"] .ps-footer .ps-footer__copyright {
    background: #0A1524 !important;
    border-top-color: #23415F !important;
}
html[data-theme="dark"] .ps-footer__copyright .site-copyright { color: #93A7C0 !important; }
html[data-theme="dark"] .ps-footer__copyright .site-copyright a { color: #FFFFFF !important; }
html[data-theme="dark"] .tnw-pmband {
    background: #10233A !important;
    border-color: #27507A !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .tnw-pmband__title { color: #EAF4FF !important; }
html[data-theme="dark"] .tnw-pmtile { background: #0B192C !important; border-color: #27507A !important; }
html[data-theme="dark"] .tnw-pmband__head { border-inline-end-color: #27507A !important; }
html[data-theme="dark"] .mega-menu,
html[data-theme="dark"] .menu__content {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}

/* ================== DARK: QUICK / UTILITY / MISC BLOCKS ==================== */
html[data-theme="dark"] .eh-toast {
    background: #14304C !important;
    border-color: #27507A !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .eh-toast--err { background: #3A1418 !important; border-color: #D92D20 !important; }
html[data-theme="dark"] .eh-lang__opt { background: #10233A !important; color: #CFE6FA !important; border-color: #27507A !important; }
html[data-theme="dark"] .whatsapp-btn,
html[data-theme="dark"] .eh-drawer__wa,
html[data-theme="dark"] .tnw-phone-wa { filter: none !important; }
html[data-theme="dark"] .admin-bar, html[data-theme="dark"] #admin_bar { background: #0A1524 !important; }

/* ========================== LIGHT MODE: PRESERVED ========================== */
/* The appearance layer only adds focus rings, controls and dark-mode scoped
   overrides — existing light design, images and button labels stay untouched. */

/* ==========================================================================
   QA FIXES: desktop header overflow (1440), dark hero/ribbon readability,
   390px hero layout, dark descendant text, extra inline light backgrounds.
   ========================================================================== */

/* ---- Desktop header: keep nav + lang/theme + primary CTA fully onscreen ----
   Social pills and phone are ancillary; shed them before anything clips. */
@media (max-width: 1500px) {
    html .main-site-header .header-social-links { display: none !important; }
}
@media (max-width: 1440px) {
    html .main-site-header .header-phone { display: none !important; }
    html .header-actions { gap: 6px !important; }
    html .main-site-header .header-inner { gap: 12px !important; }
    html .navigation.desktop-nav .nav-link,
    html .navigation.desktop-nav .nav-dropdown-trigger { font-size: 12.5px !important; padding: 0 8px !important; }
    html .header-cta-btn { padding: 7px 13px !important; font-size: 12.5px !important; }
    html .eh-appearance-controls { gap: 4px !important; }
}

/* ====================== REDUCED MOTION ===================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
html[data-theme="dark"] a, html[data-theme="dark"] button { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

/* ==========================================================================
   LANGUAGE + THEME CONTROLS (visible on desktop and mobile, compact at 390px)
   ========================================================================== */
.eh-appearance-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.eh-lang-switch {
    display: inline-flex;
    align-items: center;
    background: var(--eh-frost);
    border: 1px solid var(--eh-border-2);
    border-radius: 9999px;
    padding: 2px;
    gap: 2px;
    height: 34px;
}
html[data-theme="dark"] .eh-lang-switch {
    background: #10233A;
    border-color: #27507A;
}

.eh-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border-radius: 9999px;
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--eh-primary);
    text-decoration: none;
    line-height: 1;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.eh-lang-btn:hover { background: #E0F2FE; color: var(--eh-primary-deep); }
.eh-lang-btn.is-on,
.eh-lang-btn[aria-pressed="true"] {
    background: var(--eh-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 91, 170, 0.35);
}
html[data-theme="dark"] .eh-lang-btn { color: #9AD8F5; }
html[data-theme="dark"] .eh-lang-btn:hover { background: #16304C; color: #FFFFFF; }
html[data-theme="dark"] .eh-lang-btn.is-on,
html[data-theme="dark"] .eh-lang-btn[aria-pressed="true"] {
    background: #0B6FC4;
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 180, 216, 0.35);
}

.eh-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9999px;
    background: var(--eh-frost);
    border: 1px solid var(--eh-border-2);
    color: var(--eh-primary);
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.eh-theme-toggle:hover {
    background: #E0F2FE;
    box-shadow: 0 0 14px rgba(0, 180, 216, 0.35);
    transform: translateY(-1px);
}
.eh-theme-toggle .ico-sun, .eh-theme-toggle .ico-moon { width: 17px; height: 17px; display: block; }
.eh-theme-toggle .ico-moon { display: none; }
html[data-theme="dark"] .eh-theme-toggle {
    background: #10233A;
    border-color: #27507A;
    color: #4CC3F0;
}
html[data-theme="dark"] .eh-theme-toggle:hover { background: #16304C; color: #FFFFFF; }
html[data-theme="dark"] .eh-theme-toggle .ico-sun { display: none; }
html[data-theme="dark"] .eh-theme-toggle .ico-moon { display: block; }

.eh-appearance-controls--drawer {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--eh-border-2);
}
html[data-theme="dark"] .eh-appearance-controls--drawer { border-top-color: #23415F; }

/* Utility bar above the footer (language + theme, always reachable) */
.eh-appearance-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 18px;
    padding: 12px 16px;
    background: var(--eh-bg-2);
    border-top: 1px solid var(--eh-border);
    border-bottom: 1px solid var(--eh-border);
    font-family: 'Cairo', sans-serif;
}
html[data-theme="dark"] .eh-appearance-bar {
    background: #0A1524;
    border-color: #23415F;
}
.eh-appearance-bar__label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--eh-text-2);
    margin: 0;
}
html[data-theme="dark"] .eh-appearance-bar__label { color: #AEC1D8; }
.eh-appearance-bar__hint {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--eh-text-3);
    letter-spacing: 0.3px;
}
html[data-theme="dark"] .eh-appearance-bar__hint { color: #7E93AD; }

/* Compact layout so nothing overlaps at 390px */
@media (max-width: 430px) {
    .header-actions { gap: 6px !important; }
    .header-actions .header-cta-btn { display: none !important; }
    .header-actions .header-social-links { display: none !important; }
    .eh-appearance-controls { gap: 4px; }
    .eh-lang-switch { height: 30px; padding: 2px; }
    .eh-lang-btn { min-width: 26px; height: 24px; padding: 0 6px; font-size: 11px; }
    .eh-theme-toggle { width: 30px; height: 30px; }
    .mobile-toggle-btn { padding: 7px 8px !important; }
    .main-site-header .header-inner { gap: 8px !important; padding-inline: 12px !important; }
    .main-site-header .brand-logo { max-width: 132px; height: auto; }
    .eh-appearance-bar { gap: 8px 12px; padding: 10px 12px; }
    .eh-appearance-bar__label, .eh-appearance-bar__hint { font-size: 11.5px; text-align: center; }
}
@media (max-width: 360px) {
    .eh-appearance-bar__hint { display: none; }
    .main-site-header .brand-logo { max-width: 110px; }
}

/* ---- Extra inline light backgrounds seen on homepage modules ---- */
html[data-theme="dark"] [style*="background:#f8fbfe" i],
html[data-theme="dark"] [style*="background: #f8fbfe" i],
html[data-theme="dark"] [style*="background:#f4f8fc" i],
html[data-theme="dark"] [style*="background: #f4f8fc" i],
html[data-theme="dark"] [style*="background:#f7fcff" i],
html[data-theme="dark"] [style*="background: #f7fcff" i],
html[data-theme="dark"] [style*="background:#f5faff" i],
html[data-theme="dark"] [style*="background: #f5faff" i],
html[data-theme="dark"] [style*="background:#eef6ff" i],
html[data-theme="dark"] [style*="background: #eef6ff" i],
html[data-theme="dark"] [style*="background:#f0f7fa" i],
html[data-theme="dark"] [style*="background: #f0f7fa" i],
html[data-theme="dark"] [style*="background:#f0f7ff" i],
html[data-theme="dark"] [style*="background: #f0f7ff" i] {
    background-color: #10233A !important;
}
html[data-theme="dark"] [style*="color:#062866" i],
html[data-theme="dark"] [style*="color: #062866" i],
html[data-theme="dark"] [style*="color:#0E1C2F" i],
html[data-theme="dark"] [style*="color: #0E1C2F" i],
html[data-theme="dark"] [style*="color:#333" i],
html[data-theme="dark"] [style*="color: #333" i],
html[data-theme="dark"] [style*="color:#0d274d" i],
html[data-theme="dark"] [style*="color: #0d274d" i] {
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ep-action-strip { background: #10233A !important; border-color: #23415F !important; }
html[data-theme="dark"] .unified-card { background: #10233A !important; border-color: #23415F !important; }
html[data-theme="dark"] .coex-tech-section,
html[data-theme="dark"] .content-section,
html[data-theme="dark"] .why-us-section { background: #0A1524 !important; }
html[data-theme="dark"] .coex-tech-section h2, html[data-theme="dark"] .coex-tech-section h3,
html[data-theme="dark"] .content-section h2, html[data-theme="dark"] .why-us-section h2 { color: #F2F7FF !important; }

/* ---- DARK: home hero, badge, intro, value-prop ribbon (readable on navy) ---- */
html[data-theme="dark"] .home-hero { background: #0A1524 !important; }
html[data-theme="dark"] .home-hero:after { background: linear-gradient(110deg, #062866, #0B3A6B) !important; }
html[data-theme="dark"] .wave, html[data-theme="dark"] .light-wave { opacity: 0.18 !important; }
html[data-theme="dark"] .hero-card-panel {
    background: rgba(10, 21, 36, 0.86) !important;
    border-color: #27507A !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .hero-card-panel h1 { color: #F2F7FF !important; }
html[data-theme="dark"] .hero-card-panel h1 span { color: #4CC3F0 !important; }
html[data-theme="dark"] .hero-card-panel .intro,
html[data-theme="dark"] .hero-copy p.intro { color: #C9DAEE !important; }
html[data-theme="dark"] .hero-card-panel .rule { background: #00B4D8 !important; }
html[data-theme="dark"] .hero-badge {
    background: #0E3A6B !important;
    border-color: #00B4D8 !important;
    color: #7FD8F5 !important;
}
html[data-theme="dark"] .hero-badge *,
html[data-theme="dark"] .hero-badge span { color: #7FD8F5 !important; }
html[data-theme="dark"] .hero-badge .pulse-dot { background: #00B4D8 !important; }
html[data-theme="dark"] .hero-action { background: linear-gradient(135deg, #0B7FD4 0%, #0A4FA8 100%) !important; color: #FFFFFF !important; }
html[data-theme="dark"] .hero-action-wa { background: #0B6FC4 !important; color: #FFFFFF !important; }
html[data-theme="dark"] .hero-action-wa:hover { background: #0C7EDF !important; }
html[data-theme="dark"] .hero-action-secondary { background: #10233A !important; color: #EAF4FF !important; border-color: #27507A !important; }
html[data-theme="dark"] .benefits {
    background: #10233A !important;
    border-color: #27507A !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .benefit strong { color: #F2F7FF !important; }
html[data-theme="dark"] .benefit small { color: #A9BED6 !important; }
html[data-theme="dark"] .benefit + .benefit { border-left-color: #27507A !important; }
html[data-theme="dark"] .metrics-section {
    background: #0A1524 !important;
    border-top-color: #23415F !important;
    border-bottom-color: #23415F !important;
}
html[data-theme="dark"] .trust-badge-item { color: #CFE6FA !important; }
html[data-theme="dark"] .hero-trust-badges { color: #A9BED6 !important; }

/* ---- DARK: descendant text on form/card/table/widget surfaces ---- */
html[data-theme="dark"] form :is(p, li, span, small, label, legend, dt, dd, td, th),
html[data-theme="dark"] .widget :is(p, li, span, small, label),
html[data-theme="dark"] .card :is(p, li, span, small, label),
html[data-theme="dark"] .ps-block :is(p, li, span, small, label),
html[data-theme="dark"] table :is(p, li, span, small, label, td, th),
html[data-theme="dark"] .ps-form :is(p, li, span, small, label) {
    color: #DCE7F5;
}

/* ---- 850px and below: hero + benefit ribbon flow naturally (no clipping) -- */
@media (max-width: 850px) {
    html body .home-hero {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 25px 5% 10px !important;
    }
    html body .benefits {
        position: relative !important;
        inset: auto !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 22px 0 28px !important;
    }
}

/* ---- 480px and below: hero CTAs stack; ribbon natural-height 1-col grid ---- */
@media (max-width: 480px) {
    html body .hero-actions-group { flex-wrap: wrap !important; gap: 10px !important; }
    html body .hero-action { flex: 1 1 100% !important; white-space: normal !important; min-width: 0 !important; }
    html body .hero-action-wa { flex: 1 1 100% !important; width: 100% !important; box-sizing: border-box !important; }
    html body .benefits {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 16px 14px !important;
    }
    html body .benefit { justify-content: flex-start !important; gap: 12px !important; }
    html body .benefit + .benefit {
        border-left: none !important;
        border-top: 1px solid rgba(0, 158, 237, 0.2) !important;
        padding-top: 12px !important;
    }
    html[data-theme="dark"] .benefit + .benefit { border-top-color: #27507A !important; }
    html body .benefit strong { font-size: 15px !important; }
    html body .benefit-icon { height: 44px !important; width: 44px !important; min-width: 44px !important; }
    html body .benefit-icon svg { width: 22px !important; height: 22px !important; }
}

/* ==========================================================================
   DARK: STRATEGIC PAGES (.ep-strategic — contact / industries)
   Base theme rules load after this file, so use scoped selectors to win.
   ========================================================================== */
html[data-theme="dark"] .ep-strategic {
    background: #0A1524 !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ep-strategic .ep-page-container { background: transparent !important; }

html[data-theme="dark"] .ep-strategic .ep-breadcrumb {
    background: #10233A !important;
    border-color: #23415F !important;
    color: #A9BED6 !important;
}
html[data-theme="dark"] .ep-strategic .ep-breadcrumb a { color: #9AD8F5 !important; }
html[data-theme="dark"] .ep-strategic .ep-breadcrumb a:hover { color: #4CC3F0 !important; }

html[data-theme="dark"] .ep-strategic .ep-gold-hero {
    background: linear-gradient(135deg, #0B192C 0%, #0E2135 100%) !important;
    border-color: #23415F !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ep-strategic .ep-gold-hero h1 { color: #F2F7FF !important; }
html[data-theme="dark"] .ep-strategic .ep-gold-hero p { color: #C7D6E8 !important; }
html[data-theme="dark"] .ep-strategic .ep-eyebrow {
    background: #0E3A6B !important;
    border-color: #27507A !important;
    color: #7FD8F5 !important;
}
html[data-theme="dark"] .ep-strategic a.ep-button[href] {
    background: #0B6FC4 !important;
    border-color: #0B6FC4 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .ep-strategic a.ep-button[href] * { color: #FFFFFF !important; }
html[data-theme="dark"] .ep-strategic a.ep-button[href]:hover { background: #0C7EDF !important; color: #FFFFFF !important; }
html[data-theme="dark"] .ep-strategic a.ep-button-light[href] {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #EAF4FF !important;
}
html[data-theme="dark"] .ep-strategic a.ep-button-light[href]:hover { background: #16304C !important; color: #FFFFFF !important; }
html[data-theme="dark"] .ep-strategic .pill-btn-wa:hover,
html[data-theme="dark"] .ep-coex .pill-btn-wa:hover {
    background: #004481 !important;
    border-color: #00B4D8 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .ep-strategic .ep-hero-note {
    background: #10233A !important;
    border-color: #23415F !important;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.65) !important;
}
html[data-theme="dark"] .ep-strategic .ep-hero-note h2 { color: #F2F7FF !important; }
html[data-theme="dark"] .ep-strategic .ep-hero-note p { color: #A9BED6 !important; }

html[data-theme="dark"] .ep-strategic .ep-editorial-figure {
    background: #0B192C !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .ep-strategic .ep-editorial-caption {
    background: #0E2135 !important;
    border-top-color: #23415F !important;
    color: #A9BED6 !important;
}
html[data-theme="dark"] .ep-editorial-figure {
    background: #0B192C !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .ep-editorial-caption {
    background: #0E2135 !important;
    border-top-color: #23415F !important;
    color: #A9BED6 !important;
}
html[data-theme="dark"] .ep-editorial-cover {
    background: #0B192C !important;
    border-color: #23415F !important;
}

html[data-theme="dark"] .ep-strategic .ep-sector-section h2 { color: #F2F7FF !important; }
html[data-theme="dark"] .ep-strategic .ep-sector-card h3 { color: #F2F7FF !important; }
html[data-theme="dark"] .ep-strategic .ep-sector-card p { color: #C7D6E8 !important; }
html[data-theme="dark"] .ep-strategic .ep-sector-card a { color: #7FC7FF !important; }
html[data-theme="dark"] .ep-strategic .ep-sector-card a:hover { color: #4CC3F0 !important; }
html[data-theme="dark"] .ep-strategic .ep-sector-card > span[aria-hidden="true"] {
    background: #0E3A6B !important;
    border-color: #27507A !important;
    color: #7FD8F5 !important;
}
html[data-theme="dark"] .ep-strategic .ep-sector-tag {
    background: #0E3A6B !important;
    border-color: #27507A !important;
    color: #7FD8F5 !important;
}

html[data-theme="dark"] .ep-strategic .ep-action-strip h2 { color: #F2F7FF !important; }
html[data-theme="dark"] .ep-strategic .ep-action-strip p { color: #C7D6E8 !important; }
html[data-theme="dark"] .ep-strategic .unified-intro { color: #C7D6E8 !important; }
html[data-theme="dark"] .ep-strategic .ep-stat-desc { color: #A9BED6 !important; }
html[data-theme="dark"] .ep-strategic .ep-stat-tag { color: #9AD8F5 !important; }

/* Contact calculator/form wrapper (inline light surface on .ep-strategic) */
html[data-theme="dark"] .ep-strategic .calculator-form-wrapper {
    background: #10233A !important;
    color: #E8EFF8 !important;
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7) !important;
}
html[data-theme="dark"] .ep-strategic .form-group label { color: #CFE6FA !important; }
html[data-theme="dark"] .ep-strategic .form-group input,
html[data-theme="dark"] .ep-strategic .form-group select,
html[data-theme="dark"] .ep-strategic .form-group textarea {
    background: #0B192C !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ep-strategic .form-group input:focus,
html[data-theme="dark"] .ep-strategic .form-group select:focus,
html[data-theme="dark"] .ep-strategic .form-group textarea:focus {
    background: #0E1C2F !important;
    border-color: #00B4D8 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .ep-strategic .form-group input::placeholder,
html[data-theme="dark"] .ep-strategic .form-group textarea::placeholder { color: #7E93AD !important; }
html[data-theme="dark"] .ep-strategic iframe { border-color: #23415F !important; }

/* ==========================================================================
   DARK: COEX TECHNOLOGY MODULE (.ep-coex)
   ========================================================================== */
html[data-theme="dark"] .ep-coex {
    background: #0A1524 !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .ep-coex nav a { color: #9AD8F5 !important; }
html[data-theme="dark"] .ep-coex nav a:hover { color: #4CC3F0 !important; }
html[data-theme="dark"] .ep-coex .layer-stage {
    background: #0B192C !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .ep-coex .layer-list button {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #CFE6FA !important;
}
html[data-theme="dark"] .ep-coex .layer-list button.active {
    background: #0B6FC4 !important;
    border-color: #00B4D8 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .ep-coex .ep-wall-section { background: #0B192C !important; }
html[data-theme="dark"] .ep-coex .ep-wall-section text { fill: #CFE6FA !important; }
html[data-theme="dark"] .ep-coex .matrix-table { background: #10233A !important; }
html[data-theme="dark"] .ep-coex .matrix-table td { color: #D7E4F3 !important; }
html[data-theme="dark"] .ep-coex .ep-coex-anatomy {
    background: #0B192C !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__badge {
    background: rgba(14, 58, 107, 0.95) !important;
    border-color: #27507A !important;
    color: #BFE6FA !important;
}
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__main-frame,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__compare-card,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__key-card,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__compare-thumb {
    background: #10233A !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__title,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__compare-title,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__key-header,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__key-text strong { color: #F2F7FF !important; }
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__desc,
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__compare-note { color: #C7D6E8 !important; }
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__key-item {
    background: #0E2135 !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__key-num {
    background: #0E3A6B !important;
    color: #7FD8F5 !important;
}
html[data-theme="dark"] .ep-coex .ep-coex-anatomy__key-sub { color: #A9BED6 !important; }

/* ==========================================================================
   DARK: QUALITY STANDARDS + TEST GALLERY
   ========================================================================== */
html[data-theme="dark"] .quality-page-unified {
    background: #0A1524 !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .quality-page-unified nav a { color: #9AD8F5 !important; }
html[data-theme="dark"] .quality-page-unified nav a:hover { color: #4CC3F0 !important; }
html[data-theme="dark"] .quality-page-unified .unified-intro { color: #C7D6E8 !important; }
html[data-theme="dark"] .quality-page-unified .ep-stat-desc { color: #A9BED6 !important; }
html[data-theme="dark"] .quality-page-unified .ep-stat-tag { color: #9AD8F5 !important; }
html[data-theme="dark"] .quality-page-unified .ep-test-gallery figure {
    background: #10233A !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .quality-page-unified .ep-test-gallery figcaption {
    background: #0E2135 !important;
    color: #9AD8F5 !important;
}

/* ==========================================================================
   DARK: PRODUCT CATALOG / DETAIL SCOPES (.elh-*)
   ========================================================================== */
html[data-theme="dark"] .elh-catalog-scope,
html[data-theme="dark"] .elh-detail-scope {
    --elh-bg: #0A1524;
    --elh-card-bg: #10233A;
    --elh-border: #23415F;
    --elh-text: #E8EFF8;
    --elh-muted: #A9BED6;
    background-color: #0A1524 !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .elh-catalog-scope .elh-title,
html[data-theme="dark"] .elh-detail-scope .elh-title { color: #F2F7FF !important; }
html[data-theme="dark"] .elh-catalog-scope .elh-title span,
html[data-theme="dark"] .elh-detail-scope .elh-title span { color: #7FD8F5 !important; }
html[data-theme="dark"] .elh-catalog-scope .elh-desc,
html[data-theme="dark"] .elh-detail-scope .elh-desc { color: #C7D6E8 !important; }
html[data-theme="dark"] .elh-catalog-scope .elh-sheet-view,
html[data-theme="dark"] .elh-detail-scope .elh-sheet-view {
    background-color: #0B192C !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] .elh-catalog-scope .elh-photo-notice,
html[data-theme="dark"] .elh-detail-scope .elh-photo-notice {
    background: rgba(14, 33, 53, 0.95) !important;
    border-color: #27507A !important;
    color: #CFE6FA !important;
}
html[data-theme="dark"] .elh-catalog-scope .elh-breadcrumbs,
html[data-theme="dark"] .elh-detail-scope .elh-breadcrumbs { color: #A9BED6 !important; }
html[data-theme="dark"] .elh-catalog-scope .elh-breadcrumbs a,
html[data-theme="dark"] .elh-detail-scope .elh-breadcrumbs a { color: #9AD8F5 !important; }
html[data-theme="dark"] .elh-catalog-scope .elh-btn-outline,
html[data-theme="dark"] .elh-detail-scope .elh-btn-outline {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #EAF4FF !important;
}

/* ==========================================================================
   ACCEPTANCE CORRECTION: ENGLISH LTR ALIGNMENT (Arabic untouched)
   ========================================================================== */
html[lang="en"] .elheiba-home {
    direction: ltr !important;
}
html[lang="en"] .elheiba-home .home-hero .hero-copy,
html[lang="en"] .elheiba-home .home-hero .hero-copy .hero-card-panel,
html[lang="en"] .elheiba-home .home-hero .hero-copy .hero-card-panel #home-title,
html[lang="en"] .elheiba-home .home-hero .hero-copy .hero-card-panel .intro {
    direction: ltr !important;
    text-align: left !important;
}
html[lang="en"] .elheiba-home .home-hero .hero-copy .hero-card-panel #home-title,
html[lang="en"] .elheiba-home .home-hero .hero-copy .hero-card-panel .intro {
    margin-left: 0 !important;
    margin-right: auto !important;
}
html[lang="en"] .elheiba-home .home-hero .hero-copy .hero-card-panel .rule {
    direction: ltr !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    align-self: flex-start !important;
}

/* Shared strategic modules — LTR shell, intentional centered content preserved */
html[lang="en"] .ep-strategic,
html[lang="en"] .ep-page-container {
    direction: ltr !important;
    text-align: left !important;
}
html[lang="en"] .ep-strategic .text-center,
html[lang="en"] .ep-strategic [class*="__header"],
html[lang="en"] .ep-strategic [class*="__head"],
html[lang="en"] .ep-strategic .ep-section-header,
html[lang="en"] .ep-strategic .ep-page-header,
html[lang="en"] .ep-page-container .text-center {
    text-align: center !important;
}

/* English footer direction and alignment */
html[lang="en"] .mega-site-footer {
    direction: ltr !important;
    text-align: left !important;
}
html[lang="en"] .mega-site-footer .text-center,
html[lang="en"] .mega-site-footer [class*="copyright"] {
    text-align: center !important;
}

/* Dark: phone digits legible white (CTA arrow disc remains white/blue) */
html[data-theme="dark"] .elheiba-home .home-hero .hero-actions-group .hero-action-wa .phone-digits {
    color: #FFFFFF !important;
}
html[lang="en"] .elheiba-home .home-hero .hero-actions-group {
    flex-wrap: wrap !important;
}
html[lang="en"] .elheiba-home .home-hero .hero-actions-group .hero-action-wa :is(.arrow, .arrow-icon, .arrow-circle, .btn-arrow, .icon-circle, .cta-arrow, [class*="arrow"]) {
    background: #FFFFFF !important;
    color: #005BAA !important;
}
html[lang="en"] .elheiba-home .home-hero .hero-copy {
    justify-content: flex-start !important;
}
@media (max-width: 850px) {
    html[lang="en"] .elheiba-home .home-hero .hero-copy {
        justify-content: center !important;
    }
}

/* ==========================================================================
   ACCEPTANCE CORRECTION: DARK CONTRAST + ENGLISH LTR (COEX/ABOUT/MOLDING/QUALITY)
   ========================================================================== */
html[data-theme="dark"] body .ep-coex .unified-intro,
html[data-theme="dark"] body .ep-coex .ep-stat-desc,
html[data-theme="dark"] body .ep-about .unified-intro,
html[data-theme="dark"] body .ep-about .ep-stat-desc,
html[data-theme="dark"] body .ep-molding .unified-intro,
html[data-theme="dark"] body .ep-molding .ep-stat-desc {
    color: #C7D6E8 !important;
}

html[lang="en"] .ep-coex,
html[lang="en"] .ep-about,
html[lang="en"] .ep-molding,
html[lang="en"] .quality-page-unified {
    direction: ltr !important;
}
html[lang="en"] .ep-coex .unified-section-title,
html[lang="en"] .ep-coex .unified-intro,
html[lang="en"] .ep-coex .ep-editorial-intro__copy,
html[lang="en"] .ep-about .unified-section-title,
html[lang="en"] .ep-about .unified-intro,
html[lang="en"] .ep-about .ep-editorial-intro__copy,
html[lang="en"] .ep-molding .unified-section-title,
html[lang="en"] .ep-molding .unified-intro,
html[lang="en"] .ep-molding .ep-editorial-intro__copy,
html[lang="en"] .quality-page-unified .unified-section-title,
html[lang="en"] .quality-page-unified .unified-intro,
html[lang="en"] .quality-page-unified .ep-editorial-intro__copy {
    direction: ltr !important;
    text-align: left !important;
    text-justify: auto !important;
}
html[lang="en"] .ep-coex nav,
html[lang="en"] .ep-about nav,
html[lang="en"] .ep-molding nav,
html[lang="en"] .quality-page-unified nav {
    direction: ltr !important;
    text-align: left !important;
}

/* ==========================================================================
   FINAL DARK ACCEPTANCE: PRODUCT CARDS + TECHNICAL CATALOG + BREADCRUMBS
   ========================================================================== */
html[data-theme="dark"] body .elh-catalog-scope .elh-card {
    background: #10233A !important;
    background-image: none !important;
    border-color: #23415F !important;
}
html[data-theme="dark"] body .elh-detail-scope .elh-card {
    background: #10233A !important;
    background-image: none !important;
    border-color: #23415F !important;
}

html[data-theme="dark"] body .ep-tech-catalog .unified-intro {
    color: #C7D6E8 !important;
}
html[data-theme="dark"] body .ep-tech-catalog .unified-section-title,
html[data-theme="dark"] body .ep-tech-catalog .unified-section-title span,
html[data-theme="dark"] body .ep-tech-catalog .unified-title,
html[data-theme="dark"] body .ep-tech-catalog .unified-title span {
    color: #F2F7FF !important;
}
html[data-theme="dark"] body .ep-tech-catalog .unified-rule {
    background: #4CC3F0 !important;
    border-color: #4CC3F0 !important;
}
html[data-theme="dark"] body .ep-tech-catalog nav a,
html[data-theme="dark"] body .ep-tech-catalog .breadcrumb a {
    color: #9AD8F5 !important;
}
html[data-theme="dark"] body .ep-tech-catalog nav a:hover,
html[data-theme="dark"] body .ep-tech-catalog .breadcrumb a:hover {
    color: #4CC3F0 !important;
}
html[data-theme="dark"] body .ep-tech-catalog .unified-card,
html[data-theme="dark"] body .ep-tech-catalog .ep-tech-card,
html[data-theme="dark"] body .ep-tech-catalog .tech-card {
    background: #10233A !important;
    border-color: #23415F !important;
}

html[data-theme="dark"] body .ep-quote nav a,
html[data-theme="dark"] body .ep-quote .breadcrumb a,
html[data-theme="dark"] body .ep-rfq-page nav a,
html[data-theme="dark"] body .ep-rfq-page .breadcrumb a,
html[data-theme="dark"] body .ep-tech-catalog nav a,
html[data-theme="dark"] body .ep-coex nav a,
html[data-theme="dark"] body .ep-about nav a,
html[data-theme="dark"] body .ep-molding nav a,
html[data-theme="dark"] body .quality-page-unified nav a {
    color: #9AD8F5 !important;
}

html[lang="en"] .ep-tech-catalog {
    direction: ltr !important;
    text-align: left !important;
}
html[lang="en"] .ep-tech-catalog .unified-section-title,
html[lang="en"] .ep-tech-catalog .unified-intro,
html[lang="en"] .ep-tech-catalog .ep-editorial-intro__copy {
    direction: ltr !important;
    text-align: left !important;
    text-justify: auto !important;
}
html[lang="en"] .ep-tech-catalog nav {
    direction: ltr !important;
    text-align: left !important;
}

html[lang="en"] body :is(.ep-coex, .ep-molding, .ep-about, .quality-page-unified) .unified-card p:not(.ep-stat-desc):not(.ep-stat-title) {
    direction: ltr !important;
    text-align: left !important;
    text-align-last: left !important;
    text-justify: auto !important;
}

/* Keep engineering highlights legible on navy surfaces. */
html[data-theme="dark"] body :is(.ep-molding, .ep-about, .ep-coex, .quality-page-unified) .unified-section-title span { color: #4CC3F0 !important; }
html[data-theme="dark"] body :is(.ep-molding, .ep-about, .ep-coex, .quality-page-unified) .unified-rule { background: #4CC3F0 !important; }

/* Dark contrast acceptance: shared footer, home components and desktop nav.
   Keep light badges/icons as light surfaces with navy type; never recolor
   descendants indiscriminately, since arrow discs have their own contrast. */
html[data-theme="dark"] .mega-site-footer .footer-links li a,
html[data-theme="dark"] .mega-site-footer .footer-links li a .footer-link-text {
    color: #D7E4F3 !important;
}
html[data-theme="dark"] .mega-site-footer .footer-links li a {
    border-bottom-color: #23415F !important;
}
html[data-theme="dark"] .mega-site-footer .footer-links li a:is(:hover, :focus-visible),
html[data-theme="dark"] .mega-site-footer .footer-links li a:is(:hover, :focus-visible) .footer-link-text {
    color: #4CD6FB !important;
}
html[data-theme="dark"] .mega-site-footer .footer-links li a:focus-visible {
    outline: 2px solid #4CD6FB !important;
    outline-offset: 3px !important;
}
html[data-theme="dark"] .mega-site-footer .quick-contact-pill {
    background: #10233A !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] .mega-site-footer .quick-contact-pill .pill-info,
html[data-theme="dark"] .mega-site-footer .quick-contact-pill .pill-info bdi,
html[data-theme="dark"] .mega-site-footer .quick-contact-pill .pill-info .bdi-spec {
    color: #E8EFF8 !important;
}
html[data-theme="dark"] .mega-site-footer .quick-contact-pill .pill-info small {
    color: #B7C7DB !important;
}
html[data-theme="dark"] .mega-site-footer .quick-contact-pill:is(:hover, :focus-visible) {
    border-color: #4CD6FB !important;
}
html[data-theme="dark"] .mega-site-footer .quick-contact-pill:is(:hover, :focus-visible) .pill-info bdi,
html[data-theme="dark"] .mega-site-footer .quick-contact-pill:is(:hover, :focus-visible) .pill-info .bdi-spec {
    color: #4CD6FB !important;
}
html[data-theme="dark"] .mega-site-footer .quick-contact-pill:focus-visible {
    outline: 2px solid #4CD6FB !important;
    outline-offset: 3px !important;
}
/* These fixed light surfaces are intentionally retained in the dark footer. */
html[data-theme="dark"] .mega-site-footer .quick-contact-pill .pill-icon {
    background: #E0F2FE !important;
    color: #005BAA !important;
}
html[data-theme="dark"] .mega-site-footer .footer-cert-tags .cert-tag,
html[data-theme="dark"] .mega-site-footer .footer-cert-tags .cert-tag .bdi-spec {
    background: #F0F3FF !important;
    color: #005BAA !important;
}

/* Stat cards use the same dark surface across the public page templates. */
html[data-theme="dark"] .ep-stat-card .ep-stat-tag,
html[data-theme="dark"] .ep-stat-card .ep-stat-desc {
    color: #B7C7DB !important;
}
html[data-theme="dark"] .ep-stat-card .ep-stat-num,
html[data-theme="dark"] .ep-stat-card .ep-stat-num.bdi-spec {
    color: #4CD6FB !important;
}
html[data-theme="dark"] .elheiba-home .ep-product-spotlight > div > .bdi-spec {
    color: #005BAA !important;
}
html[data-theme="dark"] .elheiba-home .why-content .bdi-spec {
    color: #4CD6FB !important;
}
html[data-theme="dark"] .elheiba-home .b2b-mini-badge {
    color: #005BAA !important;
}

/* Preserve the homepage calculator's intentional white panel. Inputs already
   receive dark input surfaces from the shared appearance layer. */
html[data-theme="dark"] .elheiba-home .calculator-form-wrapper {
    background: #FFFFFF !important;
    color: #062866 !important;
}
html[data-theme="dark"] .elheiba-home .calculator-form-wrapper .form-group label {
    color: #062866 !important;
}
html[data-theme="dark"] .elheiba-home .calculator-form-wrapper .calc-guarantee {
    color: #475569 !important;
}
html[data-theme="dark"] .elheiba-home .calculator-form-wrapper .calc-guarantee .phone-digits.bdi-spec {
    color: #005BAA !important;
}

/* Active/hover/focus desktop items sit on pale pills, including dark mode.
   Set that complete foreground/surface pair explicitly for each state. */
html[data-theme="dark"] .main-site-header .navigation.desktop-nav :is(.nav-link, .nav-dropdown-trigger):is(.active, :hover, :focus-visible) {
    background: #E0F2FE !important;
    color: #005BAA !important;
    border-color: #DCEAF4 !important;
}

/* Light-mode contrast: blue type on pale surfaces; cyan remains decorative.
   Explicit foreground/background pairs preserve the filled and outlined CTAs. */
html[data-theme="light"] .main-site-header .navigation.desktop-nav :is(.nav-link, .nav-dropdown-trigger):is(.active, :hover, :focus-visible) {
    background: #E0F2FE !important;
    color: #005BAA !important;
    border-color: #DCEAF4 !important;
}
html[data-theme="light"] :is(.elh-catalog-scope, .elh-detail-scope) .elh-breadcrumbs .active,
html[data-theme="light"] :is(.ep-about, .ep-coex, .quality-page-unified, .ep-molding, .ep-rfq, .ep-rfq-page, .ep-tech-catalog) nav span,
html[data-theme="light"] .ep-strategic .ep-breadcrumb [aria-current="page"] {
    color: #005BAA !important;
}
html[data-theme="light"] :is(.ep-about, .ep-coex, .quality-page-unified, .ep-molding, .ep-rfq, .ep-rfq-page, .ep-tech-catalog) nav span .bdi-spec,
html[data-theme="light"] :is(.elh-catalog-scope, .elh-detail-scope) .elh-breadcrumbs .active .bdi-spec {
    color: inherit !important;
}
/* The quotation hero explicitly declares a white heading on blue and is
   excluded, as are headings with any other intentional inline foreground. */
html[data-theme="light"] :is(.elheiba-home, .ep-about, .ep-coex, .quality-page-unified, .ep-molding, .ep-rfq, .ep-rfq-page, .ep-tech-catalog) .unified-section-title:not([style*="color" i]) > span {
    color: #005BAA !important;
}
html[data-theme="light"] :is(.elheiba-home, .ep-about, .ep-coex, .quality-page-unified, .ep-molding, .ep-rfq, .ep-rfq-page, .ep-tech-catalog) .unified-section-title:not([style*="color" i]) > span .bdi-spec {
    color: inherit !important;
}
html[data-theme="light"] .elheiba-home .hero-card-panel p.intro {
    color: #0E1C2F !important;
}
html[data-theme="light"] .elheiba-home .b2b-mini-badge {
    color: #005BAA !important;
}
html[data-theme="light"] .ep-coex .ep-coex-anatomy__compare-tag,
html[data-theme="light"] .ep-coex .ep-coex-anatomy__key-direction {
    color: #005BAA !important;
}
html[data-theme="light"] .ep-strategic .ep-eyebrow,
html[data-theme="light"] .ep-strategic .ep-sector-tag,
html[data-theme="light"] .ep-strategic .ep-sector-tag.bdi-spec {
    color: #005BAA !important;
}
html[data-theme="light"] .ep-strategic .ep-sector-card > a {
    color: #005BAA !important;
}
html[data-theme="light"] .ep-strategic .ep-sector-card > a:is(:hover, :focus-visible) {
    color: #004481 !important;
}
html[data-theme="light"] .ep-strategic a.ep-button[href] {
    background: #005BAA !important;
    border-color: #005BAA !important;
    color: #FFFFFF !important;
}
html[data-theme="light"] .ep-strategic a.ep-button[href]:is(:hover, :focus-visible) {
    background: #004481 !important;
    border-color: #004481 !important;
    color: #FFFFFF !important;
}
html[data-theme="light"] .ep-strategic a.ep-button.ep-button-light[href] {
    background: #FFFFFF !important;
    border-color: #DCEAF4 !important;
    color: #005BAA !important;
}
html[data-theme="light"] .ep-strategic a.ep-button.ep-button-light[href]:is(:hover, :focus-visible) {
    background: #F0F3FF !important;
    border-color: #005BAA !important;
    color: #004481 !important;
}

/* A translucent panel can land on a mid-tone factory image where neither
   dark nor white small type reaches 4.5:1. Its light theme surface is fixed. */
html[data-theme="light"] .elheiba-home .hero-card-panel {
    background: #F8FAFC !important;
}
html[data-theme="light"] .elheiba-home .hero-card-panel h1 > span,
html[data-theme="light"] .elheiba-home .unified-section-title:not([style*="color" i]) > span span {
    color: #005BAA !important;
}
html[data-theme="light"] .ep-coex .ep-coex-anatomy__subtitle,
html[data-theme="light"] .ep-coex .ep-coex-anatomy__subtitle .bdi-spec {
    color: #005BAA !important;
}
html[data-theme="light"] .quality-page-unified .unified-card span[style*="width: 42px"][style*="color: #ffffff"] {
    background: #005BAA !important;
    color: #FFFFFF !important;
}

/* Cyan remains the focus ring; link text keeps readable blue on ice white. */
html[data-theme="light"] body #footer-contact .footer-links a:is(:hover, :focus-visible),
html[data-theme="light"] body #footer-contact .footer-links a:is(:hover, :focus-visible) .footer-link-text {
    color: #005BAA !important;
}

/* Dark native catalog/detail surfaces and semantic copy. Text tokens may be
   light; controls that also used the old navy token retain explicit blue fills. */
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) {
    --elh-navy: #E8EFF8;
    --elh-text: #E8EFF8;
    --elh-muted: #B7C7DB;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-selector-group, .elh-color-trial-intro, .elh-tab-info-card, .elh-review-points > div) {
    background: #0E2135 !important;
    background-image: none !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-selector-title, .elh-label, .elh-color-picker-row label, .elh-color-trial-intro strong, .elh-tab-info-card h3) {
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-color-trial-intro p, .elh-color-trial-intro small, .elh-color-notice, .elh-tab-info-card p, .elh-review-points p, .elh-review-points small, .elh-factory-pending) {
    color: #C7D6E8 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-selected-label, .elh-review-points strong, .elh-breadcrumbs .active, #elh-result-count, #elh-cat-count) {
    color: #7FD8F5 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) .elh-badge {
    background: #0E3A6B !important;
    border-color: #27507A !important;
    color: #D7E4F3 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) .elh-badge :is(span, strong, bdi) {
    color: inherit !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-tab-btn.is-active, .elh-tab-btn[aria-selected="true"], .elh-family-btn.is-active) {
    background: #005BAA !important;
    border-color: #005BAA !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) .elh-retry-btn:hover {
    background: #062866 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-tab-btn, .elh-family-btn):not(.is-active):not([aria-selected="true"]) {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #D7E4F3 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-tab-btn, .elh-family-btn):not(.is-active):is(:hover, :focus-visible) {
    background: #14304C !important;
    border-color: #4CD6FB !important;
    color: #FFFFFF !important;
}

/* Real table cells need an explicit dark paint, including alternating rows;
   generic pale td text alone was insufficient over the old white row paints. */
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) {
    background: #10233A !important;
    color: #E8EFF8 !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) th {
    background: #062866 !important;
    border-color: #27507A !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) td {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) tr:nth-child(even) td {
    background: #14304C !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) tr:hover td {
    background: #1A3B5C !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) td :is(span, strong, bdi) {
    color: inherit !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) .elh-table .elh-table-notice {
    color: #C7D6E8 !important;
}
/* Catalog counters and closure compatibility snippets are native card copy. */
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) .elh-filter-bar > div,
html[data-theme="dark"] body .elh-catalog-scope .elh-card.elh-pad-sm > div {
    color: #E8EFF8 !important;
}

/* A white outline pill is a light surface even inside a dark page. */
html[data-theme="dark"] body .pill-btn-outline .bdi-spec {
    color: #005BAA !important;
}
html[data-theme="dark"] body .ep-coex .layer-list button.active .bdi-spec {
    color: #FFFFFF !important;
}
html[data-theme="dark"] body .ep-coex .ep-coex-anatomy__caption {
    color: #C7D6E8 !important;
}

/* Factory cards retain a dark surface rather than pale text over ice panels. */
html[data-theme="dark"] body .ep-about .ep-supply-flow li {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body .ep-about .ep-supply-flow strong {
    color: #7FD8F5 !important;
}
html[data-theme="dark"] body .ep-about .ep-facility-copy :is(strong, span) {
    color: #D7E4F3 !important;
}
html[data-theme="dark"] body .ep-about .ep-facility-gallery figcaption {
    background: #10233A !important;
    color: #D7E4F3 !important;
}
html[data-theme="dark"] body .ep-about .ep-facility-gallery figcaption span {
    color: #B7C7DB !important;
}
html[data-theme="dark"] body .ep-about .unified-card :is([style*="background:#00a5ee" i], [style*="background: #00a5ee" i]) {
    background: #005BAA !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] body .ep-molding .stage-card strong {
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body .ep-trust-sidebar .ep-trust-box {
    background: #10233A !important;
    border-color: #27507A !important;
}
html[data-theme="dark"] body .ep-trust-sidebar .ep-trust-box h3 {
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body .ep-trust-sidebar .ep-trust-box p {
    color: #C7D6E8 !important;
}
html[data-theme="dark"] body .ep-strategic .ep-sector-card .ep-sector-en {
    color: #B7C7DB !important;
}

/* Variant option pills keep their literal swatch dots/photos untouched. */
html[data-theme="dark"] #main-content .elh-detail-scope :is(.elh-cap-btn, .elh-body-btn, .elh-cap-type-btn) {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] #main-content .elh-detail-scope :is(.elh-cap-btn, .elh-body-btn, .elh-cap-type-btn):is(.is-active, [aria-checked="true"]) {
    background: #005BAA !important;
    border-color: #4CD6FB !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] #main-content .elh-detail-scope :is(.elh-cap-btn, .elh-body-btn, .elh-cap-type-btn):hover:not(.is-active) {
    background: #14304C !important;
    border-color: #4CD6FB !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] #main-content .elh-detail-scope :is(.elh-cap-btn, .elh-body-btn, .elh-cap-type-btn) > span:not(.elh-swatch-dot) {
    color: inherit !important;
}
html[data-theme="dark"] body .elh-detail-scope :is(.elh-thumb-label, .elh-zoom-close) {
    color: #062866 !important;
}
html[data-theme="dark"] body .elh-detail-scope .elh-thumb-fallback {
    color: #475569 !important;
}
html[data-theme="dark"] body .elh-detail-scope :is(.elh-notice-box, .elh-tab-note, .elh-color-order-summary, .elh-request-summary, .elh-prepared-request, .elh-optional-details, .elh-zoom-dialog) {
    background: #0E2135 !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body .elh-detail-scope :is(.elh-notice-text, .elh-tab-story p, .elh-tab-story figcaption, .elh-tab-note, .elh-color-order-summary, .elh-request-summary dd, .elh-field-group small, .elh-zoom-caption) {
    color: #C7D6E8 !important;
}
html[data-theme="dark"] body .elh-detail-scope :is(.elh-tab-story strong, .elh-request-summary > strong, .elh-request-summary dt, .elh-optional-details summary) {
    color: #7FD8F5 !important;
}
html[data-theme="dark"] body .elh-detail-scope .elh-factory-engineering {
    background: #10233A !important;
    border-color: #27507A !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body .elh-detail-scope :is(.elh-factory-values dt, .elh-factory-values dd, .elh-factory-formula) {
    color: #C7D6E8 !important;
}
html[data-theme="dark"] body .elh-detail-scope .elh-factory-label-result {
    background: #0E3A6B !important;
    color: #E8EFF8 !important;
}
html[data-theme="dark"] body .ep-molding nav > span {
    color: #7FD8F5 !important;
}

html[data-theme="dark"] body .elh-detail-scope .elh-pill-arrow > span:not(.elh-arrow-circle) {
    color: #FFFFFF !important;
}

/* Plain specification data links keep their own affordance on dark rows;
   filled/button-like controls inside tables retain their component palette. */
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) td > a:not([class*="btn"]):not([class*="pill"]):not([class*="button"]):not([class*="cta"]) {
    color: #7FD8F5 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) td > a:not([class*="btn"]):not([class*="pill"]):not([class*="button"]):not([class*="cta"]):is(:hover, :focus-visible) {
    color: #4CD6FB !important;
}
html[data-theme="dark"] body :is(.elh-catalog-scope, .elh-detail-scope) :is(.elh-table, .elh-card-specs) td > a:not([class*="btn"]):not([class*="pill"]):not([class*="button"]):not([class*="cta"]):focus-visible {
    outline: 2px solid #4CD6FB !important;
    outline-offset: 3px !important;
}

/* Current location and factory captions remain readable without hover. */
html[data-theme="dark"] body .ep-tech-catalog nav > span {
    color: #7FD8F5 !important;
}
html[data-theme="dark"] .quality-page-unified .unified-card span[style*="width: 42px"][style*="color: #ffffff"] {
    background: #005BAA !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .quality-page-unified .unified-card span[style*="color:#64748b"],
html[data-theme="dark"] .quality-page-unified .unified-card span[style*="color: #64748b"] {
    color: #C7D6E8 !important;
}
