/* Análise de Ativo → Comparação de ativos (js/comparacao.js). Usa as classes de fundamentos.css (selos, pontos, consenso)
   e de afastamento.css (leitura do desconto). Uma coluna por ativo (até 5); a 1ª coluna, com o nome do indicador, fica fixa. */

.cp-busca { width: 300px; max-width: 100%; }

.cp-rolagem { overflow-x: auto; margin-top: 8px; border: 1px solid var(--linha); border-radius: 12px; }
.cp-tabela { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: calc(220px + var(--cp-colunas, 1) * 170px); font-size: 14px; }
.cp-tabela th, .cp-tabela td { padding: 10px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; text-align: center; }
.cp-tabela tbody tr:last-child > * { border-bottom: 0; }
.cp-tabela td { border-left: 1px solid var(--linha); }

/* 1ª coluna: nome do indicador, fixa ao rolar para o lado */
.cp-rot { position: sticky; left: 0; z-index: 1; width: 220px; text-align: left !important; font-weight: 500; color: var(--texto-suave); background: var(--fundo); }
.cp-sub { display: block; font-size: 11.5px; font-weight: 400; margin-top: 2px; }

/* Cabeçalho: um ativo por coluna */
.cp-tabela thead th { background: var(--fundo-faixa); border-bottom: 2px solid var(--linha-forte); vertical-align: top; }
.cp-tabela thead .cp-rot { background: var(--fundo-faixa); vertical-align: bottom; }
.cp-ativo__topo { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cp-ativo__topo b { font-family: var(--fonte-titulo); font-size: 18px; font-weight: 800; color: var(--dourado-texto, var(--dourado)); letter-spacing: .02em; }
.cp-tirar { font: inherit; font-size: 17px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--linha-forte); background: none;
  color: var(--texto-apoio); cursor: pointer; padding: 0; }
.cp-tirar:hover { color: var(--negativo); border-color: var(--negativo); }
.cp-ativo__nome { display: block; font-size: 12.5px; font-weight: 400; color: var(--texto-suave); margin-top: 3px; }
.cp-ativo__links { display: block; font-size: 11.5px; font-weight: 400; margin-top: 4px; }
.cp-ativo__links a { color: var(--texto-apoio); }
.cp-ativo__links a:hover { color: var(--dourado-texto, var(--dourado)); }

/* Faixas de seção */
.cp-secao th { text-align: left; font-family: var(--fonte-titulo); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dourado-texto, var(--dourado)); background: var(--fundo-faixa); padding: 9px 14px; }

/* Linha da nota em destaque; grupos da nota em negrito; linhas de cada grupo recuadas */
.cp-linha--destaque > * { background: rgba(210, 164, 82, 0.07); }
.cp-linha--destaque .cp-rot { font-family: var(--fonte-titulo); font-weight: 700; font-size: 15px; color: var(--texto); background: var(--fundo); box-shadow: inset 3px 0 0 var(--dourado); }
.cp-nota { display: inline-flex; align-items: center; gap: 10px; }
.cp-nota b { font-family: var(--fonte-titulo); font-size: 26px; font-weight: 800; }
.cp-nota .fd-selo { margin-left: 0; }
.cp-linha--grupo .cp-rot { font-weight: 600; color: var(--texto); }
.cp-linha--sub > * { padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.cp-linha--sub .cp-rot { padding-left: 28px; font-weight: 400; color: var(--texto-apoio); }

.cp-desc { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.cp-desc .af-leitura { font-size: 10px; padding: 2px 7px; }
.cp-desc .fd-obs { font-size: 11px; }
.cp-cons { display: inline-flex; flex-direction: column; align-items: stretch; gap: 5px; width: 100%; max-width: 170px; }
.cp-cons .cs-barra { height: 8px; }
.cp-cons__linha { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cp-cons .cs-selo { font-size: 11.5px; }
.cp-cons .fd-obs { font-size: 11px; }
.cp-pot { font-size: 11.5px; color: var(--texto-apoio); }
/* Nota por indicador: na linha do grupo, a nota num selinho centralizado com "nota" embaixo; nas linhas de baixo, só o
   resultado, centralizado */
.cp-nota-ind { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.cp-nota-ind__rot { font-size: 11px; font-weight: 400; color: var(--texto-suave); }
.cp-selo { display: inline-block; min-width: 40px; text-align: center; border-radius: 10px; padding: 2px 9px; font-size: 13px; font-weight: 700; color: #0A1220; cursor: help; }
.cp-ind__v { font-weight: 600; font-size: 15px; color: var(--texto); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-vazio { text-align: center !important; padding: 36px 14px !important; color: var(--texto-apoio); }

@media (max-width: 700px) {
  .cp-tabela { min-width: calc(150px + var(--cp-colunas, 1) * 150px); }
  .cp-rot { width: 150px; }
  .cp-busca { width: 100%; }
}
