/* Inherit the resolved workbench theme for manual and system appearance. */
#marketInsightsPanel{--mi-muted:color-mix(in srgb,var(--wb-muted) 65%,var(--wb-text));--mi-bar:#86aff4;--mi-positive:#197653;--mi-negative:#b84a4a;--mi-success-text:#166354;--mi-success-bg:#eef9f5;--mi-error-text:#9c3030;--mi-error-bg:#fff1f1;color:var(--wb-text);min-width:0}#marketInsightsPanel [hidden]{display:none!important}
.mi-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:18px;padding:22px;background:var(--wb-surface);border:1px solid var(--wb-line);border-radius:16px;margin-bottom:16px}.mi-form>div{min-width:135px}.mi-form .mi-category{flex:1 1 320px;min-width:240px;max-width:560px}.mi-form label{display:block;font-weight:600;font-size:13px;color:var(--wb-text);margin-bottom:8px}.mi-form select,.mi-form .kt-category-picker>button{height:44px;background:var(--wb-surface);border:1px solid var(--wb-line);border-radius:9px;color:var(--wb-text);padding:0 12px;font:inherit;max-width:100%}.mi-form select{min-width:145px}.mi-form .kt-category-picker>button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px}.mi-form .kt-category-picker>button span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mi-form .kt-category-picker svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2}.mi-form .kt-category-popover{max-width:min(650px,calc(100vw - 64px));z-index:35}.mi-form .kt-category-matches{max-height:340px}.mi-form .kt-category-matches button{width:100%;text-align:left;white-space:normal}.mi-form .mi-actions{display:flex;gap:10px;margin-left:auto}.mi-actions button{min-height:44px;min-width:102px}
.mi-status{display:flex;align-items:center;gap:10px;color:var(--mi-muted);font-size:13px;min-height:25px;margin:0 4px 14px}#miActivity{width:14px;height:14px;flex:0 0 14px;border:2px solid var(--wb-active);border-top-color:var(--wb-blue);border-radius:50%;animation:wb-spin 1s linear infinite}.mi-notice{padding:12px 16px;margin:0 0 16px;border-radius:10px;color:var(--mi-success-text);background:var(--mi-success-bg);font-size:13px}.mi-notice.mi-error{color:var(--mi-error-text);background:var(--mi-error-bg)}
.mi-empty{text-align:center;background:linear-gradient(145deg,var(--wb-hover),var(--wb-surface));border:1px dashed var(--wb-line);border-radius:16px;padding:64px 24px}.mi-empty h2{font-size:24px;margin:10px 0 16px}.mi-empty p{font-size:14px;line-height:1.8;color:var(--mi-muted);margin:8px 0}.mi-eyebrow{display:block;font-size:12px;letter-spacing:.12em;font-weight:700;color:var(--wb-blue)}.mi-result-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:26px 0 18px}.mi-result-heading h2{font-size:24px;margin:7px 0 8px}.mi-result-heading p{font-size:12px;line-height:1.7;color:var(--mi-muted);margin:0;overflow-wrap:anywhere}.mi-count{flex-shrink:0;background:var(--wb-active);color:var(--wb-blue);border-radius:20px;padding:8px 14px;font-size:13px}
.mi-highlights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.mi-highlights article{background:var(--wb-surface);border:1px solid var(--wb-line);border-radius:14px;padding:20px;min-width:0}.mi-highlights article>span{color:var(--mi-muted);font-size:13px}.mi-highlights strong{font-size:21px;line-height:1.5;margin:9px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.mi-highlights small{color:var(--wb-blue)}.mi-insight{margin:16px 0 24px;padding:14px 18px;border-left:3px solid var(--wb-blue);background:var(--wb-active);border-radius:0 10px 10px 0;font-size:13px;line-height:1.9;color:var(--wb-text)}
.mi-rankings{background:var(--wb-surface);border:1px solid var(--wb-line);border-radius:14px;overflow:hidden}.mi-tabs{display:flex;gap:6px;padding:14px 16px 0;overflow:auto;border-bottom:1px solid var(--wb-line)}.mi-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;padding:12px 16px;background:transparent;white-space:nowrap;color:var(--mi-muted);min-height:44px}.mi-tabs button[aria-selected=true]{color:var(--wb-blue);border-bottom-color:var(--wb-blue);font-weight:700;background:var(--wb-hover)}.mi-table-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;flex-wrap:wrap;padding:16px 20px}.mi-table-toolbar strong{font-size:14px}.mi-search-label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--mi-muted)}.mi-search-label input{width:240px;height:38px;border:1px solid var(--wb-line);border-radius:8px;padding:0 12px;color:var(--wb-text);background:var(--wb-surface)}
.mi-table-wrap{max-height:680px;overflow:auto;scrollbar-gutter:stable}#miTable{width:100%;border-collapse:collapse;text-align:left;font-size:13px}#miTable th{position:sticky;top:0;z-index:1;color:var(--mi-muted);background:var(--wb-hover);font-size:12px;font-weight:600;padding:13px 18px;white-space:nowrap;border-bottom:1px solid var(--wb-line)}#miTable td{padding:16px 18px;border-bottom:1px solid var(--wb-line);vertical-align:middle;line-height:1.5}#miTable tr:last-child td{border-bottom:0}#miTable tbody tr:hover{background:var(--wb-hover)}.mi-rank{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;color:var(--mi-muted);font-variant-numeric:tabular-nums}.mi-rank-top{background:var(--wb-active);color:var(--wb-blue);border-radius:7px;font-weight:700}.mi-code{display:block;color:var(--mi-muted);font-size:11px;margin-top:4px}.mi-index{min-width:115px}.mi-index strong{font-variant-numeric:tabular-nums;font-size:14px}.mi-index>span{display:block;background:var(--wb-active);height:4px;max-width:140px;border-radius:3px;margin-top:7px}.mi-index i{display:block;height:100%;border-radius:3px;background:var(--mi-bar)}.mi-positive{color:var(--mi-positive)}.mi-negative{color:var(--mi-negative)}.mi-product{display:flex;align-items:center;gap:12px;min-width:320px;max-width:480px}.mi-product img,.mi-image-empty{width:64px;height:64px;flex:0 0 64px;border-radius:8px;object-fit:contain;background:var(--wb-canvas);border:1px solid var(--wb-line)}.mi-image-empty{display:flex;align-items:center;justify-content:center;font-size:10px;color:var(--mi-muted)}.mi-product-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;color:var(--wb-text);font-weight:500;text-decoration:none}.mi-product-name:hover{color:var(--wb-blue);text-decoration:underline}.mi-product small{display:block;color:var(--mi-muted);font-size:11px;margin-top:5px}.mi-badge{display:inline-block;padding:3px 7px;font-size:11px;color:var(--mi-muted);background:var(--wb-hover);border-radius:5px;margin:2px;white-space:nowrap}.mi-badges{min-width:185px}.mi-category-path{min-width:250px;max-width:500px}.mi-category-path summary{cursor:pointer;color:var(--wb-blue)}.mi-category-path p,.mi-category-path small{margin:8px 0;color:var(--mi-muted);font-size:12px}.mi-note{font-size:12px;color:var(--mi-muted);line-height:1.8;margin:14px 4px 0}.mi-no-match{padding:28px;text-align:center;color:var(--mi-muted);font-size:14px}
#marketInsightsPanel button:focus-visible,#marketInsightsPanel select:focus-visible,#marketInsightsPanel input:focus-visible,#marketInsightsPanel summary:focus-visible,#marketInsightsPanel a:focus-visible{outline:2px solid var(--wb-blue);outline-offset:3px}#marketInsightsPanel button:disabled,#marketInsightsPanel select:disabled{opacity:.5;cursor:not-allowed}#marketInsightsPanel button,#marketInsightsPanel a{transition:color var(--wb-motion-fast,160ms),background-color var(--wb-motion-fast,160ms),border-color var(--wb-motion-fast,160ms)}
@media(max-width:760px){.mi-form{padding:16px;gap:14px}.mi-form .mi-category{max-width:100%;flex-basis:100%}.mi-form>div{flex:1 1 140px;min-width:0}.mi-form select{width:100%;min-width:0}.mi-form .mi-actions{margin-left:0}.mi-highlights{grid-template-columns:1fr}.mi-result-heading{align-items:flex-start}.mi-count{font-size:11px;padding:6px 9px}.mi-table-toolbar{padding:14px}.mi-search-label input{width:190px}.mi-tabs{padding:8px 8px 0}.mi-tabs button{padding:12px 10px}.mi-empty{padding:40px 20px}}
@media(prefers-reduced-motion:reduce){#marketInsightsPanel *,#marketInsightsPanel *:before,#marketInsightsPanel *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:760px){.mi-form .mi-actions{flex:1 1 230px;flex-wrap:wrap}.mi-form .mi-actions button{flex:1 1 100px}.mi-form .mi-category{min-width:0}}

:root[data-desktop-theme-effective=dark] #marketInsightsPanel{--mi-bar:var(--wb-blue);--mi-positive:#7fdbad;--mi-negative:#ffa5a5;--mi-success-text:#a0e7c5;--mi-success-bg:#19392f;--mi-error-text:#ffb9b9;--mi-error-bg:#44272d}

/* Buyer distributions share the workbench surfaces and keep exact labels visible. */
#marketInsightsPanel{--mi-chart-0:var(--wb-blue);--mi-chart-1:#b7791f;--mi-chart-2:#0f8387;--mi-chart-3:#8752cb;--mi-chart-4:#bd5742}
.mi-product{color:var(--wb-text);text-decoration:none}.mi-product-info{min-width:0}.mi-product:hover .mi-product-name,.mi-featured-product:hover strong{color:var(--wb-blue);text-decoration:underline}.mi-featured-product{min-width:0;max-width:none;align-items:center;margin:12px 0}.mi-featured-product strong{font-size:17px;margin:0 0 6px}.mi-featured-product small{font-size:12px;overflow-wrap:anywhere}.mi-highlights article>a+small{display:block}
.mi-profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;margin:0 0 24px}.mi-profile-card{padding:20px;border:1px solid var(--wb-line);border-radius:14px;background:var(--wb-surface);min-width:0}.mi-profile-card h3{font-size:15px;margin:0 0 20px;color:var(--wb-text)}.mi-profile-content{display:flex;align-items:center;justify-content:center;gap:18px;min-height:134px}.mi-profile-chart{position:relative;width:128px;height:128px;flex:0 0 128px}.mi-profile-chart svg{display:block;width:100%;height:100%}.mi-profile-chart>div{position:absolute;inset:30px 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0}.mi-profile-chart strong{font-size:17px;font-variant-numeric:tabular-nums}.mi-profile-chart span{font-size:12px;color:var(--mi-muted);max-width:100%;overflow-wrap:anywhere;text-align:center}.mi-profile-legend{width:auto;flex:1;border-collapse:collapse;font-size:12px}.mi-profile-legend th,.mi-profile-legend td{padding:7px 0;line-height:1.5;border:0}.mi-profile-legend th{text-align:left;font-weight:500;white-space:nowrap;color:var(--mi-muted)}.mi-profile-legend td{text-align:right;padding-left:8px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--wb-text)}.mi-profile-legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:7px;background:var(--mi-segment)}.mi-profile-empty{color:var(--mi-muted);text-align:center;font-size:13px;line-height:1.7;margin:0;flex:1}
:root[data-desktop-theme-effective=dark] #marketInsightsPanel{--mi-chart-1:#f4c46b;--mi-chart-2:#73d4cc;--mi-chart-3:#c4a2ff;--mi-chart-4:#ffa58a}
@media(max-width:420px){.mi-profile-card{padding:16px}.mi-profile-content{gap:12px}.mi-profile-chart{width:112px;height:112px;flex-basis:112px}.mi-profile-chart strong{font-size:15px}.mi-featured-product strong{font-size:15px}}

#marketInsightsPanel .mi-profile-legend th,#marketInsightsPanel .mi-profile-legend td{background:transparent;border:0;box-shadow:none}
