/* Painel de transparência da apuração. Base de cores e fonte em theme.css.
   Estados e alertas usam paleta neutra (azul, âmbar, magenta): vermelho e verde são as cores dos lados do jogo
   e ficam só nos candidatos, para nenhum aviso parecer associado a um lado. */
:root {
  --tone-live: #1546a0;
  --tone-pause: #b7791f;
  --tone-fail: #b0306a;
  --tone-wait: #59697f;
  --tone-final: #103577;
  --amber-wash: #fdf3dc;
  --magenta-wash: #fbe6ef;
  --blue-wash: #e9effb;
  --cell-todo: #dfe5ef;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tone-live: #83aaff;
    --tone-pause: #f0b44c;
    --tone-fail: #f07aab;
    --tone-wait: #a3b0bb;
    --tone-final: #b9cdff;
    --amber-wash: #3a2f17;
    --magenta-wash: #3b1c2b;
    --blue-wash: #1a2a44;
    --cell-todo: #233544;
  }
}

body.tp { background: var(--bg); color: var(--ink); overflow-x: hidden; }
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
.tp-break { word-break: break-all; }
.tp-note { color: var(--muted); font-size: .9rem; margin: .4em 0; }
.tp-ok { color: var(--tone-live); font-weight: 700; }
.tp-bad { color: var(--tone-fail); font-weight: 700; }

/* ---------- cabeçalho e navegação ---------- */
.tp-header-inner { position: relative; z-index: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; max-width: 1180px; margin: 0 auto; padding: 14px var(--gutter) 24px; }
.tp-header .brand { font-size: 1.9rem; }
.tp-header-tag { font-size: .72rem; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; opacity: .9; }
.tp-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tp-nav::-webkit-scrollbar { display: none; }
.tp-nav a { flex: none; padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 700; color: var(--muted); }
.tp-nav a:hover, .tp-nav a:focus-visible { color: var(--ink); background: var(--blue-wash); }
.tp-nav-count { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--tone-pause); color: #fff; font-size: .75rem; text-align: center; }

.tp-main { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.tp-section { padding: 36px 0 8px; border-top: 1px solid var(--line); scroll-margin-top: 56px; }
.tp-section-head { max-width: 760px; margin-bottom: 18px; }
.tp-section-head h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: .1em 0 .25em; }
.tp-section-head p { margin: 0; }
.tp-eyebrow { margin: 0; font-size: .7rem; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; color: var(--blue); }
.tp-subtitle { margin: 26px 0 6px; font-size: 1.15rem; }

/* ---------- agora ---------- */
.tp-hero { padding: 26px 0 18px; scroll-margin-top: 56px; }
.tp-hero h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); margin: .1em 0 .2em; }
.tp-lead { max-width: 720px; margin: 0 0 18px; font-size: 1.08rem; }
.tp-status { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 18px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--tone-wait); }
.tp-status[data-tone="live"] { border-left-color: var(--tone-live); }
.tp-status[data-tone="pause"] { border-left-color: var(--tone-pause); background: var(--amber-wash); }
.tp-status[data-tone="fail"] { border-left-color: var(--tone-fail); background: var(--magenta-wash); }
.tp-status[data-tone="final"] { border-left-color: var(--tone-final); }
.tp-status-head { margin: 0; font-weight: 800; font-size: 1.2rem; line-height: 1.25; font-variation-settings: "wdth" 85; }
.tp-status-body { margin: 6px 0 0; }
.tp-local-error { margin: 8px 0 0; color: var(--tone-fail); font-weight: 700; font-size: .92rem; }
.tp-dot { width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; background: var(--tone-wait); display: inline-block; flex: none; }
.tp-dot[data-tone="live"] { background: var(--tone-live); animation: tp-pulse 2s ease-out infinite; }
.tp-dot[data-tone="pause"] { background: var(--tone-pause); }
.tp-dot[data-tone="fail"] { background: var(--tone-fail); }
.tp-dot[data-tone="final"] { background: var(--tone-final); }
@keyframes tp-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone-live) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.tp-clocks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 6px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.tp-clocks dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); }
.tp-clocks dd { margin: 2px 0 0; font-size: .95rem; }
.tp-clocks [data-ago] { color: var(--muted); font-size: .86rem; }

.tp-score { margin-top: 18px; }
.tp-cands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tp-cand { position: relative; padding: 14px 14px 12px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--cand); min-width: 0; }
.tp-cand.is-leading { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cand) 35%, transparent); }
.tp-cand-meta { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.tp-cand-name { margin: 2px 0 0; font-size: clamp(1.15rem, 4.5vw, 1.6rem); overflow-wrap: anywhere; }
.tp-cand-vice { margin: 0; font-size: .8rem; color: var(--muted); }
.tp-cand-pct { margin: 8px 0 0; font-size: clamp(2rem, 9vw, 3.2rem); color: var(--cand); line-height: 1; }
.tp-cand-votes { margin: 4px 0 8px; font-weight: 700; font-size: .95rem; }
.tp-cand-bar { display: block; height: 8px; border-radius: 99px; background: var(--cell-todo); overflow: hidden; }
.tp-cand-bar > span { display: block; height: 100%; background: var(--cand); border-radius: inherit; }
.tp-elected { margin: 8px 0 0; font-weight: 800; color: var(--cand); }
.tp-gap { margin: 12px 0 4px; font-size: 1.02rem; }
.tp-composition { margin: 0; font-size: .88rem; color: var(--muted); }
.tp-disclaimer { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--blue-wash); font-size: .92rem; }

/* ---------- cadeia do dado ---------- */
.tp-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tp-chain-station { position: relative; padding: 10px 0 10px 30px; }
.tp-chain-dot { position: absolute; left: 4px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-wash); }
.tp-chain-station[data-station="tela"] .tp-chain-dot { background: var(--yellow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 30%, transparent); }
.tp-chain-label { margin: 0; font-weight: 800; }
.tp-chain-time { margin: 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 80; }
.tp-chain-note { margin: 0; font-size: .82rem; color: var(--muted); }
.tp-chain-gap { position: relative; margin-left: 10px; padding: 4px 0 4px 20px; border-left: 2px dashed var(--line); }
.tp-chain-gap span { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--blue-wash); font-weight: 800; font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---------- urna de seções e fluxo ---------- */
.tp-split { display: grid; gap: 28px; }
.tp-waffle-svg { width: 100%; height: auto; display: block; }
.tp-waffle-svg rect.done { fill: var(--blue); }
.tp-waffle-svg rect.added { fill: var(--yellow); animation: tp-blink 1.6s ease-in-out 3; }
.tp-waffle-svg rect.todo { fill: var(--cell-todo); }
@keyframes tp-blink { 50% { opacity: .35; } }
.tp-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 14px 0; }
.tp-figures dt { font-size: .74rem; color: var(--muted); font-weight: 700; }
.tp-figures dd { margin: 0; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-figures .is-added dd { color: var(--tone-pause); }
.tp-compare { display: grid; gap: 8px; }
.tp-bar { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .9rem; }
.tp-bar-value { font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-bar-track { grid-column: 1 / -1; height: 10px; border-radius: 99px; background: var(--cell-todo); overflow: hidden; }
.tp-bar-track span { display: block; height: 100%; background: var(--blue); }
.tp-flow-svg { width: 100%; height: auto; display: block; overflow: visible; }
.tp-flow-label { font-size: 12px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.tp-flow-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.tp-flow-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.tp-flow-legend i { width: 12px; height: 12px; border-radius: 3px; }
.tp-flow-legend strong { font-variant-numeric: tabular-nums; }
.tp-flow-legend em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }

/* ---------- linha do tempo ---------- */
.tp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tp-stat { padding: 10px 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.tp-stat span { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; }
.tp-stat strong { font-size: .98rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tp-chart { position: relative; }
.tp-chart-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.tp-chart-title { margin: 14px 0 4px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.tp-grid { stroke: var(--line); stroke-width: 1; }
.tp-grid.is-half { stroke-dasharray: 4 4; }
.tp-axis { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.tp-step { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; }
.tp-step-dot { fill: var(--blue); }
.tp-pause { fill: var(--tone-pause); opacity: .16; }
.tp-pause.is-ongoing { opacity: .26; }
.tp-pause-label { font-size: 11px; font-weight: 800; fill: var(--tone-pause); }
.tp-rug { stroke-width: 1.5; stroke: var(--line); }
.tp-rug[data-code="N"] { stroke: var(--blue); stroke-width: 2.5; }
.tp-rug[data-code="F"] { stroke: color-mix(in srgb, var(--blue) 45%, transparent); }
.tp-rug[data-code="S"] { stroke: var(--muted); opacity: .45; }
.tp-rug[data-code="E"], .tp-rug[data-code="X"], .tp-rug[data-code="R"] { stroke: var(--tone-fail); stroke-width: 2.5; }
.tp-rug[data-code="O"] { stroke: var(--tone-pause); }
.tp-cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.tp-race-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.tp-race-legend, .tp-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--muted); }
.tp-race-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tp-legend i { display: inline-block; width: 3px; height: 12px; margin-right: 6px; vertical-align: middle; background: var(--line); }
.tp-legend i[data-code="N"] { background: var(--blue); }
.tp-legend i[data-code="F"] { background: color-mix(in srgb, var(--blue) 45%, transparent); }
.tp-legend i[data-code="S"] { background: var(--muted); opacity: .5; }
.tp-legend i[data-code="E"] { background: var(--tone-fail); }
.tp-legend i[data-code="O"] { background: var(--tone-pause); }
.tp-tooltip { position: fixed; z-index: 20; max-width: 280px; padding: 10px 12px; border-radius: var(--radius); background: var(--ink); color: var(--bg); font-size: .82rem; line-height: 1.4; pointer-events: none; display: grid; gap: 2px; box-shadow: 0 8px 24px #0004; }

/* ---------- votos × tempo × alertas ---------- */
.tp-int-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.tp-int-controls label { font-weight: 800; font-size: .9rem; }
.tp-int-controls select { padding: 8px 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); max-width: 100%; }
.tp-int-pause { fill: var(--tone-pause); opacity: .13; }
.tp-int-guide { stroke-width: 1; stroke: var(--tone-live); opacity: .25; stroke-dasharray: 2 3; }
.tp-int-guide[data-severity="atencao"] { stroke: var(--tone-pause); opacity: .45; }
.tp-int-guide[data-severity="alta"], .tp-int-guide[data-severity="critica"] { stroke: var(--tone-fail); opacity: .55; }
.tp-int-end { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-int-label { font-size: 11px; font-weight: 700; fill: var(--muted); }
.tp-int-bar { fill: var(--blue); opacity: .8; }
.tp-int-bar.is-negative { fill: var(--tone-fail); }
.tp-int-lane { fill: var(--cell-todo); opacity: .55; }
.tp-int-lane-label { font-size: 10.5px; font-weight: 700; fill: var(--muted); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.tp-int-mark { cursor: pointer; fill: var(--tone-live); stroke: var(--bg); stroke-width: 1.5; }
.tp-int-mark[data-severity="atencao"] { fill: var(--tone-pause); }
.tp-int-mark[data-severity="alta"], .tp-int-mark[data-severity="critica"] { fill: var(--tone-fail); }
.tp-int-mark[data-status="invalidado"] { fill: transparent; stroke: var(--muted); stroke-dasharray: 2 2; }
.tp-int-mark[data-status="aberto"] { stroke: var(--ink); stroke-width: 2; }
.tp-int-mark:hover, .tp-int-mark:focus-visible { stroke: var(--yellow); stroke-width: 3; outline: none; }
.tp-int-legend { display: grid; gap: 4px; }
.tp-int-keys { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--muted); }
.tp-int-keys i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--tone-live); }
.tp-int-keys [data-key="atencao"] i { background: var(--tone-pause); }
.tp-int-keys [data-key="alta"] i { background: var(--tone-fail); }
.tp-int-keys [data-key="invalidado"] i { background: transparent; border: 1.5px dashed var(--muted); }
.tp-int-span-key { display: inline-block; width: 22px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: middle; background: var(--muted); }
.tp-tip-alerts { color: var(--yellow); }
.tp-alert.is-flash { outline: 3px solid var(--yellow); transition: outline-color .3s; }

/* ---------- o que mudou e diário ---------- */
.tp-delta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tp-delta-card { padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--cand, var(--blue)); min-width: 0; }
.tp-delta-label { margin: 0; font-size: .78rem; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.tp-delta-value { margin: 2px 0; font-size: 1.45rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tp-delta-detail { margin: 0; font-size: .82rem; color: var(--muted); }
.tp-table-wrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.tp-table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.tp-table caption { text-align: left; padding: 10px 12px 0; font-weight: 700; color: var(--muted); font-size: .82rem; }
.tp-table th, .tp-table td { padding: 8px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tp-table thead th { position: sticky; top: 0; background: var(--card); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tp-table tbody tr:last-child > * { border-bottom: 0; }
.tp-table a { color: var(--blue); font-weight: 700; }
.tp-ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }

/* ---------- alertas ---------- */
.tp-callout { padding: 12px 14px; border-radius: var(--radius); background: var(--blue-wash); margin: 0 0 16px; }
.tp-alert-summary { display: grid; gap: 10px; margin-bottom: 12px; }
.tp-alert-total { display: flex; align-items: baseline; gap: 10px; }
.tp-alert-total strong { font-size: 2.6rem; line-height: 1; }
.tp-sev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tp-sev-list li { display: flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: .82rem; }
.tp-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tp-filters button { padding: 7px 13px; font-size: .85rem; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.tp-filters button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.tp-alert-list { display: grid; gap: 10px; }
.tp-alert { padding: 14px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--tone-live); scroll-margin-top: 64px; min-width: 0; }
.tp-alert[data-severity="atencao"] { border-left-color: var(--tone-pause); }
.tp-alert[data-severity="alta"], .tp-alert[data-severity="critica"] { border-left-color: var(--tone-fail); }
.tp-alert[data-status="aberto"] { box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone-pause) 40%, transparent); }
.tp-alert:target { outline: 3px solid var(--yellow); }
.tp-alert[data-status="invalidado"] { border-left-color: var(--line); background: var(--bg); }
.tp-alert[data-status="invalidado"] .tp-sev { background: var(--cell-todo); color: var(--muted); }
.tp-alert[data-status="invalidado"] .tp-alert-title, .tp-alert[data-status="invalidado"] .tp-alert-detail { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.tp-alert-retraction { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--blue-wash); font-size: .92rem; }
.tp-alert-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .78rem; }
.tp-sev, [data-severity] > .tp-sev { padding: 2px 8px; border-radius: 99px; font-weight: 800; background: var(--blue-wash); color: var(--tone-live); }
.tp-alert[data-severity="atencao"] .tp-sev { background: var(--amber-wash); color: var(--tone-pause); }
.tp-alert[data-severity="alta"] .tp-sev, .tp-alert[data-severity="critica"] .tp-sev { background: var(--magenta-wash); color: var(--tone-fail); }
.tp-alert-status { font-weight: 800; }
.tp-alert[data-status="aberto"] .tp-alert-status { color: var(--tone-pause); }
.tp-alert-scope { color: var(--muted); font-weight: 700; }
.tp-alert-id { margin-left: auto; font-size: .76rem; color: var(--muted); }
.tp-alert-title { margin: 8px 0 4px; font-size: 1.08rem; line-height: 1.3; overflow-wrap: anywhere; }
.tp-alert-times { margin: 0 0 6px; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tp-alert-detail { margin: 0; font-size: .95rem; }
.tp-alert-resolution { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--radius); background: var(--blue-wash); font-size: .9rem; }
.tp-alert-resolution::before { content: "✓ "; font-weight: 800; color: var(--tone-live); }
.tp-alert-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.tp-alert-evidence a, .tp-scope-links a, .tp-actions a, .tp-data-meta a { color: var(--blue); font-weight: 700; }
.tp-link-btn { padding: 0; background: none; border: 0; color: var(--blue); font-weight: 700; font-size: inherit; text-decoration: underline; }
.tp-empty { padding: 18px; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--muted); }
.tp-rules { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.tp-rules summary { cursor: pointer; font-weight: 800; }
.tp-rule-list { display: grid; gap: 12px; margin: 12px 0 4px; }
.tp-rule-list dt { font-weight: 800; }
.tp-rule-list dd { margin: 2px 0 0; display: grid; gap: 2px; font-size: .9rem; }
.tp-rule-list em { color: var(--muted); }

/* ---------- estados ---------- */
.tp-states { display: grid; gap: 18px; }
.tp-tiles-svg { width: 100%; max-width: 520px; height: auto; display: block; }
.tp-tile { cursor: pointer; outline: none; }
.tp-tile-bg { fill: var(--cell-todo); stroke: transparent; stroke-width: 2; }
.tp-tile-fill { fill: color-mix(in srgb, var(--blue) 70%, transparent); }
.tp-tile[data-mode="fresh"][data-fresh="f0"] .tp-tile-bg { fill: var(--blue); }
.tp-tile[data-mode="fresh"][data-fresh="f1"] .tp-tile-bg { fill: color-mix(in srgb, var(--blue) 50%, var(--cell-todo)); }
.tp-tile[data-mode="fresh"][data-fresh="f2"] .tp-tile-bg { fill: color-mix(in srgb, var(--tone-pause) 55%, var(--cell-todo)); }
.tp-tile[data-mode="fresh"][data-fresh="f3"] .tp-tile-bg { fill: var(--tone-pause); }
.tp-tile[data-mode="fresh"][data-fresh="done"] .tp-tile-bg { fill: var(--tone-final); }
.tp-tile-uf { font-size: 12px; font-weight: 800; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.tp-tile-pct { font-size: 11px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.tp-tile-flag { fill: var(--tone-pause); stroke: var(--bg); stroke-width: 1.5; }
.tp-tile-fail { fill: var(--tone-fail); stroke: var(--bg); stroke-width: 1.5; }
.tp-tile:hover .tp-tile-bg, .tp-tile:focus-visible .tp-tile-bg, .tp-tile.is-selected .tp-tile-bg { stroke: var(--yellow); }
.tp-fresh-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.tp-fresh-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; background: var(--cell-todo); }
.tp-fresh-legend [data-fresh="f0"] i { background: var(--blue); }
.tp-fresh-legend [data-fresh="f1"] i { background: color-mix(in srgb, var(--blue) 50%, var(--cell-todo)); }
.tp-fresh-legend [data-fresh="f2"] i { background: color-mix(in srgb, var(--tone-pause) 55%, var(--cell-todo)); }
.tp-fresh-legend [data-fresh="f3"] i { background: var(--tone-pause); }
.tp-fresh-legend [data-fresh="done"] i { background: var(--tone-final); }
.tp-state-detail { padding: 16px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.tp-state-detail h3 { margin: 0 0 4px; font-size: 1.5rem; }
.tp-scope-pct { margin: 0; font-size: 2.2rem; line-height: 1; }
.tp-mini-cands { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.tp-mini-cands li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: baseline; }
.tp-mini-cands li > span:first-child { font-weight: 700; overflow-wrap: anywhere; }
.tp-mini-cands strong { color: var(--cand); font-variant-numeric: tabular-nums; }
.tp-mini-cands em { grid-column: 1 / -1; font-style: normal; font-size: .82rem; color: var(--muted); }
.tp-mini-cands .tp-cand-bar { grid-column: 1 / -1; }
.tp-mini-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 10px 0; font-size: .85rem; }
.tp-mini-times dt { color: var(--muted); font-size: .74rem; font-weight: 700; }
.tp-mini-times dd { margin: 0; font-variant-numeric: tabular-nums; }
.tp-scope-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84rem; color: var(--muted); margin: 8px 0 0; }
.tp-spark { margin: 12px 0 0; }
.tp-spark svg { width: 100%; height: auto; display: block; }
.tp-mun-search { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.tp-mun-search label { font-weight: 800; }
.tp-mun-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1rem; }
.tp-mun-search h4 { margin: 12px 0 0; font-size: 1.1rem; }
.tp-states + .tp-table-wrap tr[data-fresh="f2"] .tp-fresh-cell, .tp-states + .tp-table-wrap tr[data-fresh="f3"] .tp-fresh-cell { color: var(--tone-pause); font-weight: 800; }

/* ---------- conferir e dados ---------- */
.tp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tp-checks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.tp-checks li > div { display: grid; gap: 2px; min-width: 0; }
.tp-checks .tp-mono { color: var(--muted); overflow-wrap: anywhere; }
.tp-check-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-wash); color: var(--tone-live); font-weight: 800; }
.tp-checks li[data-ok="false"] { border-color: var(--tone-fail); }
.tp-checks li[data-ok="false"] .tp-check-mark { background: var(--magenta-wash); color: var(--tone-fail); }
.tp-verify { margin-top: 18px; }
.tp-identity { display: grid; gap: 10px; margin: 0; }
.tp-identity dt { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tp-identity dd { margin: 2px 0 0; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; }
.tp-code-wrap { position: relative; }
.tp-code-wrap .tp-link-btn { position: absolute; top: 8px; right: 10px; color: #cfe0ff; }
.tp-code { margin: 8px 0; padding: 14px 14px; border-radius: var(--radius); background: #0c1a24; color: #e8f0ff; font-size: .8rem; line-height: 1.5; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.tp-code-wrap .tp-code { padding-right: 70px; }
.tp-data-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.tp-data-list > li { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.tp-data-list summary { cursor: pointer; font-size: .84rem; color: var(--blue); font-weight: 700; }
.tp-columns { overflow-wrap: anywhere; color: var(--muted); }
.tp-data-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .88rem; font-variant-numeric: tabular-nums; }

/* ---------- doações ---------- */
.tp-donate { display: grid; gap: 14px; }
.tp-donate-card { padding: 16px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--yellow); min-width: 0; }
.tp-donate-card h3 { margin: 0; font-size: 1.5rem; }
.tp-donate-body { display: grid; gap: 14px; align-items: start; }
.tp-qr { width: 100%; max-width: 220px; height: auto; display: block; border-radius: 8px; justify-self: center; }
.tp-donate-code { display: grid; gap: 8px; min-width: 0; }
.tp-donate-code label, .tp-donate-label { margin: 0; font-weight: 800; font-size: .9rem; }
.tp-donate-code textarea { width: 100%; resize: none; padding: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.tp-donate-code button { justify-self: start; }
.tp-donate-code a { color: var(--blue); font-weight: 700; font-size: .9rem; }
.tp-address { margin: 0; padding: 10px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.tp-warn { margin: 0; padding: 8px 10px; border-radius: var(--radius); background: var(--amber-wash); font-size: .88rem; }

/* ---------- compromisso ---------- */
.tp-promises { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; max-width: 820px; }
.tp-scenarios { display: grid; gap: 10px; }
.tp-scenarios article { display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.tp-scenarios h4 { margin: 0; font-size: 1rem; }
.tp-scenarios p { grid-column: 2; margin: 0; font-size: .92rem; color: var(--muted); }
.tp-scenarios .tp-dot { margin-top: 4px; }
.tp-limits { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 820px; }
.tp-faq { display: grid; gap: 6px; max-width: 820px; }
.tp-faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--card); }
.tp-faq summary { cursor: pointer; font-weight: 800; }
.tp-faq p { margin: 8px 0 2px; }
.tp-faq a { color: var(--blue); }
.tp-footer { max-width: 1180px; margin: 0 auto; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.tp-footer a { color: var(--blue); }
.tp-noscript { padding: 16px; text-align: center; }

/* ---------- telas maiores ---------- */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .tp-clocks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tp-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tp-delta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-alert-summary { grid-template-columns: auto 1fr; align-items: center; }
  .tp-alert-summary .tp-note { grid-column: 1 / -1; }
  .tp-scenarios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-data-list > li { grid-template-columns: 1fr auto; align-items: start; }
  .tp-data-meta { justify-content: flex-end; }
  .tp-donate-body { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .tp-donate { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .tp-split { grid-template-columns: 1fr 1fr; gap: 40px; }
  .tp-states { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .tp-chain { grid-template-columns: repeat(4, minmax(0, 1fr) auto) minmax(0, 1fr); align-items: start; }
  .tp-chain-station { padding: 34px 6px 0 0; }
  .tp-chain-dot { left: 0; top: 6px; }
  .tp-chain-gap { margin: 0; padding: 4px 4px 0; border-left: 0; border-top: 2px dashed var(--line); margin-top: 12px; }
  .tp-delta { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .tp-dot[data-tone="live"], .tp-waffle-svg rect.added { animation: none; }
}
