/* =====================================================================
   Apuração de votos (TSE) - Poconet
   Segue o padrão visual do site: cantos retos, fundo branco, vermelho
   da marca como destaque. Classes prefixadas com "ap-".
   ===================================================================== */

.ap-root {
    --ap-red: #c60f0b;
    --ap-black: #111111;
    --ap-text: #222222;
    --ap-muted: #6b6b6b;
    --ap-line: #e3e3e3;
    --ap-soft: #f5f5f5;

    font-family: 'Lato', 'Roboto', sans-serif;
    color: var(--ap-text);
    text-align: left;
    line-height: 1.4;
}

.ap-root *,
.ap-root *::before,
.ap-root *::after {
    box-sizing: border-box;
    border-radius: 0;
}

.ap-root h1,
.ap-root h2,
.ap-root h3,
.ap-root p {
    margin: 0;
    padding: 0;
    letter-spacing: normal;
    text-transform: none;
}

:where(.ap-root) button {
    font: inherit;
    cursor: pointer;
}

.ap-show-sm {
    display: none;
}

.ap-num {
    font-family: 'Montserrat', 'Lato', sans-serif;
    font-variant-numeric: tabular-nums;
}

/* ---------- Etiqueta (mesmo estilo dos chapéus do site) ---------- */
.ap-root .ap-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ap-red);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    line-height: 1;
    padding: 5px 7px;
    white-space: nowrap;
}

.ap-live__dot,
.ap-menu-dot {
    position: relative;
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50% !important;
    background: currentColor;
    flex: none;
}

.ap-live__dot::after,
.ap-menu-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: ap-pulse 1.6s ease-out infinite;
}

.ap-root .ap-live--off {
    background: var(--ap-black);
}

.ap-live--off .ap-live__dot::after {
    animation: none;
}

@keyframes ap-pulse {
    0% {
        transform: scale(1);
        opacity: .8;
    }

    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* ---------- Item de menu: mesmo estilo dos demais + ponto pulsando ---------- */
.ap-menu-item>a {
    white-space: nowrap;
}

.ap-menu-dot {
    margin-right: 6px;
    vertical-align: middle;
    top: -1px;
}

/* Abre espaço para o item extra sem quebrar o menu em duas linhas */
.rd-navbar-static .rd-navbar-nav.has-ap>li>a,
.rd-navbar-fullwidth .rd-navbar-nav.has-ap>li>a {
    padding-left: 10px;
    padding-right: 10px;
}

/* ---------- Barra de progresso ---------- */
.ap-bar {
    position: relative;
    height: 4px;
    background: var(--ap-line);
    overflow: hidden;
}

.ap-bar__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--c, var(--ap-red));
    transition: width .8s ease;
}

/* ---------- Título de seção (igual "Política", "Polícia"...) ---------- */
.ap-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
}

.ap-title::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #000;
}

.ap-title>* {
    position: relative;
    z-index: 2;
    background: #fff;
}

.ap-title__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    line-height: 1.1;
    color: #000;
    padding-right: 12px;
}

.ap-title__link {
    padding-left: 12px;
    color: #000;
    white-space: nowrap;
    transition: color .2s ease;
}

.ap-title__link:hover {
    color: var(--ap-red);
    text-decoration: none;
}

/* =====================================================================
   Faixa da home
   ===================================================================== */
.ap-strip {
    margin-top: 32px;
}

.ap-status {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--ap-muted);
}

.ap-status .ap-bar {
    flex: 1;
    min-width: 120px;
}

.ap-status strong {
    color: var(--ap-black);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
}

.ap-strip__grid {
    display: grid;
    grid-template-columns: var(--cols, repeat(3, minmax(0, 1fr)));
    gap: 24px;
}

.ap-mini__short {
    display: none;
}

/* Cards compactos quando há mais de 3 cargos na linha */
@media (min-width: 1200px) {
    .is-compact .ap-mini__full,
    .is-compact .ap-mini__head small {
        display: none;
    }

    .is-compact .ap-mini__short {
        display: inline;
    }

    .is-compact .ap-mini__party {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.ap-strip__grid.is-compact {
    gap: 14px;
}

.is-compact .ap-mini {
    min-width: 0;
    padding: 12px 12px 4px;
}

.is-compact .ap-mini__title {
    font-size: 13px;
}

.is-compact .ap-mini__head small {
    font-size: 11px;
}

.is-compact .ap-mini__row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 0;
}

.is-compact .ap-mini .ap-photo {
    width: 38px;
    height: 38px;
}

.is-compact .ap-mini__name {
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.is-compact .ap-mini__party {
    font-size: 11px;
}

.is-compact .ap-mini__pct {
    font-size: 15px;
}

.is-compact .ap-mini__pct small {
    font-size: 11px;
}

.ap-mini {
    display: block;
    border: 1px solid var(--ap-line);
    border-top: 3px solid var(--ap-red);
    background: #fff;
    padding: 14px 16px 6px;
    color: var(--ap-text);
    text-decoration: none !important;
    transition: box-shadow .2s ease;
}

@media (hover: hover) {
    .ap-mini:hover {
        box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
        color: var(--ap-text);
    }
}

.ap-mini__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ap-line);
}

.ap-mini__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 15px;
    text-transform: uppercase;
    color: #000;
}

.ap-mini__head small {
    font-size: 12px;
    color: var(--ap-muted);
    white-space: nowrap;
}

.ap-mini__row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
}

.ap-mini__row+.ap-mini__row {
    border-top: 1px solid var(--ap-line);
}

.ap-mini__name {
    font-weight: 700;
    font-size: 15px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ap-mini__party {
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-mini .ap-bar {
    height: 3px;
    margin-top: 6px;
}

.ap-mini__pct {
    text-align: right;
    font-weight: 900;
    font-size: 18px;
    color: #000;
    line-height: 1.1;
}

.ap-mini__pct small {
    display: block;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: var(--ap-muted);
}

/* ---------- Lista de candidatos do card (rola dentro do card) ---------- */
.ap-mini__list {
    position: relative;
}

@media (min-width: 769px) {
    .ap-mini__list {
        max-height: var(--list-h, 210px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: #c9c9c9 transparent;
    }

    .ap-mini__list::-webkit-scrollbar {
        width: 5px;
    }

    .ap-mini__list::-webkit-scrollbar-thumb {
        background: #c9c9c9;
    }

    /* Esmaecido no rodapé indicando que há mais candidatos */
    .ap-mini__list.has-more::after {
        content: '';
        position: sticky;
        display: block;
        bottom: 0;
        height: 26px;
        margin-top: -26px;
        background: linear-gradient(rgba(255, 255, 255, 0), #fff);
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .ap-mini__list.is-end::after {
        opacity: 0;
    }
}

.ap-strip__grid .ap-mini {
    display: flex;
    flex-direction: column;
}

.ap-strip__grid .ap-mini__list {
    flex: 1;
}

.ap-mini__more {
    margin-top: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 6px -16px -6px;
    padding: 10px;
    border-top: 1px solid var(--ap-line);
    background: var(--ap-soft);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--ap-red);
    transition: background .2s ease, color .2s ease;
}

@media (hover: hover) {
    .ap-mini:hover .ap-mini__more {
        background: var(--ap-red);
        color: #fff;
    }
}

.is-compact .ap-mini__more {
    margin: 4px -12px -4px;
    font-size: 11px;
}

/* Página interna: o bloco abre a página */
.ap-banner--page {
    margin-top: 24px;
}

/* Antes de começar, percentuais zerados em cinza (não sugerem liderança) */
.is-waiting .ap-mini__pct,
.is-waiting .ap-cand__pct,
.is-waiting .ap-search__pct {
    color: var(--ap-muted) !important;
}

/* ---------- Bloco de destaque da faixa (cor da marca) ---------- */
.ap-banner {
    position: relative;
    background: linear-gradient(100deg, #9e0b08 0%, var(--ap-red) 55%, #b30d0a 100%);
    color: #fff;
    padding: 18px 22px 16px;
    margin-bottom: 20px;
    border-bottom: 3px solid #000;
}

.ap-banner__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ap-banner__kicker {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
}

.ap-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 7px 12px;
    line-height: 1;
    white-space: nowrap;
}

.ap-pill i {
    font-size: 15px;
}

.ap-pill--wait {
    background: #fff602;
    color: #000;
}

.ap-pill--live {
    background: #fff;
    color: var(--ap-red);
}

.ap-pill--final {
    background: #128a3e;
    color: #fff;
}

.ap-banner__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 6px;
}

.ap-root .ap-banner__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 1.1;
    color: #fff;
}

.ap-banner__title span {
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
}

.ap-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    border: 2px solid #fff;
    color: #fff !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    padding: 9px 14px;
    text-decoration: none !important;
    transition: background .2s ease, color .2s ease;
}

.ap-banner__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: none;
}

.ap-banner__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff !important;
    font-size: 13px;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    opacity: .9;
}

.ap-banner__link:hover {
    opacity: 1;
}

.ap-banner__cta:hover {
    background: #fff;
    color: var(--ap-red) !important;
}

.ap-banner__progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}

.ap-banner__pct {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    min-width: 110px;
}

.ap-banner .ap-bar {
    flex: 1;
    height: 10px;
    background: rgba(0, 0, 0, .25);
}

.ap-banner .ap-bar__fill {
    background: #fff602;
}

.ap-banner__meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
}

/* ---------- Foto do candidato (quadrada, como as imagens do site) ---------- */
.ap-photo {
    position: relative;
    width: 48px;
    height: 48px;
    flex: none;
    background: var(--ap-soft);
}

.ap-photo img,
.ap-avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.ap-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c, #999);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 15px;
}

.ap-photo::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--c, #999);
}

.ap-photo__badge {
    position: absolute;
    right: -6px;
    top: -6px;
    width: 20px;
    height: 20px;
    background: #128a3e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
}

/* =====================================================================
   Página completa
   ===================================================================== */
.ap-page {
    padding-bottom: 48px;
}

.ap-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: end;
    padding: 28px 0 24px;
    border-bottom: 1px solid #000;
    margin-bottom: 24px;
}

.ap-head__kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--ap-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ap-root .ap-head__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 40px;
    line-height: 1.1;
    color: #000;
}

.ap-head__place {
    margin-top: 8px;
    font-size: 18px;
    color: var(--ap-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ap-head__place i {
    color: var(--ap-red);
}

.ap-head__progress {
    border: 1px solid var(--ap-line);
    border-left: 3px solid var(--ap-red);
    padding: 14px 16px;
}

.ap-head__pct {
    font-size: 30px;
    font-weight: 900;
    color: #000;
    line-height: 1;
}

.ap-head__label {
    font-size: 13px;
    color: var(--ap-muted);
    margin: 4px 0 10px;
}

.ap-head__meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ---------- Seletor de local ---------- */
.ap-picker {
    border: 1px solid var(--ap-line);
    background: #fff;
    padding: 16px;
}

.ap-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ap-root .ap-picker__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 15px;
    text-transform: uppercase;
    color: #000;
}

.ap-picker__current {
    display: none;
    font-size: 14px;
    color: var(--ap-muted);
}

.ap-picker__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ap-picker__body {
    margin-top: 14px;
}

.ap-brasil {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--ap-line);
    background: #fff;
    color: #000;
    padding: 9px;
    font-weight: 700;
    font-size: 13px;
    transition: all .2s ease;
}

.ap-brasil:hover {
    border-color: #000;
}

.ap-brasil.is-active {
    background: var(--ap-red);
    border-color: var(--ap-red);
    color: #fff;
}

/* Mapa em blocos */
.ap-tiles {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin: 12px auto 0;
    max-width: 280px;
}

.ap-root .ap-tile {
    aspect-ratio: 1;
    border: 0;
    background: #ececec;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, color .15s ease;
}

.ap-root .ap-tile:hover {
    background: #d4d4d4;
}

.ap-root .ap-tile.is-home:not(.is-active) {
    box-shadow: inset 0 0 0 2px var(--ap-red);
    color: var(--ap-red);
}

.ap-root .ap-tile.is-active {
    background: var(--ap-red);
    color: #fff;
}

.ap-field {
    margin-top: 14px;
}

.ap-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ap-muted);
    margin-bottom: 6px;
}

.ap-select,
.ap-input {
    width: 100%;
    height: 42px;
    border: 1px solid #ccc;
    background: #fff;
    padding: 0 10px;
    font-size: 16px;
    color: var(--ap-text);
    outline: none;
}

.ap-select:focus,
.ap-input:focus {
    border-color: #000;
}

.ap-combo {
    position: relative;
}

.ap-combo__icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ap-muted);
    font-size: 17px;
    pointer-events: none;
}

.ap-combo .ap-input {
    padding-left: 34px;
}

.ap-combo__list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #000;
    border-top: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    display: none;
}

.ap-combo.is-open .ap-combo__list {
    display: block;
}

.ap-combo__opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    text-align: left;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--ap-text);
}

.ap-combo__opt:hover,
.ap-combo__opt.is-focus {
    background: var(--ap-soft);
}

.ap-combo__opt.is-selected {
    font-weight: 700;
    color: var(--ap-red);
}

.ap-combo__opt small {
    color: var(--ap-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.ap-combo__empty {
    padding: 12px;
    font-size: 14px;
    color: var(--ap-muted);
}

.ap-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ap-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s ease;
}

@media (hover: hover) {
    .ap-chip:hover {
        border-color: #000;
    }
}

.ap-chip.is-active {
    background: #000;
    border-color: #000;
    color: #fff;
}

/* ---------- Busca de candidato ---------- */
.ap-search {
    position: relative;
    margin-bottom: 12px;
}

.ap-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--ap-muted);
    pointer-events: none;
}

.ap-root .ap-search .ap-input {
    height: 48px;
    padding-left: 44px;
    font-size: 16px;
    border: 2px solid #000;
}

.ap-root .ap-search .ap-input:focus {
    border-color: var(--ap-red);
}

.ap-office-tag {
    display: inline-block;
    background: #000;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 5px;
    margin-right: 4px;
    vertical-align: 1px;
}

.ap-root .ap-cand--hit {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ap-line);
    background: #fff;
    text-align: left;
    cursor: pointer;
}

@media (hover: hover) {
    .ap-root .ap-cand--hit:hover {
        background: var(--ap-soft);
    }
}

/* Busca da home */
.ap-search--home {
    margin: -6px 0 16px;
}

.ap-root .ap-search--home .ap-input {
    height: 44px;
    font-size: 16px;
}

.ap-search__results {
    display: none;
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 2px solid #000;
    border-top: 0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .15);
    max-height: 420px;
    overflow-y: auto;
}

.ap-search.is-open .ap-search__results {
    display: block;
}

.ap-search__hit {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--ap-line);
    color: var(--ap-text) !important;
    text-decoration: none !important;
}

.ap-search__hit:focus {
    background: var(--ap-soft);
}

@media (hover: hover) {
    .ap-search__hit:hover {
        background: var(--ap-soft);
    }
}

.ap-search__hit .ap-photo {
    width: 40px;
    height: 40px;
}

.ap-search__name {
    font-weight: 700;
    font-size: 15px;
    color: #000;
    min-width: 0;
}

.ap-search__name small {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-search__pct {
    font-weight: 900;
    font-size: 16px;
}

.ap-search__all {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--ap-red) !important;
    text-decoration: none !important;
}

/* ---------- Abas de cargo ---------- */
.ap-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 3px solid var(--ap-red);
    -webkit-overflow-scrolling: touch;
}

.ap-tabs::-webkit-scrollbar {
    display: none;
}

.ap-tab {
    flex: none;
    border: 0;
    background: transparent;
    color: #000;
    padding: 12px 18px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: background .2s ease, color .2s ease;
}

@media (hover: hover) {
    .ap-tab:hover {
        background: var(--ap-soft);
    }
}

.ap-tab.is-active {
    background: var(--ap-red);
    color: #fff;
}

.ap-tab__count {
    display: inline-block;
    min-width: 20px;
    margin-left: 6px;
    padding: 2px 5px;
    background: var(--ap-red);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
}

.ap-tab.is-active .ap-tab__count {
    background: #fff;
    color: var(--ap-red);
}

.ap-tab.is-empty {
    color: #aaa;
}

.ap-tab.is-empty .ap-tab__count {
    background: #ddd;
    color: #777;
}

.ap-empty__found {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

/* ---------- Painel ---------- */
.ap-panel {
    padding-top: 18px;
}

.ap-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ap-line);
}

.ap-root .ap-panel__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: #000;
    line-height: 1.1;
}

.ap-panel__sub {
    margin-top: 4px;
    font-size: 14px;
    color: var(--ap-muted);
}

.ap-panel__sub strong {
    color: var(--ap-text);
}

.ap-panel__sections {
    text-align: right;
    flex: none;
    min-width: 170px;
}

.ap-panel__sections .ap-num {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #000;
    line-height: 1;
}

.ap-panel__sections span {
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-panel__sections .ap-bar {
    margin-top: 6px;
    --c: #128a3e;
}

.ap-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-left: 3px solid var(--ap-red);
    background: var(--ap-soft);
    padding: 12px 14px;
    margin-top: 14px;
    font-size: 14px;
}

.ap-notice i {
    font-size: 20px;
    color: var(--ap-red);
    flex: none;
}

.ap-root .ap-hint {
    margin: 14px 0 6px;
    font-size: 13px;
    color: var(--ap-muted);
}

/* Candidatos */
.ap-cand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--ap-line);
}

.ap-cand .ap-photo {
    width: 60px;
    height: 60px;
}

.ap-cand__name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: #000;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ap-cand__meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--ap-muted);
}

.ap-cand__meta b {
    color: var(--ap-text);
}

.ap-cand .ap-bar {
    margin-top: 8px;
}

.ap-cand__score {
    text-align: right;
    min-width: 90px;
}

.ap-cand__pct {
    font-size: 24px;
    font-weight: 900;
    color: #000;
    line-height: 1;
}

.ap-cand__votes {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ap-muted);
    white-space: nowrap;
}

/* Líder: sem borda/fundo para manter as fotos alinhadas; marcado pela etiqueta */
.ap-tag.ap-tag--leader {
    background: transparent;
    color: var(--ap-red);
    box-shadow: inset 0 0 0 1px var(--ap-red);
}

.ap-cand.is-leader .ap-cand__pct {
    color: var(--ap-red);
}

.ap-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 3px 6px;
    background: #128a3e;
    color: #fff;
    line-height: 1;
}

.ap-tag--second {
    background: #fff602;
    color: #000;
}

.ap-tag--muted {
    background: var(--ap-soft);
    color: var(--ap-muted);
}

/* Lista compacta (deputados) */
.ap-tools {
    margin: 14px 0 4px;
}

.ap-cand--compact {
    grid-template-columns: 30px auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 0;
}

.ap-cand--compact .ap-photo {
    width: 42px;
    height: 42px;
}

.ap-cand--compact .ap-cand__name {
    font-size: 15px;
}

.ap-cand--compact .ap-cand__pct {
    font-size: 17px;
}

.ap-rank {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--ap-muted);
    text-align: center;
}

.ap-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    padding: 11px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: all .2s ease;
}

.ap-more:hover {
    background: #000;
    color: #fff;
}

/* Resumo */
.ap-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 1px solid var(--ap-line);
    margin-top: 20px;
}

.ap-stat {
    padding: 12px 14px;
    border-right: 1px solid var(--ap-line);
}

.ap-stat:last-child {
    border-right: 0;
}

.ap-stat__label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--ap-muted);
    font-weight: 700;
}

.ap-stat__value {
    font-size: 18px;
    font-weight: 900;
    color: #000;
    margin-top: 4px;
}

.ap-stat__pct {
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-footer-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ap-refresh__ring {
    --p: 0;
    width: 14px;
    height: 14px;
    border-radius: 50% !important;
    background: conic-gradient(var(--ap-red) calc(var(--p) * 1%), var(--ap-line) 0);
}

.ap-skeleton {
    background: linear-gradient(90deg, #eee 0%, #f7f7f7 50%, #eee 100%);
    background-size: 200% 100%;
    animation: ap-shimmer 1.2s linear infinite;
}

@keyframes ap-shimmer {
    to {
        background-position: -200% 0;
    }
}

.ap-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--ap-muted);
}

.ap-empty i {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.is-loading [data-ap="panel"] {
    opacity: .5;
    transition: opacity .2s ease;
}

/* =====================================================================
   Responsivo
   ===================================================================== */
@media (max-width: 1100px) {
    .ap-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ap-stat:nth-child(3n) {
        border-right: 0;
    }

    .ap-stat:nth-child(-n+3) {
        border-bottom: 1px solid var(--ap-line);
    }
}

/* Tablet: 2 colunas, tamanho normal dos cards */
@media (max-width: 1199px) {
    .ap-strip__grid,
    .ap-strip__grid.is-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .ap-strip__grid .ap-mini:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .is-compact .ap-mini {
        padding: 14px 16px 6px;
    }

    .is-compact .ap-mini__title {
        font-size: 15px;
    }

    .is-compact .ap-mini__row {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 10px 0;
    }

    .is-compact .ap-mini .ap-photo {
        width: 48px;
        height: 48px;
    }

    .is-compact .ap-mini__name {
        font-size: 15px;
    }

    .is-compact .ap-mini__pct {
        font-size: 18px;
    }
}

/* Celular: um embaixo do outro, só os 3 primeiros de cada cargo */
@media (max-width: 768px) {
    .ap-strip__grid,
    .ap-strip__grid.is-compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-mini__list .ap-mini__row:nth-child(n+4) {
        display: none;
    }

    .ap-mini__list .ap-mini__row:nth-child(3) {
        border-bottom: 0;
    }
}

@media (max-width: 1024px) {
    .ap-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .ap-picker__current {
        display: block;
    }

    .ap-picker__toggle {
        display: inline-flex;
    }

    .ap-picker__body {
        display: none;
    }

    .ap-picker.is-open .ap-picker__body {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 20px;
        align-items: start;
    }

}

@media (max-width: 768px) {
    .ap-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding-top: 20px;
    }

    .ap-root .ap-head__title {
        font-size: 30px;
    }

    .ap-picker.is-open .ap-picker__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-title__text {
        font-size: 24px;
    }

    .ap-strip__grid {
        grid-auto-columns: 85%;
    }

    .ap-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-stat {
        border-right: 1px solid var(--ap-line) !important;
        border-bottom: 1px solid var(--ap-line);
    }

    .ap-stat:nth-child(2n) {
        border-right: 0 !important;
    }

    .ap-stat:nth-last-child(-n+2) {
        border-bottom: 0;
    }
}

@media (max-width: 520px) {
    .ap-hide-sm {
        display: none;
    }

    .ap-show-sm {
        display: inline;
    }

    .ap-title {
        padding: 18px 0;
    }

    .ap-title__text {
        font-size: 22px;
        padding-right: 8px;
    }

    .ap-title__link {
        font-size: 13px;
        padding-left: 8px;
    }

    .ap-status {
        gap: 10px;
    }

    .ap-status .ap-bar {
        order: 3;
        flex-basis: 100%;
    }

    .ap-status [data-ap="updated"] {
        display: none;
    }

    .ap-panel__head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ap-panel__sections {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .ap-panel__sections .ap-bar {
        flex: 1;
        margin: 0;
    }

    .ap-root .ap-panel__title {
        font-size: 21px;
    }

    .ap-cand {
        gap: 10px;
    }

    .ap-cand .ap-photo {
        width: 50px;
        height: 50px;
    }

    .ap-cand__name {
        font-size: 15px;
    }

    .ap-cand__pct {
        font-size: 19px;
    }

    .ap-cand__score {
        min-width: 66px;
    }

    .ap-cand--compact {
        grid-template-columns: 22px auto minmax(0, 1fr) auto;
        gap: 8px;
    }

    .ap-cand--compact .ap-photo {
        width: 38px;
        height: 38px;
    }

    .ap-cand--compact .ap-cand__name {
        font-size: 14px;
    }

    .ap-cand--compact .ap-cand__pct {
        font-size: 15px;
    }

    .ap-tab {
        padding: 11px 13px;
        font-size: 13px;
    }

    .ap-stat__value {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    .ap-mini__name {
        white-space: normal;
        line-height: 1.2;
    }

    .ap-root .ap-picker__title {
        font-size: 13px;
    }

    .ap-picker__current {
        font-size: 13px;
    }

    .ap-picker__toggle {
        padding: 7px 10px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    /* Bloco vertical: topo, título, progresso, meta e botão em largura total */
    .ap-banner {
        display: flex;
        flex-direction: column;
        padding: 18px 16px 18px;
        margin-bottom: 16px;
    }

    .ap-banner__main {
        display: contents;
    }

    .ap-banner__top {
        order: 1;
    }

    .ap-root .ap-banner__title {
        order: 2;
        margin-top: 16px;
    }

    .ap-banner__progress {
        order: 3;
        margin-top: 18px;
    }

    .ap-banner__meta {
        order: 4;
    }

    .ap-banner__actions {
        order: 5;
        align-items: stretch;
        gap: 12px;
        margin-top: 18px;
    }

    .ap-banner__link {
        justify-content: center;
    }

    .ap-banner__cta {
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .ap-banner__kicker {
        font-size: 11px;
        letter-spacing: .08em;
        white-space: nowrap;
    }

    .ap-root .ap-banner__title {
        font-size: 22px;
        line-height: 1.2;
    }

    .ap-banner__title span {
        display: block;
        margin-top: 6px;
        font-size: 17px;
    }

    .ap-banner__pct {
        font-size: 24px;
        min-width: 0;
    }

    .ap-banner .ap-bar {
        height: 8px;
    }

    .ap-banner__meta {
        flex-direction: column;
        gap: 4px;
        margin-top: 10px;
        font-size: 12px;
        line-height: 1.4;
    }

    .ap-pill {
        font-size: 11px;
        padding: 6px 9px;
        gap: 5px;
    }

    .ap-pill i {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    /* 4. lugar em linha própria, sem "·" solto */
    .ap-banner__title .ap-banner__place {
        display: block;
    }

    .ap-banner__title .ap-banner__place span {
        display: inline;
        margin: 0;
        font-size: inherit;
    }

    .ap-banner__title .ap-banner__place .ap-hide-sm {
        display: none;
    }

    /* abas com alvo de toque confortável */
    .ap-tab {
        min-height: 44px;
    }

    /* 3. topo da interna mais compacto: resultados aparecem antes */
    .ap-banner--page {
        padding: 14px 14px;
    }

    .ap-banner--page .ap-banner__meta [data-ap="updated"] {
        display: none;
    }

    .ap-picker {
        padding: 10px 12px;
    }

    .ap-root .ap-picker__title {
        display: none;
    }

    .ap-picker__current {
        font-weight: 700;
        color: #000;
        font-size: 15px;
    }

    .ap-picker__current {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    /* 9. mapa de UFs só em telas maiores (select resolve no celular) */
    .ap-tiles {
        display: none;
    }

    /* 8. alvos de toque */
    .ap-chip,
    .ap-picker__toggle,
    .ap-brasil,
    .ap-more {
        min-height: 44px;
    }

    .ap-combo__opt {
        min-height: 44px;
        padding: 12px;
    }

    .ap-select,
    .ap-input {
        height: 44px;
    }

    /* 10. indica que há mais abas para o lado */
    .ap-tabs {
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
        mask-image: linear-gradient(90deg, #000 85%, transparent);
    }

    .ap-tabs.is-end {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .ap-search,
    .ap-combo {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 520px) {
    /* 13. barra do painel com largura útil */
    .ap-panel__sections {
        flex-wrap: wrap;
    }

    .ap-panel__sections .ap-bar {
        flex-basis: 100%;
    }
}

@media (max-width: 400px) {
    /* 14. selo não estoura o bloco */
    .ap-banner__kicker {
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .ap-root .ap-banner__title {
        font-size: 19px;
    }
}

@media (max-width: 360px) {
    .ap-title__text {
        font-size: 19px;
    }

    .ap-mini {
        padding: 12px 12px 4px;
    }

    .ap-mini__row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .ap-mini .ap-photo {
        width: 42px;
        height: 42px;
    }

    .ap-mini__pct {
        font-size: 16px;
    }
}

/* ---------- Linhas da home como links ---------- */
.ap-root a.ap-mini__row {
    color: var(--ap-text);
    text-decoration: none !important;
}

.ap-mini__info {
    display: block;
    min-width: 0;
}

.ap-mini__info > span {
    display: block;
}

.ap-mini__title {
    color: #000 !important;
    text-decoration: none !important;
}

/* Percentual na cor do partido, escurecida para manter contraste com o branco */
.ap-mini__pct,
.ap-search__pct {
    color: color-mix(in srgb, var(--c, #000) 70%, #000) !important;
}

.ap-search__hit .ap-search__pct {
    color: inherit;
}

@media (hover: hover) {
    .ap-root a.ap-mini__row:hover .ap-mini__name {
        color: var(--ap-red);
    }

    /* Hover sem fundo: só o nome muda de cor (não altera alinhamento) */
    .ap-root .ap-cand[role="button"]:hover .ap-cand__name {
        color: var(--ap-red);
    }
}

.ap-root .ap-cand[role="button"] {
    cursor: pointer;
}

/* ---------- Foco visível (teclado) ---------- */
.ap-root a:focus-visible,
.ap-root button:focus-visible,
.ap-root input:focus-visible,
.ap-root select:focus-visible,
.ap-root [tabindex]:focus-visible {
    outline: 3px solid #000 !important;
    outline-offset: 2px;
}

.ap-banner a:focus-visible,
.ap-banner button:focus-visible {
    outline-color: #fff !important;
}

.ap-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Detalhe do candidato ---------- */
.ap-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ap-modal[hidden] {
    display: none;
}

html.ap-modal-open {
    overflow: hidden;
}

.ap-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    animation: ap-fade .2s ease;
}

.ap-modal__box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-top: 4px solid var(--ap-red);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    animation: ap-rise .25s ease;
    outline: none;
}

@keyframes ap-fade {
    from { opacity: 0; }
}

@keyframes ap-rise {
    from { opacity: 0; transform: translateY(16px); }
}

.ap-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 22px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-modal__body {
    padding: 22px;
}

.ap-modal__head {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding-right: 36px;
}

.ap-photo--lg {
    width: 104px;
    height: 128px;
}

.ap-photo--lg::after {
    height: 4px;
}

.ap-root .ap-modal__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 24px;
    line-height: 1.15;
    color: #000;
    margin-top: 8px;
}

.ap-modal__full {
    margin-top: 2px !important;
    font-size: 14px;
    color: var(--ap-muted);
}

.ap-modal__party {
    margin-top: 8px !important;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ap-modal__info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 18px 0 0;
    border: 1px solid var(--ap-line);
}

.ap-modal__info > div {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ap-line);
}

.ap-modal__info > div:nth-child(odd) {
    border-right: 1px solid var(--ap-line);
}

.ap-modal__info dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ap-muted);
}

.ap-modal__info dd {
    margin: 2px 0 0;
    font-size: 14px;
    color: #000;
}

.ap-root .ap-modal__sub {
    margin-top: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
    color: #000;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ap-red);
}

.ap-perf {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--ap-line);
}

.ap-perf__label {
    font-weight: 700;
    font-size: 15px;
    color: #000;
}

.ap-perf__label small,
.ap-perf__value small {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-perf__value {
    text-align: right;
    font-size: 22px;
    font-weight: 900;
    color: color-mix(in srgb, var(--c, #000) 70%, #000);
}

.ap-perf .ap-bar {
    grid-column: 1 / -1;
}

.ap-perf__na {
    color: var(--ap-muted);
    font-size: 13px;
}

.ap-modal__cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 10px;
    margin-top: 18px;
    padding: 12px 14px;
    background: #000;
    color: #fff !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none !important;
}

.ap-modal__cta small {
    grid-column: 1;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 12px;
    text-transform: none;
    color: rgba(255, 255, 255, .8);
}

.ap-modal__cta i {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 20px;
}

.ap-modal__note {
    margin-top: 10px !important;
    font-size: 12px;
    color: var(--ap-muted);
}

@media (max-width: 600px) {
    /* No celular: gaveta que sobe de baixo */
    .ap-modal {
        align-items: flex-end;
        padding: 0;
    }

    .ap-modal__box {
        max-height: 92vh;
        animation: ap-sheet .25s ease;
    }

    @keyframes ap-sheet {
        from { transform: translateY(100%); }
    }

    .ap-modal__body {
        padding: 18px 16px 24px;
    }

    .ap-modal__head {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 12px;
    }

    .ap-photo--lg {
        width: 84px;
        height: 104px;
    }

    .ap-root .ap-modal__title {
        font-size: 20px;
    }

    .ap-modal__info {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-modal__info > div:nth-child(odd) {
        border-right: 0;
    }
}

/* Contêineres de estrutura */
.ap-cands,
.ap-modal__perf {
    display: block;
}

/* Seletor de local acompanha a rolagem no desktop (listas longas de deputados) */
.ap-aside {
    position: sticky;
    top: 16px;
}

@media (max-width: 1024px) {
    .ap-aside {
        position: static;
    }
}

/* Respiro entre os blocos do painel e a lista */
.ap-seats,
.ap-evo {
    margin-bottom: 8px;
}

.ap-panel > .ap-cands,
.ap-panel > .ap-tools {
    margin-top: 8px;
}

/* ---------- Vagas em disputa ---------- */
.ap-seats {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: center;
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid var(--ap-line);
}

.ap-seats__text {
    min-width: 0;
}

.ap-seats__num {
    display: block;
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    color: #000;
}

.ap-root .ap-seats__label {
    margin-top: 6px;
    font-size: 15px;
    color: var(--ap-text);
}

.ap-seats__graphic {
    display: flex;
    justify-content: flex-end;
}

.ap-seats__legend,
.ap-evo__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 12px;
    font-size: 13px;
}

.ap-seats__legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 50% !important;
    vertical-align: 0;
    background: var(--c);
}

@media (hover: hover) {

}

/* Dica explicativa das etiquetas (QP, média, 2º turno, suplente) */
.ap-tag[data-tip] {
    position: relative;
    cursor: help;
}

.ap-tag__info {
    margin-left: 4px;
    font-size: 11px;
    opacity: .8;
}

.ap-tag[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    z-index: 30;
    left: 0;
    top: calc(100% + 8px);
    width: 260px;
    padding: 10px 12px;
    background: #111;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}

.ap-tag[data-tip]:focus,
.ap-tag[data-tip]:focus-visible {
    outline: none !important;
}

.ap-tag[data-tip]:focus::after {
    opacity: 1;
    visibility: visible;
    transform: none;
}

@media (hover: hover) {
    .ap-tag[data-tip]:hover::after {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

@media (max-width: 520px) {
    .ap-tag[data-tip]::after {
        width: 220px;
    }
}

/* ---------- Vagas de deputados: faixa + rostos ---------- */
.ap-seats2 {
    position: relative;
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid var(--ap-line);
}

.ap-seats2__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.ap-seats2__head .ap-seats__num {
    display: inline;
    font-size: 36px;
}

.ap-root .ap-seats2__head .ap-seats__label {
    margin-top: 0;
}

.ap-seatbar {
    display: flex;
    height: 12px;
    margin-top: 14px;
    background: #e3e3e3;
}

.ap-seatbar span {
    display: block;
    height: 100%;
    background: var(--c, #e3e3e3);
    box-shadow: inset -1px 0 0 #fff;
}

/* Rostos */
.ap-face {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 2px;
    border-radius: 50% !important;
    background: var(--c);
    cursor: pointer;
    overflow: hidden;
    transition: transform .15s ease;
}

.ap-face img,
.ap-face i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    object-fit: cover;
    object-position: top;
    background: #fff;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #000;
}

@media (hover: hover) {
    .ap-face:hover {
        transform: scale(1.12);
        z-index: 2;
    }
}

/* Opção B */
.ap-pgroups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px 20px;
    margin-top: 16px;
}

.ap-pgroup__head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--c);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #000;
}

.ap-pgroup__head i {
    width: 10px;
    height: 10px;
    background: var(--c);
}

.ap-pgroup__head b {
    margin-left: auto;
}

.ap-faces {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ap-pgroups__more {
    display: none;
}

/* Opção C */
@media (max-width: 640px) {
    .ap-seats2 {
        padding: 16px;
    }

    .ap-seats2__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .ap-pgroups {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    /* celular: mostra os primeiros grupos e um botão para ver todos */
    .ap-pgroups:not(.is-all) .ap-pgroup:nth-child(n+5) {
        display: none;
    }

    .ap-pgroups__more {
        display: flex;
        margin-top: 12px;
    }

        }

/* Cartões dos eleitos (presidente, governador, senador) */
.ap-winners {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.ap-winner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--ap-line);
    border-left: 4px solid var(--c);
}

.ap-face--xl {
    width: 76px;
    height: 76px;
    padding: 3px;
}

.ap-winner__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.ap-winner__info > b {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 17px;
    line-height: 1.15;
    color: #000;
}

.ap-winner__info > small {
    font-size: 13px;
    color: var(--ap-muted);
}

.ap-winner__pct {
    font-size: 20px;
    font-weight: 900;
    color: color-mix(in srgb, var(--c) 70%, #000);
}

.ap-winner__pct small {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-seats2 > .ap-runoff__title {
    margin-top: 16px;
    margin-bottom: -4px;
}

@media (max-width: 520px) {
    .ap-winners {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-face--xl {
        width: 64px;
        height: 64px;
    }
}

/* Confronto do 2º turno */
.ap-versus {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
    margin-top: 16px;
}

.ap-versus .ap-winner:last-child {
    flex-direction: row-reverse;
    text-align: right;
    border-left: 1px solid var(--ap-line);
    border-right: 4px solid var(--c);
}

.ap-versus .ap-winner:last-child .ap-winner__info {
    align-items: flex-end;
}

.ap-versus__x {
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #000;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 18px;
}

@media (max-width: 640px) {
    .ap-versus {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .ap-versus .ap-winner:last-child {
        flex-direction: row;
        text-align: left;
        border-left: 4px solid var(--c);
        border-right: 1px solid var(--ap-line);
    }

    .ap-versus .ap-winner:last-child .ap-winner__info {
        align-items: flex-start;
    }

    .ap-versus__x {
        justify-self: center;
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}

/* Finalistas do 2º turno */
.ap-runoff {
    margin-top: 16px;
}

.ap-root .ap-runoff__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 10px;
}

.ap-runoff .ap-faces {
    gap: 24px;
}

.ap-runoff__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.25;
}

.ap-runoff__item b {
    display: block;
    color: #000;
}

.ap-runoff__item small {
    color: var(--ap-muted);
}

.ap-runoff__item .ap-face {
    width: 48px;
    height: 48px;
}

/* Cartão flutuante das bolinhas */
.ap-seats__graphic {
    position: relative;
}

.ap-seatcard {
    position: absolute;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 250px;
    min-height: 96px;
    padding: 10px 12px;
    background: #111;
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
    pointer-events: none;
}

.ap-seatcard[hidden] {
    display: none;
}

.ap-seatcard__photo {
    flex: none;
    width: 46px;
    height: 46px;
    padding: 2px;
    border-radius: 50% !important;
    background: var(--c);
    overflow: hidden;
}

.ap-seatcard__photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    object-fit: cover;
    object-position: top;
    background: #fff;
}

.ap-seatcard__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.25;
}

.ap-seatcard__info b {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.ap-seatcard__info small {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
}

.ap-seatcard__info strong {
    color: #fff;
}

.ap-seatcard .ap-tag {
    align-self: flex-start;
    margin-top: 3px;
}

.ap-seats__note {
    margin-top: 10px !important;
    font-size: 12px;
    color: var(--ap-muted);
}

@media (max-width: 640px) {
    .ap-seats {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 16px;
    }

    .ap-seats__graphic {
        justify-content: center;
    }

    .ap-seats__num {
        font-size: 36px;
    }
}

/* ---------- Evolução da apuração ---------- */
.ap-evo {
    margin-top: 16px;
    padding: 14px 16px 10px;
    border: 1px solid var(--ap-line);
}

.ap-root .ap-evo__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 10px;
}

.ap-evo__canvas {
    position: relative;
    height: 240px;
}

/* ---------- Deputados em 2 colunas no desktop ---------- */
.ap-tools .ap-select {
    max-width: 320px;
}

@media (min-width: 1100px) {
    .ap-cands--grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
    }

    .ap-cands--grid .ap-more,
    .ap-cands--grid .ap-empty {
        grid-column: 1 / -1;
    }
}

/* ---------- Notas ---------- */
.ap-root .ap-notes__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 18px;
    font-style: normal;
    color: #000;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--ap-red);
    margin-bottom: 14px;
}

.ap-notes {
    margin-top: 40px;
}

.ap-notes ul {
    display: grid;
    gap: 10px;
}

.ap-notes li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ap-text);
}

.ap-notes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--ap-red);
}

@media (max-width: 520px) {
    .ap-seats__num {
        font-size: 32px;
    }

        .ap-tools .ap-select {
        max-width: none;
    }
}

/* ---------- Animações do bloco de destaque ---------- */
/* Aguardando: ampulheta vira e o selo pulsa */
.ap-pill--wait {
    animation: ap-pill-glow 2.4s ease-in-out infinite;
}

.ap-pill--wait i {
    display: inline-block;
    animation: ap-hourglass 2.4s ease-in-out infinite;
}

@keyframes ap-pill-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 246, 2, .55);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(255, 246, 2, 0);
    }
}

@keyframes ap-hourglass {
    0%, 40% {
        transform: rotate(0deg);
    }

    55%, 90% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(180deg);
    }
}

/* Barra vazia: brilho percorrendo enquanto a apuração não começa */
.ap-banner[data-state="wait"] .ap-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30%;
    background: linear-gradient(90deg, rgba(255, 246, 2, 0), rgba(255, 246, 2, .55), rgba(255, 246, 2, 0));
    animation: ap-bar-wait 2.2s ease-in-out infinite;
}

@keyframes ap-bar-wait {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(340%);
    }
}

/* Ao vivo: listras em movimento na barra preenchida */
.ap-banner[data-state="live"] .ap-bar__fill {
    background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 8px, transparent 8px 16px);
    background-size: 22.6px 22.6px;
    animation: ap-bar-live 1s linear infinite;
}

@keyframes ap-bar-live {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 22.6px 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ap-root *,
    .ap-root *::after,
    .ap-menu-dot::after {
        animation: none !important;
        transition: none !important;
    }
}
