/* =============================================================================
   Radar Eleitoral — design system
   Mobile-first · tema claro/escuro · sem fontes externas · CSS puro
   Cores de candidatos = paleta categórica validada para daltonismo (ordem fixa).
   ========================================================================== */

:root {
  color-scheme: light;
  --page: #f4f3ee;
  --surface: #fcfcfb;
  --surface-2: #f0efe9;
  --surface-3: #e8e7e0;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6b6a65;
  --axis: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, .10);
  --border-strong: rgba(11, 11, 11, .20);
  --overlay: rgba(11, 11, 11, .45);

  /* candidatos (slots 1..8) */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100;
  --c5: #e87ba4; --c6: #008300; --c7: #4a3aa7; --c8: #e34948;
  --c-other: #8a8984;

  /* rampas sequenciais do mapa (passo 1 = margem pequena, 5 = grande) */
  --r1-1: #82b7fc; --r1-2: #589bf2; --r1-3: #3580dc; --r1-4: #1c66bd; --r1-5: #044e9b;
  --r2-1: #fd946e; --r2-2: #ef6d3b; --r2-3: #ce5625; --r2-4: #ab4111; --r2-5: #872f05;
  --r3-1: #5bcd9b; --r3-2: #2ab47f; --r3-3: #189769; --r3-4: #0d7a54; --r3-5: #0c5f40;
  --r0-1: #b5b4af; --r0-2: #9b9a95; --r0-3: #81807b; --r0-4: #686863; --r0-5: #51504b;
  --map-empty: #e4e3dc;
  --map-stroke: #fcfcfb;

  /* status (reservado: sempre com ícone + texto) */
  --good: #0ca30c; --good-text: #006300;
  --warn: #fab219; --warn-text: #7a5200;
  --serious: #ec835a;
  --crit: #d03b3b; --crit-text: #b02a2a;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(11, 11, 11, .03), 0 2px 8px rgba(11, 11, 11, .04);
  --shadow-lg: 0 10px 40px rgba(11, 11, 11, .14);
  --gutter: 16px;
  --container: 1240px;
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2c2c2a;
    --ink: #ffffff; --ink-2: #c3c2b7; --muted: #a3a29b; --axis: #898781; --grid: #2c2c2a; --baseline: #45453f;
    --border: rgba(255, 255, 255, .10); --border-strong: rgba(255, 255, 255, .22); --overlay: rgba(0, 0, 0, .6);
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
    --r1-1: #004d9c; --r1-2: #1a66be; --r1-3: #3580dd; --r1-4: #569bf4; --r1-5: #80b7ff;
    --r2-1: #872f06; --r2-2: #ad3f0b; --r2-3: #ce5523; --r2-4: #ef6d3b; --r2-5: #fe946d;
    --r3-1: #015f40; --r3-2: #037b53; --r3-3: #159769; --r3-4: #29b47f; --r3-5: #59ce9b;
    --r0-1: #51504b; --r0-2: #686863; --r0-3: #81807b; --r0-4: #9b9a95; --r0-5: #b5b4af;
    --map-empty: #2a2a28; --map-stroke: #1a1a19;
    --good-text: #3fcf3f; --warn-text: #fab219; --crit-text: #ff8a8a;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2c2c2a;
  --ink: #ffffff; --ink-2: #c3c2b7; --muted: #a3a29b; --axis: #898781; --grid: #2c2c2a; --baseline: #45453f;
  --border: rgba(255, 255, 255, .10); --border-strong: rgba(255, 255, 255, .22); --overlay: rgba(0, 0, 0, .6);
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --r1-1: #004d9c; --r1-2: #1a66be; --r1-3: #3580dd; --r1-4: #569bf4; --r1-5: #80b7ff;
  --r2-1: #872f06; --r2-2: #ad3f0b; --r2-3: #ce5523; --r2-4: #ef6d3b; --r2-5: #fe946d;
  --r3-1: #015f40; --r3-2: #037b53; --r3-3: #159769; --r3-4: #29b47f; --r3-5: #59ce9b;
  --r0-1: #51504b; --r0-2: #686863; --r0-3: #81807b; --r0-4: #9b9a95; --r0-5: #b5b4af;
  --map-empty: #2a2a28; --map-stroke: #1a1a19;
  --good-text: #3fcf3f; --warn-text: #fab219; --crit-text: #ff8a8a;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .6);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
small, .small { font-size: .8125rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.125em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ----------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand small { font-weight: 600; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; display: block; line-height: 1; margin-top: 2px; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.nav { display: none; margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: .92rem; font-weight: 550; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-3); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav + .header-actions { margin-left: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; font-size: 1.2rem; }
.icon-btn:hover { background: var(--surface-2); }
.menu-btn[aria-expanded="true"] { background: var(--surface-3); }
.live-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--crit); color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--page); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mobile-nav a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.mobile-nav a[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-btn { display: none; }
  .mobile-nav, .mobile-nav.open { display: none; }
}
@media (max-width: 380px) { .brand small { display: none; } .live-chip { padding: 0 9px; } .live-chip .live-text { display: none; } }

/* faixas */
.demo-banner { background: repeating-linear-gradient(-45deg, #fff3c4, #fff3c4 12px, #ffe89a 12px, #ffe89a 24px); color: #3d2e00; border-bottom: 1px solid #e8c34a; font-size: .875rem; }
.demo-banner .container { display: flex; gap: 10px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.demo-banner strong { letter-spacing: .06em; }
:root[data-theme="dark"] .demo-banner { background: repeating-linear-gradient(-45deg, #3a2f05, #3a2f05 12px, #463909 12px, #463909 24px); color: #ffe7a0; border-color: #6b5410; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .demo-banner { background: repeating-linear-gradient(-45deg, #3a2f05, #3a2f05 12px, #463909 12px, #463909 24px); color: #ffe7a0; border-color: #6b5410; } }
.ticker { border-bottom: 1px solid var(--border); background: var(--surface); font-size: .875rem; }
.ticker .container { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.ticker a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ticker-label { font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }

/* ----------------------------------------------------------------- layout */
main { display: block; padding-bottom: 48px; }
.page-head { padding-top: 28px; padding-bottom: 8px; }
.page-head .lead { font-size: 1.075rem; color: var(--ink-2); max-width: 68ch; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.section { padding-top: 28px; padding-bottom: 8px; }
.section + .section { border-top: 1px solid var(--border); margin-top: 20px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head .more { font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.section-head .more:hover { text-decoration: underline; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
  .grid-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
  .grid-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; }
}
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
@media (min-width: 768px) { .card { padding: 22px; } }
.card-flat { box-shadow: none; }
.card h3 { margin-bottom: 4px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.card-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.card-link { text-decoration: none; display: block; transition: border-color .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--border-strong); }

/* ------------------------------------------------- selos de proveniência */
.prov { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .72rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap; color: var(--ink-2); background: var(--surface); text-decoration: none; vertical-align: middle; }
.prov .icon { width: 13px; height: 13px; }
.prov-oficial { color: var(--good-text); border-color: color-mix(in srgb, var(--good) 55%, transparent); background: color-mix(in srgb, var(--good) 8%, var(--surface)); }
.prov-pesquisa { color: var(--ink); }
.prov-estimativa { background: var(--surface-2); }
.prov-previsao { background: var(--surface-2); color: var(--ink); border-color: var(--ink-2); }
.prov-ia { border-style: dashed; color: var(--ink); }
.prov-terceiros { color: var(--ink-2); }
.prov-demo { background: #fff0b8; color: #3d2e00; border-color: #d9b23a; }
:root[data-theme="dark"] .prov-demo { background: #3a2f05; color: #ffe7a0; border-color: #6b5410; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .prov-demo { background: #3a2f05; color: #ffe7a0; border-color: #6b5410; } }
.rel { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.rel-bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.rel-bars i { display: block; width: 3px; border-radius: 1px; background: var(--grid); }
.rel-bars i:nth-child(1) { height: 5px; } .rel-bars i:nth-child(2) { height: 8px; } .rel-bars i:nth-child(3) { height: 11px; } .rel-bars i:nth-child(4) { height: 14px; }
.rel-bars i.on { background: var(--ink-2); }

.disclaimer { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .875rem; color: var(--ink-2); }
.disclaimer .icon { margin-top: 3px; font-size: 1rem; color: var(--ink); }
.disclaimer a { font-weight: 600; color: var(--ink); }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: .9rem; }
.notice-warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.notice-crit { border-color: color-mix(in srgb, var(--crit) 50%, transparent); background: color-mix(in srgb, var(--crit) 7%, var(--surface)); }
.notice-ok { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 7%, var(--surface)); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-2); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 1.02rem; }

/* ------------------------------------------------------- candidatos/chips */
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--cand, var(--c-other)); flex: none; }
.swatch-line { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: var(--cand, var(--c-other)); flex: none; vertical-align: middle; }
.cand-chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; }
.cand-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; background: var(--cand, var(--c-other)); overflow: hidden; border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--cand, var(--c-other)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.party { font-size: .78rem; font-weight: 600; color: var(--muted); }

/* ---------------------------------------------------------------- hero */
.hero { padding-top: 22px; padding-bottom: 8px; }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.round-pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 750; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.phase { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .hero-card { padding: 28px; } }
.hero-title { font-size: clamp(.8rem, .75rem + .2vw, .9rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.duel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; align-items: end; }
.duel-side { min-width: 0; }
.duel-side.right { text-align: right; }
.duel-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: clamp(.95rem, .85rem + .5vw, 1.25rem); margin-bottom: 4px; min-width: 0; }
.duel-side.right .duel-name { justify-content: flex-end; }
.duel-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.big { font-size: clamp(2.6rem, 1.6rem + 5.2vw, 5.4rem); font-weight: 750; letter-spacing: -.045em; line-height: .95; }
.big small { font-size: .42em; letter-spacing: -.02em; font-weight: 650; margin-left: 2px; }
.duel-sub { color: var(--ink-2); font-size: .9rem; margin-top: 6px; }
.splitbar { position: relative; display: flex; height: 18px; border-radius: 6px; overflow: hidden; margin: 16px 0 8px; background: var(--surface-3); gap: 2px; }
.splitbar > span { display: block; height: 100%; background: var(--cand); transition: width .6s cubic-bezier(.2, .7, .2, 1); min-width: 2px; }
.splitbar .mid { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; background: var(--ink); transform: translateX(-1px); opacity: .7; }
.splitbar-legend { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-top: 18px; }
.facts > div { background: var(--surface); padding: 10px 12px; min-width: 0; }
.facts dt { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* listas de barras (N candidatos) */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.bars li:last-child { border-bottom: 0; }
.bars .bar { grid-column: 1 / -1; height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bars .bar span { display: block; height: 100%; background: var(--cand); border-radius: 0 4px 4px 0; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.bars .val { font-weight: 750; font-variant-numeric: tabular-nums; }
.bars .sub { font-size: .8rem; color: var(--muted); font-weight: 500; }
.bars .winner .val::after { content: " ✓"; color: var(--good-text); }

/* progress (seções totalizadas) */
.meter { height: 12px; background: color-mix(in srgb, var(--ink) 12%, var(--surface)); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ink); border-radius: 999px; transition: width .6s ease; }
.meter-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 8px; }
.meter-label strong { font-size: 1.5rem; letter-spacing: -.02em; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.stat .label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat .delta { font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.delta-up::before { content: "▲ "; font-size: .7em; }
.delta-down::before { content: "▼ "; font-size: .7em; }

/* favoritismo */
.fav-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fav-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); position: relative; overflow: hidden; }
.fav-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cand); }
.fav-score { font-size: clamp(2.4rem, 2rem + 2vw, 3.4rem); font-weight: 780; letter-spacing: -.04em; line-height: 1; }
.fav-score small { font-size: .38em; color: var(--muted); font-weight: 650; letter-spacing: 0; }
.comp { list-style: none; margin: 12px 0 0; padding: 0; font-size: .82rem; }
.comp li { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 2px 8px; align-items: center; padding: 4px 0; }
.comp .track { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.comp .track span { display: block; height: 100%; background: var(--cand); opacity: .85; }
.comp .pts { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }

/* probabilidade */
.prob { display: grid; gap: 14px; }
.prob-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.prob-row .pv { font-size: 2rem; font-weight: 780; letter-spacing: -.03em; }
.prob-row .bar { grid-column: 1 / -1; height: 14px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.prob-row .bar span { display: block; height: 100%; background: var(--cand); }
.interval { position: relative; height: 26px; margin-top: 4px; }
.interval .axis { position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--baseline); }
.interval .range { position: absolute; top: 7px; height: 11px; border-radius: 6px; background: var(--cand); opacity: .28; }
.interval .point { position: absolute; top: 4px; width: 4px; height: 17px; border-radius: 2px; background: var(--cand); transform: translateX(-2px); }
.interval .fifty { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: .5; }

/* ----------------------------------------------------------------- charts */
.chart-wrap { position: relative; width: 100%; }
.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.chart text { fill: var(--axis); font-size: 12px; }
.chart .tick-label { font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--baseline); stroke-width: 1; shape-rendering: crispEdges; }
.chart .line { fill: none; stroke: var(--cand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .band { fill: var(--cand); fill-opacity: .1; stroke: none; }
.chart .pt { fill: var(--cand); fill-opacity: .32; }
.chart .end { fill: var(--cand); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font-weight: 700; font-size: 12.5px; }
.chart .end-name { fill: var(--ink-2); font-size: 11.5px; }
.chart .ref { stroke: var(--ink); stroke-opacity: .35; stroke-width: 1; }
.chart .ref-label { fill: var(--muted); font-size: 11px; }
.chart .crosshair { stroke: var(--ink); stroke-opacity: .5; stroke-width: 1; pointer-events: none; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar-mark { fill: var(--cand); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; margin: 0 0 10px; padding: 0; list-style: none; }
.chart-legend li { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.chart-note { font-size: .78rem; color: var(--muted); margin-top: 8px; }
details.table-view { margin-top: 10px; }
details.table-view summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; }
.tooltip { position: fixed; z-index: 60; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: .84rem; min-width: 160px; max-width: 280px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tooltip.show { opacity: 1; transform: none; }
.tt-title { font-weight: 750; margin-bottom: 6px; font-size: .86rem; }
.tt-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 2px 0; }
.tt-row b { font-variant-numeric: tabular-nums; font-size: .95rem; }
.tt-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); min-width: 0; }
.tt-note { margin-top: 6px; font-size: .74rem; color: var(--muted); }

/* ------------------------------------------------------------------- mapa */
.map-shell { display: grid; gap: 16px; }
@media (min-width: 1024px) { .map-shell { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--border); max-width: 100%; }
.seg a, .seg button { min-height: 36px; padding: 6px 12px; border-radius: 9px; border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink-2); text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg-scroll { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll a { white-space: nowrap; }
.map-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.map-svg { display: block; width: 100%; height: auto; max-height: 76vh; margin: 0 auto; touch-action: manipulation; }
.map-svg .uf { stroke: var(--map-stroke); stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; transition: opacity .15s; outline: none; }
.map-svg .uf.empty { fill: var(--map-empty); }
.map-svg .uf:hover, .map-svg .uf.active, .map-svg .uf:focus-visible { stroke: var(--ink); stroke-width: 2.4; }
.map-svg .uf-label { fill: var(--ink); font-size: 15px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.map-svg .bubble { stroke: var(--surface); stroke-width: 1.5; fill-opacity: .85; pointer-events: none; }
.map-svg.has-bubbles .uf { fill: var(--map-empty); }
.tilemap .tile { stroke: var(--map-stroke); stroke-width: 2; rx: 6; cursor: pointer; }
.tilemap .tile:hover, .tilemap .tile.active, .tilemap .tile:focus-visible { stroke: var(--ink); stroke-width: 2.5; }
.tilemap .tile-label { font-size: 13px; font-weight: 750; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.tilemap .tile-sub { font-size: 10px; font-weight: 600; pointer-events: none; text-anchor: middle; opacity: .9; }
.tilemap text.s0, .tilemap text.s1, .tilemap text.s2 { fill: #0b0b0b; }
.tilemap text.s3, .tilemap text.s4, .tilemap text.s5 { fill: #ffffff; }
.tilemap text.s0 { fill: var(--ink); }
:root[data-theme="dark"] .tilemap text.s1, :root[data-theme="dark"] .tilemap text.s2, :root[data-theme="dark"] .tilemap text.s3 { fill: #ffffff; }
:root[data-theme="dark"] .tilemap text.s4, :root[data-theme="dark"] .tilemap text.s5 { fill: #0b0b0b; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .tilemap text.s1, :root:where(:not([data-theme="light"])) .tilemap text.s2, :root:where(:not([data-theme="light"])) .tilemap text.s3 { fill: #ffffff; }
  :root:where(:not([data-theme="light"])) .tilemap text.s4, :root:where(:not([data-theme="light"])) .tilemap text.s5 { fill: #0b0b0b; }
}
.theme-btn .i-light { display: none; }
:root[data-theme="dark"] .theme-btn .i-light { display: inline; }
:root[data-theme="dark"] .theme-btn .i-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .theme-btn .i-light { display: inline; }
  :root:where(:not([data-theme="light"])) .theme-btn .i-dark { display: none; }
}
.map-legend { font-size: .8rem; }
.legend-grid { display: grid; gap: 6px; }
.legend-row { display: grid; grid-template-columns: minmax(70px, 120px) repeat(5, minmax(0, 1fr)); gap: 2px; align-items: center; }
.legend-row .ln { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.legend-row i { display: block; height: 14px; }
.legend-bins { display: grid; grid-template-columns: minmax(70px, 120px) repeat(5, minmax(0, 1fr)); gap: 2px; color: var(--muted); font-size: .7rem; text-align: center; }
.state-panel { min-height: 120px; }
.state-panel h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.uf-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.uf-list a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-size: .88rem; font-weight: 600; }
.uf-list a:hover { border-color: var(--border-strong); }
.uf-list .uf-fill { width: 14px; height: 14px; border-radius: 3px; flex: none; }

/* ----------------------------------------------------------------- tabelas */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
th button.sort { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-transform: inherit; letter-spacing: inherit; display: inline-flex; gap: 4px; align-items: center; }
.cell-cand { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }

/* cards de pesquisa (mobile) */
.poll-list { display: grid; gap: 10px; }
.poll-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.poll-card header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.poll-card h3 { font-size: 1rem; margin: 0; }
.poll-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.poll-results { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.poll-results li { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 4px 8px; align-items: center; font-size: .88rem; }
.poll-results .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.poll-results .bar span { display: block; height: 100%; background: var(--cand); }
.poll-results b { text-align: right; font-variant-numeric: tabular-nums; }
.only-desktop { display: none; }
@media (min-width: 900px) { .only-desktop { display: block; } .only-mobile { display: none; } }

/* filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field .lbl { font-size: .76rem; font-weight: 650; color: var(--ink-2); }
.filters .field { flex: 1 1 140px; }
select, input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="url"], input[type="password"], textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; max-width: 100%;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface); font: inherit; font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); opacity: 1; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-arrow { font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.link-arrow:hover { text-decoration: underline; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }

/* notícias */
.news-list { display: grid; gap: 12px; }
.news-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.news-item h3 { font-size: 1.02rem; margin: 6px 0; line-height: 1.3; }
.news-item h3 a { text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; }
.news-item p { color: var(--ink-2); font-size: .9rem; margin: 0 0 8px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .78rem; color: var(--muted); }
.news-item.sponsored { border-style: dashed; }
.sponsored-label { font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.evidence { margin: 8px 0 0; padding-left: 18px; font-size: .8rem; color: var(--ink-2); }

/* alertas */
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.alerts li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.alerts li:last-child { border-bottom: 0; }
.alerts .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); margin-top: 6px; }
.alerts .high .dot { background: var(--crit); }
.alerts .t { font-weight: 650; font-size: .95rem; line-height: 1.35; }
.alerts .b { font-size: .85rem; color: var(--ink-2); }
.alerts .m { font-size: .75rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }

/* regiões */
.region-card .bars li { padding: 6px 0; }
.region-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

/* apuração ao vivo */
.live-hero .big { font-size: clamp(3rem, 1.8rem + 6vw, 6.4rem); }
.live-votes { font-size: clamp(.95rem, .9rem + .3vw, 1.15rem); font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.live-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .86rem; color: var(--ink-2); }
.live-status .upd { font-variant-numeric: tabular-nums; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .78rem; border: 1px solid var(--border-strong); }
.elected-chip { background: color-mix(in srgb, var(--good) 12%, var(--surface)); color: var(--good-text); border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--warn) 35%, transparent); } 100% { background: transparent; } }
.refresh-note { font-size: .78rem; color: var(--muted); }
.connection-lost { display: none; }
.is-offline .connection-lost { display: inline-flex; }

/* patrocínio / anúncios / newsletter */
.sponsor { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); padding: 8px 0; }
.sponsor img { height: 24px; width: auto; }
.sponsor a { font-weight: 700; color: var(--ink); text-decoration: none; }
.ad-slot { margin: 20px auto; text-align: center; contain: layout; }
.ad-slot .ad-label { display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-slot .ad-box { display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.ad-slot .ad-placeholder { border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--muted); font-size: .8rem; background: var(--surface); }
.ad-mobile-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
.ad-mobile-sticky .ad-close { position: absolute; right: 4px; top: -30px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
@media (min-width: 768px) { .ad-mobile-sticky { display: none; } }
.newsletter { background: var(--ink); color: var(--surface); border-radius: 18px; padding: 22px; display: grid; gap: 14px; }
.newsletter h2 { color: var(--surface); margin: 0; }
.newsletter p { color: color-mix(in srgb, var(--surface) 78%, transparent); margin: 0; }
.newsletter form { display: grid; gap: 10px; }
.newsletter .inline { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .newsletter .inline { grid-template-columns: minmax(0, 1fr) auto; } .newsletter { padding: 28px; } }
.newsletter input[type="email"] { background: var(--surface); }
.newsletter .btn { background: var(--surface); color: var(--ink); border-color: var(--surface); }
.newsletter .check { color: color-mix(in srgb, var(--surface) 85%, transparent); font-size: .82rem; }
.newsletter .check a { color: var(--surface); }
.newsletter .check input { accent-color: var(--surface); }
.form-msg { font-size: .88rem; font-weight: 600; min-height: 1.2em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* transparência (faixa) */
.trust { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trust > div { padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .88rem; color: var(--ink-2); }
.trust > div .prov { margin-bottom: 8px; }

/* prosa (metodologia/legais) */
.prose { max-width: 72ch; font-size: 1.02rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose code, code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.prose table { margin: 1em 0; }
.formula { font-family: var(--mono); font-size: .88rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; white-space: pre; }
.toc { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.toc a { display: inline-flex; min-height: 36px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; font-size: .85rem; font-weight: 600; background: var(--surface); }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--ink-2); }

/* rodapé */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); font-size: .88rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.site-footer a { text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.site-footer a:hover { text-decoration: underline; }
.footer-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

/* consentimento */
.consent { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: 12px; max-width: 520px; margin-left: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 16px; font-size: .88rem; }
.consent[hidden] { display: none; }
.consent h2 { font-size: 1rem; margin-bottom: 6px; }
.consent .row { margin-top: 12px; }

/* status */
.status-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.status-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.status-dot { font-size: 1rem; }
.lvl { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); white-space: nowrap; }
.lvl-ok { color: var(--good-text); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.lvl-warn { color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.lvl-down { color: var(--crit-text); border-color: color-mix(in srgb, var(--crit) 50%, transparent); }

/* utilidades de layout em telas pequenas */
@media (max-width: 479px) {
  .btn { white-space: normal; text-align: center; }
  .card { padding: 14px; border-radius: 10px; }
  .hero-card { padding: 14px; border-radius: 14px; }
  .duel { gap: 10px 12px; }
  th, td { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .consent, .newsletter, .ticker, .menu-btn { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
@media (forced-colors: active) {
  .splitbar > span, .bars .bar span, .map-svg .uf { forced-color-adjust: none; }
}


/* =============================================================================
   Movimento — progressivo (só com JS ativo) e desligado em "reduzir movimento"
   ========================================================================== */
html { scroll-behavior: smooth; }
main { animation: page-in .55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }
.clock { display: none; font-size: .78rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 6px; }
.clock b { color: var(--ink); font-weight: 750; }
@media (min-width: 1280px) { .clock { display: inline-block; } }

/* entrada ao rolar */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
html.js .reveal.in, html.reveal-all .reveal { opacity: 1; transform: none; }
html.js .reveal.settled { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .25s ease; transition-delay: 0s; }

/* barras que crescem */
html.js .bars .bar span, html.js .poll-results .bar span, html.js .comp .track span, html.js .prob-row .bar span, html.js .meter span, html.js .splitbar > span { transition: width 1.2s cubic-bezier(.2, .7, .2, 1); }

/* gráficos que se desenham */
html.js .chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.js .chart.in .line { animation: draw 1.8s cubic-bezier(.4, .1, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
html.js .chart .band, html.js .chart .pt, html.js .chart .end, html.js .chart .end-label, html.js .chart .end-name, html.js .chart .bar-mark { opacity: 0; transition: opacity .8s ease; }
html.js .chart.in .band, html.js .chart.in .pt { opacity: 1; transition-delay: .9s; }
html.js .chart.in .end, html.js .chart.in .end-label, html.js .chart.in .end-name { opacity: 1; transition-delay: 1.4s; }
html.js .chart.in .bar-mark { opacity: 1; }
html.js .chart.in.instant .line { animation: none; stroke-dashoffset: 0; }
html.js .chart.in.instant .band, html.js .chart.in.instant .pt, html.js .chart.in.instant .end, html.js .chart.in.instant .end-label, html.js .chart.in.instant .end-name { transition: none; }

/* mapa: estados acendem em sequência; recolorir é suave */
.map-svg .uf { transition: fill .7s ease, stroke-width .15s ease, opacity .3s ease; }
html.js .map-svg .uf { opacity: 0; }
html.js .map-svg.in .uf { animation: uf-in .6s ease both; animation-delay: calc(var(--i, 0) * 26ms); }
@keyframes uf-in { from { opacity: 0; } to { opacity: 1; } }
html.js .map-svg.in.instant .uf { animation: none; opacity: 1; }
.map-svg .uf:hover { filter: brightness(1.08); }

/* contagem regressiva */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.countdown > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 4px 8px; text-align: center; overflow: hidden; }
.countdown b { display: block; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 780; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.countdown b.tick { animation: tick .4s cubic-bezier(.2, .7, .2, 1); }
@keyframes tick { from { transform: translateY(-40%); opacity: .15; } to { transform: none; opacity: 1; } }
.countdown.is-open { display: block; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--good) 10%, var(--surface)); font-weight: 700; }

/* alertas que se alternam */
.ticker-rot { position: relative; flex: 1; min-width: 0; height: 1.5em; overflow: hidden; }
.ticker-rot a { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; transform: translateY(70%); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.ticker-rot a.on { opacity: 1; transform: none; pointer-events: auto; }
.ticker-rot a.off { opacity: 0; transform: translateY(-70%); }
.ticker-rot small { color: var(--muted); font-weight: 650; margin-right: 6px; }

/* placar ao vivo: faixa de varredura enquanto a apuração está aberta */
.live-hero { position: relative; overflow: hidden; }
.live-hero[data-final="0"]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--crit), transparent) no-repeat; background-size: 40% 100%; animation: scan 2.6s linear infinite; }
@keyframes scan { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* interações */
.card-link, .poll-card, .news-item, .fav-card, .stat, .uf-list a, .btn { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .2s ease, opacity .2s ease; }
.card-link:hover, .poll-card:hover, .news-item:hover, .fav-card:hover, .uf-list a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.btn:active { transform: scale(.97); }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* pesquisas registradas (TSE) */
.reg-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.reg-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.reg-date { display: grid; place-items: center; align-content: center; width: 46px; height: 46px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1; gap: 2px; }
.reg-date b { font-size: 1.15rem; font-weight: 780; }
.reg-date small { font-size: .62rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
@media (max-width: 479px) { .reg-list li { grid-template-columns: auto minmax(0, 1fr); } .reg-list .prov { grid-column: 2; justify-self: start; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main { animation: none; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .chart .line { stroke-dashoffset: 0; animation: none; }
  html.js .chart .band, html.js .chart .pt, html.js .chart .end, html.js .chart .end-label, html.js .chart .end-name, html.js .chart .bar-mark { opacity: 1; }
  html.js .map-svg .uf { opacity: 1; animation: none; }
  .live-hero::before { animation: none; }
  .ticker-rot a { transition: none; }
}

/* ===================== mapa em destaque (explorador de visões) ===================== */
.home-strip { padding-top: 14px; }
.home-strip .hero-top { margin-bottom: 0; }
.map-hero { padding-top: 12px; }
.map-explorer { display: grid; gap: 12px; min-width: 0; }
.map-explorer-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 14px; }
.map-explorer-head .more { font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; }
.map-explorer-head .more:hover { text-decoration: underline; }
.map-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.map-tabs a { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease; }
.map-tabs a:hover { border-color: var(--border-strong); color: var(--ink); }
.map-tabs a[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; color: var(--ink); }
.map-tabs a.is-pending { opacity: .6; }
.map-tabs .tab-label { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.map-tabs .tab-kind { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.map-tabs .tab-kind-oficial { color: var(--good-text); }
@media (max-width: 639px) {
  .map-tabs { gap: 6px; }
  .map-tabs a { min-height: 64px; padding: 7px 8px; }
  .map-tabs .tab-label { font-size: .78rem; }
  .map-tabs .tab-kind { font-size: .58rem; letter-spacing: .03em; }
}
.map-modes { display: grid; gap: 8px; min-width: 0; }
.map-modes:empty { display: none; }
.map-live { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.map-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; animation: map-live-dot 2.4s ease-in-out infinite; }
.map-live.is-off::before { background: var(--warn); animation: none; }
@keyframes map-live-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* disposição: no celular tudo é um empilhamento (mapa → detalhes do estado → resumo → legenda) */
.map-shell { display: grid; gap: 10px; }
.map-main { display: contents; }
.map-aside { display: contents; }
.map-metarow { order: 1; margin-bottom: 0 !important; }
.map-shell > .map-main > [data-map-alert] { order: 2; }
.map-shell > .map-main > [data-map-banner] { order: 3; }
.map-shell > .map-main > .map-box { order: 4; }
.map-shell > .map-aside > .state-panel { order: 5; }
.map-shell > .map-main > [data-map-summary] { order: 6; }
.map-shell > .map-main > .map-changes { order: 7; }
.map-shell > .map-aside > .map-legend { order: 8; }
[data-map-alert]:empty, [data-map-banner]:empty, [data-map-summary]:empty { display: none; }
@media (min-width: 1024px) {
  .map-shell { grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
  .map-main { display: grid; gap: 10px; min-width: 0; }
  .map-aside { display: grid; gap: 12px; align-content: start; min-width: 0; }
  .map-main > *, .map-aside > * { order: 0 !important; }
  .map-aside > .map-legend { order: -1 !important; }
}
.map-box { min-height: 220px; }
.map-box.is-loading { opacity: .6; transition: opacity .15s ease; }
.map-box.is-loading::after { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--ink), transparent) no-repeat; background-size: 40% 100%; animation: scan 1.1s linear infinite; }

/* estados com apuração em andamento: contorno tracejado; virada de liderança: destaque temporário */
.map-svg .uf.counting { stroke: var(--ink); stroke-opacity: .7; stroke-width: 1.5; stroke-dasharray: 4 3; }
.tilemap .tile.counting { stroke: var(--ink); stroke-opacity: .7; stroke-width: 2; stroke-dasharray: 5 3; }
.map-svg .uf.flip, .tilemap .tile.flip { stroke: var(--ink); stroke-opacity: 1; stroke-width: 3.6; stroke-dasharray: none; }
.map-svg .uf.empty.counting { stroke-dasharray: 4 3; }

/* avisos, resumo e legenda */
.map-notice { display: flex; gap: 10px; align-items: flex-start; }
.map-notice > .icon { flex: none; margin-top: 3px; }
.map-alert { margin: 0; }
.map-summary-grid { display: grid; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 720px) { .map-summary-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; } }
.map-score { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.map-score-item { display: grid; gap: 2px; padding-left: 10px; border-left: 4px solid var(--cand, var(--c-other)); min-width: 0; }
.map-score-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-weight: 700; font-size: .88rem; min-width: 0; }
.map-score-pct { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem); font-weight: 780; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.map-score-pct small { font-size: .55em; margin-left: 2px; color: var(--muted); font-weight: 700; }
.map-progress .meter-label strong { font-size: 1.2rem; }
.map-tally { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; }
.tally-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: .88rem; }
.map-changes { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.map-changes h4 { margin: 0 0 6px; font-size: .84rem; }
.map-changes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; }
.map-changes time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.legend-keys { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: .78rem; color: var(--ink-2); }
.legend-keys li { display: flex; align-items: center; gap: 8px; }
.legend-keys .legend-kind { align-items: flex-start; flex-wrap: wrap; }
.key-dash { display: inline-block; width: 18px; height: 10px; border: 2px dashed var(--ink); border-radius: 2px; opacity: .75; flex: none; }
.map-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; }
.src-list { margin: 4px 0 0; padding-left: 16px; font-size: .78rem; display: grid; gap: 4px; color: var(--ink-2); }
.panel-meter { margin: 8px 0 4px; height: 8px; }
.state-panel .tt-row { padding: 3px 0; }
@media (prefers-reduced-motion: reduce) {
  .map-live::before { animation: none; }
  .map-box.is-loading::after { animation: none; }
}
.map-title { margin: 0; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); letter-spacing: -.02em; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.map-title small { font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.map-explorer-head { align-items: center; }
@media (max-width: 479px) {
  .map-title small { display: none; }
  .map-explorer-head { flex-wrap: nowrap; }
  .map-live { font-size: .72rem; order: 3; flex-basis: 100%; }
  .map-explorer-head .more { min-height: 36px; }
  .map-metarow .small { font-size: .75rem; }
  .map-modes .seg { width: 100%; }
}

/* detalhes do estado no celular: folha fixa embaixo (tocar num estado não rola a página) */
.state-sheet { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 60; max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, .28); }
.state-sheet .sheet-body h3 { margin: 0 44px 8px 0; }
.state-sheet .sheet-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.state-sheet .sheet-close:hover { background: var(--surface-2); }
@media (max-width: 1023px) { .map-shell > .map-aside > .state-panel { display: none; } }
@media (min-width: 1024px) { .state-sheet { display: none !important; } }
.map-hint { display: none; margin: 0; text-align: center; }
@media (max-width: 1023px) { .map-hint { display: block; } .map-shell > .map-main > .map-hint { order: 4; } }
/* folha compacta: cobre o mínimo possível do mapa */
.state-sheet { max-height: min(38vh, 300px); padding: 10px 14px 8px; }
.state-sheet .sheet-body h3 { font-size: .95rem !important; margin: 0 40px 4px 0; }
.state-sheet .tt-row { padding: 1px 0; font-size: .82rem; }
.state-sheet .tt-row b { font-size: .85rem; }
.state-sheet .panel-meter { margin: 6px 0 2px; height: 6px; }
.state-sheet .tt-note { margin-top: 3px; font-size: .72rem; }
.state-sheet .link-arrow { min-height: 36px; font-size: .88rem; }
.state-sheet .sheet-close { top: 0; right: 0; }

/* Destaque do dia da eleição */
.election-banner { background: var(--crit); color: #fff; font-size: .95rem; }
.election-banner--final { background: var(--ink, #14213d); }
.election-banner .container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 10px; padding-bottom: 10px; }
.election-banner .btn-banner { margin-left: auto; padding: 6px 14px; border-radius: 999px; background: #fff; color: #111; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav a.nav-hot, .mobile-nav a.nav-hot { display: inline-flex; align-items: center; gap: 6px; color: var(--crit); font-weight: 700; }
.nav a.nav-hot .live-dot, .mobile-nav a.nav-hot .live-dot { background: var(--crit); }
@media (max-width: 640px) { .election-banner .btn-banner { margin-left: 0; } }

/* Compartilhar: botão flutuante discreto + painel */
.share { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.share[hidden] { display: none; }
.share-fab { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--ink); color: var(--surface); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: var(--shadow-lg); animation: share-pulse 2.4s ease-out 1.5s 3; }
.share-fab svg { width: 20px; height: 20px; flex: none; }
@keyframes share-pulse { 0% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(57, 135, 229, .55); } 70%, 100% { box-shadow: var(--shadow-lg), 0 0 0 16px rgba(57, 135, 229, 0); } }
.share-tip { display: flex; gap: 8px; align-items: flex-start; max-width: 270px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: .85rem; line-height: 1.35; }
.share-tip[hidden], .share-panel[hidden], .share-native[hidden] { display: none; }
.share-tip-x { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.share-panel { width: min(92vw, 340px); padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
.share-head { margin: 0 0 10px; }
.share-native { width: 100%; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 650; font-size: .88rem; text-align: left; cursor: pointer; }
.share-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 4px 0; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: .72rem; text-decoration: none; cursor: pointer; }
.share-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--net); color: #fff; font-weight: 800; font-size: 1rem; }
.share-ico svg { width: 22px; height: 22px; }
.share-grid a:hover .share-ico, .share-grid button:hover .share-ico { filter: brightness(1.12); }
.share-lbl { text-align: center; line-height: 1.15; }
@media (max-width: 767px) {
  body:has(.ad-mobile-sticky) .share { bottom: 84px; }
}
body:has(#consent:not([hidden])) .share { display: none; }
@media (prefers-reduced-motion: reduce) { .share-fab { animation: none; } }
@media print { .share { display: none !important; } }

.share-btns { display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; }
.share-ig { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; color: #fff; cursor: pointer; background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); box-shadow: var(--shadow-lg); }
.share-ig[hidden] { display: none; }
.share-ig svg { width: 22px; height: 22px; }
.share-igbox { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.share-igbox[hidden] { display: none; }
.share-igrow { display: flex; gap: 12px; align-items: flex-start; }
.share-igrow img { flex: none; width: 96px; height: auto; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-3); }
.share-igacts { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.share-igacts .btn { white-space: normal; text-align: center; }

.share { transition: transform .3s ease; }
.share.is-collapsed { transform: translateX(calc(-1 * var(--share-shift, 280px) - 16px)); }
.share.is-collapsed .share-tip, .share.is-collapsed .share-panel { display: none; }
@media (prefers-reduced-motion: reduce) { .share, .share-handle svg { transition: none; } }


/* Caixa flutuante: compartilhar + dar like, numa barra única, neutra e translúcida */
.share-box { display: flex; align-items: center; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); box-shadow: 0 8px 28px rgba(11, 11, 11, .12), 0 1px 2px rgba(11, 11, 11, .06); }
.share-box .share-fab, .share-box .share-ig, .share-box .like-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; width: auto; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: .84rem; white-space: nowrap; box-shadow: none; animation: none; cursor: pointer; transition: background .15s ease; }
.share-box .share-fab:hover, .share-box .share-ig:hover, .share-box .like-btn:hover, .share-box .share-fab:focus-visible, .share-box .share-ig:focus-visible, .share-box .like-btn:focus-visible { background: color-mix(in srgb, var(--tone, var(--ink)) 12%, transparent); color: var(--ink); }
/* Cada botão tem a sua cor, num ícone redondo: compartilhar (verde), Instagram (degradê da marca) e like (azul) */
.share-box .share-fab { --tone: var(--c3); }
.share-box .share-ig { --tone: #d62976; }
.share-box .like-btn { --tone: var(--c1); }
.share-box .share-fab svg, .share-box .share-ig svg, .share-box .like-btn .icon { flex: none; box-sizing: border-box; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--tone); color: #fff; }
.share-box .share-ig svg { background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); }
.share-box .like-btn:not(.is-liked) .icon { background: color-mix(in srgb, var(--tone) 88%, #fff); }
.share-box .like-btn { margin-left: 7px; }
.share-box .like-btn::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 1px; background: var(--border-strong); }
.like-btn strong { font-weight: 600; font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.like-btn.is-liked { cursor: default; }
.like-btn.is-liked .icon { fill: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c1) 25%, transparent); }
.like-btn.just-liked .icon { animation: like-pop .4s ease; }
@keyframes like-pop { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.35) rotate(-10deg); } }
.share-handle { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 38px; margin-left: 2px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.share-handle:hover, .share-handle:focus-visible { color: var(--ink); background: var(--surface-2); }
.share-handle svg { width: 16px; height: 16px; transition: transform .3s ease; }
.share.is-collapsed .share-handle svg { transform: rotate(180deg); }
.share-box .share-ig[hidden] { display: none; }
.share-box .share-ig { margin-left: 7px; }
.share-ig .ig-short { display: none; }
@media (max-width: 400px) { .share-ig .ig-long { display: none; } .share-ig .ig-short { display: inline; } .share-box .share-fab, .share-box .share-ig, .share-box .like-btn { padding: 0 5px; } .share-box .share-ig, .share-box .like-btn { margin-left: 3px; } .share-handle { width: 20px; } .share-box .share-fab svg, .share-box .share-ig svg, .share-box .like-btn .icon { width: 19px; height: 19px; padding: 3.5px; } .share-box .share-fab, .share-box .share-ig, .share-box .like-btn { gap: 4px; } }
.share-box .share-ig::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 1px; background: var(--border-strong); }
@media (max-width: 480px) {
  .share-box { max-width: calc(100vw - 24px); }
  .share-box .share-fab, .share-box .share-ig, .share-box .like-btn { padding: 0 8px; gap: 5px; font-size: .78rem; }
  .share-box .share-ig, .share-box .like-btn { margin-left: 5px; }
  .share-box .share-ig::before, .share-box .like-btn::before { left: -3px; }
}
@media (prefers-reduced-motion: reduce) { .like-btn.just-liked .icon { animation: none; } }
@media (max-width: 380px) { .share-box .share-fab, .share-box .share-ig, .share-box .like-btn { font-size: .74rem; } .share-box .share-fab, .share-box .share-ig, .share-box .like-btn { padding: 0 4px; } }
