/* Theme switch: toggle button (both themes) + the dark layer.
   The theme lives on <html data-theme="light|dark"> (set before first paint by the
   inline script in header.php). Everything below `html[data-theme="dark"]` only
   applies in dark; custom.css stays the light theme untouched. */

/* ---- Toggle button ---------------------------------------------------- */
.ew-theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(47, 69, 102, .22);
    border-radius: 50%;
    background: transparent;
    color: #2f4566;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}
.ew-theme-toggle:hover {
    background: rgba(113, 163, 215, .16);
    border-color: #71a3d7;
    color: #2f4566;
}
.ew-theme-toggle:focus-visible {
    outline: 2px solid #71a3d7;
    outline-offset: 2px;
}
.ew-theme-toggle svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: transform .45s cubic-bezier(.34, 1.4, .5, 1), opacity .3s;
}
/* Light theme: moon in view (click = go dark); the sun waits below, turned. */
.ew-theme-toggle .ew-ico-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.ew-theme-toggle .ew-ico-moon { opacity: 1; transform: none; }
html[data-theme="dark"] .ew-theme-toggle .ew-ico-sun { opacity: 1; transform: none; }
html[data-theme="dark"] .ew-theme-toggle .ew-ico-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
@media (prefers-reduced-motion: reduce) {
    .ew-theme-toggle, .ew-theme-toggle svg { transition: none; }
}
.desktopNavbar .ew-theme-li {
    display: flex;
    align-items: center;
}
.desktopNavbar .ew-theme-li .ew-theme-toggle { margin-left: 4px; }
.ew-theme-toggle-mobile { width: 34px; height: 34px; flex: none; }
/* Desktop: the switch sits in the top strip next to the account buttons (the main
   row has no spare width at 1200-1920px in es/ca/en, see "Desktop navbar fit" in custom.css). */
.ew-theme-toggle-toolbar { width: 32px; height: 32px; margin-left: 14px; vertical-align: middle; flex: none; }

/* ---- Dark layer ------------------------------------------------------- */
html[data-theme="dark"] {
    --ew-bg: #0d1520;
    --ew-bg-2: #121c2b;
    --ew-surface: #172335;
    --ew-surface-2: #1d2b41;
    --ew-line: #2a3b55;
    --ew-text: #c9d5e4;
    --ew-text-2: #9fb0c6;
    --ew-head: #eef3f9;
    --ew-blue: #8fb8e8;
    --ew-green: #99cc97;
    color-scheme: dark;
    color: var(--ew-text);
    background: var(--ew-bg);
}
html[data-theme="dark"] body {
    background: var(--ew-bg);
    color: var(--ew-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"] .uk-h1, html[data-theme="dark"] .uk-h2, html[data-theme="dark"] .uk-h3,
html[data-theme="dark"] .uk-h4, html[data-theme="dark"] .uk-h5, html[data-theme="dark"] .uk-h6,
html[data-theme="dark"] .uk-heading-small, html[data-theme="dark"] .uk-heading-medium,
html[data-theme="dark"] .uk-heading-large, html[data-theme="dark"] .uk-card-title {
    color: var(--ew-head);
}
html[data-theme="dark"] .uk-heading-primary { color: var(--ew-blue); }
html[data-theme="dark"] p, html[data-theme="dark"] li, html[data-theme="dark"] dd, html[data-theme="dark"] dt,
html[data-theme="dark"] label, html[data-theme="dark"] td, html[data-theme="dark"] th {
    color: var(--ew-text);
}
html[data-theme="dark"] .uk-text-muted, html[data-theme="dark"] .uk-text-meta { color: var(--ew-text-2) !important; }
html[data-theme="dark"] a:not([class*="uk-button"]):not(.cl-btn) { color: var(--ew-blue); }
html[data-theme="dark"] hr { border-color: var(--ew-line); }

/* Sections and surfaces */
html[data-theme="dark"] .uk-section-default,
html[data-theme="dark"] .uk-background-default { background-color: var(--ew-bg) !important; }
html[data-theme="dark"] .uk-section-muted,
html[data-theme="dark"] .uk-background-muted { background-color: var(--ew-bg-2) !important; }
html[data-theme="dark"] .uk-card-default,
html[data-theme="dark"] .uk-card-hover,
html[data-theme="dark"] .uk-card { background-color: var(--ew-surface); color: var(--ew-text); }
html[data-theme="dark"] .uk-card-default { box-shadow: 0 0 0 1px var(--ew-line); }

/* Navbar */
html[data-theme="dark"] #main-navbar,
html[data-theme="dark"] .navbar-sticky-wrapper,
html[data-theme="dark"] #main-navbar .uk-background-default,
html[data-theme="dark"] .uk-navbar-container { background: var(--ew-bg) !important; }
html[data-theme="dark"] #main-navbar .uk-background-muted,
html[data-theme="dark"] #tm-toolbar { background: var(--ew-bg-2) !important; }
html[data-theme="dark"] #main-navbar { box-shadow: 0 2px 12px rgba(0, 0, 0, .5) !important; }
html[data-theme="dark"] .uk-navbar-nav > li > a { color: var(--ew-text) !important; }
html[data-theme="dark"] .uk-navbar-nav > li:hover > a,
html[data-theme="dark"] .uk-navbar-nav > li > a:hover,
html[data-theme="dark"] .uk-navbar-nav > li > a[aria-expanded="true"] { color: var(--ew-head) !important; }
html[data-theme="dark"] .ew-theme-toggle { color: var(--ew-text); border-color: var(--ew-line); }
html[data-theme="dark"] .ew-theme-toggle:hover { color: #f5d77a; border-color: #f5d77a; background: rgba(245, 215, 122, .1); }
html[data-theme="dark"] .uk-dropdown,
html[data-theme="dark"] .uk-navbar-dropdown { background: var(--ew-surface); color: var(--ew-text); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); border: 1px solid var(--ew-line); }
html[data-theme="dark"] .uk-navbar-dropdown-nav > li > a,
html[data-theme="dark"] .uk-dropdown-nav > li > a { color: var(--ew-text); }
html[data-theme="dark"] .uk-navbar-dropdown-nav > li > a:hover,
html[data-theme="dark"] .uk-dropdown-nav > li > a:hover { color: var(--ew-head); background: var(--ew-surface-2); }

/* Logo: the navy "every" is unreadable on dark, so the navbars carry a second <img> with the
   white artwork (logo_everyWAN_w.svg). Plain display switch, works in every browser. */
/* (class repeated on purpose: custom.css forces display:block !important on the mobile logo) */
html body img.ew-logo-dark.ew-logo-dark.ew-logo-dark.ew-logo-dark { display: none !important; }
html[data-theme="dark"] body img.ew-logo-light.ew-logo-light.ew-logo-light.ew-logo-light { display: none !important; }
html[data-theme="dark"] body img.ew-logo-dark.ew-logo-dark.ew-logo-dark.ew-logo-dark { display: block !important; }

/* Forms */
html[data-theme="dark"] .uk-input, html[data-theme="dark"] .uk-select, html[data-theme="dark"] .uk-textarea,
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"], html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="password"], html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select, html[data-theme="dark"] textarea {
    background-color: var(--ew-surface); color: var(--ew-head); border-color: var(--ew-line);
}
html[data-theme="dark"] ::placeholder { color: #7f91a9; opacity: 1; }
html[data-theme="dark"] .uk-input:focus, html[data-theme="dark"] .uk-select:focus, html[data-theme="dark"] .uk-textarea:focus {
    background-color: var(--ew-surface-2); border-color: var(--ew-blue); color: var(--ew-head);
}

/* Inline colours used all over the partials (style="color: ...").
   Attribute selectors keep us from editing every partial. */
html[data-theme="dark"] [style*="color: #2f4566"], html[data-theme="dark"] [style*="color:#2f4566"],
html[data-theme="dark"] [style*="color: #2f4466"], html[data-theme="dark"] [style*="color: #004165"],
html[data-theme="dark"] [style*="color:#004165"], html[data-theme="dark"] [style*="color: #1a535c"],
html[data-theme="dark"] [style*="color: #333"], html[data-theme="dark"] [style*="color:#333"] { color: var(--ew-head) !important; }
html[data-theme="dark"] [style*="color: #666"], html[data-theme="dark"] [style*="color:#666"],
html[data-theme="dark"] [style*="color: #555"], html[data-theme="dark"] [style*="color:#555"],
html[data-theme="dark"] [style*="color: #999"], html[data-theme="dark"] [style*="color:#999"],
html[data-theme="dark"] [style*="color: #5a6d7e"], html[data-theme="dark"] [style*="color:#5a6d7e"],
html[data-theme="dark"] [style*="color: #5a6a7e"], html[data-theme="dark"] [style*="color: #3a4a5e"],
html[data-theme="dark"] [style*="color:#3a4a5e"], html[data-theme="dark"] [style*="color:#8a949e"] { color: var(--ew-text-2) !important; }
html[data-theme="dark"] [style*="color: #71a3d7"], html[data-theme="dark"] [style*="color:#71a3d7"],
html[data-theme="dark"] [style*="color: #71A3D7"], html[data-theme="dark"] [style*="color:#71A3D7"] { color: var(--ew-blue) !important; }
html[data-theme="dark"] [style*="color: #dc2f02"], html[data-theme="dark"] [style*="color: #9d0208"] { color: #ff8a80 !important; }
html[data-theme="dark"] [style*="color: #e85d04"] { color: #ffa561 !important; }
html[data-theme="dark"] [style*="color: #856404"] { color: #f5d77a !important; }
html[data-theme="dark"] [style*="color: #6ca668"] { color: var(--ew-green) !important; }
/* Inline light backgrounds become surfaces */
html[data-theme="dark"] [style*="background: #ffffff"], html[data-theme="dark"] [style*="background: #fff;"],
html[data-theme="dark"] [style*="background:#fff"], html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background: rgba(255,255,255,0.95)"], html[data-theme="dark"] [style*="background: rgba(255, 255, 255, 0.95)"],
html[data-theme="dark"] [style*="background: #f8f9fa"], html[data-theme="dark"] [style*="background: #f5faff"],
html[data-theme="dark"] [style*="background: #f3f9f4"], html[data-theme="dark"] [style*="background: #e8f1f8"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%)"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%)"] { background: var(--ew-surface) !important; }
html[data-theme="dark"] [style*="background: #d1edff"] { background: #12344d !important; }
html[data-theme="dark"] [style*="background: #fff3cd"] { background: #3a3117 !important; }
html[data-theme="dark"] [style*="border: 1px solid #e"], html[data-theme="dark"] [style*="border:1px solid #e"] { border-color: var(--ew-line) !important; }

/* Hero / primary gradient: deep brand teal-blue instead of the bright green-blue,
   so white copy keeps contrast. */
html[data-theme="dark"] .uk-background-primary,
html[data-theme="dark"] .home-hero-wrapper {
    background: linear-gradient(135deg, #123a52 0%, #17506a 55%, #1c5f5c 100%) !important;
}
/* Brand gradient chips and buttons that carry white text */
html[data-theme="dark"] [style*="linear-gradient(135deg, #99cc97 0%, #71a3d7 100%)" i],
html[data-theme="dark"] [style*="linear-gradient(135deg, #71a3d7 0%, #99cc97 100%)" i],
html[data-theme="dark"] [style*="linear-gradient(135deg, #99cc97 0%, #6ca668 100%)" i] { background: linear-gradient(135deg, #3b8a42 0%, #3a73b4 100%) !important; }
/* Wide strips with the same gradient (newsletter band): deep, like the hero */
html[data-theme="dark"] [style*="linear-gradient(135deg, #71a3d7 0%, #99cc97 100%)" i][style*="padding: 40px 0"],
html[data-theme="dark"] [style*="linear-gradient(135deg, #99cc97 0%, #71a3d7 100%)" i][style*="padding: 40px 0"] {
    background: linear-gradient(135deg, #123a52 0%, #17506a 60%, #1a5558 100%) !important;
}
/* Secondary buttons: navy pill (large) and brand-gradient (small) get brighter fills in dark */
html[data-theme="dark"] .uk-button-secondary:not(.uk-button-small):not(.card-button-blue) {
    background: linear-gradient(to bottom, #3d6fb0 0%, #2f5c98 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .4) !important;
}
html[data-theme="dark"] .uk-button-secondary.uk-button-small { background: linear-gradient(to right, #3b8a42, #3a73b4) !important; color: #fff !important; filter: none !important; }
html[data-theme="dark"] .uk-button-secondary:hover { color: #fff !important; filter: brightness(1.12); }
html[data-theme="dark"] .uk-button-default, html[data-theme="dark"] .uk-button-default * { color: var(--ew-head); }
/* SVG artwork drawn with the navy brand colour */
html[data-theme="dark"] [fill="#004165"], html[data-theme="dark"] [fill="#2f4566"] { fill: var(--ew-blue); }
html[data-theme="dark"] [stroke="#004165"], html[data-theme="dark"] [stroke="#2f4566"] { stroke: var(--ew-blue); }
html[data-theme="dark"] polygon[fill="#004165"] { fill: #8fb8e8; }
/* Client logos are artwork for white: keep a light plate under them */
html[data-theme="dark"] [style*="border: 2px solid #f0f0f0"] { background: #eef3f9 !important; border-color: #3a4f6e !important; }
html[data-theme="dark"] [style*="solid #e8e8e8"], html[data-theme="dark"] [style*="solid #e"], html[data-theme="dark"] [style*="solid #f"],
html[data-theme="dark"] [style*="solid #d"] { border-color: var(--ew-line) !important; }
html[data-theme="dark"] [style*="color: #888"], html[data-theme="dark"] [style*="color:#888"] { color: var(--ew-text-2) !important; }
html[data-theme="dark"] .uk-label { background: #3b8a42; color: #fff; }
html[data-theme="dark"] .uk-label-success { background: #2f7a38; }
html[data-theme="dark"] .uk-label-danger { background: #c8324f; }
html[data-theme="dark"] .uk-label-warning { background: #8a5a00; }

/* Buttons */
html[data-theme="dark"] .uk-button-default { background: transparent; color: var(--ew-head); border-color: #46597a; }
html[data-theme="dark"] .uk-button-default:hover { background: var(--ew-surface-2); color: #fff; border-color: var(--ew-blue); }
html[data-theme="dark"] a.card-button-blue, html[data-theme="dark"] .uk-button-secondary.card-button-blue { background: #2c5f93 !important; color: #fff !important; }

/* Footer, off-canvas, modals */
html[data-theme="dark"] .footerSection { background-color: #08111b !important; border-top: 1px solid var(--ew-line); }
html[data-theme="dark"] .uk-offcanvas-bar { background-color: #0a1624 !important; }
html[data-theme="dark"] .uk-modal-dialog { background: var(--ew-surface); color: var(--ew-text); box-shadow: 0 0 0 1px var(--ew-line), 0 30px 80px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .uk-modal-close-default, html[data-theme="dark"] .uk-close { color: var(--ew-text); }

/* Tables */
html[data-theme="dark"] .uk-table th { color: var(--ew-text-2); }
html[data-theme="dark"] .uk-table-divider > tr:not(:first-child), html[data-theme="dark"] .uk-table-divider > :not(:first-child) > tr,
html[data-theme="dark"] .uk-table-divider > :first-child > tr:not(:first-child) { border-color: var(--ew-line); }
html[data-theme="dark"] .uk-table-striped > tr:nth-of-type(odd), html[data-theme="dark"] .uk-table-striped tbody tr:nth-of-type(odd) { background: var(--ew-surface); }
html[data-theme="dark"] .uk-table-hover > tr:hover, html[data-theme="dark"] .uk-table-hover tbody tr:hover { background: var(--ew-surface-2); }

/* Cookie banner (its CSS is injected by cookieconsent-everywan.js) */
html[data-theme="dark"] .ew-cc-card { background: var(--ew-surface); color: var(--ew-text); }
html[data-theme="dark"] .ew-cc-bd a, html[data-theme="dark"] .ew-cc-link { color: var(--ew-blue); }
html[data-theme="dark"] .ew-cc-bd strong, html[data-theme="dark"] .ew-cc-cat-ti strong { color: var(--ew-head); }
html[data-theme="dark"] .ew-cc-cat { border-color: var(--ew-line); }
html[data-theme="dark"] .ew-cc-cat:hover { border-color: #3a4f6e; box-shadow: none; }
html[data-theme="dark"] .ew-cc-cat-ic { background: var(--ew-surface-2); color: var(--ew-blue); }
html[data-theme="dark"] .ew-cc-cat-ti span, html[data-theme="dark"] .ew-cc-cat p { color: var(--ew-text-2); }
html[data-theme="dark"] .ew-cc-lockbadge { background: #163626; color: #8fd9ab; }
html[data-theme="dark"] .ew-cc-sl { background: #3a4a63; }
html[data-theme="dark"] .ew-cc-btn-ghost { background: var(--ew-surface-2); color: var(--ew-head); }
html[data-theme="dark"] .ew-cc-btn-ghost:hover { background: #26385a; }

/* reCAPTCHA badge: Google renders it light; dim it so it does not glare. */
html[data-theme="dark"] .grecaptcha-badge { filter: brightness(.85) contrast(1.05); }

/* Home: "transforma" section (its <style> lives in partials/home/transforma-section.php) */
html[data-theme="dark"] .cio-problem-card,
html[data-theme="dark"] .cio-solution-card { background: linear-gradient(145deg, #172335 0%, #1b2a40 100%); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .cio-solution-card::before {
    background: linear-gradient(145deg, #172335 0%, #1b2a40 100%) padding-box,
                linear-gradient(135deg, #99cc97 0%, #71A3D7 50%, #99cc97 100%) border-box;
}
html[data-theme="dark"] .cio-result-item { background: linear-gradient(145deg, rgba(36, 54, 80, .9) 0%, rgba(26, 42, 64, .95) 100%); }
html[data-theme="dark"] .cio-cta-button { background: linear-gradient(to right, #3b8a42 0%, #3a73b4 100%); color: #fff; }
html[data-theme="dark"] .cio-cta-button:hover { background: linear-gradient(to right, #3a73b4 0%, #3b8a42 100%); color: #fff; }
html[data-theme="dark"] .cio-arrow-divider svg { color: var(--ew-text-2); stroke: currentColor; }

/* @@INLINE-START@@ (generated by .dark-scratch/gen_inline.py) */
html[data-theme="dark"] [style*="background: #dfe5ec" i],
html[data-theme="dark"] [style*="background:#dfe5ec" i],
html[data-theme="dark"] [style*="background-color: #dfe5ec" i],
html[data-theme="dark"] [style*="background-color:#dfe5ec" i],
html[data-theme="dark"] [style*="background: #e6f0fb" i],
html[data-theme="dark"] [style*="background:#e6f0fb" i],
html[data-theme="dark"] [style*="background-color: #e6f0fb" i],
html[data-theme="dark"] [style*="background-color:#e6f0fb" i],
html[data-theme="dark"] [style*="background: #e8edf3" i],
html[data-theme="dark"] [style*="background:#e8edf3" i],
html[data-theme="dark"] [style*="background-color: #e8edf3" i],
html[data-theme="dark"] [style*="background-color:#e8edf3" i],
html[data-theme="dark"] [style*="background: #e8f1f8" i],
html[data-theme="dark"] [style*="background:#e8f1f8" i],
html[data-theme="dark"] [style*="background-color: #e8f1f8" i],
html[data-theme="dark"] [style*="background-color:#e8f1f8" i],
html[data-theme="dark"] [style*="background: #e9ecef" i],
html[data-theme="dark"] [style*="background:#e9ecef" i],
html[data-theme="dark"] [style*="background-color: #e9ecef" i],
html[data-theme="dark"] [style*="background-color:#e9ecef" i],
html[data-theme="dark"] [style*="background: #eef1f4" i],
html[data-theme="dark"] [style*="background:#eef1f4" i],
html[data-theme="dark"] [style*="background-color: #eef1f4" i],
html[data-theme="dark"] [style*="background-color:#eef1f4" i],
html[data-theme="dark"] [style*="background: #f3f9f4" i],
html[data-theme="dark"] [style*="background:#f3f9f4" i],
html[data-theme="dark"] [style*="background-color: #f3f9f4" i],
html[data-theme="dark"] [style*="background-color:#f3f9f4" i],
html[data-theme="dark"] [style*="background: #f4f6f9" i],
html[data-theme="dark"] [style*="background:#f4f6f9" i],
html[data-theme="dark"] [style*="background-color: #f4f6f9" i],
html[data-theme="dark"] [style*="background-color:#f4f6f9" i],
html[data-theme="dark"] [style*="background: #f5f7fa" i],
html[data-theme="dark"] [style*="background:#f5f7fa" i],
html[data-theme="dark"] [style*="background-color: #f5f7fa" i],
html[data-theme="dark"] [style*="background-color:#f5f7fa" i],
html[data-theme="dark"] [style*="background: #f5faff" i],
html[data-theme="dark"] [style*="background:#f5faff" i],
html[data-theme="dark"] [style*="background-color: #f5faff" i],
html[data-theme="dark"] [style*="background-color:#f5faff" i],
html[data-theme="dark"] [style*="background: #f6f8fb" i],
html[data-theme="dark"] [style*="background:#f6f8fb" i],
html[data-theme="dark"] [style*="background-color: #f6f8fb" i],
html[data-theme="dark"] [style*="background-color:#f6f8fb" i],
html[data-theme="dark"] [style*="background: #f7f8fb" i],
html[data-theme="dark"] [style*="background:#f7f8fb" i],
html[data-theme="dark"] [style*="background-color: #f7f8fb" i],
html[data-theme="dark"] [style*="background-color:#f7f8fb" i],
html[data-theme="dark"] [style*="background: #f8f9fa" i],
html[data-theme="dark"] [style*="background:#f8f9fa" i],
html[data-theme="dark"] [style*="background-color: #f8f9fa" i],
html[data-theme="dark"] [style*="background-color:#f8f9fa" i],
html[data-theme="dark"] [style*="background: #f8fafb" i],
html[data-theme="dark"] [style*="background:#f8fafb" i],
html[data-theme="dark"] [style*="background-color: #f8fafb" i],
html[data-theme="dark"] [style*="background-color:#f8fafb" i],
html[data-theme="dark"] [style*="background: #f8fafc" i],
html[data-theme="dark"] [style*="background:#f8fafc" i],
html[data-theme="dark"] [style*="background-color: #f8fafc" i],
html[data-theme="dark"] [style*="background-color:#f8fafc" i],
html[data-theme="dark"] [style*="background: #fafafa" i],
html[data-theme="dark"] [style*="background:#fafafa" i],
html[data-theme="dark"] [style*="background-color: #fafafa" i],
html[data-theme="dark"] [style*="background-color:#fafafa" i],
html[data-theme="dark"] [style*="background: #fbfcfe" i],
html[data-theme="dark"] [style*="background:#fbfcfe" i],
html[data-theme="dark"] [style*="background-color: #fbfcfe" i],
html[data-theme="dark"] [style*="background-color:#fbfcfe" i],
html[data-theme="dark"] [style*="background: #fff" i],
html[data-theme="dark"] [style*="background:#fff" i],
html[data-theme="dark"] [style*="background-color: #fff" i],
html[data-theme="dark"] [style*="background-color:#fff" i],
html[data-theme="dark"] [style*="background: #ffffff" i],
html[data-theme="dark"] [style*="background:#ffffff" i],
html[data-theme="dark"] [style*="background-color: #ffffff" i],
html[data-theme="dark"] [style*="background-color:#ffffff" i],
html[data-theme="dark"] [style*="background: white" i],
html[data-theme="dark"] [style*="background:white" i],
html[data-theme="dark"] [style*="background-color: white" i],
html[data-theme="dark"] [style*="background-color:white" i],
html[data-theme="dark"] [style*="gradient"][style*="#f8f9fa" i],
html[data-theme="dark"] [style*="gradient"][style*="#f5f7fa" i],
html[data-theme="dark"] [style*="gradient"][style*="#f8fafb" i],
html[data-theme="dark"] [style*="gradient"][style*="#e9ecef" i],
html[data-theme="dark"] [style*="gradient"][style*="#eef2f6" i],
html[data-theme="dark"] [style*="gradient"][style*="#f5faff" i],
html[data-theme="dark"] [style*="gradient"][style*="#fbfcfe" i],
html[data-theme="dark"] [style*="gradient"][style*=", #fff" i],
html[data-theme="dark"] [style*="gradient"][style*="gradient(#fff" i],
html[data-theme="dark"] [style*="gradient"][style*="rgba(240,243,246" i] {
    background: var(--ew-surface) !important;
}
html[data-theme="dark"] .uk-section[style*="background: #dfe5ec" i],
html[data-theme="dark"] .uk-section[style*="background:#dfe5ec" i],
html[data-theme="dark"] .uk-section[style*="background-color: #dfe5ec" i],
html[data-theme="dark"] .uk-section[style*="background-color:#dfe5ec" i],
html[data-theme="dark"] .uk-section[style*="background: #e6f0fb" i],
html[data-theme="dark"] .uk-section[style*="background:#e6f0fb" i],
html[data-theme="dark"] .uk-section[style*="background-color: #e6f0fb" i],
html[data-theme="dark"] .uk-section[style*="background-color:#e6f0fb" i],
html[data-theme="dark"] .uk-section[style*="background: #e8edf3" i],
html[data-theme="dark"] .uk-section[style*="background:#e8edf3" i],
html[data-theme="dark"] .uk-section[style*="background-color: #e8edf3" i],
html[data-theme="dark"] .uk-section[style*="background-color:#e8edf3" i],
html[data-theme="dark"] .uk-section[style*="background: #e8f1f8" i],
html[data-theme="dark"] .uk-section[style*="background:#e8f1f8" i],
html[data-theme="dark"] .uk-section[style*="background-color: #e8f1f8" i],
html[data-theme="dark"] .uk-section[style*="background-color:#e8f1f8" i],
html[data-theme="dark"] .uk-section[style*="background: #e9ecef" i],
html[data-theme="dark"] .uk-section[style*="background:#e9ecef" i],
html[data-theme="dark"] .uk-section[style*="background-color: #e9ecef" i],
html[data-theme="dark"] .uk-section[style*="background-color:#e9ecef" i],
html[data-theme="dark"] .uk-section[style*="background: #eef1f4" i],
html[data-theme="dark"] .uk-section[style*="background:#eef1f4" i],
html[data-theme="dark"] .uk-section[style*="background-color: #eef1f4" i],
html[data-theme="dark"] .uk-section[style*="background-color:#eef1f4" i],
html[data-theme="dark"] .uk-section[style*="background: #f3f9f4" i],
html[data-theme="dark"] .uk-section[style*="background:#f3f9f4" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f3f9f4" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f3f9f4" i],
html[data-theme="dark"] .uk-section[style*="background: #f4f6f9" i],
html[data-theme="dark"] .uk-section[style*="background:#f4f6f9" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f4f6f9" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f4f6f9" i],
html[data-theme="dark"] .uk-section[style*="background: #f5f7fa" i],
html[data-theme="dark"] .uk-section[style*="background:#f5f7fa" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f5f7fa" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f5f7fa" i],
html[data-theme="dark"] .uk-section[style*="background: #f5faff" i],
html[data-theme="dark"] .uk-section[style*="background:#f5faff" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f5faff" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f5faff" i],
html[data-theme="dark"] .uk-section[style*="background: #f6f8fb" i],
html[data-theme="dark"] .uk-section[style*="background:#f6f8fb" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f6f8fb" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f6f8fb" i],
html[data-theme="dark"] .uk-section[style*="background: #f7f8fb" i],
html[data-theme="dark"] .uk-section[style*="background:#f7f8fb" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f7f8fb" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f7f8fb" i],
html[data-theme="dark"] .uk-section[style*="background: #f8f9fa" i],
html[data-theme="dark"] .uk-section[style*="background:#f8f9fa" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f8f9fa" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f8f9fa" i],
html[data-theme="dark"] .uk-section[style*="background: #f8fafb" i],
html[data-theme="dark"] .uk-section[style*="background:#f8fafb" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f8fafb" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f8fafb" i],
html[data-theme="dark"] .uk-section[style*="background: #f8fafc" i],
html[data-theme="dark"] .uk-section[style*="background:#f8fafc" i],
html[data-theme="dark"] .uk-section[style*="background-color: #f8fafc" i],
html[data-theme="dark"] .uk-section[style*="background-color:#f8fafc" i],
html[data-theme="dark"] .uk-section[style*="background: #fafafa" i],
html[data-theme="dark"] .uk-section[style*="background:#fafafa" i],
html[data-theme="dark"] .uk-section[style*="background-color: #fafafa" i],
html[data-theme="dark"] .uk-section[style*="background-color:#fafafa" i],
html[data-theme="dark"] .uk-section[style*="background: #fbfcfe" i],
html[data-theme="dark"] .uk-section[style*="background:#fbfcfe" i],
html[data-theme="dark"] .uk-section[style*="background-color: #fbfcfe" i],
html[data-theme="dark"] .uk-section[style*="background-color:#fbfcfe" i],
html[data-theme="dark"] .uk-section[style*="background: #fff" i],
html[data-theme="dark"] .uk-section[style*="background:#fff" i],
html[data-theme="dark"] .uk-section[style*="background-color: #fff" i],
html[data-theme="dark"] .uk-section[style*="background-color:#fff" i],
html[data-theme="dark"] .uk-section[style*="background: #ffffff" i],
html[data-theme="dark"] .uk-section[style*="background:#ffffff" i],
html[data-theme="dark"] .uk-section[style*="background-color: #ffffff" i],
html[data-theme="dark"] .uk-section[style*="background-color:#ffffff" i],
html[data-theme="dark"] .uk-section[style*="background: white" i],
html[data-theme="dark"] .uk-section[style*="background:white" i],
html[data-theme="dark"] .uk-section[style*="background-color: white" i],
html[data-theme="dark"] .uk-section[style*="background-color:white" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#f8f9fa" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#f5f7fa" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#f8fafb" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#e9ecef" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#eef2f6" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#f5faff" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="#fbfcfe" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*=", #fff" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="gradient(#fff" i],
html[data-theme="dark"] .uk-section[style*="gradient"][style*="rgba(240,243,246" i] {
    background: var(--ew-bg) !important;
}
html[data-theme="dark"] .uk-section.uk-section-muted[style*="gradient"] {
    background: var(--ew-bg-2) !important;
}
html[data-theme="dark"] [style*="background: #fde7e7" i] { background: #3a1d25 !important; }
html[data-theme="dark"] [style*="background:#fde7e7" i] { background: #3a1d25 !important; }
html[data-theme="dark"] [style*="background: #e7f4e6" i] { background: #183225 !important; }
html[data-theme="dark"] [style*="background:#e7f4e6" i] { background: #183225 !important; }
html[data-theme="dark"] [style*="background: #fff2dc" i] { background: #3a3117 !important; }
html[data-theme="dark"] [style*="background:#fff2dc" i] { background: #3a3117 !important; }
html[data-theme="dark"] [style*="background: #fff3cd" i] { background: #3a3117 !important; }
html[data-theme="dark"] [style*="background:#fff3cd" i] { background: #3a3117 !important; }
html[data-theme="dark"] [style*="background: #d1edff" i] { background: #12344d !important; }
html[data-theme="dark"] [style*="background:#d1edff" i] { background: #12344d !important; }
html[data-theme="dark"] [style*="background: #f8d7da" i] { background: #3a1d25 !important; }
html[data-theme="dark"] [style*="background:#f8d7da" i] { background: #3a1d25 !important; }
html[data-theme="dark"] [style*="background: #e3f2fd" i] { background: #12344d !important; }
html[data-theme="dark"] [style*="background:#e3f2fd" i] { background: #12344d !important; }
html[data-theme="dark"] [style*="background: #fef3f0" i] { background: #3a2420 !important; }
html[data-theme="dark"] [style*="background:#fef3f0" i] { background: #3a2420 !important; }
html[data-theme="dark"] [style*="background: #f0faf9" i] { background: #143232 !important; }
html[data-theme="dark"] [style*="background:#f0faf9" i] { background: #143232 !important; }
/* @@INLINE-END@@ */

/* Hero: deeper than the chip gradient above, so it needs to come after it */
html[data-theme="dark"] .home-hero-wrapper[style],
html[data-theme="dark"] .uk-background-primary[style] {
    background: linear-gradient(135deg, #0f3046 0%, #164662 55%, #1a4f60 100%) !important;
}
html[data-theme="dark"] .home-hero-wrapper .uk-label,
html[data-theme="dark"] .home-hero-wrapper .uk-button-secondary,
html[data-theme="dark"] #main-navbar .uk-button-secondary { background: #2f7a38 !important; color: #fff !important; }

html[data-theme="dark"] .uk-button-secondary.uk-button-small { background: linear-gradient(to right, #2f7a38, #34699f) !important; }
html[data-theme="dark"] .uk-label, html[data-theme="dark"] .uk-label-success[style], html[data-theme="dark"] .uk-label[style*="#99cc97" i] { background: #2f7a38 !important; color: #fff !important; }
html[data-theme="dark"] .uk-label-danger { background: #c8324f !important; }
html[data-theme="dark"] a.cio-cta-button { color: #fff !important; }
html[data-theme="dark"] a.uk-button-default, html[data-theme="dark"] .uk-button.uk-button-default {
    background: var(--ew-surface-2) !important; color: var(--ew-head) !important; border: 1px solid #46597a !important;
}
html[data-theme="dark"] a.uk-button-default:hover { background: #26385a !important; }
html[data-theme="dark"] [style*="color: #dc3545" i], html[data-theme="dark"] [style*="color:#dc3545" i] { color: #ff8793 !important; }
html[data-theme="dark"] [style*="color: #e9483f" i] { color: #ff8a80 !important; }
html[data-theme="dark"] .uk-card a:not([class*="uk-button"]):not(.cio-cta-button) { color: var(--ew-blue); }
/* red "problem" cards: same hue, a notch deeper so white copy passes AA */
html[data-theme="dark"] [style*="gradient"][style*="#dc3545" i]:not([style*="90deg"]) { background: linear-gradient(135deg, #b3263a 0%, #96202f 100%) !important; }

/* ---- Page-specific classes (their <style> blocks live in the partials) ---- */
/* About */
html[data-theme="dark"] .about-card { background: var(--ew-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .about-card.dark .about-stat-num { color: var(--ew-head); }
html[data-theme="dark"] .about-stat-num { color: var(--ew-blue); }
html[data-theme="dark"] .about-card.green .about-stat-num { color: var(--ew-green); }
html[data-theme="dark"] .about-stat-desc, html[data-theme="dark"] .about-legal { color: var(--ew-text-2); }
html[data-theme="dark"] .about-section-title, html[data-theme="dark"] .about-intro .about-intro-lead,
html[data-theme="dark"] .about-intro-lead { color: var(--ew-head); }
html[data-theme="dark"] .about-testimonial { background: linear-gradient(145deg, #172335 0%, #1b2a40 100%); }
html[data-theme="dark"] .about-testimonial blockquote, html[data-theme="dark"] .about-testimonial .author { color: var(--ew-text); }
html[data-theme="dark"] .about-testimonial .role { color: var(--ew-blue); }
html[data-theme="dark"] .about-legal { background: var(--ew-surface); }
html[data-theme="dark"] .about-team-card { background: var(--ew-surface); }
html[data-theme="dark"] .about-team-card::after { background: linear-gradient(to bottom, transparent 30%, rgba(13, 21, 32, .6) 52%, #0d1520 78%); }
html[data-theme="dark"] .about-team-name { color: var(--ew-head); }
html[data-theme="dark"] .about-team-role { color: #a9b6c7; }
/* RID landing (partials/landings/rid-content.php) */
html[data-theme="dark"] .lp-card, html[data-theme="dark"] .lp-cta { background: var(--ew-surface); border-color: var(--ew-line); }
html[data-theme="dark"] .lp-cta { background: linear-gradient(135deg, #172335, #1c2f48); }
html[data-theme="dark"] .lp-list li, html[data-theme="dark"] .lp-card strong { color: var(--ew-text); }
html[data-theme="dark"] .lp-card h3, html[data-theme="dark"] .lp-cta h4 { color: var(--ew-head); }
/* Historias landing (partials/landings/historias-content.php) */
html[data-theme="dark"] .hist-steps-section, html[data-theme="dark"] .hist-cards-section,
html[data-theme="dark"] .hist-section-bridge { background: var(--ew-bg); }
html[data-theme="dark"] .hist-step, html[data-theme="dark"] .hist-prop-card, html[data-theme="dark"] .hist-benefit-card {
    background: linear-gradient(145deg, #172335 0%, #1b2a40 100%);
}
html[data-theme="dark"] .hist-step-text, html[data-theme="dark"] .hist-prop-card p, html[data-theme="dark"] .hist-benefit-card h3,
html[data-theme="dark"] .hist-benefit-list li, html[data-theme="dark"] .hist-form-glass h2 { color: var(--ew-text); }
html[data-theme="dark"] .hist-form-glass { background: rgba(23, 35, 53, .97); }
html[data-theme="dark"] .hist-form-glass input[type="text"], html[data-theme="dark"] .hist-form-glass input[type="email"] { background: var(--ew-surface-2); color: var(--ew-head); }
html[data-theme="dark"] .hist-form-glass .hist-gdpr-label { color: var(--ew-text-2); }
html[data-theme="dark"] .hist-hero-cta { background: #eef3f9; color: #12263d; }
/* Legal pages */
html[data-theme="dark"] .legal-content section h2, html[data-theme="dark"] .legal-content section h3,
html[data-theme="dark"] .legal-content section h4, html[data-theme="dark"] .legal-content section strong { color: var(--ew-head); }
html[data-theme="dark"] .legal-content section p, html[data-theme="dark"] .legal-content section li { color: var(--ew-text); }
html[data-theme="dark"] .legal-content section a { color: var(--ew-blue); }
/* Desktop dropdowns: custom.css forces colours with !important */
html[data-theme="dark"] .uk-navbar-dropdown, html[data-theme="dark"] .uk-navbar-dropdown-large,
html[data-theme="dark"] .uk-dropdown.ew-subdrop, html[data-theme="dark"] .uk-navbar-dropdown.ew-menu-drop { background: rgba(23, 35, 53, .98) !important; }
html[data-theme="dark"] .uk-navbar-dropdown-large .uk-nav-header, html[data-theme="dark"] .uk-navbar-dropdown-large .uk-nav-header[style*="font-weight: 700"] { color: var(--ew-head) !important; }
html[data-theme="dark"] .uk-navbar-dropdown-large .uk-navbar-dropdown-nav > li > a,
html[data-theme="dark"] .uk-navbar-dropdown-nav > li > a { color: var(--ew-text) !important; }
html[data-theme="dark"] .uk-navbar-dropdown-large .uk-navbar-dropdown-nav > li > a:hover,
html[data-theme="dark"] .uk-navbar-dropdown-nav > li > a:hover { color: #fff !important; }
html[data-theme="dark"] .ew-menu-group-toggle { color: var(--ew-text-2); }
html[data-theme="dark"] .ew-menu-group-toggle[aria-expanded="true"], html[data-theme="dark"] .ew-menu-group > a.uk-open { color: var(--ew-green); background-color: rgba(153, 204, 151, .12); }
html[data-theme="dark"] .ew-menu-icon[src*="icon-microsoft"] { filter: brightness(1.15); }
html[data-theme="dark"] .uk-accordion-title, html[data-theme="dark"] .uk-accordion-title:hover { color: var(--ew-head); }
html[data-theme="dark"] .uk-list-striped > li:nth-of-type(odd) { background: var(--ew-surface); }
html[data-theme="dark"] .uk-list-striped > li:nth-of-type(even) { background: transparent; }
html[data-theme="dark"] .uk-badge { background: #2f7a38; color: #fff; }
html[data-theme="dark"] .uk-badge[style*="113, 163, 215"], html[data-theme="dark"] .uk-badge[style*="#71a3d7" i] { background: #34699f !important; color: #fff !important; }
html[data-theme="dark"] .uk-label-primary { background: #34699f; color: #fff; }
html[data-theme="dark"] .uk-label-warning { background: #8a5a00 !important; color: #fff !important; }

/* ---- Campaign landings (.cl, defined in src/campaigns/ui.php) ---- */
html[data-theme="dark"] .cl {
    --ink: #eef3f9; --body: #c3d0e0; --muted: #9fb0c6; --line: #2a3b55; --soft: #101a29;
    --blue-d: #8fb8e8; --green-d: #99cc97;
}
html[data-theme="dark"] .cl-callout, html[data-theme="dark"] .cl-chip, html[data-theme="dark"] .cl-step,
html[data-theme="dark"] .cl-feature, html[data-theme="dark"] .cl-price, html[data-theme="dark"] .cl-plan,
html[data-theme="dark"] .cl-portal, html[data-theme="dark"] .cl-soft .cl-without li,
html[data-theme="dark"] .cl-plain .cl-without li { background: var(--ew-surface); }
html[data-theme="dark"] .cl-callout, html[data-theme="dark"] .cl-step, html[data-theme="dark"] .cl-feature,
html[data-theme="dark"] .cl-price, html[data-theme="dark"] .cl-plan, html[data-theme="dark"] .cl-portal { box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .7); }
html[data-theme="dark"] .cl-plan.featured {
    background: linear-gradient(#172335, #172335) padding-box, linear-gradient(135deg, #99cc97, #71a3d7) border-box;
    border: 2px solid transparent;
}
html[data-theme="dark"] .cl-step b { background: #101a29; }
html[data-theme="dark"] .cl-feature .ico { background: linear-gradient(135deg, rgba(153, 204, 151, .16), rgba(113, 163, 215, .16)); }
html[data-theme="dark"] .cl-amount strong, html[data-theme="dark"] .cl-plan-price strong { color: var(--ew-head); }
html[data-theme="dark"] .cl-badge { color: var(--ew-head); background: linear-gradient(135deg, rgba(153, 204, 151, .2), rgba(113, 163, 215, .2)); }
html[data-theme="dark"] .cl-badge i { background: linear-gradient(135deg, #2f7a38, #34699f); }
html[data-theme="dark"] .cl-card { background: rgba(23, 35, 53, .96); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); border: 1px solid var(--ew-line); }
html[data-theme="dark"] .cl-pill.ok { background: #163626; color: #8fd9ab; }
html[data-theme="dark"] .cl-pill.warn { background: #3a3117; color: #f5d77a; }
html[data-theme="dark"] .cl-pill.bad { background: #3a1d25; color: #ff9aa6; }
html[data-theme="dark"] .cl-pill.info { background: #12344d; color: #9cc7f0; }
html[data-theme="dark"] .cl-portal-bar { background: #121c2b; }
html[data-theme="dark"] .cl-portal-bar i { background: #2a3b55; }
html[data-theme="dark"] .cl-portal figcaption { background: #121c2b; }
html[data-theme="dark"] .cl-dots .cl-dot { background: #3a4a63; }
html[data-theme="dark"] .cl-dots .cl-dot.on { background: var(--ew-blue); }
html[data-theme="dark"] .cl-dots .cl-arrow { color: var(--ew-head); }
html[data-theme="dark"] .cl-dots .cl-arrow:hover { background: var(--ew-surface-2); }
html[data-theme="dark"] .cl-hero, html[data-theme="dark"] .cl-dark { box-shadow: inset 0 -1px 0 var(--ew-line); }
html[data-theme="dark"] .cl .cl-btn:hover, html[data-theme="dark"] .cl .cl-btn:focus { color: #0b2540 !important; }

/* ---- Blog list and posts (CSS lives inline in public/blog.php and each post) ---- */
html[data-theme="dark"] .blog-card { background: var(--ew-surface); box-shadow: 0 8px 28px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .blog-card-meta, html[data-theme="dark"] .blog-card-excerpt { color: var(--ew-text-2); }
html[data-theme="dark"] .blog-card-read-time { color: #8fa1b8; }
html[data-theme="dark"] .blog-card-title { color: var(--ew-head); }
html[data-theme="dark"] .blog-card-cta, html[data-theme="dark"] .blog-card:hover .blog-card-cta { color: var(--ew-blue); }
html[data-theme="dark"] .blog-tag { background: var(--ew-surface-2); color: var(--ew-text); }
html[data-theme="dark"] .blog-card:hover .blog-tag, html[data-theme="dark"] .blog-tag:hover { background: #26385a !important; }
html[data-theme="dark"] .blog-filters span { color: var(--ew-text-2) !important; }
html[data-theme="dark"] .blog-filter-btn { background: var(--ew-surface) !important; color: var(--ew-text) !important; border-color: var(--ew-line) !important; }
html[data-theme="dark"] .blog-filter-btn span { color: var(--ew-text-2) !important; }
html[data-theme="dark"] .blog-filter-btn.active { background: #34699f !important; color: #fff !important; border-color: #34699f !important; }
html[data-theme="dark"] .blog-filter-btn.active span { color: #dbe8f7 !important; }
html[data-theme="dark"] .blog-pagination a, html[data-theme="dark"] .blog-pagination span { color: var(--ew-text); }
html[data-theme="dark"] .blog-pagination li.uk-active span { background: #34699f; color: #fff; }
html[data-theme="dark"] .blog-pagination a:hover { background: var(--ew-surface-2); color: var(--ew-blue); }
html[data-theme="dark"] .blog-post-body [style*="color: #495057"], html[data-theme="dark"] .blog-post-body [style*="color:#495057"],
html[data-theme="dark"] [style*="color: #495057"], html[data-theme="dark"] [style*="color:#495057"],
html[data-theme="dark"] [style*="color: #3a4a5c"], html[data-theme="dark"] [style*="color: #6c757d"],
html[data-theme="dark"] [style*="color:#6c757d"] { color: var(--ew-text) !important; }
html[data-theme="dark"] [style*="color: #868e96"], html[data-theme="dark"] [style*="color:#868e96"], html[data-theme="dark"] [style*="color: #adb5bd"] { color: var(--ew-text-2) !important; }
html[data-theme="dark"] [style*="color:#3f7fc4"], html[data-theme="dark"] [style*="color: #3f7fc4"] { color: var(--ew-blue) !important; }
html[data-theme="dark"] [style*="color: #0c1428"] { color: var(--ew-head) !important; }
html[data-theme="dark"] [style*="solid #e9ecef"], html[data-theme="dark"] [style*="solid #dee2e6"] { border-color: var(--ew-line) !important; }
html[data-theme="dark"] [style*="background: #f4f7fb"], html[data-theme="dark"] [style*="background:#f4f7fb"] { background: var(--ew-surface) !important; }
html[data-theme="dark"] .blog-post-body h1, html[data-theme="dark"] .blog-post-body h2, html[data-theme="dark"] .blog-post-body h3,
html[data-theme="dark"] .blog-post-body h4 { color: var(--ew-head); }
html[data-theme="dark"] .blog-post-body p, html[data-theme="dark"] .blog-post-body li, html[data-theme="dark"] .blog-post-body td,
html[data-theme="dark"] .blog-post-body th { color: var(--ew-text); }
html[data-theme="dark"] .blog-post-body a { color: var(--ew-blue); }
html[data-theme="dark"] .blog-post-body blockquote { background: var(--ew-surface); border-left-color: var(--ew-blue); color: var(--ew-text); }
html[data-theme="dark"] .blog-post-body table, html[data-theme="dark"] .blog-post-body td, html[data-theme="dark"] .blog-post-body th { border-color: var(--ew-line); }
html[data-theme="dark"] .blog-post-body pre, html[data-theme="dark"] .blog-post-body code { background: #0a111b; color: #d6e2f1; border: 1px solid var(--ew-line); }
html[data-theme="dark"] .blog-post-body img { background: #fff; border-radius: 8px; }
/* Modern Workplace page */
html[data-theme="dark"] .mw-issues-section { background: var(--ew-bg-2); }
html[data-theme="dark"] .mw-issues-section .uk-card-default.uk-card-hover { background: var(--ew-surface); border-color: var(--ew-line); }

/* Navy-to-blue gradient blocks (cards, sections) behind white copy */
html[data-theme="dark"] [style*="gradient"][style*="#71a3d7" i][style*="#004165" i],
html[data-theme="dark"] [style*="gradient"][style*="#71a3d7" i][style*="#2f4566" i] {
    background: linear-gradient(135deg, #2c68a3 0%, #0e3a5c 100%) !important;
}
/* chip gradient, a notch deeper for 4.5:1 with white text */
html[data-theme="dark"] [style*="linear-gradient(135deg, #99cc97 0%, #71a3d7 100%)" i],
html[data-theme="dark"] [style*="linear-gradient(135deg, #71a3d7 0%, #99cc97 100%)" i],
html[data-theme="dark"] [style*="linear-gradient(135deg, #99cc97 0%, #6ca668 100%)" i] { background: linear-gradient(135deg, #2f7a38 0%, #2d629c 100%) !important; }
html[data-theme="dark"] .home-hero-wrapper[style], html[data-theme="dark"] .uk-background-primary[style],
html[data-theme="dark"] .uk-section[style*="linear-gradient(135deg, #99cc97 0%, #71a3d7 100%)" i],
html[data-theme="dark"] .uk-section[style*="linear-gradient(135deg, #71a3d7 0%, #99cc97 100%)" i] {
    background: linear-gradient(135deg, #0f3046 0%, #164662 55%, #1a4f60 100%) !important;
}
html[data-theme="dark"] .mw-services-section { background: var(--ew-bg-2) !important; }
html[data-theme="dark"] .uk-badge[style*="#99cc97" i] { background: #2f7a38 !important; color: #fff !important; }
html[data-theme="dark"] [style*="background: #41a973" i], html[data-theme="dark"] [style*="background:#41a973" i] { background: #23774f !important; color: #fff !important; }
html[data-theme="dark"] .blog-filter-btn span { color: #b4c3d6 !important; }
/* Newsletter landing */
html[data-theme="dark"] .cl-subcard, html[data-theme="dark"] .cl-inbox { background: var(--ew-surface); }
html[data-theme="dark"] .cl-sub input[type=email] { background: var(--ew-bg-2); color: var(--ew-head); }
html[data-theme="dark"] .cl-sub input[type=email]:focus { background: var(--ew-surface-2); }
html[data-theme="dark"] .cl-sub-msg.ok { background: #163626; color: #8fd9ab; }
html[data-theme="dark"] .cl-sub-msg.err { background: #3a1d25; color: #ff9aa6; }

/* Polish found while reviewing screenshots */
html[data-theme="dark"] .contact input:not([type="checkbox"]), html[data-theme="dark"] .contact textarea, html[data-theme="dark"] .contact select,
html[data-theme="dark"] .uk-input, html[data-theme="dark"] .uk-textarea, html[data-theme="dark"] .uk-select { border-color: #3a4f6e !important; }
html[data-theme="dark"] .contact input:focus, html[data-theme="dark"] .contact textarea:focus, html[data-theme="dark"] .contact select:focus { border-color: var(--ew-blue) !important; }
html[data-theme="dark"] .page_banner .background-img, html[data-theme="dark"] .container_banner .background-img { filter: brightness(.62) saturate(.85); }
html[data-theme="dark"] .about-card::before { background: linear-gradient(105deg, transparent 0%, rgba(143, 184, 232, .07) 45%, transparent 100%); }
html[data-theme="dark"] .about-card.green::before { background: linear-gradient(105deg, transparent 0%, rgba(153, 204, 151, .08) 45%, transparent 100%); }
html[data-theme="dark"] .uk-checkbox, html[data-theme="dark"] .uk-radio { background-color: var(--ew-surface-2); border-color: #4a5f80; }
html[data-theme="dark"] .uk-checkbox:checked, html[data-theme="dark"] .uk-radio:checked { background-color: #34699f; border-color: #34699f; }
html[data-theme="dark"] option { background: var(--ew-surface); color: var(--ew-head); }

html[data-theme="dark"] [style*="color: #5fa85a" i] { color: var(--ew-green) !important; }
html[data-theme="dark"] [style*="color: #4a7ba8" i] { color: var(--ew-blue) !important; }
html[data-theme="dark"] [style*="color: #003a5d" i] { color: var(--ew-head) !important; }
html[data-theme="dark"] [style*="color:#9fd3ff" i] { color: #9fd3ff !important; }

/* @@APPEND@@ */

/* Contrast fixes (review round) */
/* uk-text-primary is a deep teal meant for white; links like "Más información →" need the dark blue */
html[data-theme="dark"] .uk-text-primary { color: var(--ew-blue) !important; }
html[data-theme="dark"] #tm-toolbar a.uk-button-text { color: var(--ew-green); }
/* Hero CTA: navy pill on a navy hero -> give it a light edge and a touch more body.
   custom.css styles .uk-button-secondary through stacked :not() selectors, hence the :not(#x). */
html[data-theme="dark"] .home-hero-wrapper a.uk-button-secondary.uk-button-large:not(#x):not(#y) {
    background: #2a4a78 !important;
    box-shadow: inset 0 0 0 1.5px rgba(238, 243, 249, .75), 0 3px 12px rgba(0, 0, 0, .35) !important;
}
html[data-theme="dark"] .home-hero-wrapper a.uk-button-secondary.uk-button-large:not(#x):not(#y):hover {
    background: #34588f !important;
}

/* Contact form headings: custom.css forces the light-theme blue with !important. */
html[data-theme="dark"] #contacto .contact-form h2 { color: var(--ew-blue) !important; }
