/* ═══════════════════════════════════════════════════════════════
   IDEX — Camada de PREVIEW (oculta-mas-pública)
   Carregada DEPOIS dos CSS de produção; só sobrescreve/acrescenta.
   Nada aqui afeta as páginas no ar — só a tela de preview.
   Tokens da marca: azul #0080ff · texto #1d1d20 · muted #5a5a60 · Sora
   ═══════════════════════════════════════════════════════════════ */

.idex-pv,
.idex-pv * {
    font-family: 'Sora', sans-serif;
}

/* ── Faixa de aviso "pré-visualização" ───────────────────────── */
.idex-pv-banner {
    background: #1d1d20;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    padding: 8px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.idex-pv-banner strong {
    font-weight: 600;
}

.idex-pv-banner__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0080ff;
    display: inline-block;
}

/* ── Hero: corrige contraste do título (era #1d1d20 sobre azul) ── */
.idex-pv .idex-modular-hero__title {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.idex-pv .idex-modular-hero__description {
    color: rgba(255, 255, 255, 0.9);
}

.idex-pv .idex-modular-hero__kicker {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

/* ── Navegação entre índices dentro do preview ───────────────── */
.idex-pv-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.idex-pv-nav__btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.idex-pv-nav__btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.idex-pv-nav__btn.is-active {
    background: #fff;
    color: #0080ff;
    border-color: #fff;
    font-weight: 600;
}

/* ── Nota "como ler" no topo do conteúdo ─────────────────────── */
.idex-pv-note {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid #0080ff;
    border-radius: 10px;
    padding: 14px 18px;
    color: #3a3a40;
    font-size: 14px;
    line-height: 1.5;
}

.idex-pv-note strong {
    color: #1d1d20;
    font-weight: 600;
}

/* ── Título de cada gráfico vira flex p/ acomodar o botão (i) ── */
.idex-pv .idex-api-widget h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Botão (i) + tooltip ─────────────────────────────────────── */
.idex-pv-info {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.idex-pv-info__btn {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid #0080ff;
    background: #fff;
    color: #0080ff;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.idex-pv-info__btn:hover,
.idex-pv-info.is-open .idex-pv-info__btn {
    background: #0080ff;
    color: #fff;
}

/* blindagem contra button:focus rosa (#c36) do tema no chip "i" */
.idex-pv-info__btn {
    -webkit-tap-highlight-color: transparent;
}
.idex-pv-info__btn:focus {
    background: #fff;
    color: #0080ff;
    border-color: #0080ff;
    outline: none;
}
.idex-pv-info.is-open .idex-pv-info__btn:focus {
    background: #0080ff;
    color: #fff;
}
.idex-pv-info__btn:focus-visible {
    outline: 2px solid #0080ff;
    outline-offset: 2px;
}

.idex-pv-info__tip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    width: max-content;
    max-width: 280px;
    background: #1d1d20;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: none;
    white-space: normal;
}

.idex-pv-info__tip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1d1d20;
}

.idex-pv-info.is-open .idex-pv-info__tip {
    display: block;
}

/* ── Card do glossário ───────────────────────────────────────── */
.idex-pv-glossary {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 22px 24px;
}

.idex-pv-glossary__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.idex-pv-glossary__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d1d20;
}

.idex-pv-glossary__hint {
    margin: 0;
    font-size: 13px;
    color: #5a5a60;
}

.idex-pv-glossary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
}

.idex-pv-term {
    margin: 0;
}

.idex-pv-term__name {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: #0080ff;
}

.idex-pv-term__def {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #44444a;
}

/* ── Polimento dos cards de gráfico/tabela ───────────────────── */
.idex-pv .idex-api-widget,
.idex-pv .idex-api-table-card {
    transition: border-color 0.15s, box-shadow 0.15s;
}

.idex-pv .idex-api-widget:hover,
.idex-pv .idex-api-table-card:hover {
    border-color: rgba(0, 128, 255, 0.35);
    box-shadow: 0 6px 20px rgba(13, 38, 76, 0.06);
}

.idex-pv .idex-api-widget__meta {
    color: #5a5a60 !important;
}

/* ── Rodapé do preview ───────────────────────────────────────── */
.idex-pv-footnote {
    color: #5a5a60;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    padding: 8px 0 4px;
}

/* ── Responsivo ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .idex-pv-glossary__grid {
        grid-template-columns: 1fr;
    }
    .idex-pv-info__tip {
        max-width: 220px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Tipografia — força Sora em TODO o gráfico e tabela.
   A fonte herdada da API é "Work Sans"; aqui ela é sobrescrita com
   !important (o mesmo que as páginas no ar fazem via .idex-api-page).
   ═══════════════════════════════════════════════════════════════ */
.idex-pv,
.idex-pv *,
.idex-pv .js-plotly-plot text,
.idex-pv .js-plotly-plot .xtick text,
.idex-pv .js-plotly-plot .ytick text,
.idex-pv .js-plotly-plot .gtitle,
.idex-pv .js-plotly-plot .legendtext,
.idex-pv .js-plotly-plot .hovertext,
.idex-pv .js-plotly-plot .annotation-text,
.idex-pv .js-plotly-plot .annotation text,
.idex-pv .js-plotly-plot .modebar,
.idex-pv .idex-api-table-card__content th,
.idex-pv .idex-api-table-card__content td {
    font-family: 'Sora', sans-serif !important;
}

/* ── Respiro entre gráficos (antes ficavam muito agrupados) ──── */
.idex-pv .idex-api-widgets {
    gap: 26px;
    margin-top: 18px;
}

.idex-pv .idex-api-widget {
    padding: 24px 26px;
}

/* PADRAO NOVO: TODOS os graficos em 1 COLUNA (full-width), com a legenda a
   ESQUERDA (feita no idex-chart-polish.js). Mais espaco horizontal p/ os dados
   e altura uniforme -> secao padronizada. */
.idex-pv .idex-api-widgets {
    grid-template-columns: 1fr;
}

.idex-pv .idex-api-widget__chart,
.idex-pv .idex-api-widget:has([id$="-performance"]) .idex-api-widget__chart,
.idex-pv .idex-api-widget:has([id$="-secondary"]) .idex-api-widget__chart {
    min-height: 460px;
}

/* ── Card no PADRAO NOVO: TRILHO esquerdo (titulo + descricao + legenda em
   lista empilhada) | GRAFICO em caixa a direita. Ativado por .idex-csr-side,
   que o idex-chart-polish.js adiciona nos graficos de eixo (barra/linha). ── */
.idex-pv .idex-api-widget.idex-csr-side {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 30px;
    align-items: start;
}
.idex-pv .idex-api-widget.idex-csr-side > h2 { grid-area: 1 / 1; }
.idex-pv .idex-api-widget.idex-csr-side > .idex-api-widget__meta { grid-area: 2 / 1; }
.idex-pv .idex-api-widget.idex-csr-side > .idex-api-widget__legend {
    grid-area: 3 / 1; align-self: start; margin-top: 22px;
}
.idex-pv .idex-api-widget.idex-csr-side > .idex-api-widget__chart {
    grid-area: 1 / 2 / 4 / 3;
    background: rgba(0, 0, 0, .02);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 12px;
    padding: 10px 14px;
}

/* Legenda custom — lista empilhada com bolinhas redondas (como o print) */
.idex-api-widget__legend { display: flex; flex-direction: column; gap: 13px; }
.idex-api-widget__legend .idex-legend-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: none; border: 0; padding: 0; margin: 0;
    cursor: pointer; text-align: left; font: inherit; width: 100%;
}
.idex-api-widget__legend .idex-legend-dot {
    flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; margin-top: 3px;
}
.idex-api-widget__legend .idex-legend-label {
    font-size: 13px; line-height: 1.35; color: rgba(29, 29, 32, .82);
    /* quebra rotulo longo DENTRO do trilho (nao invade o grafico).
       white-space:normal desfaz o nowrap herdado do <button>; min-width:0 deixa
       o flex encolher; overflow-wrap quebra ate palavra longa se preciso. */
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
.idex-api-widget__legend .idex-legend-item:hover .idex-legend-label { color: #1d1d20; }
.idex-api-widget__legend .idex-legend-item.is-static { cursor: default; }
.idex-api-widget__legend .idex-legend-item.is-off { opacity: .45; }
.idex-api-widget__legend .idex-legend-item.is-off .idex-legend-label { text-decoration: line-through; }

/* Mobile: empilha (trilho em cima, grafico embaixo); legenda em linha.
   A virgula = OR: vale para largura pequena (retrato) OU altura curta
   (celular DEITADO/landscape, viewport ~390-430px de altura). Assim o
   celular na horizontal mantem o layout empilhado, so mais largo — em vez
   de cair no grid de 2 colunas do desktop. */
@media (max-width: 768px), (max-height: 500px) {
    .idex-pv .idex-api-widget.idex-csr-side {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
    .idex-pv .idex-api-widget.idex-csr-side > h2,
    .idex-pv .idex-api-widget.idex-csr-side > .idex-api-widget__meta,
    .idex-pv .idex-api-widget.idex-csr-side > .idex-api-widget__legend,
    .idex-pv .idex-api-widget.idex-csr-side > .idex-api-widget__chart {
        grid-area: auto; grid-column: 1;
    }
    .idex-api-widget__legend {
        flex-flow: row wrap; gap: 8px 18px; margin: 4px 0 10px;
    }

    /* SO NO MOBILE: limita a altura da CAIXA DO GRAFICO (nao do card/secao) a
       no maximo 70vh. min-height:0 remove o piso de 460px que faria o min
       vencer o max no landscape; height:460 mantem o tamanho normal quando
       cabe; max-height:70vh corta quando o viewport e curto (celular deitado).
       Titulo, descricao e legenda continuam livres (fora desta regra). */
    .idex-pv .idex-api-widget__chart,
    .idex-pv .idex-api-widget:has([id$="-performance"]) .idex-api-widget__chart,
    .idex-pv .idex-api-widget:has([id$="-secondary"]) .idex-api-widget__chart {
        min-height: 0;
        height: 460px;
        max-height: 70vh;
    }
}

.idex-pv .idex-api-tables {
    margin-top: 36px;
}

.idex-pv .idex-api-tables__grid {
    gap: 22px;
}

/* alvos de "ir para": não colam no topo ao rolar */
.idex-pv .idex-api-widget,
.idex-pv .idex-api-tables,
.idex-pv .idex-pv-glossary {
    scroll-margin-top: 96px;
}

/* ═══════════════════════════════════════════════════════════════
   Tabelas "Top variações" — visual de marca (antes: grade pesada/feia)
   ═══════════════════════════════════════════════════════════════ */
.idex-pv .idex-api-table-card__content {
    padding: 2px 2px 4px;
}

.idex-pv .idex-api-table-card__content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.idex-pv .idex-api-table-card__content td {
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid rgba(13, 38, 76, 0.07);
    color: #2a2a30;
    line-height: 1.35;
    background: transparent;
}

/* zebra suave em vez da grade cheia de antes */
.idex-pv .idex-api-table-card__content tr:nth-child(even) td {
    background: rgba(13, 38, 76, 0.018);
}

/* Empresa à esquerda; colunas numéricas à direita, algarismos tabulares */
.idex-pv .idex-api-table-card__content td:nth-child(2) {
    text-align: left;
    font-weight: 500;
    color: #1d1d20;
}
.idex-pv .idex-api-table-card__content td:nth-child(n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
    white-space: nowrap;
    color: #3a3a42;
}

/* cabeçalho (linha marcada por JS: idex-pv-table__head) */
.idex-pv .idex-api-table-card__content tr.idex-pv-table__head td {
    background: #f4f7fb;
    border-bottom: 1.5px solid rgba(13, 38, 76, 0.12);
    color: #5a5a60;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* linha-resumo do índice (idex-pv-table__total) — nome reposto + destaque */
.idex-pv .idex-api-table-card__content tr.idex-pv-table__total td {
    background: rgba(0, 128, 255, 0.06);
    border-top: 1.5px solid rgba(0, 128, 255, 0.45);
    border-bottom: none;
    font-weight: 700;
    color: #0a2540;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* a coluna "Ativo" (código) segue oculta — herdado das páginas no ar */
.idex-pv .idex-api-table-card__content td.idex-api-table__first-col {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   Navegação flutuante — índice de conteúdo (aba na borda + painel).
   Abre no hover (desktop) ou toque (mobile); seções numeradas,
   atalho p/ outros índices e scroll-spy. Azul/Sora da marca.
   ═══════════════════════════════════════════════════════════════ */
.idex-pv-toc {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9998;
    width: 46px;
    font-family: 'Sora', sans-serif;
}

/* aba colada na borda direita */
.idex-pv-toc__tab {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 46px;
    padding: 15px 0;
    border: none;
    border-radius: 13px 0 0 13px;
    /* Blindado: o tema/Elementor pinta button por baixo; trava a marca. */
    background: #0080ff !important;
    color: #fff !important;
    cursor: pointer;
    box-shadow: -7px 0 22px rgba(0, 128, 255, 0.30);
    transition: background 0.15s, box-shadow 0.15s;
    touch-action: manipulation;
}
/* Blindagem: o tema pinta button:focus de rosa (#c36) e adiciona anel de
   foco — trava a aba sempre na marca, em qualquer estado (inclusive toque). */
.idex-pv-toc__tab {
    -webkit-tap-highlight-color: transparent;
}
.idex-pv-toc__tab:focus,
.idex-pv-toc__tab:active {
    background-color: #0080ff !important;
    border-color: transparent !important;
    outline: none !important;
}
.idex-pv-toc__tab:focus-visible {
    outline: none !important;
    box-shadow: -7px 0 22px rgba(0, 128, 255, 0.30), 0 0 0 3px rgba(255, 255, 255, 0.9) inset !important;
}
.idex-pv-toc__tab:hover {
    background-color: #006ad4 !important;
}
/* Aberto: leve escurecida (mantém azul da marca, sinaliza estado ativo).
   Texto e toggle continuam brancos em qualquer estado. */
.idex-pv-toc.is-open .idex-pv-toc__tab {
    background-color: #006ad4 !important;
}
.idex-pv-toc__tab,
.idex-pv-toc.is-open .idex-pv-toc__tab,
.idex-pv-toc__tab:hover,
.idex-pv-toc__tab:focus,
.idex-pv-toc__tab:active {
    color: #fff !important;
}

.idex-pv-toc__bars {
    width: 18px;
    height: 2px;
    background: #fff !important;
    border-radius: 2px;
    box-shadow: 0 -5px 0 #fff, 0 5px 0 #fff;
}

.idex-pv-toc__tx {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.idex-pv-toc__ct {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
}
.idex-pv-toc__ct b {
    font-size: 13px;
    font-weight: 700;
}
.idex-pv-toc__ct i {
    font-style: normal;
    font-size: 10px;
    opacity: 0.85;
}

/* painel que desliza à esquerda da aba */
.idex-pv-toc__panel {
    position: absolute;
    top: 50%;
    right: 46px;
    width: 304px;
    max-width: calc(100vw - 64px);
    max-height: 80vh;
    overflow-y: auto;
    padding: 16px 16px 14px;
    background: #fff;
    border: 1px solid rgba(13, 38, 76, 0.10);
    border-radius: 14px 0 0 14px;
    box-shadow: -24px 0 64px rgba(13, 38, 76, 0.20);
    transform: translateY(-50%) translateX(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.18s, visibility 0.22s;
}

.idex-pv-toc__close {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(13, 38, 76, 0.16);
    border-radius: 50%;
    background: #ffffff;
    color: #1d1d20;
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.idex-pv-toc__close:focus-visible {
    outline: 2px solid #0080ff;
    outline-offset: 2px;
}
.idex-pv-toc.is-open .idex-pv-toc__panel {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.idex-pv-toc__sec + .idex-pv-toc__sec {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(13, 38, 76, 0.07);
}
.idex-pv-toc__h {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8a8a92;
    margin-bottom: 10px;
}

/* atalhos p/ outros índices (chips clonados do hero) */
.idex-pv-toc__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
/* grupos rotulados dentro de "Trocar índice": Famílias × Variações */
.idex-pv-toc__grp + .idex-pv-toc__grp {
    margin-top: 13px;
}
.idex-pv-toc__sub {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #9a9aa2;
    margin-bottom: 7px;
}
.idex-pv-toc__chips .idex-pv-nav__btn {
    height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(13, 38, 76, 0.14);
    background: #f4f7fb;
    color: #1d1d20;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.idex-pv-toc__chips .idex-pv-nav__btn:hover {
    border-color: #0080ff;
    color: #0080ff;
    background: #fff;
}
.idex-pv-toc__chips .idex-pv-nav__btn.is-active {
    background: #0080ff;
    border-color: #0080ff;
    color: #fff;
}

/* lista numerada "nesta página" */
.idex-pv-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.idex-pv-toc__lnk {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 8px;
    border-radius: 9px;
    color: #2a2a30;
    text-decoration: none;
    line-height: 1.25;
    transition: background 0.12s, color 0.12s;
}
.idex-pv-toc__lnk:hover {
    background: #eef5ff;
    color: #0080ff;
}
.idex-pv-toc__n {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef1f6;
    color: #5a5a60;
    font-size: 11.5px;
    font-weight: 700;
    transition: background 0.12s, color 0.12s;
}
.idex-pv-toc__lnk:hover .idex-pv-toc__n {
    background: #0080ff;
    color: #fff;
}
.idex-pv-toc__t {
    font-size: 13px;
}
.idex-pv-toc__lnk.is-active {
    background: #eef5ff;
    color: #0a2540;
    font-weight: 600;
}
.idex-pv-toc__lnk.is-active .idex-pv-toc__n {
    background: #0080ff;
    color: #fff;
}

/* voltar ao topo */
.idex-pv-toc__top {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed rgba(13, 38, 76, 0.16);
    border-radius: 9px;
    background: transparent;
    color: #5a5a60;
    font-family: 'Sora', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s;
}
.idex-pv-toc__top:hover {
    border-color: #0080ff;
    color: #0080ff;
}
/* blindagem contra button:focus rosa (#c36) do tema */
.idex-pv-toc__top {
    -webkit-tap-highlight-color: transparent;
}
.idex-pv-toc__top:focus,
.idex-pv-toc__top:active {
    background: transparent;
    border-color: #0080ff;
    color: #0080ff;
    outline: none;
}
.idex-pv-toc__top:focus-visible {
    outline: 2px solid #0080ff;
    outline-offset: 2px;
}

/* ───── MOBILE: navegação vira botão fixo na base + folha inferior ─────
   No celular a aba lateral some atrás do conteúdo (e do banner de cookies)
   e não comunica "navegar pelos gráficos". Aqui ela vira um botão flutuante
   centralizado embaixo (alcance do polegar) que abre uma folha inferior
   (bottom sheet) com a lista numerada de TODOS os gráficos + troca de índice.
   Reaproveita o mesmo JS de scroll/scroll-spy — só muda a apresentação. */
body.idex-pv-has-fs {
    overflow: hidden;
}

.idex-pv .idex-pv-widget-tools {
    display: flex;
    justify-content: flex-end;
    margin: 6px 0 8px;
}

.idex-pv .idex-pv-fs-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(0, 128, 255, 0.28);
    background: #eef5ff;
    color: #0a4f93;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.idex-pv .idex-pv-fs-btn__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.idex-pv .idex-pv-fs-btn__icon svg {
    width: 16px;
    height: 16px;
}

.idex-pv .idex-pv-fs-btn:focus-visible {
    outline: 2px solid #0080ff;
    outline-offset: 2px;
}

.idex-pv .idex-api-widget {
    position: relative;
}

.idex-pv .idex-api-widget.is-fs {
    position: fixed;
    inset: 0;
    z-index: 10030;
    margin: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    overflow: auto;
    padding: 12px 10px 18px;
}

.idex-pv .idex-api-widget.is-fs .idex-api-widget__chart {
    min-height: calc(100vh - 170px) !important;
    min-height: calc(100dvh - 170px) !important;
}

.idex-pv-touch-ui .idex-api-widget__chart,
.idex-pv-touch-ui .js-plotly-plot {
    pointer-events: none;
}

.idex-pv-touch-ui .idex-api-widget.is-fs .idex-api-widget__chart,
.idex-pv-touch-ui .idex-api-widget.is-fs .js-plotly-plot {
    pointer-events: auto;
}

.idex-pv .idex-api-widget__chart,
.idex-pv .js-plotly-plot {
    touch-action: pan-y;
}

.idex-pv .idex-api-widget.is-fs .idex-api-widget__chart,
.idex-pv .idex-api-widget.is-fs .js-plotly-plot {
    touch-action: pan-y;
}

.idex-pv .idex-api-widget.is-fs .idex-pv-fs-btn {
    background: #0080ff;
    border-color: #0080ff;
    color: #ffffff;
}

.idex-pv .idex-pv-rotate-tip {
    position: sticky;
    top: 6px;
    z-index: 2;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(10, 37, 64, 0.93);
    color: #ffffff;
    font-size: 11.5px;
    line-height: 1.25;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.idex-pv .idex-pv-rotate-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .idex-pv-toc {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        transform: none;
        pointer-events: none;          /* o container não captura toques... */
        z-index: 10000;
    }

    /* botão flutuante rotulado (FAB) */
    .idex-pv-toc__tab {
        pointer-events: auto;          /* ...só o botão e a folha capturam */
        position: fixed;
        left: 50%;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        flex-direction: row;
        width: auto;
        min-height: 50px;
        padding: 0 20px;
        gap: 10px;
        border-radius: 999px;
        box-shadow: 0 10px 28px rgba(0, 128, 255, 0.40), 0 2px 8px rgba(13, 38, 76, 0.16);
        transition: opacity 0.2s, transform 0.2s, background 0.15s;
    }
    .idex-pv-toc.is-open .idex-pv-toc__tab {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(10px);
    }
    /* auto-hide ao rolar pra baixo (não cobrir o eixo X durante leitura) */
    .idex-pv-toc.is-hidden .idex-pv-toc__tab {
        transform: translateX(-50%) translateY(120%);
        opacity: 0;
        pointer-events: none;
    }

    /* rótulo "Navegar" volta na horizontal */
    .idex-pv-toc__tx {
        display: inline;
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 14px;
    }
    .idex-pv-toc__bars { width: 17px; }
    .idex-pv-toc__ct {
        flex-direction: row;
        align-items: baseline;
        gap: 2px;
        margin-left: 4px;
        padding-left: 10px;
        border-left: 1px solid rgba(255, 255, 255, 0.45);
    }
    .idex-pv-toc__ct b { font-size: 14px; }
    .idex-pv-toc__ct i { font-size: 12px; }

    /* scrim atrás da folha (visual; o toque passa direto e fecha) */
    .idex-pv-toc::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1;
        background: rgba(13, 38, 76, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s, visibility 0.22s;
    }
    .idex-pv-toc.is-open::after {
        opacity: 1;
        visibility: visible;
    }

    /* painel = folha inferior */
    .idex-pv-toc__panel {
        position: fixed;
        z-index: 2;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: 82vh;
        padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        border: none;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -18px 50px rgba(13, 38, 76, 0.28);
        transform: translateY(100%);
        transition: transform 0.26s ease, opacity 0.2s, visibility 0.26s;
    }

    .idex-pv-toc__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        top: 10px;
        right: 12px;
        z-index: 3;
        background: rgba(255, 255, 255, 0.96);
    }
    .idex-pv-toc.is-open .idex-pv-toc__panel {
        transform: translateY(0);
    }
    /* alça da folha */
    .idex-pv-toc__panel::before {
        content: "";
        display: block;
        width: 38px;
        height: 4px;
        margin: 0 auto 14px;
        border-radius: 999px;
        background: rgba(13, 38, 76, 0.18);
    }

    /* alvos de toque maiores na lista */
    .idex-pv-toc__lnk {
        padding: 11px 8px;
    }
    .idex-pv-toc__t {
        font-size: 14px;
    }
    .idex-pv-toc__chips .idex-pv-nav__btn {
        height: 34px;
        font-size: 13px;
    }

    /* ───── MOBILE: enxugar o "chrome" do card pra ganhar largura útil
       e melhorar a legibilidade do gráfico ─────
       Antes: container 14px + card 24/26px de padding + borda 1px =
       21% da tela perdida em moldura. Aqui o card vira "flat" (sem borda
       pesada, sombra mínima) e o padding cai pra ~12-14px. Recupera ~36px
       de plot e combina com o bump de fonte do JS pra deixar legível. */
    .idex-pv .idex-modular-content__container {
        padding: 0 8px;
        gap: 12px;
    }
    .idex-pv .idex-api-widgets {
        gap: 14px;
        margin-top: 10px;
    }
    .idex-pv .idex-api-widget {
        padding: 14px 12px;
        border: none;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(13, 38, 76, 0.06);
    }
    .idex-pv .idex-api-widget h2 {
        font-size: 14px !important;
        line-height: 1.25;
    }

    .idex-pv .idex-api-widget__meta {
        font-size: 12px !important;
        margin: 4px 0 8px;
    }
    /* tabelas seguem a mesma estética flat */
    .idex-pv .idex-api-table-card {
        padding: 14px 12px;
        border: none;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(13, 38, 76, 0.06);
    }
}

@media (min-width: 769px) and (max-width: 1024px) and (pointer: coarse) {
    .idex-pv-toc__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        z-index: 3;
    }
}
