/* Históricos longos mantêm o card de trabalho em uma proporção utilizável. */
.lead-history-wrap .history-list,.budget-history>.history-list{
  max-height:360px;overflow:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:var(--line) transparent;
  scrollbar-gutter:stable;padding:2px 8px 2px 2px;min-width:0;
}
.lead-history-wrap .history-list:focus-visible,.budget-history>.history-list:focus-visible{
  outline:2px solid var(--accent);outline-offset:3px;border-radius:12px;
}
.history-item{min-width:0}
.sticky-browser>.research-panel{position:sticky;top:0}
.history-item-head>*{min-width:0;overflow-wrap:anywhere}
.budget-page .portfolio-head .secondary{font-size:12px;height:40px;white-space:nowrap;border-radius:11px;flex:0 0 auto}
.budget-page .stage-summary-card{min-height:64px;font-size:12px;padding:12px 14px;gap:8px;box-shadow:none}
.budget-page .stage-summary-card strong{font-size:22px}
.budget-page .lead-work-main .person strong{font-size:16px;line-height:1.5}
.budget-page .lead-work-footer .secondary{font-size:12px;height:38px;border-radius:11px}
@media(max-width:1100px){
  .lead-history-wrap .history-list,.budget-history>.history-list{max-height:320px}
}
@container(max-width:560px){
  .budget-page .lead-compact-status{grid-template-columns:1fr}
  .budget-page .lead-compact-status>div{grid-template-columns:110px minmax(0,1fr);gap:10px;align-items:start}
}
@container(max-width:390px){
  .budget-page .budget-form-grid{grid-template-columns:1fr}
  .budget-page .portfolio-head{flex-direction:column;align-items:start}
}
