/* LAB ID: ajustes para celular e tablet. Sobrepõe os estilos inline das páginas. */
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; }
p, h1, h2, h3, li, dd, dt, a, span, td, th { overflow-wrap: break-word; }

@media (max-width: 900px) {
  [style*="font-size: 260px"] { font-size: 160px !important; }
  [style*="height: 760px"] { height: 600px !important; }
}

@media (max-width: 760px) {
  /* margens laterais */
  [style*="max-width: 1280px"] { padding-left: 20px !important; padding-right: 20px !important; }
  header[style*="padding: 28px 40px"], header [style*="padding: 22px 40px"], header[style*="padding: 22px 40px"] { padding: 16px 20px !important; }

  /* menu: todos os itens visíveis, em duas linhas */
  nav[aria-label="Principal"] { width: 100%; flex-wrap: wrap !important; gap: 10px 18px !important; font-size: 13px !important; }
  header img[alt="LAB ID"] { height: 30px !important; }

  /* respiros verticais */
  [style*="padding: 120px 40px"], [style*="padding: 96px 40px"] { padding-top: 64px !important; }
  [style*="padding: 72px 40px"], [style*="padding: 88px 40px"], [style*="padding: 64px 40px"] { padding-top: 48px !important; padding-bottom: 48px !important; }
  [style*="padding: 72px 40px 0"], [style*="padding: 64px 40px 0"], [style*="padding: 56px 40px 0"] { padding-bottom: 0 !important; }
  [style*="margin-top: 120px"] { margin-top: 72px !important; }
  [style*="margin-top: 96px"], [style*="margin: 96px auto 0"] { margin-top: 64px !important; }
  [style*="margin: 72px 0 0"], [style*="margin-top: 72px"], [style*="margin: 72px auto 0"] { margin-top: 48px !important; }
  [style*="margin-top: 56px"], [style*="margin: 56px auto 0"] { margin-top: 32px !important; }

  /* caixas e cartões */
  [style*="padding: 64px 56px"], [style*="padding: 56px"], [style*="padding: 48px"], [style*="padding: 40px;"] { padding: 32px 22px !important; }
  [style*="padding: 36px 40px 40px"] { padding: 24px 22px 28px !important; }
  [style*="padding: 28px 32px"] { padding: 22px 20px !important; }
  [style*="padding: 48px 40px 56px"] { padding: 32px 22px 36px !important; }
  #out [style*="padding: 40px"] { padding: 28px 22px !important; }

  /* colunas que somam: viram uma coluna só */
  [style*="grid-column: span"], .step .body { grid-column: 1 / -1 !important; }
  [style*="grid-template-columns"] { gap: 28px 20px !important; }

  /* títulos */
  h1[style*="font-size: 52px"], h1[style*="font-size: 48px"], h1[style*="font-size: 46px"], h1[style*="font-size: 44px"] { font-size: 32px !important; line-height: 1.12 !important; }
  [style*="font-size: 36px"], [style*="font-size: 34px"], [style*="font-size: 32px"] { font-size: 26px !important; line-height: 1.2 !important; }
  [style*="font-size: 30px"], [style*="font-size: 28px"] { font-size: 23px !important; line-height: 1.25 !important; }
  [style*="font-size: 26px"], [style*="font-size: 24px"] { font-size: 21px !important; }
  [style*="font-size: 22px"] { font-size: 19px !important; }
  [style*="font-size: 21px"] { font-size: 18px !important; }

  /* números grandes */
  [style*="font-size: 260px"] { font-size: 110px !important; }
  [style*="font-size: 200px"], [style*="clamp(56px"] { font-size: 72px !important; }
  [style*="font-size: 160px"], [style*="font-size: 140px"] { font-size: 84px !important; }
  [style*="font-size: 120px"] { font-size: 64px !important; }
  [style*="font-size: 96px"] { font-size: 56px !important; }
  [style*="font-size: 72px"] { font-size: 52px !important; }
  [style*="font-size: 64px"] { font-size: 44px !important; }
  [style*="font-size: 44px"]:not(h1) { font-size: 38px !important; }
  [style*="font-size: 40px"] { font-size: 32px !important; }

  /* alturas fixas de fotos e capas */
  [style*="height: 760px"] { height: 520px !important; }
  [style*="height: 560px"] { height: 380px !important; }
  [style*="height: 520px"] { height: 300px !important; }
  [style*="height: 480px"] { height: 340px !important; }
  [style*="height: 420px"] { height: 260px !important; }
  [style*="height: 340px"] { height: 220px !important; }

  /* lista "Nesta edição" da newsletter */
  [style*="grid-template-columns: 132px"] { grid-template-columns: 84px 1fr 16px !important; gap: 14px !important; }
  [style*="grid-template-columns: 132px"] > span:first-of-type { display: none !important; }
  [style*="grid-template-columns: 132px"] h3 { font-size: 16px !important; line-height: 1.3 !important; }
  [style*="width: 132px"] { width: 84px !important; height: 60px !important; }
  [style*="grid-template-columns: 200px 1fr auto"] { grid-template-columns: 1fr auto !important; }
  [style*="grid-template-columns: 200px 1fr auto"] > span:first-child { display: none !important; }

  /* botões ocupam a largura */
  a[style*="min-height: 48px"], a[style*="min-height: 52px"], button[style*="min-height: 52px"] { justify-content: center; }
  [style*="flex-wrap: wrap; gap: 12px"] > a[style*="min-height"] { flex: 1 1 100%; }

  /* rodapé */
  footer [style*="justify-content: space-between"] { align-items: flex-start !important; }
  footer p, footer a { font-size: 13px; }

  /* gráficos dos indicadores */
  .chart svg text { font-size: 21px; }
  nav[aria-label="Indicadores"] ul { grid-template-columns: 1fr 1fr !important; gap: 0 16px !important; }
  [style*="align-items: baseline; gap: 20px"] { flex-wrap: wrap; row-gap: 4px !important; }

  /* faixa Mercado em números: 2 colunas */
  section[aria-label="Mercado em números"] ul { grid-template-columns: 1fr 1fr !important; gap: 28px 18px !important; }
  section[aria-label="Mercado em números"] ul [style*="font-size: 44px"] { font-size: 32px !important; }

  /* tabelas */
  table { font-size: 12px !important; }
  th, td { padding-right: 8px !important; }
  details table { display: block; overflow-x: auto; }

  /* espaçamentos de cabeçalho de seção */
  [style*="margin-bottom: 40px"] { margin-bottom: 28px !important; }
  [style*="gap: 48px"] { gap: 28px !important; }
  [style*="gap: 56px"] { gap: 32px !important; }
}

@media (max-width: 420px) {
  h1[style*="font-size"] { font-size: 28px !important; }
  [style*="font-size: 260px"] { font-size: 88px !important; }
  [style*="font-size: 72px"] { font-size: 46px !important; }
}