/* ========================================================================== 
   EVERKLIN - Semantic Surface Contrast

   Final, intentionally scoped contrast authority. It resolves legacy white
   copy left behind when formerly dark page-family sections were converted to
   the homepage's cream and pale-green system. Image-overlay cards and living
   process workspaces keep their own contrast rules.
   ========================================================================== */

body.everklin-transformed {
    --ek-action-olive: #5c7427;
    --ek-action-olive-hover: #4d631e;
    --ek-readable-olive: #526923;
    --ek-on-dark: #fffdf8;
    --ek-on-dark-muted: rgba(255, 253, 248, .86);
}

/* Primary actions use a deeper olive so white labels remain readable. */
body.everklin-transformed :is(
    .site-header .header-technical-cta,
    .skip-link,
    .corp-btn--olive,
    .footer-support__primary,
    .solutions-button--olive,
    .industries-hub__button--olive,
    .sfh-button--primary,
    .page-button:not(.page-button-secondary):not(.page-button--secondary):not(.page-button--outline):not(.page-button--light),
    .brewery-button--primary,
    .wsp-hero .page-button--primary,
    .fpp-page .page-button--primary,
    .contact-button--primary,
    .contact-submit,
    .contact-chat-launcher,
    .iic-button:not(.iic-button--outline),
    .iic-hub-button--primary,
    .sn-button:not(.sn-button--quiet):not(.sn-button--light):not(.sn-button--line),
    .th-button--primary,
    .product-cta-primary,
    .hero .btn-gold,
    .solutions-promo-card > a
) {
    color: #fff !important;
    border-color: var(--ek-action-olive) !important;
    background: var(--ek-action-olive) !important;
}

body.everklin-transformed :is(
    .site-header .header-technical-cta,
    .skip-link,
    .corp-btn--olive,
    .footer-support__primary,
    .solutions-button--olive,
    .industries-hub__button--olive,
    .sfh-button--primary,
    .page-button:not(.page-button-secondary):not(.page-button--secondary):not(.page-button--outline):not(.page-button--light),
    .brewery-button--primary,
    .wsp-hero .page-button--primary,
    .fpp-page .page-button--primary,
    .contact-button--primary,
    .contact-submit,
    .contact-chat-launcher,
    .iic-button:not(.iic-button--outline),
    .iic-hub-button--primary,
    .sn-button:not(.sn-button--quiet):not(.sn-button--light):not(.sn-button--line),
    .th-button--primary,
    .product-cta-primary,
    .hero .btn-gold,
    .solutions-promo-card > a
):is(:hover, :focus-visible) {
    color: #fff !important;
    border-color: var(--ek-action-olive-hover) !important;
    background: var(--ek-action-olive-hover) !important;
}

/* Business-family closing panel: the final light theme changed its surface,
   so its inherited white copy must change with it. */
body.everklin-transformed .sfh-final {
    color: var(--ek-page-copy) !important;
    background: var(--ek-page-sage) !important;
}

body.everklin-transformed .sfh-final :is(h1, h2, h3, h4, strong) {
    color: var(--ek-page-ink) !important;
}

body.everklin-transformed .sfh-final :is(p, li) {
    color: var(--ek-page-copy) !important;
}

body.everklin-transformed .sfh-final .sfh-final__kicker {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .sfh-final .sfh-button--light {
    color: #fff !important;
    border-color: var(--ek-action-olive) !important;
    background: var(--ek-action-olive) !important;
}

/* Industries hub conversion bands now use pale-green surfaces. */
body.everklin-transformed .industries-hub :is(.industries-hub__selection, .industries-hub__review) {
    color: var(--ek-page-copy) !important;
    background: var(--ek-page-sage) !important;
}

body.everklin-transformed .industries-hub :is(.industries-hub__selection, .industries-hub__review) :is(h1, h2, h3, h4, strong) {
    color: var(--ek-page-ink) !important;
}

body.everklin-transformed .industries-hub :is(.industries-hub__selection, .industries-hub__review) :is(p, li) {
    color: var(--ek-page-copy) !important;
}

body.everklin-transformed .industries-hub :is(.industries-hub__selection, .industries-hub__review) .industries-hub__kicker,
body.everklin-transformed .industries-hub .industries-hub__selection li span {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .industries-hub .industries-hub__selection ol,
body.everklin-transformed .industries-hub .industries-hub__selection li {
    border-color: rgba(92, 116, 39, .34) !important;
}

body.everklin-transformed .industries-hub .industries-hub__selection li:not(:last-child)::after {
    color: var(--ek-readable-olive) !important;
    border-color: rgba(92, 116, 39, .46) !important;
    background: var(--ek-page-sage) !important;
}

/* Industry application bands were formerly olive. Their pale surface now
   receives the same dark editorial hierarchy as adjacent sections. */
body.everklin-transformed .iic-flagship .iic-environments {
    color: var(--ek-page-copy) !important;
    background: var(--ek-page-sage) !important;
}

body.everklin-transformed .iic-flagship .iic-environments :is(h1, h2, h3, h4, strong) {
    color: var(--ek-page-ink) !important;
}

body.everklin-transformed .iic-flagship .iic-environments :is(p, li, .iic-text-link) {
    color: var(--ek-page-copy) !important;
}

body.everklin-transformed .iic-flagship .iic-environments :is(.iic-kicker, .iic-environments__list span, .iic-environments__list b) {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .iic-flagship .iic-environments :is(.iic-environments__list, .iic-environments__list a) {
    border-color: rgba(92, 116, 39, .3) !important;
}

body.everklin-transformed .iic-flagship .iic-environments .iic-environments__list a {
    color: var(--ek-page-ink) !important;
}

/* Small labels and numeric proof points need a stronger olive on light
   surfaces; this preserves the brand accent without pale-on-pale text. */
body.everklin-transformed :is(
    .sn-impact-dashboard__metrics dt,
    .certification-proof-grid dt,
    .company-certification-proof dt,
    .company-certifications dt
) {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .contact-language-toggle button:is(.is-active, :hover, :focus-visible) {
    color: #fff !important;
    background: var(--ek-action-olive) !important;
}

body.everklin-transformed .contact-language-toggle button:last-child:hover {
    color: #fff !important;
    background: var(--ek-action-olive) !important;
}

/* Secondary actions stay light and legible instead of inheriting a legacy
   medium-olive fill with white copy. */
body.everklin-transformed .page-button-secondary {
    color: var(--ek-page-ink) !important;
    border-color: #a9bc78 !important;
    background: #fff !important;
}

body.everklin-transformed .page-button-secondary:is(:hover, :focus-visible) {
    color: var(--ek-page-ink) !important;
    border-color: var(--ek-action-olive) !important;
    background: var(--ek-page-sage) !important;
}

body.everklin-transformed main .page-button.page-button-secondary {
    color: var(--ek-page-ink) !important;
    border-color: #a9bc78 !important;
    background: #fff !important;
}

/* Interactive active states use the accessible action olive. */
body.everklin-transformed main:not(.corp-home) :where(
    [role="tab"][aria-selected="true"],
    .filter-button.is-active,
    .category-tab.is-active,
    .programme-tab.is-active,
    .download-filter-row button.is-active,
    .sn-orbit__node.is-active,
    .lpd__challenge.is-active
) {
    color: #fff !important;
    border-color: var(--ek-action-olive) !important;
    background: var(--ek-action-olive) !important;
}

/* The compact company journey uses an active waypoint, not a filled tab. */
body.everklin-transformed .company-journey-map__nodes button[role="tab"][aria-selected="true"] {
    color: var(--ek-page-ink) !important;
    border-color: transparent !important;
    background: transparent !important;
}

body.everklin-transformed main.downloads-flagship .download-filter-row button.is-active,
body.everklin-transformed main.knowledge-editorial .knowledge-explorer-tabs button[aria-selected="true"],
body.everklin-transformed .lpd__modes button[aria-pressed="true"],
body.everklin-transformed .fsv2-related a[aria-current="page"] {
    color: #fff !important;
    border-color: var(--ek-action-olive) !important;
    background: var(--ek-action-olive) !important;
}

body.everklin-transformed :is(
    .sfh-inline-link,
    .sn-trustrow__link,
    .industries-hub__text-link,
    .iic-text-link
) {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed main :is(
    .corp-kicker,
    .solutions-kicker,
    .industries-hub__kicker,
    .sfh-kicker,
    .sfh-final__kicker,
    .iic-kicker,
    .wsp-eyebrow,
    .sp-eyebrow,
    .fpp-eyebrow,
    .sn-kicker,
    .anchor-eyebrow,
    .contact-eyebrow,
    .section-kicker,
    .inner-kicker,
    .eyebrow,
    .kicker
) {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .iic-hero .iic-kicker,
body.everklin-transformed main.iic-flagship .iic-hero .iic-kicker,
body.everklin-transformed .solutions-selection .solutions-kicker,
body.everklin-transformed .solutions-review .solutions-kicker {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .certification-proof-panel dt {
    color: #59685d !important;
}

body.everklin-transformed main.contact-ultra .contact-language-toggle button:is(.is-active, :hover, :focus-visible) {
    color: #fff !important;
    background: var(--ek-action-olive) !important;
}

/* The two intentional homepage olive bands retain their pale labels. */
body.everklin-transformed .corp-home :is(.corp-commitment, .corp-final) :is(.corp-kicker, .eyebrow, .kicker) {
    color: #f4f8dc !important;
}

/* Semantic dark surfaces remain dark regardless of legacy light guards. */
body.everklin-transformed :is([data-theme="dark"], [data-surface="dark"]) {
    color: var(--ek-on-dark) !important;
}

body.everklin-transformed :is([data-theme="dark"], [data-surface="dark"]) :is(h1, h2, h3, h4, h5, h6, strong, dt) {
    color: var(--ek-on-dark) !important;
}

body.everklin-transformed :is([data-theme="dark"], [data-surface="dark"]) :is(p, li, dd, small) {
    color: var(--ek-on-dark-muted) !important;
}

body.everklin-transformed :is([data-theme="dark"], [data-surface="dark"]) a:not(.page-button):not(.button):not(.btn) {
    color: var(--ek-on-dark) !important;
    text-decoration-color: #dce9a6 !important;
}

/* Final keyboard, contrast and touch-target guard. These rules are deliberately
   limited to shared controls and do not alter certificate-specific surfaces. */
body.everklin-transformed .corp-home .corp-hero__search button {
    color: #fff !important;
    border-color: var(--ek-action-olive) !important;
    background: var(--ek-action-olive) !important;
}

body.everklin-transformed .corp-home .corp-hero__search button:is(:hover, :focus-visible) {
    border-color: var(--ek-action-olive-hover) !important;
    background: var(--ek-action-olive-hover) !important;
}

body.everklin-transformed footer.site-footer :is(
    .footer-support__eyebrow,
    .footer-contact-list span,
    .footer-column .footer-view-all,
    .footer-column .footer-view-all span
) {
    color: var(--ek-readable-olive) !important;
}

body.everklin-transformed .contact-language-toggle button {
    min-height: 44px !important;
    color: var(--ek-page-ink) !important;
    background: #fff !important;
}

body.everklin-transformed .contact-language-toggle button:is(.is-active, :hover, :focus-visible) {
    color: #fff !important;
}

body.everklin-transformed :is(
    .knowledge-resource-link,
    .company-journey-map__controls button,
    .company-journey-map__nodes button,
    .kc-faq summary,
    .fpp-page details > summary,
    .lpd__challenge,
    .lpd__modes button
) {
    min-height: 44px;
}

@media (max-width: 1179px) {
    body.everklin-transformed .site-header :is(.header-search, .mobile-menu-toggle) {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    body.everklin-transformed .corp-home :is(
        [data-corp-slide-control],
        [data-corp-slider-toggle]
    ) {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
    }
}

/* Homepage commitment CTA sits on a pale surface. Keep its label readable
   even when shared action styles are loaded after the homepage stylesheet. */
body.everklin-transformed .corp-home .corp-commitment .corp-btn--soft,
body.everklin-transformed .corp-home .corp-commitment .corp-btn--soft span {
    color: var(--ek-page-ink) !important;
}

body.everklin-transformed .corp-home .corp-commitment .corp-btn--soft {
    border-color: #d3dfad !important;
    background: #f1f7dc !important;
}

body.everklin-transformed .corp-home .corp-commitment .corp-btn--soft:is(:hover, :focus-visible) {
    color: #fff !important;
    border-color: var(--ek-action-olive-hover) !important;
    background: var(--ek-action-olive-hover) !important;
}

body.everklin-transformed .corp-home .corp-commitment .corp-btn--soft:is(:hover, :focus-visible) span {
    color: #fff !important;
}
