/* SubaMeta - rolagem mobile sem indicador lateral e sem deslocamento horizontal.
   Mantem a rolagem vertical por toque, teclado e tecnologias assistivas. */
html, body {
  max-width: 100%;
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
/* Grid/flex devem poder reduzir ao espaço real do dispositivo. */
#app, .shell, .main, .main .content, .content,
.ef-page, .ef-sim, .ef-simulator-unified,
.ef-controls, .ef-results, .ef-projection-more,
.ef-projection-body, .smc-shell, .smc-chart-wrap,
.smc-pro-toolbar, .smc-comparison, .page-head,
.admin-shell, .admin-main, .admin-content {
  min-width: 0;
  max-width: 100%;
}
/* Os gráficos não podem aumentar a largura da página; conservam a proporção. */
.ef-plot, .ef-chart, .smc-svg, .smc-chart-wrap,
.ef-projection-more, .ef-projection-body {max-width: 100%;}
.ef-plot svg, .smc-chart-wrap svg, .ef-page canvas,
.smc-shell canvas, .content img, .content video {max-width:100%;}
/* Tabelas amplas rolam somente no próprio bloco, sem arrastar a página inteira. */
.ef-table-scroll, .ef-milestones .ef-table-scroll,
.smc-table-scroll, .table-wrap, .table-scroll,
.data-wrap, .table-responsive {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media(max-width: 900px) {
  /* Oculta somente o desenho da barra; NAO desativa a rolagem vertical. */
  html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  /* Evita que containers aninhados originem uma segunda barra lateral. */
  .shell, .main, .content, .ef-page, .ef-sim-modern,
  .ef-simulator-unified, .ef-results, .ef-projection-more,
  .smc-shell {min-width:0; max-width:100%;}
  .ef-sim-modern .ef-income-header > div:first-child,
  .ef-patrimony-summary > div,
  .ef-projection-more > summary > span,
  .ef-compound-head > div, .smc-chart-title > * {
    min-width: 0;
  }
  .ef-sim-modern .ef-income-header h3,
  .ef-sim-modern .ef-patrimony-summary strong,
  .ef-projection-more strong,
  .ef-page .ef-strong,
  .smc-shell strong, .page-head h1 {
    overflow-wrap: anywhere;
  }
  .ef-page .ef-table-scroll, .smc-table-scroll,
  .table-wrap, .table-scroll, .data-wrap, .table-responsive {
    overscroll-behavior-x: contain;
  }
}
@media(max-width: 480px) {
  .ef-page .ef-hero, .ef-page .ef-sim,
  .ef-page .ef-explain, .ef-page .ef-footer {
    max-width:100%;
  }
  .ef-sim-modern .ef-monthly-strip,
  .ef-sim-modern .ef-compare-grow,
  .ef-patrimony-breakdown,
  .ef-results .ef-three {
    min-width:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .ef-results .ef-three > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .ef-page .ef-tax-values {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .ef-income-header .ef-pill {flex-shrink:0;}
  .ef-patrimony-summary, .ef-projection-body,
  .ef-monthly-strip > div, .ef-compare-grow > div {min-width:0;}
  .ef-page .ef-options-open .ef-options-fields > div {min-width:0;}
}
