/* Repaso responsive de la plataforma (07/11/2026).
   Solo evita que las pantallas se rompan: mismos colores, piezas y textos. Va al final del <head>.
   Prefijo «html:not(#r)» o el de la hoja común más «:not(#r)» para ganar a las reglas con !important que corrige. */

/* ---------- Empresas: tarjeta de cada empresa (Buscar empresas y Mis empresas seguidas) ----------
   La hoja común (30/10) la pone en una fila «icono | nombre | cifras | botones» con el nombre en minmax(0,1fr).
   Cuando las cifras y los botones no caben, el nombre se queda en 0 px y sale una letra por línea.
   Ahora: una fila solo si cabe todo (lista de 1.200 px o más); si no, las cifras bajan a una segunda fila;
   y en listas estrechas, todo apilado como en el móvil. */
html.ot-pieces:not(#o):not(#r) main.content .cw-grid { container: otcw / inline-size; }
html:not(#r) .cw-card h2, html:not(#r) .cw-card h2 > button { overflow-wrap: break-word !important; word-break: normal !important; }
html.ot-pieces:not(#o):not(#r) main.content article.cw-card { grid-template-columns: auto minmax(10rem, 1fr) auto auto !important; }

@container otcw (max-width: 1199px) {
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card {
    grid-template-columns: auto minmax(10rem, 1fr) auto !important;
    grid-template-areas: "ico name acts" "ico tax acts" "ico stats stats" !important;
    row-gap: 2px !important;
  }
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card > .cw-card-stats {
    flex-wrap: wrap !important; justify-content: flex-start !important; row-gap: 10px !important; margin-top: 10px !important;
  }
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card > .cw-card-stats > div { align-items: flex-start !important; text-align: left !important; }
}
@container otcw (max-width: 619px) {
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card {
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas: "ico name" "ico tax" "stats stats" "acts acts" !important;
    row-gap: 8px !important;
  }
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card > .cw-card-stats { margin-top: 4px !important; column-gap: 20px !important; }
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card > .cw-card-stats > div { min-width: 0 !important; }
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card > footer { min-width: 0 !important; flex-wrap: wrap !important; justify-content: flex-start !important; }
  html.ot-pieces:not(#o):not(#r) main.content article.cw-card > footer .cw-follow { min-width: 0 !important; }
}
