:root {
  --bg: #0a0e16;
  --card: #0e131c;
  --card-2: #121824;
  --row: #131925;
  --line: #1c2331;
  --line-2: #252d3d;
  --text: #eef2f8;
  --text-2: #c9cfdb;
  --muted: #8a93a6;
  --muted-2: #5f687b;
  --accent: #4357ec;
  --accent-2: #6d86ff;
  --green: #22c55e;
  --green-2: #4ade80;
  --amber: #f5b13d;
  --red: #ef4b55;
  --track: #252c3c;
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(67, 87, 236, 0.07), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.app {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 15px 10px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------------ topo */
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 22px; text-decoration: none; min-width: 0; margin-left: 7px; flex-shrink: 0; }
.brand__logo { width: 58px; height: 58px; border-radius: 12px; flex-shrink: 0; box-shadow: 0 4px 16px rgba(31, 163, 79, 0.18); }
.brand__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand__title { font-size: 25px; font-weight: 700; letter-spacing: -0.4px; white-space: nowrap; }
.brand__title em { font-style: normal; color: #8fb2ff; }
.brand__sub { font-size: 13px; color: #a3abbb; white-space: nowrap; }

.tabs {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  padding: 3px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.tabs__item {
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: #c3c9d6;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: background 0.15s, color 0.15s;
}
.tabs__item:hover { color: #fff; background: rgba(255, 255, 255, 0.03); }
.tabs__item.is-active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(180deg, #4255e6, #3443c9);
  border-color: #5a6cff;
  box-shadow: 0 0 0 1px rgba(90, 108, 255, 0.15), 0 6px 18px rgba(67, 87, 236, 0.35);
}
.tabs__item--menu { padding-right: 14px; }
.tabs__menu { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 270px;
  padding: 6px;
  background: #111723;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  z-index: 40;
}
.dropdown__label { padding: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.dropdown__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.dropdown__item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.dropdown__item small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.dropdown__sep { height: 1px; background: var(--line); margin: 6px 4px; }

.search {
  position: relative;
  width: 345px;
  height: 46px;
  margin-left: 48px;
  flex-shrink: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s;
}
.search:focus-within { border-color: #34405a; }
.search__icon { color: #c3c9d6; flex-shrink: 0; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.search input::placeholder { color: #8e97a9; }
.search input::-webkit-search-cancel-button { display: none; }
.search__kbd {
  font-family: var(--font);
  font-size: 11.5px;
  color: #9aa2b3;
  padding: 3px 7px;
  border-radius: 6px;
  background: #171d29;
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow: auto;
  padding: 6px;
  background: #111723;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  z-index: 40;
}
.search__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  color: var(--text-2);
}
.search__item small { color: var(--muted); font-size: 12px; }
.search__item.is-active, .search__item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.search__empty { padding: 12px; color: var(--muted); font-size: 13px; }

.live { margin-left: 26px; min-width: 175px; flex-shrink: 0; display: flex; gap: 12px; align-items: flex-start; }
.live__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  margin-top: 5px;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
  flex-shrink: 0;
}
.live--on .live__dot { animation: pulse 2s infinite; }
.live--wait .live__dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 177, 61, 0.15); }
.live--end .live__dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(109, 134, 255, 0.15); }
.live--err .live__dot { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 75, 85, 0.15); }
.live__title { font-size: 13.5px; font-weight: 500; color: var(--green-2); }
.live--wait .live__title { color: var(--amber); }
.live--end .live__title { color: var(--accent-2); }
.live--err .live__title { color: #ff8189; }
.live__sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
/* TSE segue com o andamento mas não republica o resultado: aviso discreto, não erro do site. */
.live--parado .live__sub { color: #c9a868; cursor: help; }
.live__online { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.live__online svg { color: var(--green-2); flex-shrink: 0; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); } 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.04); } }

/* ------------------------------------------------------------------ grade */
.grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr) 432px;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.coluna { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 328px;
  gap: 14px;
  margin-top: 10px;
}

.card {
  background: linear-gradient(180deg, #0f141e, #0d1219);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  position: relative;
}
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card__title { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -0.4px; }
.card__sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.card__title--sm { font-size: 18.5px; letter-spacing: -0.3px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  background: #151b27;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}

.chip--select { position: relative; cursor: pointer; font-weight: 600; }
.chip--select:hover { border-color: #34405a; }
.chip--select svg { color: var(--muted); }
.chip--select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.chip--select select option { background: #121824; color: var(--text); }

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  border-radius: 8px;
  background: #121824;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  flex-shrink: 0;
}
.select select {
  appearance: none;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  padding: 0 34px 0 12px;
  cursor: pointer;
}
.select select option { background: #121824; color: var(--text); }
.select svg { position: absolute; right: 12px; pointer-events: none; color: var(--muted); }
.select--sm { height: 28px; }
.select--sm select { font-size: 12.5px; padding: 0 28px 0 10px; }
.select--sm svg { right: 9px; }

/* ------------------------------------------------------------------ disputa */
.disputa { padding: 14px 9px 9px; display: flex; flex-direction: column; }
.disputa__head { padding: 0 9px 0 10px; margin-bottom: 13px; }
.disputa__head--prop { margin-bottom: 9px; }
.disputa__head--prop .disputa__sub { margin-top: 6px; }
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: #121824; border: 1px solid var(--line-2); }
.seg button { height: 22px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 12px; font-weight: 500; transition: background 0.15s, color 0.15s; }
.seg button:hover { color: #fff; }
.seg button.is-on { background: #28324e; color: #fff; box-shadow: inset 0 0 0 1px #3d4a6e; }
.disputa__sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.disputa__sub .card__sub { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none; white-space: nowrap; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid #3a4354; background: #121824; display: grid; place-items: center; transition: background 0.15s, border-color 0.15s; }
.check__box svg { opacity: 0; color: #fff; }
.check input:checked + .check__box { background: var(--accent); border-color: #5a6cff; }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px rgba(90, 108, 255, 0.35); }
.check:hover .check__box { border-color: #5a6cff; }
.disputa__list { display: flex; flex-direction: column; gap: 9px; }
.cand {
  display: grid;
  grid-template-columns: 22px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 10px;
  height: 62px;
  padding: 0 14px 0 7px;
  border-radius: 10px;
  background: var(--row);
  border: 1px solid #1d2432;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.cand--lider {
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 24%, #131925), color-mix(in srgb, var(--c) 7%, #131925) 55%, #131925);
  border-color: color-mix(in srgb, var(--c) 40%, #1d2432);
}
.cand__rank {
  width: 22px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  background: #273042;
  color: #dfe4ee;
}
.cand__rank--cor { background: color-mix(in srgb, var(--c) 82%, #000); color: #fff; }
.cand__rank--num { font-size: 10.5px; letter-spacing: -0.3px; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--c);
  padding: 2px;
  position: relative;
  flex-shrink: 0;
  background: #0e131c;
}
.avatar__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 45%, #1d2433), color-mix(in srgb, var(--c) 12%, #121824));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
}
.avatar__inner { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.avatar--sm { width: 34px; height: 34px; border-width: 1.5px; padding: 1.5px; }
.avatar--sm .avatar__inner { font-size: 11px; }
.avatar--party .avatar__inner { border-radius: 9px; font-size: 11px; }
.avatar--party { border-radius: 12px; }

.cand__info { min-width: 0; padding-top: 2px; }
.cand__nome { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.1px; }
.cand__partido { font-size: 11.5px; font-weight: 500; color: color-mix(in srgb, var(--c) 70%, #c9cfdb); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand__partido .tag { color: var(--muted); text-transform: none; margin-left: 6px; }
.bar { height: 5px; border-radius: 3px; background: var(--track); margin-top: 6px; }
.bar > i { position: relative; display: block; height: 100%; max-width: 100%; border-radius: 3px; background-color: var(--c); transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s; }
.cand__nums { text-align: right; padding-left: 6px; }
.cand__pct { font-size: 21px; font-weight: 700; letter-spacing: -0.4px; }
.cand__votos { font-size: 12.5px; color: var(--text-2); opacity: 0.85; margin-top: 3px; white-space: nowrap; }
.pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 2px;
  text-transform: none;
  letter-spacing: 0;
}
.pill--eleito { background: rgba(34, 197, 94, 0.16); color: var(--green-2); }
.pill--turno { background: rgba(109, 134, 255, 0.16); color: #9fb0ff; }
.pill--dentro { background: rgba(245, 177, 61, 0.14); color: #f5c46b; }
/* Vitória matematicamente garantida, ainda sem a confirmação do TSE: mesma cor do oficial,
   fundo mais leve, contorno e cadeado. */
.pill.pill--garantido {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 50%, transparent);
}
.pill--garantido svg { flex-shrink: 0; }
.cand--click { cursor: pointer; }
.cand--click:hover { border-color: #34405a; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-pair .btn-row { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* projeção de cadeiras */
.hemiciclo { display: block; width: 100%; max-width: 520px; margin: 6px auto 4px; }
.hemiciclo__n { font-size: 0.2px; font-weight: 700; fill: #fff; }
.hemiciclo__sub { font-size: 0.065px; fill: #8a93a6; }
.bancadas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 8px 0 12px; }
.bancada { display: grid; grid-template-columns: 10px 96px minmax(0, 1fr) 32px; align-items: center; gap: 8px; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--text-2); font-size: 12.5px; text-align: left; cursor: pointer; }
.bancada:hover { background: #151b27; color: #fff; }
.bancada .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.bancada__sg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bancada__bar { height: 6px; border-radius: 3px; background: #1a2030; overflow: hidden; }
.bancada__bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.bancada b { text-align: right; color: #fff; }
.nota { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin: 8px 0 0; }
.nota b { color: var(--text-2); }

/* desempenho por partido */
.pbusca { margin-bottom: 14px; }
.pbusca .cbusca__input { margin-right: 40px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 96px; overflow-y: auto; }
.pchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: #121824; color: var(--text-2); font-size: 12px; font-weight: 600; }
.pchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pchip small { color: var(--muted); font-weight: 500; }
.pchip:hover { color: #fff; border-color: #34405a; }
.pchip.is-on { background: #1d2540; border-color: #4357ec; color: #fff; }
.phead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.phead h3 { margin: 0; }
.pcards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pcard { padding: 11px 12px; border-radius: 10px; background: #121824; border: 1px solid var(--line-2); min-width: 0; }
.pcard__t { font-size: 11.5px; color: var(--muted); }
.pcard__v { font-size: 22px; font-weight: 700; color: #fff; margin: 3px 0 4px; }
.pcard__l { font-size: 11.5px; color: var(--text-2); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; }
.pcard__l b { color: #fff; font-weight: 600; }
.psec { font-size: 14px; font-weight: 600; color: #fff; margin: 18px 0 8px; }
.ptabela { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.ptabela table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptabela th, .ptabela td { padding: 6px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid #161c28; }
.ptabela thead th { color: var(--muted); font-weight: 500; font-size: 11.5px; background: #111622; position: sticky; top: 0; }
.ptabela tbody th { text-align: left; color: var(--text-2); }
.ptabela td small { color: var(--muted); }
.ptabela td.vazio { color: #3b4356; }
.ptabela td.dentro { color: #f5c46b; font-weight: 600; }
.ptabela .cad { display: inline-block; min-width: 18px; padding: 0 4px; border-radius: 4px; background: #1d2540; color: #fff; text-align: center; }

.btn-row {
  margin-top: 12px;
  height: 34px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 16px;
  border-radius: 8px;
  background: #121824;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 12.5px;
}
.btn-row:hover { border-color: #34405a; color: #fff; }

.stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 44% 56%;
  border-radius: 10px;
  background: #111723;
  border: 1px solid var(--line);
  padding: 14px 0 14px;
  flex: 1;
  min-height: 116px;
}
.stats__col { padding: 0 16px 0 16px; display: flex; flex-direction: column; justify-content: center; }
.stats__col + .stats__col { border-left: 1px solid var(--line-2); flex-direction: row; align-items: center; gap: 8px; padding: 0 10px 0 12px; }
.stats__col + .stats__col .stats__label { white-space: nowrap; }
.stats__label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.stats__label svg { color: #8ea0ff; }
.stats__value { font-size: 19px; font-weight: 700; margin-top: 7px; letter-spacing: -0.2px; }
.stats__delta { font-size: 13px; color: var(--green-2); margin-top: 6px; font-weight: 500; }
.stats__delta--neg { color: #ff8189; }
.stats__hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.donut { position: relative; flex-shrink: 0; display: grid; place-items: center; }
.donut svg { display: block; transform: rotate(-90deg); }
.donut circle { transition: stroke-dasharray 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.donut__label { position: absolute; font-weight: 700; letter-spacing: -0.3px; }

/* ------------------------------------------------------------------ mapa */
.mapa { padding: 16px 19px 18px; display: flex; flex-direction: column; overflow: hidden; }
.mapa__stage { position: relative; flex: 1; min-height: 480px; margin: 6px -19px -18px; }
.mapa__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.mapa__svg.is-dragging { cursor: grabbing; }
.uf { stroke: #10141c; stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill 0.6s, filter 0.2s; cursor: pointer; }
.uf:hover { filter: brightness(1.18); }
.uf.is-pinned { stroke: #e9edf5; stroke-width: 1.6; }
.uf-shine { pointer-events: none; }
.uf-label { font-family: var(--font); font-size: calc(18px / var(--z, 1)); font-weight: 600; fill: #e6e9f0; pointer-events: none; paint-order: stroke; stroke: rgba(10, 14, 22, 0.55); stroke-width: calc(3px / var(--z, 1)); }
.map-mun, .map-uf-borda { display: none; }
.nivel-mun .map-mun, .nivel-mun .map-uf-borda { display: inline; }
.nivel-mun .uf-shine, .nivel-mun .uf-ext { display: none !important; }
.nivel-mun.is-zoom .map-leads, .nivel-mun.is-zoom .map-boxes { display: none; }
.nivel-mun .uf-label { stroke: rgba(10, 14, 22, 0.85); stroke-width: calc(4px / var(--z, 1)); }
.map-mun path { stroke: #0e131c; stroke-width: 0.35; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; transition: fill 0.6s; }
.map-mun path:hover { stroke: #f2f4f8; stroke-width: 1.4; }
.map-uf-borda path { fill: none; stroke: #090c12; stroke-width: 1.3; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapa__ctrl { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.seg--lg button { height: 28px; padding: 0 12px; font-size: 12.5px; }
.mapa__dica { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 7px 12px; border-radius: 9px; background: rgba(14, 19, 28, 0.92); border: 1px solid var(--line-2); font-size: 12px; color: var(--text-2); pointer-events: none; white-space: nowrap; }
.legend__mun { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; height: 19px; font-size: 12px; color: var(--text-2); }
.legend__nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend__mun .legend__ramp { margin: 0; height: 7px; }
.legend__scale--mun { margin: 2px 0 4px 82px; font-size: 10.5px; }
.uf-box rect { fill: #161c28; stroke: #2a3243; stroke-width: 1; vector-effect: non-scaling-stroke; }
.uf-box text { font-family: var(--font); font-size: 18px; font-weight: 600; fill: #d9dde6; }
.uf-box { cursor: pointer; }
.uf-box:hover rect { stroke: #4a5568; }
.uf-ext rect { stroke-width: 1.2; transition: fill 0.6s; }
.uf-ext.is-pinned rect { stroke: #e9edf5; }
.uf-ext text { font-size: 19px; }
.uf-ext .globo { fill: none; stroke: #d9dde6; stroke-width: 1.6; }
.uf-lead { stroke: #3a4354; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }

.mapa__overlay { position: absolute; inset: 0; pointer-events: none; }
.callout {
  position: absolute;
  width: 202px;
  padding: 11px 13px 11px;
  background: rgba(14, 19, 28, 0.94);
  border: 1px solid #2a3243;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  backdrop-filter: blur(6px);
}
.callout__title { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.callout__close { border: 0; background: none; color: var(--muted); padding: 0 2px; line-height: 1; font-size: 15px; }
.callout__close:hover { color: #fff; }
.callout__row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); height: 23px; }
.callout__row .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.callout__row .nome { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callout__row b { font-weight: 600; color: #fff; font-size: 12.5px; }
.callout__row--lider b { color: var(--c); font-size: 15.5px; font-weight: 700; }
.callout__foot { font-size: 11px; color: var(--muted); margin-top: 5px; }
.callout__bar { height: 4px; border-radius: 2px; background: var(--track); margin-top: 6px; overflow: hidden; }
.callout__bar i { display: block; height: 100%; background: #3d7bf5; border-radius: 2px; transition: width 0.6s; }
.callout-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.callout-line line { stroke: #dfe4ee; stroke-width: 1; opacity: 0.75; }
.callout-line .anchor { fill: #fff; }

.mapa__tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 190px;
  padding: 10px 12px;
  background: rgba(14, 19, 28, 0.96);
  border: 1px solid #2a3243;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.zoom {
  position: absolute;
  right: 16px;
  top: 52%;
  display: flex;
  flex-direction: column;
  border-radius: 9px;
  background: #121824;
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.zoom button {
  width: 38px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #c9cfdb;
}
.zoom button + button { border-top: 1px solid var(--line-2); }
.zoom button:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.legend {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 188px;
  padding: 12px 15px 10px;
  background: rgba(14, 19, 28, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.legend__title { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend__item { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); height: 21px; white-space: nowrap; overflow: hidden; }
.legend__item span:last-child { overflow: hidden; text-overflow: ellipsis; }
.legend__dot { width: 13px; height: 13px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.legend__ramp { height: 8px; border-radius: 4px; margin: 4px 0 6px; }
.legend__scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------------ comparação com 2022 (Presidente) */
/* Cartões e tooltip do mapa */
.h22-co { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.h22-co__t { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.h22-co__t span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.h22-co__r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 32px; align-items: center; gap: 5px; height: 19px; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.h22-co__r b { padding: 0 4px; border-radius: 3px; background: var(--c); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 14px; }
.h22-co__nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h22-co__v { color: #fff; font-weight: 600; }
.h22-co__d { text-align: right; color: var(--c); font-weight: 600; filter: brightness(1.25); }
/* Legenda do modo "Variação desde 2022" */
.h22-leg__br { font-size: 11.5px; color: var(--text-2); margin: 5px 0 1px; }
.h22-leg__br b { color: #fff; font-weight: 600; }
.h22-leg { font-size: 10.5px; line-height: 1.4; color: var(--muted); margin-top: 4px; white-space: normal; }
/* Resultado da cidade */
.h22 { margin: -4px 0 16px; padding: 11px 14px 12px; border-radius: 10px; background: #121824; border: 1px solid var(--line-2); }
.h22--carregando { font-size: 12px; color: var(--muted); }
.h22__tit { font-size: 13.5px; font-weight: 600; color: #fff; }
.h22__tit small { font-size: 12px; font-weight: 400; color: var(--muted); }
.h22__em { margin: 3px 0 8px; font-size: 12.5px; color: var(--text-2); }
.h22__em b { color: #fff; font-weight: 600; }
.h22__tab { display: flex; flex-direction: column; gap: 2px; }
.h22__lin { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px 84px; gap: 0 10px; align-items: center; min-height: 26px; font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.h22__lin > span:not(:first-child) { text-align: right; white-space: nowrap; }
.h22__lin--cab { min-height: 18px; font-size: 11px; color: var(--muted); }
.h22__p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.h22__p i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.h22__p b { font-weight: 700; }
.h22__p small { min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h22__d { color: var(--c); font-weight: 600; filter: brightness(1.25); }
.h22 .nota { margin-top: 7px; }
/* Desempenho por partido (PT e PL) */
.h22-part { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.h22-part b { color: #fff; font-weight: 600; }
@media (max-width: 640px) {
  .h22-co__t { font-size: 10px; gap: 4px; }
  .h22-co__r { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px; font-size: 11px; }
  .h22-co__nm { font-size: 10.5px; }
  .h22-leg, .h22-leg__br { width: 100%; }
  .h22 { padding: 10px 11px; }
  .h22__lin { grid-template-columns: minmax(0, 1fr) 46px 46px 64px; gap: 0 6px; font-size: 12.5px; }
  .h22__p { flex-wrap: wrap; gap: 0 7px; }
  .h22__p small { flex-basis: 100%; padding-left: 16px; font-size: 11px; white-space: normal; }
}

/* ------------------------------------------------------------------ regiões */
.regioes { padding: 15px 16px 6px 14px; }
.regioes__head { display: flex; align-items: center; gap: 12px; margin-bottom: 7px; }
.regioes__icon { width: 30px; height: 30px; color: #5d6577; flex-shrink: 0; }
.regioes__head .card__title { flex: 1; }
.regioes__cols { display: flex; justify-content: flex-end; font-size: 11px; color: var(--muted); padding-right: 30px; margin-bottom: 2px; }
.reg { border-top: 1px solid transparent; }
.reg + .reg { border-top-color: #161c28; }
.reg__row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 90px minmax(0, 1fr) 50px 14px;
  align-items: center;
  gap: 0 8px;
  height: 40.5px;
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
}
.reg__icon { width: 30px; height: 26px; color: #4c5466; }
.reg__icon path { fill: currentColor; }
.reg__nome { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.stack { display: flex; height: 18px; border-radius: 3px; overflow: hidden; background: var(--track); }
.stack > span {
  position: relative;
  height: 100%;
  background: var(--c);
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.stack > span.outros { background: #343c4d; }
.reg__sec { font-size: 13px; color: var(--text-2); text-align: right; }
.reg__chev { color: var(--muted); transition: transform 0.2s; }
.reg.is-open .reg__chev { transform: rotate(90deg); }
.reg__ufs { padding: 2px 0 8px 42px; display: grid; gap: 5px; }
.reg__uf { display: grid; grid-template-columns: 28px minmax(0, 1fr) 52px 16px; gap: 0 8px; align-items: center; font-size: 12px; color: var(--text-2); }
.reg__uf .stack { height: 12px; }
.reg__uf .stack > span { font-size: 0; }

/* ------------------------------------------------------------------ resumo */
.resumo { padding: 15px 16px 13px 18px; }
.resumo__body { display: grid; grid-template-columns: 110px minmax(0, 1fr) 108px; gap: 12px; align-items: center; margin-top: 13px; }
.resumo__mid { display: flex; flex-direction: column; gap: 8px; }
.box { border-radius: 8px; background: #121824; border: 1px solid var(--line); padding: 7px 11px 7px; }
.box__label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.box__label .ring { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); }
.box__value { font-size: 15px; font-weight: 700; margin-top: 3px; letter-spacing: -0.2px; white-space: nowrap; }
.box__value small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.box__value--sm { font-size: 13.5px; }
.resumo__side { display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--line-2); padding-left: 11px; align-self: stretch; justify-content: center; }
.resumo__side .box { background: none; border: 0; padding: 1px 0 2px; }
.resumo__side .box__label { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 2px; }
.resumo__side .box__label b { font-weight: 600; color: var(--text-2); }
.resumo__side .box__value { white-space: nowrap; }
.resumo__side .box__label { font-size: 11px; }
.resumo__side .box__value { font-size: 11.5px; font-weight: 500; color: var(--text-2); }

/* ------------------------------------------------------------------ atualizações */
.updates { padding: 14px 16px 4px 18px; flex: 1; display: flex; flex-direction: column; min-height: 186px; }
.updates__head { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.updates__head .card__title { flex: 1; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); flex-shrink: 0; }
.dot-live--off { background: var(--muted-2); box-shadow: none; }
.link { border: 0; background: none; color: #6d8cff; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.link:hover { color: #9fb0ff; }
.upd-list { display: flex; flex-direction: column; flex: 1; }
.upd {
  display: grid;
  grid-template-columns: 50px 22px 34px minmax(0, 1fr) auto;
  gap: 0 10px;
  align-items: center;
  height: 27px;
  font-size: 12.5px;
  color: var(--text-2);
  animation: fade-in 0.5s ease;
}
.upd__time { font-size: 12px; padding: 3px 0; text-align: center; border-radius: 5px; background: #161c28; color: var(--text-2); }
.upd__icon { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--c); display: grid; place-items: center; }
.upd__icon i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.upd__uf { font-weight: 700; color: var(--text); font-size: 13px; }
.upd__txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upd__delta { color: var(--green-2); font-weight: 500; }
.empty { color: var(--muted); font-size: 12.5px; padding: 10px 0; line-height: 1.5; }
@keyframes fade-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ evolução */
.evolucao { padding: 18px 20px 8px 25px; display: grid; grid-template-columns: 290px minmax(0, 1fr); height: 146px; }
.evolucao__txt .card__title { font-size: 17.5px; letter-spacing: -0.3px; white-space: nowrap; }
.evolucao__chart { position: relative; height: 122px; margin-top: -6px; }
.evolucao__chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.evolucao__seg { margin-top: 8px; }
.evolucao__sub { margin-top: 8px; font-size: 12px; }
.chart-delta { fill: #8a93a6; }
.tag-estimativa { display: inline-block; padding: 1px 6px; margin-right: 4px; border-radius: 4px; background: rgba(245, 177, 61, 0.14); color: #f5c46b; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; text-transform: uppercase; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; height: 100%; align-items: center; }
.proj__rows { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.proj__row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 190px; align-items: center; gap: 12px; font-size: 12.5px; }
.proj__nome { color: var(--c); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj__track { position: relative; height: 10px; border-radius: 5px; background: #1a2030; }
.proj__agora { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: color-mix(in srgb, var(--c) 45%, transparent); transition: width 0.8s var(--ease-out, ease); }
.proj__proj { position: absolute; left: 0; top: -2px; bottom: -2px; border-radius: 6px; border: 1.5px dashed var(--c); transition: width 0.8s var(--ease-out, ease); }
.proj__meta { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1px dashed #5d6577; }
.proj__meta span { position: absolute; top: -13px; left: -10px; font-size: 9.5px; color: #6f788a; }
.proj__num { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.proj__num b { color: #fff; font-size: 13.5px; }
.proj__num .sobe { color: #4ade80; }
.proj__num .desce { color: #f87171; }
.proj__nota { font-size: 10.5px; color: #6f788a; line-height: 1.35; margin-top: 1px; }
.proj__veredito { padding: 11px 13px; border-radius: 10px; background: #121824; border: 1px solid var(--line-2); }
.proj__v { font-size: 15px; font-weight: 700; color: #fff; margin: 5px 0 3px; }
.proj__l { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.proj__l small { color: var(--muted); }
.proj__mais { margin-top: 7px; padding: 0; border: 0; background: none; color: #8fa7ff; font-size: 12px; font-weight: 600; cursor: pointer; }
.proj__mais:hover { color: #fff; text-decoration: underline; }
.proj--modal { grid-template-columns: minmax(0, 1fr) 240px; height: auto; margin: 6px 0 4px; }
.proj__row--ganha .proj__proj { box-shadow: 0 0 12px -2px var(--c); }
.proj-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.el-uf select { min-width: 180px; }
.ptabela tr.vira th, .ptabela tr.vira td { background: rgba(245, 177, 61, 0.06); }
.ptabela .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.chart-delta.sobe { fill: #4ade80; }
.chart-delta.desce { fill: #f87171; }
.chart-axis { font-family: var(--font); font-size: 11px; fill: #8a93a6; }
.chart-grid { stroke: #161c28; stroke-width: 1; }
.chart-line { fill: none; stroke: #3d7bf5; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-proj { fill: none; stroke: #5d6577; stroke-width: 1.2; stroke-dasharray: 4 4; }
.chart-dot { fill: #3d7bf5; stroke: #0e131c; stroke-width: 2; }
.chart-now { fill: #0e131c; stroke: #8fb2ff; stroke-width: 2; }
.chart-tag rect { fill: #121824; stroke: #2a3243; }
.chart-tag text { font-family: var(--font); fill: #eef2f8; }
.ao-vivo {
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 11px;
  border-radius: 6px;
  background: #0f1d17;
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: var(--green-2);
  font-size: 12px;
  font-weight: 500;
  z-index: 1;
}
.ao-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.ao-vivo--off { background: #121824; border-color: var(--line-2); color: var(--muted); }
.ao-vivo--off i { background: var(--muted-2); }

/* ------------------------------------------------------------------ previsão */
.previsao { padding: 18px 20px 14px 19px; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 16px; align-items: start; margin-top: 10px; margin-bottom: 10px; }
.previsao__icon { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #3a4354; display: grid; place-items: center; color: #c9cfdb; margin-top: 2px; }
.previsao__title { font-size: 13.5px; font-weight: 600; }
.previsao__txt { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.45; max-width: 200px; }
.previsao__eta { font-size: 23px; font-weight: 700; margin-top: 4px; letter-spacing: -0.3px; }
.previsao__bars { position: absolute; right: 20px; bottom: 16px; display: flex; align-items: flex-end; gap: 4px; height: 54px; }
.previsao__bars i { width: 5px; border-radius: 2px; background: #3a4354; transition: height 0.6s; }
.previsao__bars i:last-child { background: #5c667a; }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.7); backdrop-filter: blur(3px); }
.modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 22px 22px 18px;
  background: #0f141e;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: #121824; color: var(--text-2); }
.modal__close:hover { color: #fff; }
.modal h3 { margin: 0 40px 4px 0; font-size: 20px; letter-spacing: -0.3px; }
.modal .card__sub { margin-bottom: 16px; }
.mlist { display: flex; flex-direction: column; gap: 7px; }
.mrow {
  display: grid;
  grid-template-columns: 32px auto minmax(0, 1fr) 160px minmax(104px, auto);
  gap: 0 12px;
  align-items: center;
  padding: 8px 12px 8px 8px;
  border-radius: 10px;
  background: var(--row);
  border: 1px solid #1d2432;
}
.mrow__n { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; }
.mrow__nome { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__info { min-width: 0; }
.mrow__det { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.mrow__det .pill, .cand__partido .pill { margin-left: 0; vertical-align: 0; flex-shrink: 0; }
.cand__partido .pill { margin-left: 6px; }
.mrow__det .uf-chip { margin-right: 0; flex-shrink: 0; }
.mrow__txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mrow__num { white-space: nowrap; }
.mrow__num { text-align: right; }
.mrow__num b { font-size: 16px; }
.mrow__num small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 16px; }
.mtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.mtabs button { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: #121824; color: var(--text-2); font-size: 12.5px; }
.mtabs button.is-active { background: #1d2540; border-color: #4357ec; color: #fff; }
.cbusca { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 10px; }
.cbusca__input { flex: 1 1 260px; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; background: #121824; border: 1px solid var(--line-2); border-radius: 10px; color: var(--muted); }
.cbusca__input:focus-within { border-color: #4357ec; }
.cbusca__input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14px; }
.cinfo { font-size: 12px; color: var(--muted); margin-bottom: 8px; min-height: 16px; }
.uf-chip { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--text-2); background: #1d2433; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; margin-right: 6px; }
.btn-mais { justify-content: center; gap: 8px; margin-top: 10px; }
.mupd { display: grid; grid-template-columns: 70px 22px 120px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid #161c28; font-size: 13px; color: var(--text-2); }

.skeleton { color: transparent !important; background: linear-gradient(90deg, #151b27, #1b2230, #151b27); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 1560px) {
  .search { margin-left: 18px; width: 300px; }
  .live { margin-left: 8px; }
}
@media (max-width: 1400px) {
  .brand__sub { display: none; }
  .search { width: 240px; }
  .grid { grid-template-columns: 400px minmax(0, 1fr) 400px; }
}

/* Tablet / notebook pequeno */
@media (max-width: 1240px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 14px 0 12px; gap: 12px 14px; }
  .brand { order: 1; }
  .live { order: 2; margin-left: auto; }
  .tabs { order: 3; margin-left: 0; }
  .search { order: 4; flex: 1; width: auto; min-width: 220px; margin-left: 0; }
  .grid { grid-template-columns: 400px minmax(0, 1fr); }
  .coluna { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Tablet em pé: uma coluna, com o resumo logo depois da disputa */
@media (max-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .coluna { display: contents; }
  #disputa { order: 1; }
  #resumo { order: 2; }
  #mapa { order: 3; }
  #regioes { order: 4; }
  #updates { order: 5; }
  .mapa__stage { min-height: 520px; }
  .bottom { grid-template-columns: minmax(0, 1fr); }
  .evolucao { grid-template-columns: minmax(0, 1fr); height: auto; gap: 12px; }
  .evolucao__chart { height: 150px; margin-top: 0; }
  .previsao { margin: 0; }
  .mrow { grid-template-columns: 30px auto minmax(0, 1fr) auto; }
  .mrow > .bar { display: none; }
  .mgrid { grid-template-columns: repeat(2, 1fr); }
}

/* Celular */
@media (max-width: 640px) {
  .app { padding: 0 10px 18px; }
  .topbar { padding: 12px 0 10px; gap: 10px; }
  .brand { gap: 12px; margin-left: 0; min-width: 0; flex-shrink: 1; }
  .brand__logo { width: 40px; height: 40px; border-radius: 9px; }
  .brand__title { font-size: 19px; }
  .live { width: 100%; margin-left: 0; min-width: 0; gap: 10px; }
  .live__sub { white-space: normal; }
  .tabs { width: 100%; height: 42px; }
  .tabs__item { flex: 1 1 auto; justify-content: center; height: 34px; padding: 0 6px; font-size: 12.5px; }
  .tabs__menu { display: none; }
  .search { width: 100%; min-width: 0; height: 42px; }
  .search__kbd { display: none; }

  .grid, .bottom { gap: 10px; }
  .bottom { margin-top: 10px; }
  .card__title { font-size: 20px; }
  .card__title--sm { font-size: 17px; }

  .disputa { padding: 12px 8px 8px; }
  .disputa__head { padding: 0 6px; margin-bottom: 11px; }
  .disputa__sub { flex-wrap: wrap; row-gap: 6px; }
  .disputa__list { gap: 7px; }
  .cand { grid-template-columns: 22px 44px minmax(0, 1fr) auto; gap: 0 8px; height: 58px; padding: 0 10px 0 6px; }
  .avatar { width: 44px; height: 44px; }
  .cand__nome { font-size: 14px; }
  .cand__pct { font-size: 18px; }
  .cand__votos { font-size: 11.5px; }
  .stats { grid-template-columns: minmax(0, 1fr); padding: 12px 0; min-height: 0; }
  .stats__col + .stats__col { border-left: 0; border-top: 1px solid var(--line-2); margin-top: 12px; padding: 12px 16px 0; }

  .mapa { padding: 14px 12px 12px; }
  .mapa .card__head { flex-direction: column; align-items: stretch; gap: 10px; }
  .mapa .select select { width: 100%; }
  .mapa__ctrl { flex-direction: column; align-items: stretch; }
  .mapa__ctrl .seg { width: 100%; }
  .mapa__ctrl .seg button { flex: 1; }
  .mapa__dica { white-space: normal; text-align: center; width: max-content; max-width: 90%; }
  .mapa__stage { display: block; min-height: 0; margin: 8px -12px 0; }
  .mapa__svg { position: relative; height: 330px; touch-action: pan-y; }
  .mapa__overlay { position: static; padding: 0 12px; }
  .callout-line { display: none; }
  .callouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
  .callout { position: static; width: auto; padding: 9px 10px; backdrop-filter: none; }
  .callout__title { font-size: 12.5px; }
  .callout__row { font-size: 11.5px; height: 21px; gap: 6px; }
  .callout__row--lider b { font-size: 14px; }
  .legend { position: static; width: auto; margin: 10px 12px 0; display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .legend__title { width: 100%; margin-bottom: 4px; }
  .legend__ramp, .legend__scale { width: 100%; }
  .zoom { top: 222px; left: 10px; right: auto; }
  .zoom button { width: 34px; height: 32px; }

  .regioes { padding: 14px 12px 6px; }
  .regioes__icon { display: none; }
  .reg__row { grid-template-columns: 28px 84px minmax(0, 1fr) 46px 12px; gap: 0 6px; }
  .reg__nome { font-size: 13px; }
  .reg__ufs { padding-left: 34px; }

  .resumo { padding: 14px 12px 12px; }
  .resumo__body { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
  .resumo__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-around; border-left: 0; border-top: 1px solid var(--line-2); padding: 10px 0 0; }

  .updates { padding: 14px 12px 6px; min-height: 0; }
  .upd { grid-template-columns: 46px 20px 30px minmax(0, 1fr) auto; gap: 0 8px; font-size: 12px; }

  .evolucao { padding: 16px 12px 10px; }
  .previsao { padding: 16px 14px 14px; }

  .modal { padding: 10px; }
  .modal__card { padding: 16px 14px 14px; max-height: 92vh; }
  .modal h3 { font-size: 18px; }
  .mrow { grid-template-columns: 28px auto minmax(0, 1fr) auto; gap: 0 9px; padding: 7px 10px 7px 4px; }
  .mrow__n { font-size: 11px; letter-spacing: -0.3px; }
  .mrow__nome { font-size: 13.5px; }
  .mrow__num b { font-size: 15px; }
  .mrow__num small { font-size: 11px; }
  .mupd { grid-template-columns: 46px 20px 30px minmax(0, 1fr) auto; font-size: 12px; }
  .avisos { right: 12px; left: 12px; bottom: 64px; width: auto; }
  .fab-eleitos { left: 12px; right: auto; bottom: 12px; height: 38px; }
  .el-linha { grid-template-columns: 34px minmax(0, 1fr); }
  .el-linha .el-apurado { grid-column: 2; }
  .el-dep summary { grid-template-columns: 34px minmax(0, 1fr); }
  .el-dep__p, .el-dep summary .el-apurado { grid-column: 2; }
  .el-dep__lista { grid-template-columns: minmax(0, 1fr); }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard:first-child { grid-column: 1 / -1; }
  .bancadas { grid-template-columns: minmax(0, 1fr); }
  .btn-pair { grid-template-columns: minmax(0, 1fr); }
  .evolucao__txt .card__title { white-space: normal; }
  .evolucao__chart--proj { height: auto; }
  .proj, .proj--modal { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .proj__row { grid-template-columns: 64px minmax(0, 1fr); row-gap: 3px; }
  .proj__num { grid-column: 2; font-size: 11.5px; }
  .search__results { max-height: 60vh; }
}

/* ------------------------------------------------------------------ animações */
:root { --ease-out: cubic-bezier(0.22, 1, 0.36, 1); }

/* ------------------------------------------------------------------ barras: progresso e vencedores */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* Enquanto a apuração acontece, um brilho percorre as barras (gradiente animado, sem cortar o glow). */
.apurando .bar > i {
  background-image: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  background-size: 38% 100%;
  background-repeat: no-repeat;
  background-position: -70% 0;
  animation: barra-varre 2.8s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
.apurando .cand:nth-child(2) .bar > i { animation-delay: 0.3s; }
.apurando .cand:nth-child(3) .bar > i { animation-delay: 0.6s; }
.apurando .cand:nth-child(4) .bar > i { animation-delay: 0.9s; }
.apurando .cand:nth-child(5) .bar > i { animation-delay: 1.2s; }
.apurando .cand:nth-child(6) .bar > i { animation-delay: 1.5s; }
@keyframes barra-brilho { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(130%); } }
@keyframes barra-varre { 0% { background-position: -70% 0; } 60%, 100% { background-position: 170% 0; } }

/* Líder (e quem está dentro das vagas): barra mais grossa, com gradiente, glow e ponta luminosa. */
.cand--lider .bar { height: 7px; margin-top: 4px; border-radius: 4px; }
.cand--lider .bar > i {
  border-radius: 4px;
  background-image:
    linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #0b0f17), var(--c) 70%, color-mix(in srgb, var(--c) 55%, #fff));
  background-size: 38% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -70% 0, 0 0;
  box-shadow: 0 0 10px 0 color-mix(in srgb, var(--c) 80%, transparent), 0 0 26px 3px color-mix(in srgb, var(--c) 35%, transparent);
}
.apurando .cand--lider .bar > i { animation: barra-varre-lider 2.6s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
@keyframes barra-varre-lider { 0% { background-position: -70% 0, 0 0; } 60%, 100% { background-position: 170% 0, 0 0; } }
.cand--lider .bar > i::after {
  content: ''; position: absolute; right: -5px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, color-mix(in srgb, var(--c) 70%, #fff) 30%, transparent 70%);
  animation: ponta-pulsa 1.8s ease-in-out infinite;
}
@keyframes ponta-pulsa { 0%, 100% { transform: scale(0.75); opacity: 0.75; } 50% { transform: scale(1.15); opacity: 1; } }
.cand--ganha .bar > i { box-shadow: 0 0 8px 0 color-mix(in srgb, var(--c) 65%, transparent); }
.cand--lider .cand__pct { text-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); }

/* Borda luminosa girando em volta do líder. */
.cand--lider::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0deg 230deg, color-mix(in srgb, var(--c) 85%, #fff) 300deg, transparent 350deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borda-gira 5s linear infinite;
}
@keyframes borda-gira { to { --ang: 360deg; } }

/* Listas dos modais: eleitos e quem está dentro das vagas ganham faixa colorida e brilho. */
.mrow:has(.pill--eleito), .mrow:has(.pill--dentro) { border-color: color-mix(in srgb, var(--c) 35%, #1d2432); box-shadow: inset 3px 0 0 var(--c), 0 0 18px -10px var(--c); }
.pill--eleito { box-shadow: 0 0 10px -2px rgba(34, 197, 94, 0.6); }
.pill--dentro { box-shadow: 0 0 10px -3px rgba(245, 177, 61, 0.55); }

/* Números que contam: piscam em verde (subiu) ou vermelho (desceu). */
.cnt { font-variant-numeric: tabular-nums; border-radius: 4px; }
.cnt--sobe { animation: cnt-sobe 1.4s ease-out; }
.cnt--desce { animation: cnt-desce 1.4s ease-out; }
@keyframes cnt-sobe { 0%, 30% { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.45); } 100% { color: inherit; text-shadow: none; } }
@keyframes cnt-desce { 0%, 30% { color: #f87171; text-shadow: 0 0 12px rgba(248, 113, 113, 0.4); } 100% { color: inherit; text-shadow: none; } }

/* Ultrapassagem: quem subiu de posição ganha um destaque rápido. */
.flip-subiu { animation: flip-subiu 1.6s ease-out; }
@keyframes flip-subiu { 0% { box-shadow: 0 0 0 1px var(--c), 0 0 22px -4px var(--c); } 100% { box-shadow: none; } }

/* Reflexo discreto passando sobre o líder. */
.cand--lider { position: relative; overflow: hidden; }
.cand--lider::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.07) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: lider-reflexo 7s ease-in-out 1.5s infinite;
}
@keyframes lider-reflexo { 0% { transform: translateX(-100%); } 18%, 100% { transform: translateX(100%); } }

/* Mapa: pulso de luz no estado que acabou de receber seções. */
.uf.uf-pulso { animation: uf-pulso 1.8s ease-out; }
@keyframes uf-pulso { 0% { filter: brightness(2) saturate(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.7)); } 100% { filter: none; } }

/* Entrada da página: cards em sequência. */
.card { animation: card-entra 0.7s var(--ease-out) both; }
.grid > .card:nth-child(1) { animation-delay: 0.05s; }
.grid > .card:nth-child(2) { animation-delay: 0.12s; }
.coluna > .card:nth-child(1) { animation-delay: 0.19s; }
.coluna > .card:nth-child(2) { animation-delay: 0.26s; }
.coluna > .card:nth-child(3) { animation-delay: 0.33s; }
.bottom > .card:nth-child(1) { animation-delay: 0.4s; }
.bottom > .card:nth-child(2) { animation-delay: 0.47s; }
@keyframes card-entra { from { opacity: 0; transform: translateY(16px) scale(0.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Gráficos: linhas que se desenham e hemiciclo que enche ponto a ponto. */
.chart-line, .chart-draw { stroke-dasharray: 1; animation: linha-desenha 1.4s var(--ease-out) both; }
@keyframes linha-desenha { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hemiciclo circle { transform-box: fill-box; transform-origin: center; animation: ponto-entra 0.45s var(--ease-out) both; }
@keyframes ponto-entra { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }

/* Pequenos toques: cards respondem ao passar o mouse; botões com leve elevação. */
.cand { transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out); }
.cand--click:hover, .btn-row:hover { transform: translateY(-1px); }

/* Contador ao vivo (estimativa) */
.vivo { display: flex; gap: 18px; margin-top: 7px; }
.vivo__n { display: flex; flex-direction: column; min-width: 0; }
.vivo__n b { font-size: 17px; line-height: 1.15; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; white-space: nowrap; }
.vivo__n small { font-size: 11px; color: var(--muted); margin-top: 1px; }
.vivo--on .vivo__n b { background: linear-gradient(90deg, #fff 0%, #cfe0ff 50%, #fff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: vivo-brilho 2.2s linear infinite; }
@keyframes vivo-brilho { from { background-position: 200% 0; } to { background-position: 0 0; } }
.vivo__nota { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 10.5px; color: #6f788a; white-space: nowrap; }
.vivo__nota i { width: 6px; height: 6px; border-radius: 50%; background: #f5b13d; flex-shrink: 0; }
.vivo--on + .vivo__nota i { background: #22c55e; animation: pulse 1.6s infinite; }

/* Barras do panorama por região também "em progresso". */
.apurando .stack > span:not(.outros)::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.3) 50%, transparent 80%);
  transform: translateX(-130%);
  animation: barra-brilho 3.6s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
.apurando .reg:nth-child(2) .stack > span::after { animation-delay: 0.4s; }
.apurando .reg:nth-child(3) .stack > span::after { animation-delay: 0.8s; }
.apurando .reg:nth-child(4) .stack > span::after { animation-delay: 1.2s; }
.apurando .reg:nth-child(5) .stack > span::after { animation-delay: 1.6s; }
.apurando .callout__bar i, .apurando .stats .bar > i { position: relative; overflow: hidden; }
.apurando .callout__bar i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  transform: translateX(-130%);
  animation: barra-brilho 2.4s ease-in-out infinite;
}

/* Rosca de seções apuradas: brilho pulsando na ponta enquanto a apuração acontece. */
.apurando .donut svg circle:last-child { animation: rosca-brilho 2.4s ease-in-out infinite; }
@keyframes rosca-brilho { 0%, 100% { filter: drop-shadow(0 0 2px rgba(52, 227, 164, 0.35)); } 50% { filter: drop-shadow(0 0 7px rgba(52, 227, 164, 0.8)); } }

/* Anel do líder "respirando". */
.apurando .cand--lider .avatar { animation: lider-anel 2.6s ease-in-out infinite; }
@keyframes lider-anel { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 0%, transparent); } }

/* Ponto "ao vivo": onda a cada checagem do TSE. */
.live__dot { position: relative; }
.live__dot--ping::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--green); animation: ping 1.2s ease-out forwards; }
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }

/* Feed: atualização nova chega com um flash verde. */
.upd { animation: fade-in 0.5s ease, upd-novo 2s ease-out; border-radius: 6px; }
@keyframes upd-novo { 0% { background: rgba(34, 197, 94, 0.16); } 100% { background: transparent; } }

/* Troca de cargo: o conteúdo dos cards entra deslizando. */
.troca .card > * { animation: troca 0.5s var(--ease-out) both; }
@keyframes troca { from { opacity: 0.25; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Fundo com brilho suave em movimento. */
body::before {
  content: ''; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(32% 28% at 18% 12%, rgba(61, 123, 245, 0.1), transparent 70%),
    radial-gradient(28% 26% at 82% 18%, rgba(239, 75, 85, 0.07), transparent 70%),
    radial-gradient(36% 32% at 50% 96%, rgba(52, 227, 164, 0.05), transparent 70%);
  animation: aurora 28s ease-in-out infinite alternate;
}
@keyframes aurora { from { transform: translate3d(-2%, -1%, 0) rotate(0deg); } to { transform: translate3d(2%, 2%, 0) rotate(6deg); } }

/* Cards respondem ao mouse com um brilho sutil na borda. */
@media (hover: hover) {
  .card { transition: border-color 0.3s, box-shadow 0.3s; }
  .card:hover { border-color: #2a3346; box-shadow: 0 0 0 1px rgba(91, 147, 255, 0.05), 0 14px 40px -20px rgba(61, 123, 245, 0.4); }
}

/* Botão compartilhar e ações do cabeçalho do painel */
.disputa__acoes { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.chip--btn { display: inline-grid; place-items: center; width: 30px; padding: 0; cursor: pointer; color: var(--text-2); transition: color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.chip--btn:hover { color: #fff; border-color: #4357ec; box-shadow: 0 0 14px -4px rgba(67, 87, 236, 0.8); }
.chip--btn.is-busy { opacity: 0.5; pointer-events: none; }

/* Avisos (virada, confirmações) */
.avisos { position: fixed; right: 18px; bottom: 70px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 24px)); }
.aviso {
  position: relative; overflow: hidden; padding: 12px 38px 12px 14px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c, #3d7bf5) 22%, #111723), #0f141e 70%);
  border: 1px solid color-mix(in srgb, var(--c, #3d7bf5) 55%, #1d2432);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7), 0 0 28px -10px var(--c, #3d7bf5);
  animation: aviso-entra 0.5s var(--ease-out) both;
}
.aviso.saindo { animation: aviso-sai 0.35s ease-in forwards; }
.aviso__tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--c, #9fb0ff); }
.aviso__txt { font-size: 14px; font-weight: 600; color: #fff; margin: 3px 0 2px; }
.aviso__det { font-size: 12px; color: var(--text-2); }
.aviso__x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px; }
.aviso__tempo { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--c, #3d7bf5); transform-origin: left; animation: aviso-tempo 9s linear forwards; }
.aviso--simples { padding: 11px 14px; font-size: 13px; color: #fff; --c: #22c55e; }
@keyframes aviso-entra { from { opacity: 0; transform: translateX(30px) scale(0.96); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes aviso-sai { to { opacity: 0; transform: translateX(30px) scale(0.96); } }
@keyframes aviso-tempo { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Eleitos: botão no canto e modal */
.fab-eleitos {
  position: fixed; right: 18px; bottom: 18px; z-index: 55; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 13px; border-radius: 999px; border: 1px solid rgba(245, 196, 107, 0.45);
  background: linear-gradient(135deg, #2a2210, #141824 70%); color: #f5c46b; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7), 0 0 22px -6px rgba(245, 177, 61, 0.55);
  animation: fab-entra 0.6s var(--ease-out) 1s both;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.fab-eleitos:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.7), 0 0 30px -4px rgba(245, 177, 61, 0.75); }
@keyframes fab-entra { from { opacity: 0; transform: translateY(20px) scale(0.9); } to { opacity: 1; transform: none; } }
.tv .fab-eleitos { display: none; }
.mtabs--scroll { overflow-x: auto; scrollbar-width: none; }
.mtabs--scroll button { white-space: nowrap; flex-shrink: 0; }
.el-busca { margin-bottom: 10px; height: 38px; }
.el-resumo { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.el-resumo b { color: #fff; }
.el-lista { display: flex; flex-direction: column; gap: 6px; }
.el-linha { display: grid; grid-template-columns: 38px minmax(0, 1fr) 96px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--row); border: 1px solid #1d2432; }
.el-linha--grande { padding: 12px; }
.el-pessoas { display: flex; flex-wrap: wrap; gap: 6px 16px; min-width: 0; }
.el-pessoa { display: flex; align-items: center; gap: 9px; min-width: 0; }
.el-pessoa__info { min-width: 0; }
.el-pessoa__nome { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-pessoa__det { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.el-pessoa__det .pill { margin-left: 0; }
.el-vazio { font-size: 12px; color: var(--muted); }
.el-apurado { position: relative; height: 18px; border-radius: 5px; background: #1a2030; overflow: hidden; font-size: 10.5px; color: #fff; }
.el-apurado i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #1c6b45, #22c55e); opacity: 0.55; }
.el-apurado span { position: relative; display: block; text-align: center; line-height: 18px; font-variant-numeric: tabular-nums; }
.el-dep { border-radius: 10px; background: var(--row); border: 1px solid #1d2432; }
.el-dep summary { display: grid; grid-template-columns: 38px auto minmax(0, 1fr) 96px; align-items: center; gap: 10px; padding: 9px 10px; cursor: pointer; list-style: none; font-size: 12.5px; }
.el-dep summary::-webkit-details-marker { display: none; }
.el-dep__t { white-space: nowrap; color: var(--text-2); }
.el-dep__p { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-ok { color: var(--green-2); }
.el-prov { color: #f5c46b; }
.el-dep__lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; padding: 2px 12px 12px; }
.el-dep__item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; height: 24px; font-size: 12.5px; }
.el-dep__item i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.el-dep__nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-dep__part { color: var(--c); font-size: 11.5px; font-weight: 600; }
.el-dep__votos { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 2º turno (.t2: faixa no card; .t2m: modal) */
/* A faixa ocupa o lugar do 6º candidato, com a altura de .cand: o card não cresce e a tela de
   1672×941 continua sem rolagem. --c1/--c2: cores dos candidatos; --tom: cor do selo (2º turno,
   eleito ou provável). */
.t2 {
  --tom: #9fb0ff;
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 12px;
  width: 100%; height: 62px; margin: 0; padding: 0 8px 0 9px;
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--tom) 34%, #1d2432);
  background:
    radial-gradient(70% 150% at 0% 50%, color-mix(in srgb, var(--c1) 26%, transparent), transparent 70%),
    radial-gradient(70% 150% at 100% 50%, color-mix(in srgb, var(--c2) 20%, transparent), transparent 70%),
    linear-gradient(180deg, #151c2a, #10151f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 26px -18px var(--c1), 0 10px 26px -18px var(--c2);
  color: var(--text); text-align: left;
  animation: t2-entra 0.8s var(--ease-out) backwards;
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.t2:hover { border-color: color-mix(in srgb, var(--tom) 62%, #1d2432); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 30px -16px var(--c1), 0 12px 30px -16px var(--c2); }
.t2:focus-visible { outline: 2px solid color-mix(in srgb, var(--tom) 70%, transparent); outline-offset: 2px; }
.t2--eleito { --tom: var(--green-2); }
.t2--provavel { --tom: #f5c46b; }
/* Filete de luz no topo, nas cores dos dois candidatos, e reflexo passando de tempos em tempos. */
.t2::after {
  content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; pointer-events: none; opacity: 0.6;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c1) 75%, #fff), color-mix(in srgb, var(--c2) 75%, #fff), transparent);
}
.t2::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.06) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: lider-reflexo 9s ease-in-out 2.4s infinite;
}
@keyframes t2-entra { from { opacity: 0; transform: translateY(-8px) scale(0.98); filter: blur(5px); } }
.t2__fotos { display: flex; align-items: center; padding-left: 1px; }
.t2 .avatar { width: 42px; height: 42px; border-width: 2px; padding: 1.5px; box-shadow: 0 0 0 2px #121926, 0 0 14px -3px var(--c); }
.t2 .avatar + .avatar { margin-left: -12px; }
.t2 .avatar__inner { font-size: 12px; }
.t2--eleito .avatar { width: 46px; height: 46px; box-shadow: 0 0 0 2px #121926, 0 0 18px -2px var(--c); }
.t2__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.t2__tag, .t2__nomes, .t2__sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2__tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--tom); }
.t2__tag svg { margin-left: 5px; vertical-align: -0.5px; }
.t2__tse { display: inline-block; margin-left: 6px; padding: 0 4px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--tom) 50%, transparent); font-size: 9px; line-height: 13px; letter-spacing: 0.4px; vertical-align: 1px; }
.t2__nomes { font-size: 14.5px; font-weight: 700; letter-spacing: -0.1px; color: #fff; }
.t2__nomes i { font-style: normal; font-weight: 500; color: var(--muted); margin: 0 6px; }
.t2__sub { font-size: 11.5px; color: var(--text-2); opacity: 0.88; }
.t2__sub .tag-estimativa { vertical-align: 1px; margin-right: 6px; }
.t2__conta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; height: 46px; padding: 0 8px; border-radius: 9px; line-height: 1;
  background: rgba(6, 9, 15, 0.5); border: 1px solid color-mix(in srgb, var(--tom) 28%, #252d3d);
}
.t2__conta b { font-size: 21px; font-weight: 800; letter-spacing: -0.6px; color: #fff; margin: 2px 0 1px; text-shadow: 0 0 16px color-mix(in srgb, var(--tom) 65%, transparent); }
.t2__conta small { font-size: 9px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.t2__conta--pct b { font-size: 17px; margin-top: 0; }
.t2__conta b.t2__hoje { font-size: 15px; text-transform: uppercase; letter-spacing: 0; }

.t2m__hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px;
  margin-bottom: 20px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, #6d86ff 30%, #252d3d);
  background: radial-gradient(120% 180% at 0% 0%, rgba(109, 134, 255, 0.16), transparent 55%), linear-gradient(180deg, #131a28, #0f141e);
  box-shadow: 0 18px 40px -30px rgba(109, 134, 255, 0.9);
}
.t2m__conta { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 92px; height: 92px; border-radius: 14px; background: rgba(6, 9, 15, 0.55); border: 1px solid rgba(109, 134, 255, 0.35); }
.t2m__conta b { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; color: #fff; text-shadow: 0 0 24px rgba(109, 134, 255, 0.7); }
.t2m__conta b.t2m__hoje { font-size: 24px; letter-spacing: -0.5px; }
.t2m__conta span { margin-top: 5px; font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.t2m__quando { min-width: 0; }
.t2m__dia { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.t2m__falta { margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
.t2m__linha { position: relative; height: 6px; margin: 14px 6px 0 0; border-radius: 3px; background: #1a2030; }
.t2m__linha i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #3443c9, #6d86ff); }
.t2m__linha i::after { content: ''; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(109, 134, 255, 0.35), 0 0 12px rgba(109, 134, 255, 0.8); }
.t2m__marcos { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 11px; color: var(--muted); }
.t2m__bloco + .t2m__bloco { margin-top: 22px; }
.t2m__sec { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 15px; font-weight: 700; color: #fff; }
.t2m__sec .pill { margin-left: 0; vertical-align: 0; }
.t2m__par { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.t2m__par--um { grid-template-columns: minmax(0, 1fr); max-width: 340px; }
.t2m__x { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #151b27; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; font-weight: 700; }
.t2m__cand {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; min-width: 0;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 20%, #131925), #131925 65%);
  border: 1px solid color-mix(in srgb, var(--c) 40%, #1d2432);
  box-shadow: 0 14px 30px -24px var(--c);
}
.t2m__info { min-width: 0; }
.t2m__nome { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2m__part { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.2px; text-transform: uppercase; color: color-mix(in srgb, var(--c) 70%, #c9cfdb); }
.t2m__num { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 6px; }
.t2m__num b { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.t2m__num small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.t2m__cara { display: flex; gap: 2px; height: 8px; margin-top: 12px; border-radius: 4px; overflow: hidden; }
.t2m__cara i { background: var(--c); box-shadow: 0 0 10px -2px var(--c); }
.t2m__cara-leg { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.t2m__cara-leg span:first-child, .t2m__cara-leg span:last-child { color: var(--text-2); font-weight: 600; }
.t2m__nota { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.t2m__nota b { color: var(--text-2); font-weight: 600; }
.t2m__nota--topo { margin: -2px 0 10px; }
.t2m__nota .tag-estimativa { margin-right: 6px; }
.t2m__sim {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; margin-top: 14px; padding: 0 16px;
  border-radius: 10px; border: 1px solid #5a6cff; background: linear-gradient(180deg, #4255e6, #3443c9);
  color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 22px -10px rgba(67, 87, 236, 0.8);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.t2m__sim:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px rgba(67, 87, 236, 0.95); }
.t2m__sim.is-busy { opacity: 0.6; pointer-events: none; }
.t2m__erro { margin: 8px 0 0; font-size: 12px; color: #ff8189; }
.t2m__resumo { margin: -2px 0 4px; font-size: 12.5px; color: var(--text-2); }
.t2m__resumo b { color: #fff; }
.t2m__grupo { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.t2m__grupo small { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.t2m__lista { display: flex; flex-direction: column; gap: 6px; }
.t2m__uf { display: grid; grid-template-columns: 34px minmax(0, 1fr) 88px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--row); border: 1px solid #1d2432; }
.t2m__uf--oficial { grid-template-columns: 34px minmax(0, 1fr); }
.t2m__uf .uf-chip { margin-right: 0; justify-self: start; }
.t2m__duelo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.t2m__vs { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.t2m__p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.t2m__pinfo { display: flex; flex-direction: column; min-width: 0; }
.t2m__pinfo b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2m__pinfo small { display: flex; align-items: center; gap: 5px; margin-top: 1px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.t2m__cad { display: inline-flex; color: #9fb0ff; }
.t2m__prov { font-size: 10.5px; font-weight: 600; color: #f5c46b; text-transform: none; letter-spacing: 0; }

@media (max-width: 640px) {
  .t2 { height: 58px; gap: 0 10px; padding: 0 7px 0 7px; }
  .t2 .avatar { width: 38px; height: 38px; }
  .t2--eleito .avatar { width: 42px; height: 42px; }
  .t2__nomes { font-size: 13.5px; }
  .t2__nomes i { margin: 0 4px; }
  .t2__conta { min-width: 48px; height: 44px; padding: 0 6px; }
  .t2__conta b { font-size: 19px; }
  .t2m__hero { gap: 14px; padding: 14px; }
  .t2m__conta { width: 72px; height: 72px; border-radius: 12px; }
  .t2m__conta b { font-size: 30px; }
  .t2m__dia { font-size: 15.5px; }
  .t2m__par { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .t2m__x { justify-self: center; width: 26px; height: 26px; font-size: 12px; }
  .t2m__cand { grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 12px; }
  .t2m__num { grid-column: auto; flex-direction: column; align-items: flex-end; margin-top: 0; }
  .t2m__num b { font-size: 20px; }
  .t2m__num small { font-size: 11px; }
  .t2m__uf, .t2m__uf--oficial { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
  .t2m__uf .el-apurado { grid-column: 2; }
  .t2m__duelo { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .t2m__vs { display: none; }
}

/* Modo TV */
.tv { cursor: none; }
.tv .search, .tv .tabs__menu { visibility: hidden; }
.tv-barra { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 12px; border-radius: 999px; background: rgba(14, 19, 28, 0.88); border: 1px solid var(--line-2); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7); font-size: 12.5px; color: var(--text-2); overflow: hidden; cursor: auto; }
.tv-barra__tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; color: #f5c46b; }
.tv-barra__txt { color: #fff; font-weight: 600; }
.tv-barra__prox { color: var(--muted); font-variant-numeric: tabular-nums; }
.tv-barra__sair { border: 1px solid var(--line-2); background: #151b27; color: var(--text-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.tv-barra__tempo { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #f5b13d; transform-origin: left; animation: aviso-tempo 15s linear forwards; }

/* Radar: linha no topo que corre a cada checagem do TSE (5 s) e pisca verde com dado novo. */
.radar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; pointer-events: none; overflow: hidden; }
.radar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, transparent, rgba(91, 147, 255, 0.55)); opacity: 0; }
.radar--checa i { animation: radar-corre 5s linear forwards; }
.radar--novo i { background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), #22c55e); animation: radar-novo 1.6s ease-out forwards; }
@keyframes radar-corre { 0% { transform: scaleX(0); opacity: 1; } 92% { opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes radar-novo { 0% { transform: scaleX(0); opacity: 1; } 35% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.live__sub [data-desde] { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ simulador do 2º turno */
/* Modal mais largo só quando mostra o simulador (controles e resultado lado a lado). */
.modal__card:has(> #modal-body > .sim) { width: min(1040px, 100%); max-height: min(92vh, 980px); }
.sim { container: sim / inline-size; --ca: #3d7bf5; --cb: #ef4b55; }
.sim__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sim__kicker { display: block; margin: 0 44px 6px 0; font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.modal .sim__topo .card__sub { margin-bottom: 10px; }
.sim__aviso { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 8px 12px; border-radius: 9px; background: rgba(245, 177, 61, 0.08); border: 1px solid rgba(245, 177, 61, 0.32); color: #f5c46b; font-size: 12.5px; line-height: 1.4; }
.sim__aviso b { color: #ffd58a; font-weight: 600; }
.sim__aviso svg { flex-shrink: 0; }

/* Celular e telas estreitas: uma coluna, placar grudado no topo enquanto a pessoa mexe nas linhas. */
.sim__grade { display: flex; flex-direction: column; gap: 12px; }
.sim__res { display: contents; }
.sim__placar {
  order: -1; position: sticky; top: 0; z-index: 3; padding: 11px 13px 10px; border-radius: 12px; border: 1px solid var(--line-2);
  background:
    radial-gradient(90% 160% at 0% 0%, color-mix(in srgb, var(--ca) 17%, transparent), transparent 62%),
    radial-gradient(90% 160% at 100% 0%, color-mix(in srgb, var(--cb) 17%, transparent), transparent 62%),
    #10151f;
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.95);
}
/* O placar gruda abaixo do padding do modal: esta faixa na cor do modal esconde as linhas que
   passariam por esse vão. Parado, ela cai sobre a margem do aviso (mesma cor, invisível). */
.sim__placar::before { content: ''; position: absolute; left: -1px; right: -1px; bottom: 100%; height: 22px; background: #0f141e; }
.sim__aviso { margin-bottom: 22px; }
@media (max-width: 640px) {
  .sim__placar::before { height: 16px; }
  .sim__aviso { margin-bottom: 16px; }
}
.sim__duelo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; }
.sim__lado { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.sim__lado--b { align-items: flex-end; text-align: right; }
.sim__ltopo { display: none; align-items: center; gap: 8px; margin-bottom: 8px; }
.sim__lado--b .sim__ltopo { flex-direction: row-reverse; }
.sim__lnome { max-width: 100%; font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 55%, #eef2f8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim__lpart { display: none; font-size: 11px; font-weight: 600; letter-spacing: 0.2px; color: color-mix(in srgb, var(--c) 70%, #c9cfdb); margin-top: 1px; }
.sim__lpct { font-size: 23px; font-weight: 800; line-height: 1.1; letter-spacing: -0.6px; color: var(--text-2); font-variant-numeric: tabular-nums; transition: color 0.3s, text-shadow 0.3s; }
.sim__lado.is-win .sim__lpct { color: #fff; text-shadow: 0 0 18px color-mix(in srgb, var(--c) 75%, transparent); }
.sim__lvotos { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sim__x { padding-bottom: 16px; color: var(--muted-2); font-size: 13px; font-weight: 600; }
.sim__venc { display: none; padding: 2px 8px; border-radius: 999px; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; box-shadow: 0 0 14px -3px var(--c); }
.sim__barra { position: relative; display: flex; gap: 3px; height: 12px; margin: 9px 0 8px; }
.sim__barra > i { flex: 0 0 auto; height: 100%; min-width: 6px; border-radius: 6px; transition: width 0.55s var(--ease-out), box-shadow 0.4s; }
.sim__ba { background: linear-gradient(90deg, color-mix(in srgb, var(--ca) 65%, #000), var(--ca)); }
.sim__bb { background: linear-gradient(90deg, var(--cb), color-mix(in srgb, var(--cb) 65%, #000)); }
.sim__ba.is-win { box-shadow: 0 0 16px -3px var(--ca); }
.sim__bb.is-win { box-shadow: 0 0 16px -3px var(--cb); }
.sim__meio { position: absolute; left: 50%; top: -4px; bottom: -4px; border-left: 1.5px dashed rgba(255, 255, 255, 0.6); }
.sim__meio span { display: none; position: absolute; top: -15px; left: -11px; font-size: 9.5px; color: #8a93a6; }
.sim__frase { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.sim__frase b { color: #fff; font-weight: 700; }
.sim__frase .sim__quem { color: color-mix(in srgb, var(--c) 45%, #fff); }
.sim__selo { margin: 4px 0 0; font-size: 10.5px; font-weight: 600; color: #f5c46b; }

.sim__det { order: 2; padding: 13px 14px 14px; border-radius: 12px; background: #121824; border: 1px solid var(--line-2); }
.sim__stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 12.5px; color: var(--muted); }
.sim__stat b { color: #fff; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.sim__share {
  width: 100%; height: 42px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 10px; border: 1px solid #5a6cff; background: linear-gradient(180deg, #4255e6, #3443c9); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 22px -10px rgba(67, 87, 236, 0.8); transition: transform 0.2s var(--ease-out), box-shadow 0.2s, opacity 0.2s;
}
.sim__share:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(67, 87, 236, 0.95); }
.sim__share:disabled { opacity: 0.65; cursor: progress; transform: none; }
.sim__share:focus-visible, .sim__preset:focus-visible { outline: 2px solid #8fa7ff; outline-offset: 2px; }

/* Cenários prontos */
.sim__presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sim__preset { height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: #121824; color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s; }
.sim__preset:hover { color: #fff; border-color: #34405a; }
.sim__preset[aria-pressed='true'] { background: #1d2540; border-color: #4357ec; color: #fff; box-shadow: 0 0 16px -6px rgba(67, 87, 236, 0.9); }
/* Altura reservada para o texto mais longo: trocar de cenário não empurra as linhas no meio do arraste. */
.sim__desc { margin: 9px 0 12px; min-height: 54px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.sim__desc b { color: var(--text-2); font-weight: 600; }

/* Linhas: um eliminado (ou brancos e nulos, abstenção) por cartão */
.sim__fontes { display: flex; flex-direction: column; gap: 8px; }
.sim__fonte { position: relative; overflow: hidden; padding: 11px 12px 14px; border-radius: 12px; background: var(--row); border: 1px solid #1d2432; transition: border-color 0.2s, box-shadow 0.2s; }
.sim__fonte:focus-within { border-color: color-mix(in srgb, var(--c) 40%, #2a3346); box-shadow: 0 0 22px -14px var(--c); }
.sim__fonte.is-off { padding-bottom: 11px; background: transparent; border-style: dashed; }
.sim__fhead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sim__finfo { flex: 1; min-width: 0; }
.sim__fnome { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim__fsub { margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.sim__ico { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: #1a2030; border: 1px solid var(--line-2); color: var(--text-2); }
.sim__linha { display: grid; gap: 2px; margin-top: 8px; }
.sim__linha--lado { transition: opacity 0.25s; }
.sim__fonte.is-zero .sim__linha--lado { opacity: 0.45; }
.sim__rot { font-size: 11.5px; font-weight: 500; color: var(--muted); }
/* Pontas com largura fixa nos dois controles: os trilhos ficam alinhados. */
.sim__lctrl, .sim__pctrl { display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; align-items: center; gap: 10px; }
.sim__pctrl > b { text-align: right; font-size: 13.5px; color: #fff; font-variant-numeric: tabular-nums; }
.sim__ponta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sim__ponta--b { align-items: flex-end; text-align: right; }
.sim__ponta small { max-width: 100%; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim__ponta b { font-size: 13.5px; color: #fff; font-variant-numeric: tabular-nums; }
.sim__leg { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.sim__leg span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sim__leg i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sim__leg-f i { background: #2a3142; box-shadow: inset 0 0 0 1px #3a4458; }
.sim__leg b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.sim__tira { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; display: flex; background: #1a2030; }
.sim__tira i { height: 100%; transition: width 0.35s var(--ease-out); }
.sim__ta { background: var(--ca); }
.sim__tb { background: var(--cb); }
.sim__fonte.is-off .sim__tira { display: none; }

/* Controles deslizantes (alvo grande para o dedo; trilho em cores, polegar com brilho) */
.sim__slider { position: relative; display: block; min-width: 0; }
.sim__slider--lado::before { content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 16px; margin: -8px 0 0 -1px; border-radius: 1px; background: rgba(255, 255, 255, 0.35); pointer-events: none; }
.sim__range {
  --trk: #252c3c; --th: #7d93ff;
  position: relative; z-index: 1; display: block; width: 100%; height: 32px; margin: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.sim__range:focus { outline: none; }
.sim__slider--lado .sim__range { --trk: linear-gradient(90deg, color-mix(in srgb, var(--ca) 72%, #0e131c), color-mix(in srgb, var(--cb) 72%, #0e131c)); }
.sim__range--part { --v: 0%; --trk: linear-gradient(90deg, #7d93ff var(--v), #252c3c var(--v)); }
.sim__range::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--trk); }
.sim__range::-moz-range-track { height: 8px; border-radius: 4px; background: var(--trk); }
.sim__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%;
  background: #fff; border: 5px solid var(--th); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 14px -2px var(--th); transition: transform 0.15s var(--ease-out);
}
.sim__range::-moz-range-thumb { box-sizing: border-box; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid var(--th); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 14px -2px var(--th); }
.sim__range:active::-webkit-slider-thumb { transform: scale(1.12); }
.sim__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(125, 147, 255, 0.45), 0 0 14px -2px var(--th); }
.sim__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(125, 147, 255, 0.45), 0 0 14px -2px var(--th); }

/* Abstenção: chave liga/desliga */
.sim__switch { position: relative; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.sim__switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sim__switch i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #252c3c; border: 1px solid var(--line-2); transition: background 0.2s, border-color 0.2s; }
.sim__switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c9cfdb; transition: transform 0.2s var(--ease-out), background 0.2s; }
.sim__switch input:checked + i { background: #3443c9; border-color: #5a6cff; }
.sim__switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.sim__switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(90, 108, 255, 0.45); }

/* Tablet: rótulo à esquerda do controle e cenários numa linha. */
@container sim (min-width: 560px) {
  .sim__presets { display: flex; flex-wrap: wrap; }
  .sim__desc { min-height: 36px; }
  .sim__fsub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sim__linha { grid-template-columns: 138px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 6px; }
  .sim__leg { margin-top: 6px; padding-left: 150px; }
}

/* Computador: controles à esquerda e resultado fixo à direita. */
@container sim (min-width: 860px) {
  .sim__grade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
  .sim__res { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 4px; }
  .sim__placar { position: relative; top: auto; padding: 16px 16px 14px; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9); }
  .sim__placar::before { display: none; }
  .sim__ltopo { display: flex; }
  .sim__lado.is-win .sim__venc { display: inline-block; }
  .sim__lnome { font-size: 14px; color: #fff; }
  .sim__lpart { display: block; }
  .sim__lpct { font-size: 32px; margin-top: 6px; }
  .sim__lvotos { font-size: 11.5px; margin-top: 2px; }
  .sim__x { padding-bottom: 30px; font-size: 15px; }
  .sim__barra { height: 16px; margin: 26px 0 12px; }
  .sim__barra > i { border-radius: 8px; }
  .sim__meio span { display: block; }
  .sim__frase { font-size: 14px; }
  .sim__selo { margin-top: 8px; }
}

/* O bloco global acima não alcança o polegar dos controles (pseudoelemento do navegador). */
@media (prefers-reduced-motion: reduce) {
  .sim__range::-webkit-slider-thumb { transition: none; }
}
