.wb-nd {
    --nd-ink: var(--wb-ui-ink, #172925);
    --nd-muted: var(--wb-ui-muted, #65746f);
    --nd-accent: var(--wb-ui-accent, #177d70);
    --nd-border: var(--wb-ui-border, #dceae7);
    --nd-surface: var(--wb-ui-surface, #f8fcfb);
    --nd-radius: var(--wb-ui-radius, 24px);
    --nd-page-top-gap: clamp(24px, 3vw, 32px);
    box-sizing: border-box;
    color: var(--nd-ink);
    display: grid;
    gap: 24px;
    margin: 0 auto 48px;
    max-width: 1180px;
    padding-top: var(--nd-page-top-gap);
}

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

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

.wb-nd__sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.wb-nd__hero {
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .82) 0 7%, transparent 7.5%),
        radial-gradient(circle at 94% 30%, rgba(255, 255, 255, .42) 0 11%, transparent 11.5%),
        linear-gradient(135deg, #eaf8f4 0%, #f5fbf8 58%, #edf8e9 100%);
    border: 1px solid #d7ebe5;
    border-radius: var(--nd-radius);
    box-shadow: 0 14px 40px rgba(27, 84, 73, .08);
    display: grid;
    gap: 26px;
    overflow: hidden;
    padding: clamp(28px, 5vw, 54px);
    position: relative;
}

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

.wb-nd__eyebrow {
    color: var(--nd-accent);
    display: block;
    font-size: 12px;
    font-weight: 780;
    letter-spacing: .1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

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

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

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

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

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

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

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

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

.wb-nd__filters {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.wb-nd__filter {
    align-items: center;
    background: #fff;
    border: 1px solid var(--nd-border);
    border-radius: 15px;
    color: #405952;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    font-weight: 720;
    gap: 8px;
    justify-content: space-between;
    line-height: 1.25;
    min-height: 52px;
    padding: 10px 12px;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.wb-nd__filter strong {
    align-items: center;
    background: #eef5f3;
    border-radius: 999px;
    color: #58706a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 11px;
    justify-content: center;
    min-height: 25px;
    min-width: 25px;
    padding: 3px 7px;
}

.wb-nd__filter:hover,
.wb-nd__filter:focus-visible,
.wb-nd__filter.is-active {
    border-color: rgba(23, 125, 112, .55);
    box-shadow: 0 8px 22px rgba(32, 88, 77, .09);
    color: var(--nd-accent);
    outline: 0;
    transform: translateY(-1px);
}

.wb-nd__filter.is-active strong {
    background: var(--nd-accent);
    color: #fff;
}

.wb-nd__status {
    color: var(--nd-muted);
    font-size: 13px;
    margin: -9px 2px -8px;
}

.wb-nd__sections {
    display: grid;
    gap: 22px;
}

.wb-nd__section {
    background: #fff;
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius);
    box-shadow: 0 10px 30px rgba(28, 67, 59, .055);
    padding: clamp(20px, 3vw, 32px);
}

.wb-nd__section-header {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.wb-nd__section-mark {
    background: linear-gradient(145deg, #58b8a9, #177d70);
    border-radius: 9px 3px 9px 3px;
    box-shadow: 0 5px 12px rgba(23, 125, 112, .2);
    flex: 0 0 11px;
    height: 34px;
    margin-top: 2px;
}

.wb-nd__section--mineral .wb-nd__section-mark {
    background: linear-gradient(145deg, #65a6c4, #2b7293);
}

.wb-nd__section--other-nutrient .wb-nd__section-mark {
    background: linear-gradient(145deg, #9d8ad0, #6852a0);
}

.wb-nd__section--other-element .wb-nd__section-mark {
    background: linear-gradient(145deg, #8d9b98, #596865);
}

.wb-nd__section--obsolete .wb-nd__section-mark {
    background: linear-gradient(145deg, #d6a866, #a06e29);
}

.wb-nd__section-header h2 {
    color: var(--nd-ink);
    font-size: clamp(22px, 3vw, 29px);
    font-weight: 760;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0;
}

.wb-nd__section-header p {
    color: var(--nd-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 6px 0 0;
    max-width: 760px;
}

.wb-nd__subgroup + .wb-nd__subgroup {
    border-top: 1px solid #e8f0ee;
    margin-top: 28px;
    padding-top: 25px;
}

.wb-nd__subgroup h3 {
    color: #4d625d;
    font-size: 13px;
    font-weight: 780;
    letter-spacing: .07em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.wb-nd__grid {
    display: grid;
    gap: 11px;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}

.wb-nd__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-nd__card:hover,
.wb-nd__card:focus-within {
    border-color: rgba(23, 125, 112, .45);
    box-shadow: 0 10px 24px rgba(32, 80, 70, .1);
    transform: translateY(-2px);
}

.wb-nd__card-main {
    align-items: center;
    color: inherit !important;
    display: flex;
    gap: 12px;
    min-height: 82px;
    padding: 13px;
    text-decoration: none !important;
}

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

.wb-nd__symbol {
    align-items: center;
    background: #e8f5f1;
    border: 1px solid #cfe8e1;
    border-radius: 13px;
    color: #176f64;
    display: inline-flex;
    flex: 0 0 48px;
    font-size: 15px;
    font-weight: 800;
    height: 48px;
    justify-content: center;
    letter-spacing: -.02em;
}

.wb-nd__section--mineral .wb-nd__symbol {
    background: #edf6fa;
    border-color: #d5e8f0;
    color: #2d708e;
}

.wb-nd__section--other-nutrient .wb-nd__symbol {
    background: #f2eef9;
    border-color: #e2d9f2;
    color: #68529a;
}

.wb-nd__section--other-element .wb-nd__symbol {
    background: #f0f4f3;
    border-color: #dde5e3;
    color: #526460;
}

.wb-nd__section--obsolete .wb-nd__symbol {
    background: #fbf3e7;
    border-color: #efdfc5;
    color: #936524;
}

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

.wb-nd__card-copy strong {
    color: var(--nd-ink);
    font-size: 15px;
    font-weight: 735;
    line-height: 1.27;
}

.wb-nd__substance {
    color: #788983;
    font-size: 12px;
    line-height: 1.25;
}

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

.wb-nd__card:hover .wb-nd__arrow {
    transform: translateX(3px);
}

.wb-nd__related {
    align-items: baseline;
    background: rgba(246, 249, 248, .9);
    border-top: 1px solid #e5ecea;
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 4px 6px;
    line-height: 1.4;
    padding: 8px 13px 10px;
}

.wb-nd__related span {
    color: #788983;
}

.wb-nd__related a {
    color: var(--nd-accent);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(23, 125, 112, .3);
    text-underline-offset: 2px;
}

.wb-nd__empty {
    background: var(--nd-surface);
    border: 1px dashed #bfd8d2;
    border-radius: var(--nd-radius);
    color: var(--nd-muted);
    padding: 38px 22px;
    text-align: center;
}

.wb-nd__empty span {
    color: var(--nd-accent);
    display: block;
    font-size: 38px;
    line-height: 1;
}

.wb-nd__empty p {
    margin: 10px auto 0;
    max-width: 540px;
}

.wb-nd__diagnostic {
    background: #fff7df;
    border: 1px solid #edcf73;
    border-radius: 12px;
    color: #624b08;
    padding: 12px 15px;
}

@media (max-width: 980px) {
    .wb-nd__filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .wb-nd {
        gap: 18px;
        margin-bottom: 32px;
    }

    .wb-nd__hero {
        border-radius: 20px;
        gap: 20px;
        padding: 25px 19px 21px;
    }

    .wb-nd__hero h1 {
        font-size: 31px;
        line-height: 1.08;
    }

    .wb-nd__hero p {
        font-size: 15px;
        line-height: 1.52;
        margin-top: 13px;
    }

    .wb-nd__search-wrap {
        min-height: 54px;
        padding-left: 14px;
    }

    .wb-nd__search {
        font-size: 15px;
        padding-inline: 10px !important;
    }

    .wb-nd__clear {
        font-size: 0;
        height: 34px;
        padding: 0;
        position: relative;
        width: 34px;
    }

    .wb-nd__clear::before {
        content: '×';
        font-size: 22px;
        left: 50%;
        line-height: 1;
        position: absolute;
        top: 48%;
        transform: translate(-50%, -50%);
    }

    .wb-nd__filters {
        display: flex;
        margin-inline: -1px;
        overflow-x: auto;
        padding: 1px 1px 7px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .wb-nd__filter {
        flex: 0 0 auto;
        min-height: 46px;
        min-width: 112px;
        scroll-snap-align: start;
    }

    .wb-nd__section {
        border-radius: 20px;
        padding: 20px 16px;
    }

    .wb-nd__section-header {
        gap: 11px;
        margin-bottom: 19px;
    }

    .wb-nd__section-header h2 {
        font-size: 23px;
    }

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

    .wb-nd__card-main {
        min-height: 76px;
        padding: 11px;
    }

    .wb-nd__symbol {
        flex-basis: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wb-nd__filter,
    .wb-nd__card,
    .wb-nd__arrow {
        transition: none;
    }
}
