.metric-help-close:focus-visible { outline: 3px solid #168a91; outline-offset: 3px; }
.metric-help-dialog {
  box-sizing: border-box;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid #d4e3e8;
  border-radius: 16px;
  background: #fff;
  color: #18364e;
  box-shadow: 0 24px 80px #16384b33;
}
.metric-help-dialog::backdrop { background: #112e4666; }
.metric-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.metric-help-heading h3 { margin: 0; font-size: 18px; }
.metric-help-close { flex-shrink: 0; padding: 7px 12px; border: 1px solid #d4e3e8; border-radius: 8px; background: #f5f9fb; color: #18364e; cursor: pointer; }
.metric-help-caption { margin: 24px 0 8px; color: #127b83; font-size: 12px; font-weight: 600; }
.metric-help-formula { margin: 0; padding: 16px; border-radius: 10px; background: #edf7f6; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.metric-help-detail { margin: 0; color: #586e80; font-size: 14px; line-height: 1.9; }
@media (max-width: 480px) { .metric-help-dialog { padding: 20px; } }
#historyAnalysisPanel[hidden], #historicalInvestmentPanel[hidden] { display: none; }
