.wb-ad {
    --ad-ink: #172925;
    --ad-muted: #62756f;
    --ad-accent: #177d70;
    --ad-accent-dark: #11665c;
    --ad-border: #dbe9e5;
    --ad-surface: #f7fbfa;
    --ad-warm: #fff8ed;
    --ad-radius: 22px;
    box-sizing: border-box;
    color: var(--ad-ink);
    display: grid;
    gap: 24px;
    margin: 0 auto 52px;
    max-width: 1180px;
    padding-top: clamp(22px, 3vw, 32px);
}

.wb-ad *,
.wb-ad *::before,
.wb-ad *::after {
    box-sizing: border-box;
}

.wb-ad [hidden] {
    display: none !important;
}

.wb-ad__sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body:has(.wb-ad) #wbPageContent,
body.wb-additives-directory-page #wbPageContent {
    max-width: 1240px;
}

body:has(.wb-ad) #wbContent,
body.wb-additives-directory-page #wbContent {
    float: none !important;
    width: 100% !important;
}

body:has(.wb-ad) #wbSidebar,
body.wb-additives-directory-page #wbSidebar {
    display: none !important;
}

.wb-ad__hero {
    background:
        radial-gradient(circle at 92% 14%, rgba(255, 255, 255, .82) 0 8%, transparent 8.5%),
        radial-gradient(circle at 84% 36%, rgba(255, 255, 255, .42) 0 13%, transparent 13.5%),
        linear-gradient(135deg, #e9f7f3 0%, #f4fbf8 57%, #eef8e9 100%);
    border: 1px solid #d4e9e3;
    border-radius: var(--ad-radius);
    box-shadow: 0 16px 42px rgba(27, 84, 73, .08);
    display: grid;
    gap: 22px;
    overflow: hidden;
    padding: clamp(28px, 5vw, 52px);
    position: relative;
}

.wb-ad__hero-copy {
    max-width: 840px;
    position: relative;
    z-index: 1;
}

.wb-ad__eyebrow,
.wb-ad__section-kicker {
    color: var(--ad-accent);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.wb-ad__eyebrow {
    margin-bottom: 10px;
}

.wb-ad__hero h1 {
    color: var(--ad-ink);
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 760;
    letter-spacing: -.035em;
    line-height: 1.04;
    margin: 0;
    max-width: 900px;
}

.wb-ad__hero-copy p {
    color: #48635d;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.58;
    margin: 18px 0 0;
    max-width: 790px;
}

.wb-ad__search-wrap {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(23, 125, 112, .2);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(36, 93, 81, .11);
    display: flex;
    max-width: 790px;
    min-height: 60px;
    padding: 0 8px 0 18px;
    position: relative;
    z-index: 1;
}

.wb-ad__search-icon {
    color: var(--ad-accent);
    display: grid;
    flex: 0 0 24px;
    place-items: center;
}

.wb-ad__search-icon svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
    width: 22px;
}

.wb-ad__search {
    appearance: none;
    background: transparent;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ad-ink);
    flex: 1 1 auto;
    font: inherit;
    font-size: 16px;
    min-width: 0;
    outline: 0;
    padding: 17px 12px !important;
}

.wb-ad__search::placeholder {
    color: #82948f;
    opacity: 1;
}

.wb-ad__clear {
    background: #edf7f4;
    border: 0;
    border-radius: 10px;
    color: #316b61;
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-size: 13px;
    font-weight: 720;
    padding: 9px 12px;
}

.wb-ad__examples {
    align-items: center;
    color: #667b75;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 7px;
    max-width: 790px;
    position: relative;
    z-index: 1;
}

.wb-ad__examples button {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(23, 125, 112, .2);
    border-radius: 999px;
    color: #326d63;
    cursor: pointer;
    font: inherit;
    font-weight: 720;
    padding: 6px 10px;
}

.wb-ad__examples button:hover,
.wb-ad__examples button:focus-visible,
.wb-ad__clear:hover,
.wb-ad__clear:focus-visible {
    background: #e3f3ef;
    outline: 2px solid rgba(23, 125, 112, .2);
    outline-offset: 2px;
}

.wb-ad__browse {
    display: grid;
    gap: 18px;
}

.wb-ad__browse-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
}

.wb-ad__browse-heading h2,
.wb-ad__results-heading h2 {
    color: var(--ad-ink);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 760;
    letter-spacing: -.025em;
    line-height: 1.12;
    margin: 5px 0 0;
}

.wb-ad__browse-heading p {
    color: var(--ad-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 7px 0 0;
}

.wb-ad__groups {
    display: grid;
    gap: 11px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wb-ad__group {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--ad-border);
    border-radius: 17px;
    color: inherit;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 12px;
    grid-template-columns: 11px minmax(0, 1fr) auto;
    min-height: 112px;
    padding: 18px;
    text-align: left;
    text-decoration: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.wb-ad__group:hover,
.wb-ad__group:focus-visible,
.wb-ad__group.is-active {
    border-color: rgba(23, 125, 112, .55);
    box-shadow: 0 10px 28px rgba(30, 82, 72, .1);
    outline: 0;
    transform: translateY(-2px);
}

.wb-ad__group.is-active {
    background: #f8fcfb;
}

.wb-ad__group-mark {
    background: linear-gradient(145deg, #efb04f, #db7d32);
    border-radius: 8px 3px 8px 3px;
    box-shadow: 0 4px 10px rgba(201, 114, 39, .2);
    height: 34px;
    margin-top: 1px;
    width: 11px;
}

.wb-ad__group[data-additives-group="e200-299"] .wb-ad__group-mark,
.wb-ad__group[data-additives-group="e500-599"] .wb-ad__group-mark {
    background: linear-gradient(145deg, #5fae9c, #247d70);
}

.wb-ad__group[data-additives-group="e300-399"] .wb-ad__group-mark,
.wb-ad__group[data-additives-group="e600-699"] .wb-ad__group-mark {
    background: linear-gradient(145deg, #73a9cb, #387a9e);
}

.wb-ad__group[data-additives-group="e400-499"] .wb-ad__group-mark,
.wb-ad__group[data-additives-group="e700-799"] .wb-ad__group-mark {
    background: linear-gradient(145deg, #9589cc, #6757a0);
}

.wb-ad__group[data-additives-group="e900-999"] .wb-ad__group-mark {
    background: linear-gradient(145deg, #d984a8, #ae557e);
}

.wb-ad__group[data-additives-group="e800-899"] .wb-ad__group-mark,
.wb-ad__group[data-additives-group="e1000-1599"] .wb-ad__group-mark {
    background: linear-gradient(145deg, #9aa6a2, #65736f);
}

.wb-ad__group-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.wb-ad__group-copy strong {
    color: var(--ad-ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.24;
}

.wb-ad__group-copy small {
    color: var(--ad-muted);
    font-size: 12px;
    line-height: 1.42;
}

.wb-ad__group-count,
.wb-ad__result-count {
    align-items: center;
    background: #edf5f3;
    border-radius: 999px;
    color: #527068;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-height: 28px;
    min-width: 28px;
    padding: 4px 8px;
}

.wb-ad__group.is-active .wb-ad__group-count {
    background: var(--ad-accent);
    color: #fff;
}

.wb-ad__results {
    background: #fff;
    border: 1px solid var(--ad-border);
    border-radius: var(--ad-radius);
    box-shadow: 0 12px 34px rgba(28, 67, 59, .06);
    display: grid;
    gap: 20px;
    padding: clamp(20px, 3vw, 32px);
}

.wb-ad__results-heading {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.wb-ad__grid {
    display: grid;
    gap: 11px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wb-ad__card {
    background: #fbfdfc;
    border: 1px solid #dfeae7;
    border-radius: 16px;
    min-width: 0;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.wb-ad__card:hover,
.wb-ad__card:focus-within {
    border-color: rgba(23, 125, 112, .45);
    box-shadow: 0 10px 24px rgba(32, 80, 70, .1);
    transform: translateY(-2px);
}

.wb-ad__card > a {
    align-items: center;
    color: inherit !important;
    display: flex;
    gap: 14px;
    min-height: 104px;
    padding: 14px;
    text-decoration: none !important;
}

.wb-ad__card > a:focus-visible {
    outline: 3px solid rgba(23, 125, 112, .28);
    outline-offset: -3px;
}

.wb-ad__code {
    align-items: center;
    background: #e9f5f2;
    border: 1px solid #cfe8e1;
    border-radius: 13px;
    color: #176f64;
    display: inline-flex;
    flex: 0 0 62px;
    font-size: 15px;
    font-weight: 820;
    height: 56px;
    justify-content: center;
    letter-spacing: -.02em;
    padding: 4px;
    text-align: center;
}

.wb-ad__card-copy {
    display: grid;
    flex: 1 1 auto;
    gap: 3px;
    min-width: 0;
}

.wb-ad__card-copy strong {
    color: var(--ad-ink);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.28;
}

.wb-ad__card-copy small {
    color: #788983;
    font-size: 12px;
    line-height: 1.3;
}

.wb-ad__card-match {
    color: #795b2b !important;
}

.wb-ad__status {
    font-weight: 720;
}

.wb-ad__status--authorised {
    color: #277064 !important;
}

.wb-ad__status--not-authorised {
    color: #8a5d2a !important;
}

.wb-ad__family {
    background: #f7fbfa;
    border: 1px solid #cfe3de;
    border-radius: 18px;
    grid-column: 1 / -1;
    overflow: hidden;
}

.wb-ad__family-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    list-style: none;
    padding: 18px 20px;
}

.wb-ad__family-summary::-webkit-details-marker {
    display: none;
}

.wb-ad__family-summary::before {
    color: var(--ad-accent);
    content: "+";
    flex: 0 0 20px;
    font-size: 23px;
    font-weight: 500;
    line-height: 1;
}

.wb-ad__family[open] > .wb-ad__family-summary::before {
    content: "−";
}

.wb-ad__family-copy {
    display: grid;
    flex: 1 1 auto;
    gap: 5px;
}

.wb-ad__family-copy strong {
    color: var(--ad-ink);
    font-size: 16px;
    line-height: 1.3;
}

.wb-ad__family-copy small,
.wb-ad__family-note {
    color: var(--ad-muted);
    font-size: 12px;
    line-height: 1.45;
}

.wb-ad__family-count {
    align-items: center;
    background: var(--ad-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-height: 29px;
    min-width: 29px;
    padding: 4px 9px;
}

.wb-ad__family-body {
    border-top: 1px solid #d9e9e5;
    display: grid;
    gap: 14px;
    padding: 16px 20px 20px;
}

.wb-ad__family-note {
    margin: 0;
}

.wb-ad__family-source {
    color: var(--ad-accent-dark) !important;
    font-size: 12px;
    font-weight: 760;
    justify-self: start;
    text-decoration: none !important;
}

.wb-ad__arrow {
    color: #6c8780;
    flex: 0 0 auto;
    font-size: 18px;
    transition: transform .18s ease;
}

.wb-ad__card:hover .wb-ad__arrow {
    transform: translateX(3px);
}

.wb-ad__more {
    background: #edf7f4;
    border: 1px solid #cee5df;
    border-radius: 12px;
    color: var(--ad-accent-dark);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 760;
    justify-self: center;
    min-width: 180px;
    padding: 12px 18px;
}

.wb-ad__more:hover,
.wb-ad__more:focus-visible {
    background: #e3f3ef;
    outline: 2px solid rgba(23, 125, 112, .22);
    outline-offset: 2px;
}

.wb-ad__pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.wb-ad__page {
    align-items: center;
    background: #f7fbfa;
    border: 1px solid #d6e7e2;
    border-radius: 10px;
    color: var(--ad-accent-dark) !important;
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    justify-content: center;
    min-height: 38px;
    min-width: 38px;
    padding: 7px 11px;
    text-decoration: none !important;
}

.wb-ad__page:hover,
.wb-ad__page:focus-visible,
.wb-ad__page.is-current {
    background: var(--ad-accent);
    border-color: var(--ad-accent);
    color: #fff !important;
    outline: 0;
}

.wb-ad__page--text {
    padding-inline: 14px;
}

.wb-ad__empty {
    background: var(--ad-surface);
    border: 1px dashed #bdd7d1;
    border-radius: 16px;
    color: var(--ad-muted);
    font-size: 14px;
    line-height: 1.5;
    padding: 28px;
    text-align: center;
}

.wb-ad__method {
    background: var(--ad-warm);
    border: 1px solid #eee0c8;
    border-radius: 16px;
    padding: 0 20px;
}

.wb-ad__method summary {
    color: #5b4a31;
    cursor: pointer;
    font-size: 15px;
    font-weight: 760;
    padding: 17px 0;
}

.wb-ad__method-body {
    padding-bottom: 18px;
}

.wb-ad__method p,
.wb-ad__method li {
    color: #6e604c;
    font-size: 14px;
    line-height: 1.58;
    max-width: 900px;
}

.wb-ad__method p {
    margin: -4px 0 12px;
}

.wb-ad__method ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.wb-ad__method li strong {
    color: #5b4a31;
}

.wb-ad__diagnostic {
    background: #fff3cd;
    border: 1px solid #e8cc72;
    border-radius: 12px;
    color: #5f4c14;
    font-size: 12px;
    padding: 12px 14px;
}

.wb-ad.is-searching .wb-ad__browse-heading,
.wb-ad.is-searching .wb-ad__groups {
    display: none;
}

@media (max-width: 920px) {
    .wb-ad__groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .wb-ad {
        gap: 18px;
        margin-bottom: 36px;
        padding-top: 14px;
    }

    .wb-ad__hero {
        border-radius: 18px;
        gap: 18px;
        padding: 24px 18px;
    }

    .wb-ad__hero h1 {
        font-size: clamp(29px, 9vw, 38px);
    }

    .wb-ad__hero-copy p {
        font-size: 15px;
        line-height: 1.5;
    }

    .wb-ad__search-wrap {
        min-height: 56px;
        padding-left: 14px;
    }

    .wb-ad__examples > span {
        flex-basis: 100%;
    }

    .wb-ad__groups {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wb-ad__group {
        align-items: center;
        min-height: 82px;
        padding: 14px;
    }

    .wb-ad__group-copy small {
        display: none;
    }

    .wb-ad__results {
        border-radius: 18px;
        padding: 18px 14px;
    }

    .wb-ad__results-heading h2 {
        font-size: 24px;
    }

    .wb-ad__grid {
        grid-template-columns: 1fr;
    }

    .wb-ad__card > a {
        min-height: 94px;
        padding: 12px;
    }
}

@media (max-width: 420px) {
    .wb-ad__clear {
        font-size: 0;
        min-height: 36px;
        min-width: 36px;
        padding: 0;
        position: relative;
    }

    .wb-ad__clear::after {
        content: "×";
        font-size: 21px;
        inset: 0;
        line-height: 34px;
        position: absolute;
        text-align: center;
    }

    .wb-ad__code {
        flex-basis: 56px;
        height: 52px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wb-ad *,
    .wb-ad *::before,
    .wb-ad *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
