:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: var(--widget-width); height: var(--widget-height); margin: 0; overflow: hidden; }
button, input, select { font: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brand-accent, #9af0d1); outline-offset: 2px; }
[hidden] { display: none !important; }

#widget-root, .widget { width: 100%; height: 100%; }
.widget {
  --nav-width: 30px;
  position: relative;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 22px;
  padding: 10px 12px 8px;
  overflow: hidden;
  color: var(--brand-text, #fff);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand-accent, #9af0d1) 9%, transparent), transparent 55%),
    linear-gradient(135deg, var(--brand-primary, #07192b) 0%, var(--brand-surface, #0b2238) 65%, var(--brand-primary, #07192b) 100%);
}
.widget__header { display: flex; align-items: flex-start; justify-content: space-between; min-width: 0; gap: 16px; }
.brand { display: flex; align-items: center; min-width: 0; gap: 9px; }
.brand__mark { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; overflow: hidden; border-radius: 12px; color: var(--brand-primary, #07192b); background: var(--brand-accent, #9af0d1); font-size: 14px; font-weight: 900; letter-spacing: -.04em; }
.brand__monogram { grid-area: 1 / 1; }
.brand__logo { z-index: 1; grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; background: var(--brand-surface, #fff); }
.brand__copy { display: grid; min-width: 0; line-height: 1.05; }
.brand__copy strong { overflow: hidden; font-size: 13px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.brand__copy small { margin-top: 5px; color: var(--brand-secondary, #aebdca); font-size: 11px; }
.widget__status { min-width: 0; }
.widget__status--message { display: grid; justify-items: end; line-height: 1.15; }
.widget__status--message strong { color: var(--brand-accent, #9af0d1); font-size: 16px; }
.widget__status--message > span:not(.countdown) { margin-top: 3px; color: var(--brand-secondary, #b9c5cf); font-size: 11px; }
.countdown { margin-top: 3px; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 800; }
.widget__status--result { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; max-width: 535px; gap: 5px 10px; }
.status-badge { flex: 0 0 auto; padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.status-badge--live { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-live-text, #07192b); background: var(--brand-live-bg, #9af0d1); }
.status-badge--live::before { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .25; } }
.status-badge--final { color: var(--brand-accent, #9af0d1); background: var(--brand-primary, #07192b); }
.widget__office { flex: 0 0 auto; font-size: 13px; font-weight: 800; }
.widget__totalization { flex-basis: 100%; min-width: 0; overflow: hidden; color: var(--brand-secondary, #bdc9d3); text-align: right; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.slider { position: relative; display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr) var(--nav-width); min-height: 0; gap: 5px; }
.slider__viewport { min-width: 0; min-height: 0; overflow: hidden; border-radius: 8px; }
/* Posição explícita: botões ocultos (catálogo de uma página) não deslocam o viewport para a coluna do botão. */
.slider__button--previous { grid-column: 1; grid-row: 1; }
.slider__viewport { grid-column: 2; grid-row: 1; }
.slider__button--next { grid-column: 3; grid-row: 1; }
.slider:has(> .slider__button[hidden]) .slider__viewport { grid-column: 1 / -1; }
.widget--layout-wide .slider__viewport { border-radius: 12px; }
.widget--layout-compact .slider__viewport { border-radius: 10px; }
.widget--layout-vertical .slider__viewport { border-radius: 11px; }
.slider__track { display: flex; width: 100%; height: 100%; gap: var(--gap); touch-action: pan-y; user-select: none; will-change: transform; transition-property: transform; transition-timing-function: cubic-bezier(.22, .61, .36, 1); }
.slider__button { z-index: 2; align-self: center; width: var(--nav-width); height: 34px; padding: 0 0 2px; border: 0; border-radius: 999px; color: var(--brand-text, #fff); background: color-mix(in srgb, var(--brand-text, #fff) 9%, transparent); cursor: pointer; font-size: 20px; line-height: 1; transition: background-color .2s ease, color .2s ease; }
.slider__button:hover { color: var(--brand-accent, #9af0d1); background: color-mix(in srgb, var(--brand-text, #fff) 17%, transparent); }
.candidate-card {
  --photo-w: 64px;
  flex: 0 0 calc((100% - var(--page-gap)) / var(--visible-items));
  min-width: 0; min-height: 0; height: 100%;
  display: grid; grid-template-columns: var(--photo-w) minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  column-gap: 10px; row-gap: 2px; padding: 8px; overflow: hidden;
  border-radius: 12px; color: var(--brand-primary, #07192b); background: var(--brand-secondary, #c2ced7);
  box-shadow: 0 6px 18px rgb(0 0 0 / 22%);
}
/* Líder do resultado: acompanha o reorder do LIVE sem tocar no DOM. */
.candidate-card--result:first-child { box-shadow: inset 0 0 0 2px var(--brand-primary, #07192b), 0 6px 18px rgb(0 0 0 / 22%); }
.candidate__content, .candidate__topline { display: contents; }
.candidate__fallback, .candidate__photo-wrap { grid-column: 1; grid-row: 1 / -1; width: 100%; height: auto; min-height: 0; border-radius: 9px; }
.candidate__fallback { display: grid; place-items: center; color: var(--brand-accent, #9af0d1); background: var(--brand-primary, #07192b); font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.candidate__photo-wrap { position: relative; overflow: hidden; background: var(--brand-primary, #07192b); }
.candidate__photo-wrap .candidate__fallback { position: absolute; inset: 0; }
.candidate__photo { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.candidate__name { grid-column: 2 / -1; grid-row: 1; min-width: 0; max-width: 100%; overflow: hidden; font-size: 14px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.candidate__meta { grid-column: 2 / -1; grid-row: 2; display: flex; align-items: center; min-width: 0; margin-top: 3px; font-size: 10px; white-space: nowrap; }
.candidate__party { min-width: 0; padding: 1px 6px; overflow: hidden; border-radius: 999px; color: var(--brand-secondary, #c2ced7); background: var(--brand-primary, #07192b); font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; }
.candidate__number { flex: 0 0 auto; margin-left: 5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.candidate__percentage { grid-column: 2 / -1; grid-row: 3; align-self: end; color: var(--brand-primary, #07192b); font-size: 20px; font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.candidate__votes { grid-column: 2 / -1; grid-row: 4; align-self: end; justify-self: start; min-width: 0; max-width: 100%; margin-top: 2px; overflow: hidden; color: color-mix(in srgb, var(--brand-primary, #07192b) 74%, var(--brand-secondary, #c2ced7)); font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.candidate__office { grid-column: 2 / -1; grid-row: 5; align-self: end; min-width: 0; overflow: hidden; color: color-mix(in srgb, var(--brand-primary, #07192b) 74%, var(--brand-secondary, #c2ced7)); display: -webkit-box; font-size: 10px; font-weight: 700; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.candidate__bar { grid-column: 2 / -1; grid-row: 5; display: block; width: 100%; height: 6px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: var(--brand-progress-track, var(--brand-primary, #07192b)); }
.candidate__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-progress-fill, var(--brand-accent, #9af0d1)); transition: width 500ms ease; }
.widget__footer { display: flex; align-items: end; justify-content: flex-end; min-width: 0; gap: 12px; color: var(--brand-secondary, #8295a5); font-size: 9px; line-height: 1.25; white-space: nowrap; }
.fixture-label { margin-right: auto; padding-block: 1px; color: var(--brand-secondary, #b7c6d0); font-weight: 800; letter-spacing: .06em; }

.widget--unauthorized { display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; padding: 6px 10px; }
.widget-unauthorized__message { margin: 0; max-width: 100%; overflow: hidden; color: var(--brand-secondary, #c2ced7); font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; }
.widget--unauthorized.widget--layout-micro .widget-unauthorized__message { font-size: 10px; }
.widget--disabled { display: grid; grid-template-areas: "brand message" "footer footer"; grid-template-columns: minmax(0, auto) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 20px; align-items: center; min-width: 0; min-height: 0; gap: 8px 20px; overflow: hidden; }
.widget--disabled > * { min-width: 0; max-width: 100%; }
.widget--disabled .brand { grid-area: brand; align-self: center; width: 100%; overflow: hidden; }
.widget--disabled .brand__copy { overflow: hidden; }
.widget--disabled .widget-disabled__message { grid-area: message; display: grid; justify-items: end; align-content: center; min-width: 0; max-width: 100%; max-height: 100%; overflow: hidden; text-align: right; }
.widget--disabled .widget-disabled__message strong, .widget--disabled .widget-disabled__message span { display: block; max-width: 100%; overflow: hidden; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.widget--disabled .widget-disabled__message strong { color: var(--brand-accent, #9af0d1); }
.widget--disabled .widget-disabled__message span { color: var(--brand-secondary, #b9c5cf); }
.widget--disabled .widget__footer { grid-area: footer; width: 100%; overflow: hidden; }
.widget--disabled .widget__footer > * { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.widget--disabled.widget--layout-strip { grid-template-areas: "brand message" "footer footer"; grid-template-columns: minmax(0, auto) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 14px; gap: 0 8px; }
.widget--disabled.widget--layout-compact, .widget--disabled.widget--layout-vertical, .widget--disabled.widget--layout-micro { grid-template-areas: "brand" "message" "footer"; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 0; }
.widget--disabled.widget--layout-vertical { grid-template-rows: 76px minmax(0, 1fr) 28px; padding: 10px 8px 8px; }
.widget--disabled.widget--layout-micro { grid-template-rows: 22px minmax(0, 1fr) 18px; padding: 3px; }
.widget--disabled.widget--layout-micro .widget-disabled__message strong { font-size: 10px; }
.widget--disabled.widget--layout-micro .widget-disabled__message span { font-size: 9px; }
.widget--disabled.widget--layout-vertical .widget-disabled__message, .widget--disabled.widget--layout-compact .widget-disabled__message, .widget--disabled.widget--layout-micro .widget-disabled__message { justify-items: start; text-align: left; }

/* Large horizontal family */
.widget--1260x200 { --nav-width: 27px; grid-template-rows: 43px minmax(0, 1fr) 19px; padding: 8px 10px 6px; }
.widget--1260x200 .brand__mark { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.widget--1260x200 .brand__copy strong { font-size: 12px; }
.widget--1260x200 .brand__copy small { margin-top: 3px; font-size: 10px; }
.widget--1260x200 .widget__status--message { display: flex; align-items: baseline; gap: 9px; }
.widget--1260x200 .widget__status--message > span:not(.countdown) { display: none; }
.widget--1260x200 .slider__button { height: 32px; }
.widget--1260x200 .candidate-card { --photo-w: 62px; column-gap: 8px; padding: 6px; }
.widget--1260x200 .candidate__name { font-size: 12px; }
.widget--1260x200 .candidate__percentage { font-size: 18px; }

.widget--970x250 .candidate-card { --photo-w: 68px; }
.widget--970x250 .candidate__name { font-size: 13px; }
.widget--970x250 .candidate__percentage { font-size: 22px; }

/* Intermediate horizontal family */
.widget--970x150 { --nav-width: 24px; grid-template-rows: 33px minmax(0, 1fr) 16px; padding: 4px 7px; }
.widget--970x150 .widget__header { align-items: center; gap: 10px; }
.widget--970x150 .brand { gap: 6px; }
.widget--970x150 .brand__mark { width: 27px; height: 27px; border-radius: 8px; font-size: 10px; }
.widget--970x150 .brand__copy strong { font-size: 10px; }
.widget--970x150 .brand__copy small { display: none; }
.widget--970x150 .widget__status--message { display: flex; align-items: center; gap: 8px; }
.widget--970x150 .widget__status--message strong { font-size: 13px; }
.widget--970x150 .widget__status--message > span:not(.countdown) { display: none; }
.widget--970x150 .countdown { margin: 0; font-size: 11px; }
.widget--970x150 .widget__status--result { flex-wrap: nowrap; max-width: 600px; gap: 6px; }
.widget--970x150 .widget__office { font-size: 11px; }
.widget--970x150 .widget__totalization { flex-basis: auto; font-size: 10px; }
.widget--970x150 .slider { gap: 4px; }
.widget--970x150 .slider__button { height: 30px; font-size: 18px; }
.widget--970x150 .candidate-card { --photo-w: 58px; grid-template-columns: var(--photo-w) minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 8px; padding: 6px; border-radius: 10px; }
.widget--970x150 .candidate__percentage { grid-column: 3; grid-row: 1; align-self: start; }
.widget--970x150 .candidate__name { grid-column: 2; }
.widget--970x150 .candidate__votes { grid-row: 3; }
.widget--970x150 .candidate__bar, .widget--970x150 .candidate__office { grid-row: 4; }
.widget--970x150 .candidate__fallback, .widget--970x150 .candidate__photo-wrap { border-radius: 8px; font-size: 15px; }
.widget--970x150 .candidate__name { font-size: 12px; }
.widget--970x150 .candidate__percentage { font-size: 17px; }
.widget--970x150 .candidate__meta { margin-top: 3px; }
.widget--970x150 .candidate__bar { height: 5px; margin-top: 4px; }
.widget--970x150 .widget__footer { gap: 8px; }

/* Low horizontal strips */
.widget--layout-strip { --nav-width: 18px; grid-template-rows: 18px minmax(0, 1fr) 14px; padding: 2px 4px; }
.widget--layout-strip .widget__header { align-items: center; gap: 7px; }
.widget--layout-strip .brand { gap: 4px; }
.widget--layout-strip .brand__mark { width: 16px; height: 16px; border-radius: 5px; font-size: 7px; }
.widget--layout-strip .brand__copy { display: none; }
.widget--1260x100 .brand__copy { display: grid; }
.widget--1260x100 .brand__copy strong { max-width: 150px; font-size: 9px; }
.widget--1260x100 .brand__copy small { display: none; }
.widget--layout-strip .widget__status--message { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 6px; }
.widget--layout-strip .widget__status--message strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.widget--layout-strip .widget__status--message > span:not(.countdown) { display: none; }
.widget--layout-strip .countdown { margin: 0; font-size: 9px; white-space: nowrap; }
.widget--layout-strip .widget__status--result { flex-wrap: nowrap; max-width: 70%; gap: 5px; overflow: hidden; }
.widget--layout-strip .status-badge { padding: 2px 4px; font-size: 9px; line-height: 1; }
.widget--layout-strip .widget__office { font-size: 9px; }
.widget--layout-strip .widget__totalization { flex-basis: auto; font-size: 9px; }
.widget--layout-strip .slider { gap: 3px; }
.widget--layout-strip .slider__viewport { border-radius: 7px; }
.widget--layout-strip .slider__button { height: 24px; font-size: 15px; }
.widget--layout-strip .candidate-card { --photo-w: 36px; grid-template-columns: var(--photo-w) minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); column-gap: 7px; row-gap: 0; padding: 4px 7px 4px 4px; border-radius: 8px; box-shadow: none; }
.widget--layout-strip .candidate__name { grid-column: 2; }
.widget--layout-strip .candidate__percentage { grid-column: 3; grid-row: 1; align-self: center; }
.widget--layout-strip .candidate__bar { grid-row: 3; align-self: end; }
.widget--layout-strip .candidate__fallback, .widget--layout-strip .candidate__photo-wrap { border-radius: 6px; font-size: 12px; }
.widget--layout-strip .candidate__name { font-size: 10px; }
.widget--layout-strip .candidate__percentage { font-size: 14px; }
.widget--layout-strip .candidate__meta { margin-top: 1px; font-size: 9px; }
.widget--layout-strip .candidate__party { padding: 0 5px; }
.widget--layout-strip .candidate__votes, .widget--layout-strip .candidate__office { display: none; }
.widget--layout-strip .candidate__bar { height: 4px; margin-top: auto; }
.widget--layout-strip .widget__footer { align-items: center; gap: 7px; font-size: 9px; }
.widget--layout-strip .fixture-label { overflow: hidden; min-width: 0; margin-right: auto; text-overflow: ellipsis; }
.widget--layout-strip .source-label, .widget--layout-strip time { flex: 0 0 auto; }
.widget--layout-strip button:focus-visible, .widget--layout-strip [tabindex]:focus-visible { outline-offset: -2px; }
.widget--1260x100 { grid-template-rows: 19px minmax(0, 1fr) 15px; }
.widget--1260x100 .candidate-card { --photo-w: 40px; }

/* Vertical family */
.widget--300x600 { --nav-width: 23px; grid-template-rows: 76px minmax(0, 1fr) 28px; padding: 10px 8px 8px; }
.widget--300x600 .widget__header { display: grid; grid-template-columns: 1fr; align-content: start; gap: 8px; }
.widget--300x600 .brand__mark { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.widget--300x600 .brand__copy strong { max-width: 210px; font-size: 11px; }
.widget--300x600 .brand__copy small { margin-top: 3px; font-size: 10px; }
.widget--300x600 .widget__status--message { justify-items: start; }
.widget--300x600 .widget__status--message strong { font-size: 14px; }
.widget--300x600 .widget__status--message > span:not(.countdown) { display: none; }
.widget--300x600 .countdown { font-size: 11px; }
.widget--300x600 .widget__status--result { justify-content: flex-start; flex-wrap: wrap; max-width: 100%; gap: 3px 6px; }
.widget--300x600 .widget__office { font-size: 10px; }
.widget--300x600 .widget__totalization { flex: 1 1 100%; text-align: left; font-size: 9px; }
.widget--300x600 .slider { gap: 4px; }
.widget--300x600 .slider__button { height: 34px; font-size: 18px; }
.widget[data-slider-direction="vertical"] .slider__track { flex-direction: column; }
.widget--300x600 .candidate-card { --photo-w: 64px; width: 100%; height: auto; column-gap: 9px; padding: 7px; border-radius: 11px; }
.widget--300x600 .candidate__fallback, .widget--300x600 .candidate__photo-wrap { font-size: 17px; }
.widget--300x600 .candidate__name { font-size: 12px; }
.widget--300x600 .candidate__percentage { font-size: 21px; }
.widget--300x600 .candidate__meta { margin-top: 4px; }
.widget--300x600 .candidate__votes { font-size: 9px; }
.widget--300x600 .candidate__bar { height: 6px; margin-top: 6px; }
.widget--300x600 .widget__footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: repeat(2, minmax(0, 1fr)); align-content: center; align-items: center; gap: 0 6px; font-size: 9px; line-height: 1.15; }
.widget--300x600 .fixture-label { grid-column: 1 / -1; max-width: none; overflow: visible; }
.widget--300x600 .widget__footer > span:not(.fixture-label) { overflow: hidden; text-overflow: ellipsis; }

/* Medium rectangle */
.widget--300x250 { --nav-width: 22px; grid-template-rows: 66px minmax(0, 1fr) 26px; padding: 8px 7px 6px; gap: 2px; }
.widget--300x250 .widget__header { gap: 8px; }
.widget--300x250 .brand { gap: 5px; }
.widget--300x250 .brand__mark { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }
.widget--300x250 .brand__copy strong { max-width: 75px; font-size: 9px; }
.widget--300x250 .brand__copy small { margin-top: 3px; font-size: 9px; }
.widget--300x250 .widget__status--message strong { max-width: 160px; text-align: right; font-size: 13px; }
.widget--300x250 .widget__status--message > span:not(.countdown) { display: none; }
.widget--300x250 .countdown { font-size: 10px; }
.widget--300x250 .widget__status--result { max-width: 158px; gap: 4px; }
.widget--300x250 .widget__office { font-size: 10px; }
.widget--300x250 .widget__totalization { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.widget--300x250 .slider { gap: 3px; }
.widget--300x250 .slider__button { height: 30px; font-size: 17px; }
.widget--300x250 .candidate-card { --photo-w: 40px; grid-template-columns: var(--photo-w) minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto auto auto; column-gap: 4px; row-gap: 2px; padding: 7px; }
.widget--300x250 .candidate__fallback, .widget--300x250 .candidate__photo-wrap { grid-row: 1; border-radius: 8px; font-size: 15px; }
.widget--300x250 .candidate__name { grid-column: 1 / -1; grid-row: 3; font-size: 12px; }
.widget--300x250 .candidate__percentage { grid-column: 2; grid-row: 1; align-self: end; justify-self: end; }
.widget--300x250 .candidate__percentage { font-size: 15px; }
.widget--300x250 .candidate__meta { grid-row: 4; margin-top: 2px; font-size: 9px; }
.widget--300x250 .candidate__meta, .widget--300x250 .candidate__bar { grid-column: 1 / -1; }
.widget--300x250 .candidate__bar { grid-row: 5; }
.widget--300x250 .candidate__votes, .widget--300x250 .candidate__office { display: none; }
.widget--300x250 .candidate__bar { height: 5px; margin-top: 6px; }
.widget--300x250 .widget__footer { align-items: end; gap: 6px; font-size: 9px; }
.widget--300x250 .fixture-label { overflow: hidden; min-width: 0; margin-right: 0; text-overflow: ellipsis; }
.widget--300x250 .source-label { flex: 0 0 auto; color: var(--brand-secondary, #a8bbc8); }

/* One-up micro family */
.widget--layout-micro { --nav-width: 17px; grid-template-rows: 22px 54px 18px; padding: 3px; }
.widget--layout-micro .widget__header { align-items: center; gap: 5px; }
.widget--layout-micro .brand { gap: 4px; }
.widget--layout-micro .brand__mark { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; }
.widget--layout-micro .brand__copy { display: none; }
.widget--layout-micro .widget__status--message { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 5px; }
.widget--layout-micro .widget__status--message strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.widget--layout-micro .widget__status--message > span:not(.countdown) { display: none; }
.widget--layout-micro .countdown { margin: 0; font-size: 9px; white-space: nowrap; }
.widget--layout-micro .widget__status--result { max-width: 285px; flex-wrap: nowrap; gap: 5px; overflow: hidden; }
.widget--layout-micro .status-badge { padding: 2px 4px; font-size: 9px; line-height: 1; }
.widget--layout-micro .widget__office { display: none; }
.widget--layout-micro .widget__totalization { flex-basis: auto; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.widget--layout-micro .slider { gap: 2px; }
.widget--layout-micro .slider__viewport { border-radius: 8px; }
.widget--layout-micro .slider__button { width: 17px; height: 26px; font-size: 15px; }
.widget--layout-micro .candidate-card { --photo-w: 40px; grid-template-columns: var(--photo-w) minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); column-gap: 8px; row-gap: 0; padding: 4px 8px 4px 4px; border-radius: 8px; box-shadow: none; }
.widget--layout-micro .candidate__name { grid-column: 2; }
.widget--layout-micro .candidate__percentage { grid-column: 3; grid-row: 1; align-self: center; }
.widget--layout-micro .candidate__bar { grid-row: 3; align-self: end; }
.widget--layout-micro .candidate__fallback, .widget--layout-micro .candidate__photo-wrap { border-radius: 7px; font-size: 14px; }
.widget--layout-micro .candidate__name { font-size: 11px; }
.widget--layout-micro .candidate__percentage { font-size: 15px; }
.widget--layout-micro .candidate__meta { margin-top: 1px; font-size: 9px; }
.widget--layout-micro .candidate__party { padding: 0 5px; }
.widget--layout-micro .candidate__votes, .widget--layout-micro .candidate__office { display: none; }
.widget--layout-micro .candidate__bar { height: 4px; margin-top: auto; }
.widget--layout-micro .widget__footer { align-items: center; gap: 6px; font-size: 9px; }
.widget--layout-micro .fixture-label { overflow: hidden; min-width: 0; margin-right: auto; color: var(--brand-secondary, #d3dce3); text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
  .slider__track, .candidate__bar > span, .slider__button { transition-duration: 0ms !important; }
  .status-badge--live::before { animation: none; }
}

/* Concurso sem catálogo ou cargo/UF inexistente: ocupa a área do carrossel com mensagem neutra. */
.widget__empty { display: grid; align-content: center; justify-items: center; gap: 4px; min-width: 0; min-height: 0; max-height: 100%; padding: 6px 12px; overflow: hidden; border: 1px dashed var(--brand-secondary, #b9c5cf); border-radius: 12px; color: var(--brand-text, #fff); background: var(--brand-surface, #0b2238); text-align: center; }
.widget__empty strong, .widget__empty span { display: block; max-width: 100%; overflow: hidden; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.widget__empty strong { color: var(--brand-accent, #9af0d1); font-size: 14px; white-space: normal; }
.widget__empty span { color: var(--brand-secondary, #b9c5cf); font-size: 11px; }
.widget--layout-compact .widget__empty strong { font-size: 12px; }
.widget--layout-strip .widget__empty, .widget--layout-micro .widget__empty { padding: 2px 8px; border-radius: 7px; }
.widget--layout-strip .widget__empty strong, .widget--layout-micro .widget__empty strong { font-size: 10px; white-space: nowrap; }

/* Filtros: cargo, UF, partido e busca em todos os formatos, numa linha própria acima dos candidatos. */
.widget[data-format-enabled="true"] { grid-template-rows: 52px 26px minmax(0, 1fr) 20px; }
.widget__filters { display: flex; align-items: center; min-width: 0; margin: 0; gap: 6px; }
.filter { display: block; flex: 0 1 auto; min-width: 0; margin: 0; }
.filter--office { flex: 0 1 128px; }
.filter--uf { flex: 0 0 60px; }
.filter--party { flex: 0 1 150px; }
.filter--search { flex: 1 1 140px; max-width: 220px; }
.filter select, .filter input { display: block; width: 100%; height: 22px; margin: 0; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--brand-text, #fff) 24%, transparent); border-radius: 999px; color: var(--brand-text, #fff); background-color: color-mix(in srgb, var(--brand-text, #fff) 8%, transparent); font-size: 11px; font-weight: 600; line-height: 1; text-overflow: ellipsis; }
.filter select { padding-right: 19px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 11px) 52%, calc(100% - 7px) 52%; background-repeat: no-repeat; background-size: 4px 4px; cursor: pointer; }
.filter input { appearance: none; }
.filter input::placeholder { color: color-mix(in srgb, var(--brand-text, #fff) 62%, transparent); }
.filter input::-webkit-search-cancel-button { display: none; }
.filter option { color: var(--brand-primary, #07192b); background: var(--brand-secondary, #c2ced7); }
.filter select:disabled, .filter input:disabled { opacity: .5; cursor: default; }
.filter select:focus-visible, .filter input:focus-visible { outline: 2px solid var(--brand-accent, #9af0d1); outline-offset: 1px; }
.filter-count { flex: 0 0 auto; margin-left: auto; color: var(--brand-secondary, #c2ced7); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slider__empty { grid-column: 1 / -1; grid-row: 1; display: grid; place-items: center; min-width: 0; border: 1px dashed var(--brand-secondary, #b9c5cf); border-radius: 10px; color: var(--brand-accent, #9af0d1); background: var(--brand-surface, #0b2238); font-size: 12px; text-align: center; }
.slider__empty strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget__empty--loading strong { color: var(--brand-secondary, #b9c5cf); }
.widget__contest { color: var(--brand-text, #fff); font-size: 11px; font-weight: 700; }

/* Cabeçalho pré-LIVE dos formatos maiores: cargo/UF e contagem regressiva em destaque. */
.widget--970x250 .widget__status--message > span:not(.countdown):not(.widget__contest) { display: none; }
.widget--970x250 .widget__contest, .widget--300x600 .widget__status--message > span.widget__contest,
.widget--1260x200 .widget__status--message > span.widget__contest { display: block; }
.widget--970x250 .countdown, .widget--1260x200 .countdown, .widget--300x600 .countdown { padding: 2px 9px; border-radius: 999px; color: var(--brand-primary, #07192b); background: var(--brand-accent, #9af0d1); }
.widget--1260x200 .widget__status--message { align-items: center; }

.widget[data-format-enabled="true"].widget--1260x200 { grid-template-rows: 40px 22px minmax(0, 1fr) 17px; }
.widget--1260x200 .filter select, .widget--1260x200 .filter input { height: 20px; font-size: 10px; }
.widget--1260x200 .filter-count { font-size: 10px; }

.widget[data-format-enabled="true"].widget--970x150 { grid-template-rows: 30px 20px minmax(0, 1fr) 15px; }
.widget--970x150 .filter select, .widget--970x150 .filter input { height: 18px; padding-inline: 8px; font-size: 10px; }
.widget--970x150 .filter select { padding-right: 17px; }
.widget--970x150 .filter-count { font-size: 10px; }

.widget[data-format-enabled="true"].widget--layout-strip { grid-template-rows: 16px 15px minmax(0, 1fr) 14px; }
.widget[data-format-enabled="true"].widget--1260x100 { grid-template-rows: 17px 16px minmax(0, 1fr) 15px; }
.widget--layout-strip .widget__filters, .widget--layout-micro .widget__filters { gap: 4px; }
.widget--layout-strip .filter select, .widget--layout-strip .filter input,
.widget--layout-micro .filter select, .widget--layout-micro .filter input { height: 15px; padding: 0 6px; font-size: 9px; }
.widget--layout-strip .filter select, .widget--layout-micro .filter select { padding-right: 14px; background-position: calc(100% - 9px) 55%, calc(100% - 6px) 55%; background-size: 3px 3px; }
.widget--layout-strip .filter--office { flex-basis: 92px; }
.widget--layout-strip .filter--uf { flex-basis: 42px; }
.widget--layout-strip .filter--party { flex-basis: 84px; }
.widget--layout-strip .filter--search { flex-basis: 110px; max-width: 160px; }
.widget--layout-strip .filter-count, .widget--layout-micro .filter-count { font-size: 9px; }
.widget--layout-strip .slider__empty, .widget--layout-micro .slider__empty { border-radius: 7px; font-size: 10px; }

.widget[data-format-enabled="true"].widget--300x600 { grid-template-rows: 76px 46px minmax(0, 1fr) 28px; }
.widget--300x600 .widget__status--message .countdown { order: 1; }
.widget--300x600 .widget__status--message > span.widget__contest { order: 2; }
.widget--300x600 .widget__status--message { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 1px; }
.widget[data-format-enabled="true"].widget--300x600 .widget__header { gap: 4px; }
.widget--300x600 .widget__status--message > span.widget__contest { flex-basis: 100%; }
.widget--300x600 .widget__filters { flex-wrap: wrap; align-content: center; row-gap: 5px; }
.widget--300x600 .filter--office { flex: 1 1 44%; }
.widget--300x600 .filter--uf { flex: 0 0 56px; }
.widget--300x600 .filter--party { flex: 1 1 30%; }
.widget--300x600 .filter--search { flex: 1 1 52%; max-width: none; }
.widget--300x600 .filter select, .widget--300x600 .filter input { height: 20px; font-size: 10px; }
.widget--300x600 .filter-count { font-size: 10px; }

.widget[data-format-enabled="true"].widget--300x250 { grid-template-rows: 48px 20px minmax(0, 1fr) 22px; }
.widget--300x250 .widget__filters { gap: 3px; }
.widget--300x250 .filter select, .widget--300x250 .filter input { height: 17px; padding: 0 6px; font-size: 9px; }
.widget--300x250 .filter select { padding-right: 14px; background-position: calc(100% - 9px) 55%, calc(100% - 6px) 55%; background-size: 3px 3px; }
.widget--300x250 .filter--office { flex-basis: 78px; }
.widget--300x250 .filter--uf { flex-basis: 38px; }
.widget--300x250 .filter--party { flex-basis: 62px; }
.widget--300x250 .filter--search { flex-basis: 58px; }
.widget--300x250 .filter-count { font-size: 9px; }

.widget[data-format-enabled="true"].widget--layout-micro { grid-template-rows: 17px 16px minmax(0, 1fr) 14px; }
.widget--layout-micro .filter--office { flex-basis: 78px; }
.widget--layout-micro .filter--uf { flex-basis: 36px; }
.widget--layout-micro .filter--party { flex-basis: 60px; }
.widget--layout-micro .filter--search { flex-basis: 60px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.widget--layout-strip .filter select:focus-visible, .widget--layout-strip .filter input:focus-visible,
.widget--layout-micro .filter select:focus-visible, .widget--layout-micro .filter input:focus-visible { outline-offset: -2px; }

/* Respiro entre filtros e cards: sai da área flexível dos cards; a altura externa do formato não muda. */
.widget[data-format-enabled="true"] { --filters-gap: 6px; }
.widget[data-format-enabled="true"].widget--layout-compact { --filters-gap: 4px; }
.widget[data-format-enabled="true"].widget--layout-strip,
.widget[data-format-enabled="true"].widget--layout-micro { --filters-gap: 2px; }
.widget[data-format-enabled="true"] > .slider,
.widget[data-format-enabled="true"] > .widget__empty { margin-top: var(--filters-gap); }

/* Identidade institucional do rodapé (site ou produto): nunca empurra Fonte/Atualizado. */
.widget__footer .fixture-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.widget__footer .source-label, .widget__footer time { flex: 0 0 auto; }
