.product-research-menu-panel {
  --research-action-size: 3rem;
  --research-action-gap: .375rem;
  --research-menu-inset: .5rem;
  --research-menu-width: 18rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--research-action-size), auto);
  gap: var(--research-action-gap);
  box-sizing: border-box;
  width: min(var(--research-menu-width), calc(100vw - 1rem));
  min-width: 0;
  max-height: calc(100dvh - 1rem);
  padding: var(--research-menu-inset);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--erp-surface, var(--hub-panel-strong));
  color: var(--erp-ink, var(--hub-ink));
  border-color: var(--erp-border, var(--hub-line));
  box-shadow: var(--erp-overlay-shadow, var(--hub-shadow-tight));
}
body .product-research-menu-panel > button.product-research-button {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: var(--research-action-size) !important;
  margin: 0 !important;
  padding: var(--research-menu-inset) !important;
  border: 1px solid var(--erp-border, var(--hub-line)) !important;
  border-radius: var(--research-menu-inset) !important;
  background: var(--erp-surface, var(--hub-panel-strong)) !important;
  color: var(--erp-ink, var(--hub-ink)) !important;
  font-family: var(--erp-font, inherit);
  font-size: .8125rem !important;
  font-weight: 600;
  line-height: 1.25 !important;
  letter-spacing: normal;
  white-space: normal !important;
  overflow-wrap: anywhere;
  justify-content: center;
  text-align: center;
  box-shadow: none !important;
}
body .product-research-menu-panel > button.product-research-button[data-cost] {
  grid-column: 1 / -1;
  border-color: var(--erp-accent, var(--hub-blue)) !important;
}
body .product-research-menu-panel > button.product-research-button:not(:disabled):hover {
  background: var(--erp-selected, var(--hub-panel)) !important;
  border-color: var(--erp-accent, var(--hub-blue)) !important;
}
body .product-research-menu-panel > button.product-research-button:focus-visible {
  outline: 2px solid var(--erp-accent, var(--hub-blue)) !important;
  outline-offset: 2px;
}
body .product-research-menu-panel > button.product-research-button:is([hidden], .hidden) { display: none !important; }
body .product-research-menu-panel > button.product-research-button:disabled { opacity: .45; cursor: not-allowed; }
body button.product-research-menu-trigger {
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  height: 2.75rem !important;
  min-height: 2.75rem !important;
}
body button.product-research-menu-trigger[aria-expanded="true"] {
  outline: 2px solid var(--erp-accent, var(--hub-blue));
  outline-offset: 2px;
}
/* Keep menu cells outside the shared fixed-width icon geometry. */
@layer matrixpro-erp-buttons {
 body.local-erp-shell .product-research-menu-panel > button.product-research-button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: var(--research-action-size) !important;
  padding: var(--research-menu-inset) !important;
  white-space: normal !important;
  line-height: 1.25 !important;
 }
}
