* { box-sizing: border-box; }
body { margin: 0; background: #0b1726; color: #eef3f8; font: 18px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; }
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background: #102640; border-bottom: 3px solid #e0a800; gap: 1rem; flex-wrap: wrap; }
header h1 { margin: 0; font-size: 1.6rem; } header p { margin: .2rem 0 0; color: #a9bdd3; }
#relogio { font-size: 2.2rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.materia { padding: 1.2rem 2rem .4rem; }
.materia h2 { margin: .4rem 0; font-size: 1.8rem; } .ementa { font-size: 1.2rem; margin: .3rem 0; } .meta { color: #a9bdd3; margin: .2rem 0; }
.etiqueta { display: inline-block; padding: .2rem .8rem; border-radius: 4px; font-weight: 700; font-size: .9rem; background: #3a4d63; letter-spacing: .05em; }
.etiqueta.em_votacao { background: #e0a800; color: #1a1a1a; animation: pulsar 1.5s infinite; }
@keyframes pulsar { 50% { opacity: .6; } }
.placar { display: flex; gap: 1rem; padding: .6rem 2rem 1rem; flex-wrap: wrap; align-items: stretch; }
.caixa { min-width: 150px; padding: .6rem 1.2rem; border-radius: 8px; text-align: center; background: #1b3350; display: flex; flex-direction: column; }
.caixa .num { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; } .caixa .rot { font-size: .9rem; letter-spacing: .08em; }
.caixa.sim { background: #1c7f46; } .caixa.nao { background: #b8352a; } .caixa.abstencao { background: #5b6670; }
.resultado { display: flex; align-items: center; padding: 0 2rem; font-size: 2.2rem; font-weight: 800; border-radius: 8px; letter-spacing: .05em; }
.resultado.aprovado { background: #eef3f8; color: #1c7f46; } .resultado.rejeitado { background: #eef3f8; color: #b8352a; }
.vereadores { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; padding: 0 2rem 2rem; }
.vereador { display: flex; align-items: center; gap: .7rem; background: #13283f; border-radius: 8px; padding: .5rem .7rem; }
.vereador.ausente { opacity: .45; }
.vereador img, .sem-foto { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sem-foto { background: #2c4766; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem; }
.info { flex: 1; display: flex; flex-direction: column; min-width: 0; } .info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partido { color: #a9bdd3; font-size: .85rem; }
.estado { font-weight: 800; font-size: .85rem; padding: .25rem .5rem; border-radius: 4px; white-space: nowrap; }
.estado.sim { background: #1c7f46; } .estado.nao { background: #b8352a; } .estado.abstencao { background: #5b6670; }
.estado.votou { background: #2f6fb5; } .estado.presente { background: #2c4766; } .estado.ausente { background: transparent; color: #a9bdd3; }
@media (max-width: 600px) { header, .materia, .placar, .vereadores { padding-left: 16px; padding-right: 16px; } .materia h2 { font-size: 1.4rem; } }

.orador { display: flex; align-items: center; gap: 1.2rem; margin: 1rem 2rem 0; padding: .8rem 1.2rem; background: #1b3350; border-left: 6px solid #e0a800; border-radius: 8px; }
.orador[hidden] { display: none; }
.orador img, .orador .sem-foto { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.orador .info strong { font-size: 1.8rem; } .orador .fase { color: #e0a800; font-weight: 700; letter-spacing: .05em; font-size: .9rem; }
.orador .tempo { font-size: 4rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: auto; }
.orador .tempo.alerta { color: #e0a800; } .orador .tempo.esgotado { color: #ff6b5e; animation: pulsar 1s infinite; }
@media (max-width: 600px) { .orador { margin: 1rem 16px 0; flex-wrap: wrap; } .orador .tempo { font-size: 2.6rem; } }
header .logo { height: 64px; width: auto; background: #fff; border-radius: 6px; padding: 4px; }
header .titulo { flex: 1; }
header { border-bottom-color: var(--destaque, #e0a800); }
.resultado.desempate { background: #e0a800; color: #1a1a1a; font-size: 1.4rem; animation: pulsar 1.5s infinite; }

.tela-cheia { background: transparent; border: 1px solid rgba(255,255,255,.3); color: inherit; font-size: 1.4rem; border-radius: 6px; cursor: pointer; padding: .2rem .6rem; }
body.em-tela-cheia .tela-cheia, body.tv .tela-cheia { display: none; }
body.sem-cursor, body.sem-cursor * { cursor: none !important; }
/* Tema claro: ?tema=claro */
body.claro { background: #f4f6f9; color: #1d2733; }
body.claro header { background: #fff; border-bottom-color: var(--destaque, #1f5fa8); }
body.claro header p, body.claro .meta, body.claro .partido { color: #5d6b7a; }
body.claro .vereador, body.claro .orador { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
body.claro .caixa.votantes, body.claro .caixa:not(.sim):not(.nao):not(.abstencao) { background: #e6ebf1; color: #1d2733; }
body.claro .caixa.sim, body.claro .caixa.nao, body.claro .caixa.abstencao { color: #fff; }
body.claro .sem-foto { background: #cfd8e3; color: #1d2733; }
body.claro .estado.presente { background: #e6ebf1; color: #1d2733; } body.claro .estado.ausente { color: #5d6b7a; }
body.claro .estado.sim, body.claro .estado.nao, body.claro .estado.abstencao, body.claro .estado.votou { color: #fff; }
body.claro .resultado.aprovado, body.claro .resultado.rejeitado { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
body.claro .etiqueta { background: #e6ebf1; color: #1d2733; } body.claro .etiqueta.em_votacao { background: #e0a800; }
body.claro .tela-cheia { border-color: rgba(0,0,0,.2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Foco em duas cores (anel branco + anel escuro): contraste >= 4,9:1 sobre qualquer fundo do sistema */
:focus-visible { outline: 3px solid #1d2733; outline-offset: 2px; box-shadow: 0 0 0 2px #ffffff; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
.faixa-demo { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #ffe69c; color: #5c4400; text-align: center; font-weight: 700; padding: .2rem; font-size: 1rem; }
