:root {
    --tr-surface: var(--site-surface, #252525);
    --tr-raised: var(--site-surface-raised, #2d2d2d);
    --tr-border: var(--site-border, #414141);
    --tr-text: var(--site-text, #f2f2f2);
    --tr-link: #8fc5ff;
    --tr-muted: var(--site-muted, #b8b8b8);
    --tr-accent: #8e63d2;
    --tr-safe: #4f9c68;
    --tr-warn: #e0a53a;
    --tr-danger: #d66a6a;
}

.tr-page { color: var(--tr-text); max-width: 1240px; }
html[data-theme="light"] { --tr-link: var(--ui-blue-strong); }
.tr-page a { color: var(--tr-link); }
.tr-page .tr-hero > a.btn-primary,
.tr-page .tr-hero > a.btn-primary:hover,
.tr-page .tr-hero > a.btn-primary:focus-visible { color: #fff; }
.tr-breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--tr-muted); margin-bottom: 1.25rem; font-size: .92rem; }
.tr-hero, .tr-detail-hero { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-bottom: 1.25rem; }
.tr-hero { margin-bottom: 1.6rem; }
.tr-catalogue-tabs { display: flex; gap: .4rem; margin-bottom: 1.25rem; padding: .3rem; width: fit-content; border: 1px solid var(--tr-border); border-radius: 999px; background: var(--tr-surface); }
.tr-catalogue-tabs a { padding: .45rem 1rem; border-radius: 999px; color: var(--tr-muted); text-decoration: none; font-size: .9rem; font-weight: 650; }
.tr-catalogue-tabs a:hover { color: var(--tr-text); background: var(--tr-raised); }
.tr-catalogue-tabs a[aria-current="page"] { background: color-mix(in srgb, var(--tr-accent) 22%, var(--tr-surface)); color: var(--tr-text); }
.tr-hero h1, .tr-detail-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 .5rem; }
.tr-hero p, .tr-detail-hero p { max-width: 760px; color: var(--tr-muted); margin-bottom: 0; }
.tr-eyebrow { color: #bb9be9 !important; font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
html[data-theme="light"] .tr-eyebrow { color: #63318e !important; }
.tr-trust-banner { border: 1px solid #8a6aad; border-left: 5px solid var(--tr-accent); background: color-mix(in srgb, var(--tr-accent) 12%, var(--tr-surface)); border-radius: 12px; padding: 1rem 1.15rem; margin: 1rem 0 1.5rem; }
.tr-filter-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.tr-filter-panel label { display: grid; gap: .35rem; color: var(--tr-muted); font-size: .85rem; }
.tr-filter-panel :is(input, select) { background: var(--tr-raised); border-color: var(--tr-border); color: var(--tr-text); }
.tr-filter-panel input::placeholder { color: var(--tr-muted); opacity: .75; }
.tr-bulk-bar { display: flex; flex-wrap: wrap; gap: .65rem; padding: .8rem 0; border-top: 1px solid var(--tr-border); border-bottom: 1px solid var(--tr-border); }
.tr-bulk-bar :is(label, button) { display: inline-flex; align-items: center; gap: .55rem; min-height: 36px; padding: .45rem .7rem; border: 1px solid var(--tr-border); border-radius: 8px; background: var(--tr-surface); color: var(--tr-text); font-size: .83rem; cursor: pointer; }
.tr-bulk-bar :is(label, button):hover { border-color: var(--tr-accent); }
.tr-bulk-bar input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--tr-accent); }
.tr-bulk-bar button:disabled { opacity: .6; cursor: wait; }
.tr-section { margin: 1.7rem 0; }
.tr-section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: .75rem; }
.tr-section-heading h2 { font-size: 1.35rem; margin: 0; }
.tr-section-heading p { color: var(--tr-muted); margin: .25rem 0 0; }
.tr-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.tr-card, .tr-panel { background: var(--tr-surface); border: 1px solid var(--tr-border); border-radius: 14px; padding: 1rem; box-shadow: 0 10px 28px rgba(0, 0, 0, .12); }
.tr-card { position: relative; display: grid; min-height: 210px; }
.tr-card-detail-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tr-card:has(> .tr-card-detail-link:hover) { border-color: #8fc5ff; }
.tr-card.has-image { grid-template-columns: minmax(0, 1fr) minmax(90px, 32%); gap: .6rem; }
.tr-card-content { display: flex; min-width: 0; flex-direction: column; }
.tr-card-image { display: grid; place-items: center; min-width: 0; max-height: 215px; overflow: hidden; }
.tr-card-image img { display: block; width: 100%; max-height: 205px; aspect-ratio: 9 / 16; object-fit: contain; }
.tr-card h3 { font-size: 1.12rem; line-height: 1.25; margin: .85rem 0 .35rem; }
.tr-problem-card h3 { margin-top: 0; }
.tr-card p { margin: 0; font-size: .82rem; }
.tr-card .tr-card-problems { font-size: .76rem; line-height: 1.45; }
.tr-card p, .tr-card small, .tr-muted { color: var(--tr-muted); }
.tr-card-topline { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.tr-card-topline .tr-pill { max-width: 100%; }
.tr-pill, .tr-review, .tr-trust-chip { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: .2rem .55rem; font-size: .72rem; font-weight: 750; letter-spacing: .03em; }
.tr-pill { background: var(--tr-raised); border: 1px solid var(--tr-border); }
.tr-pill-organic_compatible { background: color-mix(in srgb, var(--tr-safe) 20%, var(--tr-surface)); border-color: var(--tr-safe); }
.tr-pill-conventional { background: color-mix(in srgb, var(--tr-warn) 18%, var(--tr-surface)); border-color: var(--tr-warn); }
.tr-pill-unclassified { background: var(--tr-raised); border-color: var(--tr-muted); }
.tr-review { color: var(--tr-muted); border: 1px solid var(--tr-border); }
.tr-review-authoritative_verified, .tr-review-curated { color: #a7dbb6; border-color: #4f9c68; }
.tr-review-provisional, .tr-review-needs_review, .tr-review-stale { color: #ffd487; border-color: #b78431; }
.tr-pref-controls { position: relative; z-index: 2; display: grid; gap: .55rem; margin: auto 0 0; padding-top: 1rem; }
.tr-pref-controls label { display: flex; gap: .55rem; align-items: center; cursor: pointer; font-size: .82rem; }
.tr-pref-controls input { width: 1.1rem; height: 1.1rem; accent-color: var(--tr-accent); }
.tr-warning, .tr-unknown { color: #ffd487 !important; }
.tr-inline-status { min-height: 1.3rem; color: var(--tr-muted); }
.tr-empty { padding: 3rem; text-align: center; border: 1px dashed var(--tr-border); border-radius: 14px; color: var(--tr-muted); }
.tr-page :is(.tr-card, .tr-section, .tr-empty)[hidden] { display: none; }
.tr-page.app-treatment-catalogue { margin-inline: auto; padding: 12px 12px 20px; }
.app-treatment-catalogue .tr-hero {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.app-treatment-catalogue .tr-hero h1 { margin: 0; font-size: clamp(22px, 5vw, 28px); font-weight: 650; }
.app-treatment-catalogue .app-treatment-map {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border: 1px solid var(--tr-border);
    border-radius: 7px;
    color: var(--tr-link);
    font-size: 13px;
    text-decoration: none;
}
.app-treatment-catalogue .app-treatment-map:hover { background: var(--tr-raised); }
.app-treatment-catalogue .tr-catalogue-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 9px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--tr-border);
    border-radius: 0;
    background: transparent;
}
.app-treatment-catalogue .tr-catalogue-tabs a {
    padding: 8px 4px 6px;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 13px;
    text-align: center;
}
.app-treatment-catalogue .tr-catalogue-tabs a[aria-current="page"] {
    border-color: var(--tr-link);
    background: transparent;
    color: var(--tr-text);
}
.app-treatment-catalogue .tr-filter-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 7px; }
.app-treatment-catalogue .tr-filter-panel label { gap: 2px; min-width: 0; font-size: 11px; }
.app-treatment-catalogue .tr-filter-panel :is(input, select) { min-width: 0; height: 38px; min-block-size: 38px; padding-block: 4px; font-size: 13px; }
.app-treatment-catalogue .tr-bulk-bar { gap: 5px; padding: 6px 0; }
.app-treatment-catalogue .tr-bulk-bar :is(label, button) { flex: 1 1 135px; justify-content: flex-start; padding: 4px 7px; font-size: 11px; line-height: 1.25; }
.app-treatment-catalogue .tr-bulk-bar input { flex: 0 0 auto; }
.app-treatment-catalogue .tr-inline-status:empty { min-height: 0; }
.app-treatment-catalogue .tr-section { margin: 11px 0 18px; }
.app-treatment-catalogue .tr-section-heading { margin-bottom: 7px; }
.app-treatment-catalogue .tr-section-heading h2 { font-size: 17px; }
.app-treatment-catalogue .tr-card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.app-treatment-catalogue .tr-empty { padding: 18px; }
@media (max-width: 540px) {
    .app-treatment-catalogue .tr-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-treatment-catalogue .tr-filter-panel label:first-child { grid-column: 1 / -1; }
    .app-treatment-catalogue .tr-filter-panel label:first-child > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.tr-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 330px); gap: 1.25rem; align-items: start; }
.tr-detail-main { display: grid; gap: 1rem; min-width: 0; }
.tr-detail-main > .tr-panel { min-width: 0; }
.tr-detail-aside { position: sticky; top: 1rem; }
.tr-panel h2 { font-size: 1.25rem; margin-bottom: .9rem; }
.tr-panel h3 { font-size: 1rem; margin-top: 1.25rem; }
.tr-fact-list, .tr-source-list { display: grid; gap: .65rem; margin: 0; padding-left: 1.2rem; }
.tr-source-list li { display: grid; gap: .15rem; }
.tr-source-list small { color: var(--tr-muted); }
.tr-table-wrap { overflow-x: auto; }
.tr-table { --bs-table-bg: transparent; --bs-table-color: var(--tr-text); --bs-table-border-color: var(--tr-border); }
.tr-link-cards { display: grid; gap: .65rem; }
.tr-link-card { display: grid; gap: .25rem; padding: .8rem; border: 1px solid var(--tr-border); border-radius: 10px; text-decoration: none; }
.tr-link-card:hover, .tr-link-card:focus-visible { border-color: var(--tr-accent); background: color-mix(in srgb, var(--tr-accent) 8%, transparent); }
.tr-link-card span, .tr-link-card small { color: var(--tr-muted); }
.tr-strategy { border-top: 1px solid var(--tr-border); padding: .8rem 0; }
.tr-strategy summary { cursor: pointer; font-weight: 700; }
.tr-callout { padding: .8rem; background: var(--tr-raised); border-left: 4px solid var(--tr-warn); border-radius: 8px; margin-top: .85rem; }
.tr-definition-list { display: grid; gap: 0; }
.tr-definition-list > div { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 1rem; border-top: 1px solid var(--tr-border); padding: .7rem 0; }
.tr-definition-list dt { color: var(--tr-muted); }
.tr-definition-list dd { margin: 0; }
.tr-regulatory-card { border: 1px solid var(--tr-border); border-radius: 10px; padding: .85rem; margin-top: .75rem; }
.tr-regulatory-card > div { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.tr-regulatory-card p { margin: .45rem 0 0; }
.tr-regulatory-card small { color: var(--tr-muted); }
.tr-regulatory-card small a { color: var(--tr-link); }
.tr-detail-preferences { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.3rem; padding: .2rem 0 .8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--tr-border); }
.tr-detail-preferences label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .84rem; }
.tr-detail-preferences input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--tr-accent); }
.tr-detail-preferences .tr-inline-status { min-height: 0; margin-left: auto; font-size: .78rem; }
.tr-detail-key-note { margin: .9rem 0 0; padding: .7rem .85rem; border-left: 3px solid var(--tr-accent); border-radius: 6px; background: var(--tr-raised); font-size: .88rem; line-height: 1.5; }
.tr-detail-plant-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tr-detail-plant { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: .2rem .6rem .2rem .25rem; border: 1px solid var(--tr-border); border-radius: 999px; background: var(--tr-raised); color: var(--tr-text); text-decoration: none; font-size: .79rem; line-height: 1.2; }
.tr-detail-plant:hover { color: var(--tr-link); border-color: var(--tr-link); }
.tr-detail-plant:focus-visible { outline: 2px solid var(--tr-link); outline-offset: 2px; }
.tr-detail-plant img, .tr-detail-plant-fallback { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; object-fit: contain; }
.tr-detail-more-plants { margin-top: .55rem; }
.tr-detail-more-plants summary { width: fit-content; cursor: pointer; color: var(--tr-link); font-size: .82rem; }
.tr-detail-more-plants .tr-detail-plants-hide { display: none; }
.tr-detail-more-plants[open] { display: flex; flex-direction: column; }
.tr-detail-more-plants[open] summary { order: 2; margin-top: .55rem; }
.tr-detail-more-plants[open] .tr-detail-plants-show { display: none; }
.tr-detail-more-plants[open] .tr-detail-plants-hide { display: inline; }
.tr-detail-more-plants[open] .tr-detail-plant-list { order: 1; }
.tr-crop-specific-list > div { border-top: 1px solid var(--tr-border); padding: .7rem 0; }
.tr-crop-specific-list > div:first-child { border-top: 0; padding-top: 0; }
.tr-crop-specific-list strong { font-size: .88rem; }
.tr-crop-specific-list p { margin: .25rem 0 0; color: var(--tr-muted); font-size: .86rem; }

.tr-problem-detail { max-width: 1240px; }
.tr-problem-detail .tr-detail-layout { grid-template-columns: minmax(0, 1fr) 310px; }
.tr-problem-detail .tr-detail-layout-full { grid-template-columns: minmax(0, 1fr); }
.tr-problem-detail .tr-detail-aside { position: static; display: grid; gap: 1rem; }
.tr-solution-detail .tr-detail-layout { grid-template-columns: minmax(0, 1fr) 310px; }
.tr-solution-detail .tr-detail-layout-full { grid-template-columns: minmax(0, 1fr); }
.tr-solution-detail .tr-detail-aside { position: static; display: grid; gap: 1rem; }
.tr-crop-risk-table th, .tr-crop-risk-table td { overflow-wrap: normal; word-break: normal; }
.tr-crop-risk-table :is(th, td):first-child { min-width: 175px; width: 24%; }
.tr-crop-risk-table :is(th, td):nth-child(2) { white-space: nowrap; width: 85px; }
.tr-treatment-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; }
.tr-treatment-card { display: grid; align-content: start; gap: .4rem; min-width: 0; padding: .85rem; border: 1px solid var(--tr-border); border-radius: 10px; background: var(--tr-raised); color: var(--tr-text) !important; text-decoration: none; }
.tr-treatment-card:hover, .tr-treatment-card:focus-visible { border-color: var(--tr-accent); background: color-mix(in srgb, var(--tr-accent) 8%, var(--tr-raised)); }
.tr-treatment-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .65rem; }
.tr-treatment-card-head strong { font-size: .95rem; line-height: 1.35; }
.tr-treatment-role { display: inline-flex; padding: .18rem .5rem; border: 1px solid var(--tr-border); border-radius: 999px; color: var(--tr-muted); font-size: .72rem; white-space: nowrap; }
.tr-treatment-description { font-size: .84rem; line-height: 1.45; }
.tr-treatment-caution { display: block; color: var(--tr-muted); font-size: .78rem; line-height: 1.4; }
.tr-management-group + .tr-management-group { margin-top: 1.5rem; }
.tr-management-group h3 { margin: 0 0 .65rem; color: var(--tr-text); }
.tr-management-group ol { display: grid; gap: .8rem; padding-left: 1.3rem; margin: 0; }
.tr-management-group li::marker { color: var(--tr-muted); }
.tr-management-options { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.tr-management-options a { padding: .3rem .65rem; border: 1px solid var(--tr-border); border-radius: 8px; font-size: .8rem; text-decoration: none; }
.tr-management-options a:hover { border-color: #8fc5ff; background: var(--tr-raised); }
.tr-problem-art { display: grid; place-items: center; }
.tr-problem-art img { width: 100%; height: 300px; object-fit: contain; }
.tr-product-list { display: grid; gap: .75rem; }
.tr-product-group { min-width: 0; border: 1px solid var(--tr-border); border-radius: 10px; overflow: hidden; }
.tr-product-group h3 { margin: 0; padding: .7rem .75rem .5rem; font-size: .84rem; line-height: 1.25; }
.tr-product-title { color: inherit; text-decoration: none; }
.tr-product-title:hover, .tr-product-title:focus-visible { color: inherit; text-decoration: underline; }
.tr-amazon-items { display: grid; gap: 1px; background: var(--tr-border); }
.tr-amazon-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: .65rem; min-height: 68px; padding: .4rem .65rem; background: var(--tr-surface); color: var(--tr-text) !important; text-decoration: none; }
.tr-amazon-item-no-image { grid-template-columns: 1fr; }
.tr-amazon-item:hover { background: var(--tr-raised); }
.tr-amazon-item img { width: 54px; height: 54px; object-fit: contain; background: white; border-radius: 6px; }
.tr-amazon-item span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: .79rem; line-height: 1.3; }
.tr-product-amazon { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; border-top: 1px solid var(--tr-border); font-size: .76rem; text-decoration: none; }
.tr-product-amazon:hover { background: var(--tr-raised); }
.tr-problem-products .tr-product-note { color: var(--tr-muted); font-size: .76rem; margin: .8rem 0 0; }
.tr-problem-sources { width: calc(100% - 310px - 1.25rem); margin-top: 1.25rem; box-shadow: none; }
.tr-problem-sources-full { width: 100%; }
.tr-sources-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; }
.tr-problem-sources .tr-source-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; list-style: none; font-size: .82rem; }

@media (max-width: 850px) {
    .tr-filter-panel { grid-template-columns: 1fr 1fr; }
    .tr-detail-layout, .tr-problem-detail .tr-detail-layout, .tr-solution-detail .tr-detail-layout { grid-template-columns: 1fr; }
    .tr-detail-aside { position: static; }
    .tr-problem-sources { width: 100%; }
}

@media (max-width: 560px) {
    .tr-hero, .tr-detail-hero { align-items: flex-start; flex-direction: column; }
    .tr-filter-panel { grid-template-columns: 1fr; }
    .tr-card-grid { grid-template-columns: 1fr; }
    .tr-definition-list > div { grid-template-columns: 1fr; gap: .25rem; }
    .tr-problem-sources .tr-source-list { grid-template-columns: 1fr; }
    .tr-crop-risk-table { min-width: 600px; }
}

.tr-page :focus-visible { outline: 3px solid color-mix(in srgb, var(--tr-accent) 65%, white); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tr-page * { scroll-behavior: auto !important; } }
