/* ==========================================================================
   SITE - OBSERVATORIO DO TURISMO (Observatorio do Turismo)
   Mesma identidade do site: azul institucional do header, Roboto, cards brancos
   com raio de 16px e titulos de secao com barra azul a esquerda.
   ========================================================================== */

.tn-page {
    --tn-azul-escuro: #0D3B66;
    --tn-azul: #175394;
    --tn-destaque: #0284C7;
    --tn-titulo: #0F172A;
    --tn-texto: #334155;
    --tn-suave: #64748B;
    --tn-meta: #94A3B8;
    --tn-borda: #F1F5F9;
    --tn-trilho: #F1F5F9;
    --tn-alta: #15803D;
    --tn-baixa: #B91C1C;

    max-width: calc(1240px + 2 * var(--site-container-padding, 1.5rem));
    margin: 0 auto;
    padding: 32px var(--site-container-padding, 1.5rem) 64px;
    color: var(--tn-texto);
}

.mt-tn {
    margin-top: 20px;
}

/* O main.css do site centraliza todo h2/h3; aqui os titulos ficam alinhados a esquerda */
.tn-page h1,
.tn-page h2,
.tn-page h3 {
    text-align: left;
}

/* Titulo
   ========================================================================== */

.tn-titulo {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.tn-titulo__principal {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--tn-titulo);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px;
}

.tn-titulo__subtitulo {
    font-size: 1.1rem;
    color: var(--tn-suave);
    margin: 0;
}

.tn-ano {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 4px 6px 4px 16px;
}

.tn-ano__rotulo {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tn-suave);
    margin: 0;
}

.tn-ano__select {
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    color: var(--tn-azul-escuro);
    padding: 8px 6px;
    cursor: pointer;
    outline: none;
}

.tn-ano__botao {
    border: none;
    background: var(--tn-destaque);
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 700;
}

/* Destaques
   ========================================================================== */

.tn-destaque {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tn-azul-escuro), var(--tn-azul));
    border-radius: 16px;
    padding: 32px 40px;
    color: #fff;
    box-shadow: 0 12px 28px rgba(13, 59, 102, 0.25);
    margin-bottom: 32px;
}

.tn-destaque::before,
.tn-destaque::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.tn-destaque::before {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -30px;
    background: rgba(255, 255, 255, 0.06);
}

.tn-destaque::after {
    width: 220px;
    height: 220px;
    bottom: -120px;
    right: 240px;
    background: rgba(56, 189, 248, 0.1);
}

.tn-destaque__badge {
    display: inline-block;
    background: var(--tn-destaque);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 8px;
    padding: 4px 10px;
}

.tn-destaque__titulo {
    position: relative;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin: 10px 0 24px;
    line-height: 1.25;
}

.tn-destaque__numeros {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tn-destaque__numero {
    padding: 4px 24px 4px 28px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.tn-destaque__numero:first-child {
    padding-left: 0;
    border-left: none;
}

.tn-destaque__numero strong {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.tn-destaque__numero span {
    display: block;
    font-size: 0.9rem;
    color: #CFE3F7;
    margin-top: 6px;
    line-height: 1.35;
}

/* Filtros: busca, ano, fonte, tipo e temas
   ========================================================================== */

.tn-filtro {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
}

/* Ao rolar, o painel sobe ate sobrar so a linha de resumo, que fica presa no topo.
   --tn-topo (altura do cabecalho fixo) e --tn-recuo (parte que rola) vem do JS. */
.tn-filtro.is-fixavel {
    position: sticky;
    top: calc(var(--tn-topo, 0px) - var(--tn-recuo, 0px));
}

.tn-filtro__linha {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
}

.tn-busca {
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    padding: 0 16px;
    margin: 0;
    color: var(--tn-suave);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tn-busca:focus-within {
    background: #fff;
    border-color: var(--tn-destaque);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.tn-busca input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--tn-titulo);
    padding: 10px 0;
}

.tn-busca input::placeholder {
    color: var(--tn-meta);
}

.tn-filtro .tn-ano {
    border-color: #CBD5E1;
    min-height: 48px;
}

.tn-filtro__fonte .tn-ano__select {
    max-width: 230px;
    text-overflow: ellipsis;
}

.tn-filtro__abrir {
    display: none;
    align-items: center;
    gap: 8px;
    border: none;
    background: var(--tn-azul-escuro);
    color: #fff;
    border-radius: 10px;
    padding: 0 14px;
    min-height: 44px;
    font-size: 0.9rem;
    font-weight: 700;
}

.tn-filtro__qtd {
    background: #fff;
    color: var(--tn-azul-escuro);
    border-radius: 999px;
    min-width: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    line-height: 20px;
    text-align: center;
}

.tn-filtro__qtd[hidden] {
    display: none;
}

.tn-seg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F1F5F9;
    border-radius: 12px;
    padding: 4px;
}

.tn-seg__botao {
    border: none;
    background: transparent;
    color: var(--tn-suave);
    border-radius: 9px;
    padding: 0 14px;
    min-height: 40px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tn-seg__botao:hover {
    color: var(--tn-azul-escuro);
}

.tn-seg__botao.is-ativo {
    background: #fff;
    color: var(--tn-azul-escuro);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.tn-filtro__rotulo {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tn-meta);
    margin: 0;
}

.tn-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: -6px;
}

.tn-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #E2E8F0;
    color: var(--tn-texto);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tn-chip__qtd {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tn-meta);
}

.tn-chip .bi {
    font-size: 0.7rem;
}

.tn-chip:hover {
    border-color: var(--tn-destaque);
    color: var(--tn-destaque);
}

.tn-chip.is-ativo {
    background: var(--tn-azul-escuro);
    border-color: var(--tn-azul-escuro);
    color: #fff;
    font-weight: 700;
}

.tn-chip.is-ativo .tn-chip__qtd {
    color: #BFDBFE;
}

.tn-subtemas {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #F0F7FF;
    border-radius: 12px;
    padding: 12px;
}

.tn-subtemas[hidden],
.tn-opcoes__sub[hidden] {
    display: none;
}

.tn-subtemas__titulo {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tn-azul);
    margin-right: 2px;
}

.tn-subchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #BFDBFE;
    color: var(--tn-texto);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tn-subchip:hover {
    border-color: var(--tn-destaque);
    color: var(--tn-destaque);
}

.tn-subchip.is-ativo {
    background: var(--tn-destaque);
    border-color: var(--tn-destaque);
    color: #fff;
    font-weight: 700;
}

/* Ano do dado: etiqueta dos indicadores que nao sao do ano escolhido e aviso no painel */
.tn-selo-ano {
    display: inline-block;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    cursor: help;
}

.tn-aviso-ano {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--tn-texto);
}

.tn-aviso-ano > .bi {
    color: #B45309;
}

.tn-aviso-ano p {
    flex: 1 1 320px;
    margin: 0;
    line-height: 1.6;
}

.tn-aviso-ano__opcao {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tn-azul-escuro);
    cursor: pointer;
}

.tn-aviso-ano__opcao input {
    width: 16px;
    height: 16px;
    accent-color: var(--tn-azul-escuro);
}

.tn-resumo {
    display: flex;
    align-items: center;
    gap: 8px 10px;
    flex-wrap: wrap;
    border-top: 1px solid #E2E8F0;
    padding-top: 14px;
    min-height: 45px;
}

.tn-resumo__contagem {
    font-size: 0.9rem;
    color: var(--tn-titulo);
}

.tn-resumo__ativos {
    display: contents;
}

.tn-pilula {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    background: #E0F2FE;
    border: none;
    color: #075985;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.82rem;
    cursor: pointer;
}

.tn-pilula span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-pilula:hover {
    background: #BAE6FD;
}

.tn-resumo__limpar,
.tn-vazio__botao {
    border: none;
    background: transparent;
    color: var(--tn-destaque);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: underline;
    padding: 4px;
    cursor: pointer;
}

.tn-resumo__limpar[hidden] {
    display: none;
}

.tn-resumo__alterar {
    display: none;
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tn-azul-escuro);
    text-decoration: none;
}

.tn-filtro.is-preso .tn-resumo__alterar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tn-vazio[hidden],
.tn-grade[hidden],
.tn-pilha[hidden],
[data-tn-indicador][hidden] {
    display: none;
}

/* Folha de filtros do celular: so existe abaixo de 576px */
.tn-folha {
    display: none;
}

/* Secoes
   ========================================================================== */

.tn-secao {
    margin-top: 40px;
}

.tn-secao[hidden] {
    display: none;
}

.tn-secao__titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    border-left: 4px solid #2563EB;
    padding-left: 12px;
    margin: 0 0 20px;
    line-height: 1.35;
}

.tn-grade {
    display: grid;
    gap: 20px;
}

.tn-grade--cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tn-grade--graficos-1 {
    grid-template-columns: minmax(0, 1fr);
}

.tn-grade--graficos-2 {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
}

.tn-grade--graficos-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tn-grade--lateral {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
}

.tn-pilha {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card de indicador
   ========================================================================== */

.tn-card {
    background: #fff;
    border: 1px solid var(--tn-borda);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    min-width: 0;
}

.tn-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.tn-card__nome {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--tn-suave);
    margin: 0 0 6px;
    line-height: 1.35;
}

.tn-card__valor {
    font-size: 1.85rem;
    font-weight: 900;
    color: var(--tn-titulo);
    line-height: 1.15;
    margin: 0 0 8px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.tn-card__rodape {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.tn-card__meta {
    font-size: 0.75rem;
    color: var(--tn-meta);
    line-height: 1.4;
}

/* Cards ao lado de um grafico */
.tn-card--destaque {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.tn-card--destaque .tn-card__valor {
    font-size: 3.25rem;
    order: -1;
    margin-bottom: 6px;
}

.tn-card--destaque .tn-card__nome {
    font-size: 1rem;
    font-weight: 400;
    color: #475569;
}

.tn-card--forte {
    background: linear-gradient(135deg, var(--tn-destaque), var(--tn-azul));
    border-color: transparent;
}

.tn-card--forte .tn-card__valor { color: #fff; }
.tn-card--forte .tn-card__nome { color: #E0F2FE; }
.tn-card--forte .tn-card__meta { color: #BAE6FD; }
.tn-card--leve .tn-card__valor { color: var(--tn-azul-escuro); }

/* Variacao */
.tn-variacao {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.tn-variacao--alta { background: #DCFCE7; color: var(--tn-alta); }
.tn-variacao--baixa { background: #FEE2E2; color: var(--tn-baixa); }
.tn-variacao--estavel { background: #F1F5F9; color: var(--tn-suave); }

.tn-card--forte .tn-variacao { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* Graficos
   ========================================================================== */

.tn-grafico {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
}

.tn-grafico__topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.tn-grafico__titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tn-titulo);
    margin: 0 0 4px;
}

.tn-grafico__fonte {
    font-size: 0.8rem;
    color: var(--tn-suave);
    margin: 0;
}

.tn-grafico__total {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--tn-azul-escuro);
    line-height: 1.1;
    margin: 0 0 20px;
}

/* Barras por ano */
.tn-anos {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 16px;
    min-height: 240px;
    border-bottom: 1px solid #E2E8F0;
    padding-top: 8px;
}

.tn-anos__coluna {
    position: relative;
    flex: 1;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.tn-anos__valor {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tn-titulo);
    margin-bottom: 8px;
    white-space: nowrap;
}

.tn-anos__barra {
    width: 100%;
    background: #BAE6FD;
    border-radius: 10px 10px 0 0;
    transition: height 0.6s ease;
}

.tn-anos__barra.is-atual {
    background: linear-gradient(180deg, var(--tn-azul), var(--tn-azul-escuro));
}

.tn-anos__ano {
    position: absolute;
    bottom: -28px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tn-suave);
}

.tn-grafico--anos {
    padding-bottom: 44px;
}

/* Barra empilhada */
.tn-empilhado {
    display: flex;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    gap: 2px;
    background: var(--tn-trilho);
}

.tn-empilhado span {
    min-width: 4px;
}

.tn-legenda {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tn-legenda li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.tn-legenda i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tn-legenda__nome {
    flex: 1;
    color: var(--tn-texto);
}

.tn-legenda strong {
    color: var(--tn-titulo);
    white-space: nowrap;
}

/* Colunas com muitos periodos (mes a mes): sem o valor em cima, rotulos alternados */
.tn-anos--denso {
    gap: 4px;
}

.tn-anos--denso .tn-anos__valor {
    display: none;
}

.tn-anos--denso .tn-anos__barra {
    border-radius: 4px 4px 0 0;
}

.tn-anos--denso .tn-anos__ano {
    font-size: 0.7rem;
    white-space: nowrap;
}

.tn-anos--denso .tn-anos__coluna:not(:nth-child(6n + 1)):not(:last-child) .tn-anos__ano {
    display: none;
}

/* Pizza e rosca */
.tn-pizza {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tn-pizza__figura {
    position: relative;
    flex: 0 0 auto;
    width: min(190px, 100%);
    margin: 0 auto;
}

.tn-pizza__svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
}

.tn-pizza__centro {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 30%;
    text-align: center;
    pointer-events: none;
}

.tn-pizza__centro strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tn-titulo);
    line-height: 1.1;
}

.tn-pizza__centro span {
    font-size: 0.7rem;
    color: var(--tn-suave);
    line-height: 1.2;
    margin-top: 2px;
}

.tn-pizza .tn-legenda {
    flex: 1 1 200px;
    margin: 0;
}

/* Linha no tempo */
.tn-linha__atual {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 12px;
}

.tn-linha__atual strong {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tn-titulo);
    line-height: 1.1;
}

.tn-linha__atual span {
    font-size: 0.85rem;
    color: var(--tn-suave);
}

.tn-linha {
    position: relative;
    height: 220px;
}

.tn-linha svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tn-linha__grade {
    stroke: #E2E8F0;
    stroke-width: 1;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke;
}

.tn-linha__area {
    fill: rgba(2, 132, 199, 0.12);
}

.tn-linha__traco {
    fill: none;
    stroke: var(--tn-destaque);
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.tn-linha__ponto {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--tn-destaque);
    cursor: pointer;
    outline: none;
}

.tn-linha__ponto.is-pico {
    border-color: #F59E0B;
}

.tn-linha__ponto.is-atual {
    background: var(--tn-azul-escuro);
    border-color: var(--tn-azul-escuro);
}

.tn-linha__ponto:hover,
.tn-linha__ponto:focus {
    transform: scale(1.5);
    z-index: 2;
}

.tn-linha__ponto:hover::after,
.tn-linha__ponto:focus::after {
    content: attr(data-rotulo);
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) scale(0.67);
    transform-origin: bottom center;
    background: var(--tn-titulo);
    color: #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.tn-linha__eixo {
    position: relative;
    height: 24px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--tn-suave);
}

.tn-linha__eixo span {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.tn-linha__eixo span:first-child {
    transform: none;
}

.tn-linha__eixo span:last-child {
    transform: translateX(-100%);
}

.tn-linha__resumo {
    font-size: 0.8rem;
    color: var(--tn-suave);
    margin: 4px 0 0;
}

/* Lista de barras horizontais */
.tn-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tn-lista li {
    display: grid;
    grid-template-columns: minmax(140px, 230px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.tn-lista__nome {
    color: var(--tn-texto);
}

.tn-lista__trilho {
    height: 14px;
    border-radius: 7px;
    background: var(--tn-trilho);
    overflow: hidden;
}

.tn-lista__trilho span {
    display: block;
    height: 100%;
    border-radius: 7px;
    background: var(--tn-destaque);
}

.tn-lista li.is-maior .tn-lista__nome {
    font-weight: 700;
    color: var(--tn-azul-escuro);
}

.tn-lista li.is-maior .tn-lista__trilho span {
    background: #F59E0B;
}

.tn-lista strong {
    color: var(--tn-titulo);
    min-width: 40px;
    text-align: right;
}

/* Fontes e estado vazio
   ========================================================================== */

.tn-fontes {
    margin-top: 48px;
    background: #E0F2FE;
    border-radius: 16px;
    padding: 22px 28px;
}

.tn-fontes h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tn-azul-escuro);
    margin: 0 0 6px;
}

.tn-fontes p {
    font-size: 0.9rem;
    margin: 0 0 6px;
}

.tn-fontes small {
    font-size: 0.8rem;
    color: var(--tn-suave);
}

.tn-vazio {
    text-align: center;
    background: #fff;
    border-radius: 16px;
    padding: 64px 24px;
    color: var(--tn-suave);
}

.tn-vazio i {
    font-size: 3rem;
    color: var(--tn-destaque);
}

.tn-vazio h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tn-titulo);
    margin: 12px 0 6px;
}

/* Responsivo
   ========================================================================== */

@media (max-width: 1100px) {
    .tn-grade--cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tn-destaque__numeros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 24px;
    }

    .tn-destaque__numero:nth-child(3) {
        padding-left: 0;
        border-left: none;
    }
}

@media (max-width: 992px) {
    .tn-grade--graficos-2,
    .tn-grade--graficos-3,
    .tn-grade--lateral {
        grid-template-columns: minmax(0, 1fr);
    }

    .tn-pilha {
        flex-direction: row;
    }

    .tn-grade--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .tn-page {
        padding-top: 24px;
    }

    .tn-titulo__principal {
        font-size: 1.85rem;
    }

    .tn-titulo__subtitulo {
        font-size: 1rem;
    }

    .tn-destaque {
        padding: 24px 20px;
    }

    .tn-destaque__titulo {
        font-size: 1.25rem;
    }

    .tn-destaque__numero {
        padding: 0 0 0 16px;
    }

    .tn-destaque__numero strong {
        font-size: 1.75rem;
    }

    .tn-destaque__numero span {
        font-size: 0.8rem;
    }

    .tn-filtro {
        padding: 16px;
        gap: 12px;
    }

    .tn-so-desktop {
        display: none;
    }

    /* Linha no celular: so o primeiro e o ultimo rotulo do eixo cabem sem encavalar */
    .tn-linha__eixo span:not(:first-child):not(:last-child) {
        display: none;
    }

    .tn-linha {
        height: 180px;
    }

    .tn-pizza {
        flex-direction: column;
        align-items: stretch;
    }

    .tn-pizza .tn-legenda {
        flex-basis: auto;
    }

    .tn-busca {
        flex-basis: 100%;
        background: #fff;
    }

    .tn-filtro__abrir {
        display: inline-flex;
    }

    .tn-filtro .tn-ano {
        min-height: 44px;
        margin-left: auto;
        border-radius: 10px;
    }

    .tn-filtro__rotulo {
        display: none;
    }

    .tn-folha .tn-filtro__rotulo {
        display: block;
        margin-top: 6px;
    }

    .tn-chips,
    .tn-subtemas {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -16px;
        padding: 0 16px 2px;
        scrollbar-width: none;
    }

    .tn-subtemas {
        background: transparent;
        border-radius: 0;
    }

    .tn-subtemas__titulo {
        display: none;
    }

    .tn-chip,
    .tn-subchip {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .tn-folha:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1080;
    }

    .tn-folha__fundo {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
    }

    .tn-folha__painel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 88vh;
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 20px 20px 0 0;
        animation: tn-folha-subir 0.25s ease;
    }

    .tn-folha__topo {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px 6px;
    }

    .tn-folha__topo h2 {
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--tn-titulo);
        margin: 0;
    }

    .tn-folha__fechar {
        border: none;
        background: transparent;
        color: var(--tn-suave);
        font-size: 1.1rem;
        padding: 6px;
    }

    .tn-folha__corpo {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow-y: auto;
        padding: 6px 20px 16px;
    }

    .tn-opcoes {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .tn-opcao,
    .tn-subopcao {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        border: none;
        background: transparent;
        color: var(--tn-texto);
        text-align: left;
        font-size: 0.95rem;
        padding: 10px 4px;
        border-radius: 8px;
    }

    .tn-opcao span::before {
        content: '';
        display: inline-block;
        width: 14px;
        height: 14px;
        margin-right: 10px;
        vertical-align: -2px;
        border: 2px solid #94A3B8;
        border-radius: 50%;
    }

    .tn-opcao.is-ativo {
        color: var(--tn-azul-escuro);
        font-weight: 700;
    }

    .tn-opcao.is-ativo span::before {
        border: 4px solid var(--tn-azul-escuro);
    }

    .tn-opcao small,
    .tn-subopcao small {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--tn-meta);
    }

    .tn-opcoes__grupo.is-aberto {
        background: #F0F7FF;
        border-radius: 12px;
        padding: 2px 10px 6px;
    }

    .tn-subopcao {
        font-size: 0.9rem;
        padding: 8px 4px 8px 28px;
    }

    .tn-subopcao.is-ativo {
        color: var(--tn-destaque);
        font-weight: 700;
    }

    .tn-subopcao.is-ativo span::before {
        content: '\2713';
        margin-left: -20px;
        margin-right: 8px;
    }

    .tn-folha .tn-seg {
        align-self: flex-start;
    }

    .tn-folha__select {
        width: 100%;
        min-height: 44px;
        border: 1px solid #CBD5E1;
        border-radius: 10px;
        background: #fff;
        color: var(--tn-azul-escuro);
        font-size: 0.9rem;
        padding: 0 12px;
    }

    .tn-folha__acoes {
        display: flex;
        gap: 10px;
        padding: 12px 20px 20px;
        border-top: 1px solid #E2E8F0;
    }

    .tn-folha__limpar,
    .tn-folha__ver {
        min-height: 48px;
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 700;
    }

    .tn-folha__limpar {
        border: 1px solid #CBD5E1;
        background: #fff;
        color: var(--tn-texto);
        padding: 0 18px;
    }

    .tn-folha__ver {
        flex: 1;
        border: none;
        background: var(--tn-destaque);
        color: #fff;
    }

    .tn-grade--cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .tn-pilha {
        flex-direction: column;
    }

    .tn-grafico {
        padding: 20px;
    }

    .tn-grafico__topo {
        flex-direction: column;
    }

    .tn-anos {
        gap: 8px;
        min-height: 200px;
    }

    .tn-anos__valor {
        font-size: 0.8rem;
    }

    .tn-lista li {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px 12px;
    }

    .tn-lista__trilho {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .tn-card--destaque .tn-card__valor {
        font-size: 2.5rem;
    }
}
