/* Layout: coluna única guiada pela ordem da urna (passos no topo), lista de candidatos, colinha fixa embaixo. */
:root {
  --bg: #eef0ec;          /* cinza da carcaça da urna */
  --surface: #ffffff;
  --surface-2: #f6f7f4;
  --ink: #16191a;
  --muted: #5b625f;
  --line: #d5d9d3;
  --key: #1d2021;         /* tecla preta */
  --key-ink: #f4f5f2;
  --confirma: #1b7f45;    /* tecla CONFIRMA */
  --confirma-ink: #ffffff;
  --corrige: #d9661f;     /* tecla CORRIGE */
  --tag: #e4ece6;
  --warn: #a8461a;
  --warn-bg: #fbeee4;
  --bad: #a3202a; --bad-bg: #fbe5e6; --ok: #1b6b40; --ok-bg: #e2f2e8;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-digit: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121514; --surface: #1b1f1e; --surface-2: #222726; --ink: #eceeea; --muted: #a2aaa6;
    --line: #333a38; --key: #e9ebe7; --key-ink: #141716; --confirma: #2fa463; --confirma-ink: #08140d;
    --corrige: #ef8443; --tag: #26332c; --warn: #f0a070; --warn-bg: #3a2416; --bad: #ff8f96; --bad-bg: #431c20; --ok: #7fd6a2; --ok-bg: #173826; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121514; --surface: #1b1f1e; --surface-2: #222726; --ink: #eceeea; --muted: #a2aaa6;
  --line: #333a38; --key: #e9ebe7; --key-ink: #141716; --confirma: #2fa463; --confirma-ink: #08140d;
  --corrige: #ef8443; --tag: #26332c; --warn: #f0a070; --warn-bg: #3a2416; --bad: #ff8f96; --bad-bg: #431c20; --ok: #7fd6a2; --ok-bg: #173826; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); }
body { margin: 0; font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--confirma); outline-offset: 2px; }

.wrap { max-width: 980px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 140px; }

/* Cabeçalho */
.top { display: flex; align-items: center; gap: 14px; }
.brand h1 { font: 800 clamp(28px, 6vw, 44px)/1 var(--font-display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.brand p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

/* Passos (ordem da urna) */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 22px 0 18px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 8px; }
.step { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step .n { font: 600 11px/1 var(--font-digit); color: var(--muted); }
.step .t { font-weight: 700; font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }
.step .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.done .s { color: var(--confirma); font-weight: 600; }
.step[aria-current="step"] { background: var(--key); color: var(--key-ink); border-color: var(--key); }
.step[aria-current="step"] .n, .step[aria-current="step"] .s { color: inherit; opacity: .8; }
@media (max-width: 620px) {
  .steps { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .step { flex: none; padding: 7px 10px; }
  .step .t { font-size: 13px; white-space: nowrap; }
  .filters select { flex: 1 1 140px; min-width: 0; }
}

/* Cabeçalho da etapa */
.office { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.office h2 { font: 700 26px/1.1 var(--font-display); margin: 0; }
.office .hint { color: var(--muted); font-size: 14px; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.filters input[type=search] { flex: 1 1 240px; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.filters select { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); max-width: 100%; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); padding: 0 4px; }
.count { color: var(--muted); font-size: 13px; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }

/* Legenda */
.legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--surface-2); border: 1px dashed var(--line); padding: 10px 12px; border-radius: var(--r); margin-bottom: 12px; font-size: 14px; }
.legenda select { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); max-width: 100%; }

/* Lista de candidatos */
.list { display: flex; flex-direction: column; gap: 10px; }
.cand { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.cand.chosen { border-color: var(--confirma); box-shadow: inset 0 0 0 1px var(--confirma); }
.cand.inapto { opacity: .78; }
.photo { width: 76px; height: 95px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: block; }
.photo.ph { display: grid; place-items: center; font: 700 22px var(--font-display); color: var(--muted); }
.body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.name h3 { margin: 0; font: 700 18px/1.2 var(--font-display); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; background: var(--tag); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.tag.party { background: var(--key); color: var(--key-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.meta { font-size: 14px; color: var(--muted); }
.resumo { margin: 0; font-size: 15px; }
.feitos { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.src { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
details { font-size: 14px; }
details summary { color: var(--muted); cursor: pointer; font-weight: 600; }
details .more { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
details dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; }
details dt { color: var(--muted); }
details dd { margin: 0; overflow-wrap: anywhere; }
.side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }

.digits { display: inline-flex; gap: 3px; }
.digits span { width: 24px; height: 32px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 3px; font: 600 19px/1 var(--font-digit); background: var(--surface); }
.digits.sm span { width: 18px; height: 24px; font-size: 14px; }

.btn { border: 0; border-radius: 6px; padding: 9px 14px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: 13px; }
.btn.confirma { background: var(--confirma); color: var(--confirma-ink); }
.btn.corrige { background: var(--corrige); color: #fff; }
.btn.branco { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: default; }

@media (max-width: 620px) {
  .cand { grid-template-columns: 64px minmax(0, 1fr); }
  .photo { width: 64px; height: 80px; }
  .side { grid-column: 1 / -1; flex-direction: row; align-items: center; }
}

.more-btn { margin: 14px auto 0; display: block; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* Barra da colinha */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--key); color: var(--key-ink); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.bar .in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bar .slots { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; }
.bar .slot { font: 600 13px var(--font-digit); border: 1px solid currentColor; opacity: .55; border-radius: 4px; padding: 3px 6px; white-space: nowrap; }
.bar .slot.ok { opacity: 1; }
.bar .btn.confirma { flex: none; }

/* Folha da colinha */
.sheet { position: fixed; inset: 0; z-index: 20; background: color-mix(in srgb, var(--ink) 55%, transparent); display: flex; align-items: flex-end; justify-content: center; }
.sheet .panel { background: var(--surface); width: 100%; max-width: 720px; max-height: 92%; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { margin: 0; font: 700 22px var(--font-display); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.row .ph { display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.row img, .row .ph { width: 44px; height: 55px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.row .c { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.row .nm { font-weight: 700; overflow-wrap: anywhere; }
.row .missing { color: var(--muted); font-style: italic; }
.preview { width: 100%; max-width: 420px; align-self: center; border-radius: 8px; border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 14px; z-index: 30; }
.loading { padding: 40px 0; color: var(--muted); text-align: center; }
footer.credits { margin-top: 30px; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .cand { transition: border-color .15s; } }

/* Seções do card: realizações, pautas, processos */
.sec { display: flex; flex-direction: column; gap: 4px; border-top: 1px dashed var(--line); padding-top: 8px; }
.sec h4 { margin: 0; font: 700 12px/1.3 var(--font-body); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fonte-h { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fonte { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fonte::before { content: "↗ "; }
.nada { margin: 0; font-size: 14px; color: var(--muted); }
.proc { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.st { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-right: 4px; white-space: nowrap; }
.st-bad { background: var(--bad-bg); color: var(--bad); }
.st-warn { background: var(--warn-bg); color: var(--warn); }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-pol { background: var(--tag); color: var(--ink); }

/* Pesquisas e dinheiro */
.pesq { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pesq > div { display: grid; grid-template-columns: 9.5em minmax(60px, 1fr) 3.6em 5.5em; align-items: center; gap: 8px; }
.pesq .lbl, .kv .lbl { color: var(--muted); }
.pesq strong { font-variant-numeric: tabular-nums; text-align: right; }
.pesq .n { font-size: 12px; color: var(--muted); }
.barra { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.barra span { display: block; height: 100%; }
.b-int { background: var(--confirma); }
.b-rej { background: var(--corrige); }
.dinheiro { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.dinheiro:empty { display: none; }
.kv { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.kv .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.kv strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.kv .det { font-size: 12px; color: var(--muted); }
.pesq-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; }
.pesq-box .feitos { margin-top: 6px; }
@media (max-width: 620px) { .pesq > div { grid-template-columns: 7em minmax(40px, 1fr) 3.4em; } .pesq .n { display: none; } }

/* Padrão "só dados oficiais": aviso, documentos, texto institucional */
.aviso { margin: 16px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; color: var(--muted); }
.aviso strong { color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; font-weight: 600; font-size: inherit; }
.docs { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.docs > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.docs .lbl { color: var(--muted); min-width: 11em; }
.doc { font-size: 13px; color: var(--ink); white-space: nowrap; }
.doc::before { content: "↗ "; color: var(--muted); }
.panel.texto { gap: 8px; }
.panel.texto h3 { margin: 10px 0 0; font: 700 16px var(--font-display); }
.panel.texto p { margin: 0; max-width: 65ch; }
.sel { user-select: all; font-weight: 600; }

.certs { display: flex; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
.grp { font-size: 13px; white-space: nowrap; }
.grp .doc::before { content: ""; }
.grp .doc { text-decoration: underline; margin-left: 2px; }

/* ---- Card compacto (mobile first): identificação + ações; detalhes sob demanda ---- */
.list { gap: 8px; }
.cand { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.cand-top { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cand .photo { width: 56px; height: 70px; border-radius: 6px; }
.cand-id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cand-id h3 { margin: 0; font: 700 17px/1.2 var(--font-display); overflow-wrap: anywhere; }
.cand-id .meta { margin: 0; font-size: 13px; line-height: 1.35; }
.cand-id .tags { gap: 4px; }
.cand-id .tag { font-size: 11px; padding: 1px 7px; }
.cand-acoes { display: flex; gap: 8px; }
.cand-acoes .btn { flex: 1; min-height: 40px; }
.cand-acoes .fora { flex: 1; text-align: center; align-self: center; }
.info-btn { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.info-btn[aria-expanded="true"] { background: var(--key); color: var(--key-ink); border-color: var(--key); }
.cand-info { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.cand-info .sec { border-top: 0; padding-top: 0; }
.cand-info dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 0; font-size: 14px; }
.cand-info dt { color: var(--muted); }
.cand-info dd { margin: 0; overflow-wrap: anywhere; }
.ficha-btn { display: block; text-align: center; text-decoration: none; background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.digits.sm span { width: 20px; height: 27px; font-size: 15px; }

@media (min-width: 621px) {
  .cand { padding: 14px 16px; }
  .cand-top { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .cand .photo { width: 64px; height: 80px; }
  .cand-acoes { justify-content: flex-end; }
  .cand-acoes .btn { flex: 0 0 auto; min-width: 190px; }
}

@media (max-width: 620px) {
  .wrap { padding-block: 12px 110px; }
  .top { gap: 8px; }
  .brand h1 { font-size: 28px; }
  .brand p { font-size: 14px; margin-top: 4px; }
  .aviso { font-size: 12.5px; padding: 8px 10px; margin-top: 10px; }
  .steps { margin: 12px -16px 10px; }
  .office h2 { font-size: 21px; }
  .office .hint { font-size: 13px; }
  .filters { margin: 10px 0 4px; gap: 6px; }
  .filters input[type=search] { flex-basis: 100%; padding: 9px 12px; }
  .filters select { padding: 8px 10px; font-size: 14px; }
  .chk { font-size: 13px; }
  .legenda { padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }
  .count { margin: 2px 0 8px; }
  .bar { padding-top: 8px; }
  .bar .slots { display: none; }
  .bar .btn.confirma { flex: 1; min-height: 44px; }
}
.cand-info[hidden] { display: none; }
.aviso-curto { display: none; }
@media (max-width: 620px) {
  .top { flex-wrap: nowrap; align-items: center; }
  .brand h1 { font-size: 24px; white-space: nowrap; }
  .aviso-longo { display: none; }
  .aviso-curto { display: inline; }
  .aviso { margin-top: 8px; }
  .steps { padding-block: 6px; margin-block: 8px 6px; }
  .step { padding: 6px 9px; }
  .step .n { display: none; }
  .office { gap: 2px 10px; }
  .chk { padding: 0; }
  .legenda { flex-wrap: nowrap; }
  .legenda span { flex: 0 1 auto; }
  .legenda select { flex: 1 1 auto; min-width: 0; }
  .cand { padding: 10px 12px; gap: 8px; }
  .cand-top { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .cand .photo { width: 48px; height: 60px; }
  .cand-id { gap: 2px; }
  .cand-id h3 { font-size: 16px; }
  .cand-id .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cand-acoes .btn { min-height: 36px; padding: 6px 10px; text-transform: none; letter-spacing: 0; font-size: 14px; }
}

/* ===== Acessível e simples: textos e botões grandes (pensado também para idosos) ===== */
body { font-size: 17px; }
.btn { font-size: 16px; min-height: 48px; padding: 10px 16px; text-transform: none; letter-spacing: 0; border-radius: 10px; }
.tag, .cand-id .tag { font-size: 14px; padding: 2px 10px; }
.hint { margin: 4px 0 0; font-size: 16px; color: var(--muted); }
.office { display: block; }
.office h2 { font-size: 26px; }
.count { font-size: 15px; }
.filters input[type=search] { font-size: 17px; min-height: 52px; padding: 12px 14px; border-radius: 10px; }
.aviso { font-size: 15px; }
.linkbtn { font-size: inherit; min-height: 32px; }

/* Stepper: progresso pelas etapas da urna */
.stepper { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 10px 6px; margin: 14px 0 10px; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stepper li { position: relative; display: flex; justify-content: center; }
.stepper li + li::before { content: ""; position: absolute; top: 21px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li.feito + li::before, .stepper li.feito + li.feito::before { background: var(--confirma); }
.stepper button { position: relative; z-index: 1; background: none; border: 0; padding: 0 2px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; width: 100%; }
.stepper .bola { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--font-display); background: var(--surface); color: var(--muted); border: 3px solid var(--line); }
.stepper .rot { font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
.stepper li.feito .bola { background: var(--confirma); border-color: var(--confirma); color: var(--confirma-ink); }
.stepper li.atual .bola { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 15%, transparent); }
.stepper li.atual.feito .bola { color: var(--confirma-ink); border-color: var(--ink); }
.stepper li.atual .rot { color: var(--ink); }
.progresso { margin: 8px 0 0; text-align: center; font-size: 15px; color: var(--muted); }

/* Card */
.cand { padding: 14px; gap: 10px; }
.cand-top { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cand .photo { width: 76px; height: 95px; border-radius: 8px; }
.cand-id h3 { font-size: 19px; }
.bio { margin: 0; font-size: 16px; line-height: 1.45; }
.digits.sm span { width: 26px; height: 36px; font-size: 20px; }
.cand-acoes .btn { min-height: 50px; font-size: 17px; font-weight: 700; }
.cand-info, .cand-info dl, .kv { font-size: 16px; }
.kv .lbl, .sec h4 { font-size: 14px; }
.kv .det { font-size: 15px; }
.kv strong { font-size: 20px; }
.feitos { font-size: 16px; }
.src, .credits { font-size: 14px; }
.ficha-btn { min-height: 50px; display: grid; place-items: center; }
.more-btn { width: 100%; }
.nav .btn { flex: 1; }
.bar .btn.confirma { min-height: 52px; font-size: 18px; }
.row .c { font-size: 14px; }
.row .nm { font-size: 17px; }
.sheet .btn { min-height: 50px; }

@media (max-width: 620px) {
  .stepper { margin: 10px -16px 8px; padding-inline: 8px; }
  .stepper .bola { width: 40px; height: 40px; font-size: 17px; }
  .stepper li + li::before { top: 19px; }
  .stepper .rot { font-size: 13px; }
  .cand { padding: 12px; }
  .cand-top { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .cand .photo { width: 72px; height: 90px; }
  .cand-id h3 { font-size: 18px; }
  .cand-acoes .btn { min-height: 48px; font-size: 16px; }
  .digits.sm span { width: 22px; height: 30px; font-size: 17px; }
  .brand h1 { font-size: 26px; }
  .aviso { font-size: 14px; }
  .office h2 { font-size: 24px; }
  .hint { font-size: 16px; }
}
.office .hint { font-size: 16px; }
.stepper .rot { overflow-wrap: normal; word-break: normal; hyphens: none; }
@media (min-width: 621px) {
  .cand-top { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .cand .photo { width: 84px; height: 105px; }
  .cand-acoes .btn { min-width: 220px; }
  .stepper .rot { font-size: 15px; }
}
@media (max-width: 420px) {
  .stepper .rot { font-size: 12.5px; letter-spacing: -0.01em; }
  .stepper button { padding: 0; }
}
.brand p { font-size: 17px; }
.bar .slot { font-size: 15px; padding: 4px 8px; }
.filters select { font-size: 16px; min-height: 52px; padding: 10px 12px; border-radius: 10px; flex: 1 1 200px; min-width: 0; }
@media (max-width: 620px) { .filters select { font-size: 16px; padding: 10px; flex: 1 1 140px; } }

/* ---- Tela de introdução ---- */
.intro-btn { min-height: 56px; font-size: 20px; }

.rodape-links { margin: 24px 0 0; font-size: 15px; color: var(--muted); text-align: center; }
.acoes-colinha { flex-direction: column; align-items: stretch; }
.acoes-colinha .btn { width: 100%; min-height: 52px; font-size: 17px; }
.acoes-colinha .limpar { color: var(--corrige); border: 0; }
.preview { width: 100%; max-width: 420px; }
.faltam { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.faltam p { margin: 0; font-size: 16px; font-weight: 600; }
.faltam .nada { font-weight: 400; font-size: 15px; }
.falta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; }
.falta .btn { min-width: 120px; }
.pronta { margin: 0; font-size: 17px; font-weight: 600; color: var(--confirma); }
.toast { top: auto; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); font-size: 16px; max-width: calc(100% - 32px); text-align: center; }
.onde-votar { display: flex; flex-direction: column; gap: 10px; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 14px; font-size: 16px; line-height: 1.45; }
.onde-votar p { margin: 0; }
.onde-votar .btn { display: grid; place-items: center; text-decoration: none; min-height: 52px; font-weight: 700; color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink); }
section + .onde-votar, .wrap > .onde-votar { margin-top: 24px; }
.estado { font-size: 16px; font-weight: 700; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.carregando { text-align: center; color: var(--muted); font-size: 15px; padding: 20px 0; }
.insta-btn { overflow-wrap: anywhere; text-align: center; line-height: 1.25; }
.fab-topo { position: fixed; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 11; min-height: 52px; min-width: 52px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--surface); background: var(--key); color: var(--key-ink); font: 700 17px var(--font-body); display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 30%, transparent); }
.fab-topo span { font-size: 22px; line-height: 1; }
.fab-topo[hidden] { display: none; }
@media (min-width: 621px) { .fab-topo { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: max(16px, calc(50% - 490px + 16px)); } }
.cand-id .tag { white-space: normal; line-height: 1.3; }
@media (max-width: 620px) {
  .top { flex-wrap: nowrap; }
  .brand { min-width: 0; }
  .estado { font-size: 14px; padding: 6px 10px; }
}
@media (max-width: 420px) { .estado { display: none; } }

/* Colinha em tela cheia */
.sheet-cheia { align-items: stretch; background: var(--bg); }
.sheet-cheia .panel { max-width: 720px; width: 100%; height: 100%; max-height: 100%; border-radius: 0; padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 721px) { .sheet-cheia .panel { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* Carregando a imagem da colinha */
.preview-box { width: 100%; max-width: 420px; align-self: center; min-height: 200px; display: grid; place-items: center; }
.gerando { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; font-size: 17px; color: var(--muted); }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--confirma); animation: girar 0.9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }
.sheet-cheia .panel { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-cheia .panel > * { flex-shrink: 0; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dupla .btn { width: 100%; min-height: 56px; font-size: 18px; }
/* Botões da colinha: mesma altura e alinhados na linha, sem margens herdadas (ex.: button + button). */
.acoes-colinha { gap: 10px; }
.acoes-colinha > *, .acoes-colinha .btn, .dupla > .btn { margin: 0; }
.dupla { align-items: stretch; }


/* ---- Abertura (home) ---- */
.intro { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; padding-block: 32px 48px; }
.intro-topo { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.bandeira { width: 64px; height: auto; border-radius: 4px; box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 15%, transparent); margin-bottom: 6px; }
.intro-ano { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.intro h1 { margin: 0; font: 800 clamp(36px, 9vw, 52px)/1.02 var(--font-display); letter-spacing: -0.02em; }
.intro-lead { margin: 4px 0 0; max-width: 30ch; font-size: 19px; line-height: 1.5; color: var(--muted); }
.intro-estados { display: flex; flex-direction: column; gap: 18px; }
.intro-estados h2 { margin: 0; font: 700 22px/1.2 var(--font-display); text-align: center; }
.estados-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 621px) { .estados-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.estado-btn { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; text-align: left;
  font: 600 17px/1.2 var(--font-body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer;
  transition: border-color .15s, background-color .15s; }
.estado-btn:hover { border-color: var(--ink); }
.estado-btn:focus-visible { outline: 3px solid var(--confirma); outline-offset: 2px; }
.estado-btn.atual { border-color: var(--confirma); background: color-mix(in srgb, var(--confirma) 8%, var(--surface)); }
.estado-bandeira { flex: none; width: 36px; height: 25px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.estado-bandeira.sem { display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-2); }
.intro-btn { min-height: 56px; font-size: 20px; }
.intro-aviso { margin: 0; text-align: center; font-size: 15px; line-height: 1.55; color: var(--muted); padding-top: 28px; border-top: 1px solid var(--line); }
.intro-aviso strong { color: var(--ink); }
.intro .linkbtn { align-self: center; margin-top: -24px; font-size: 15px; color: var(--muted); }

.estados-grade { grid-auto-rows: 1fr; }
.estado-btn span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .estado-btn { gap: 10px; padding: 10px 12px; font-size: 16px; } .estado-bandeira { width: 32px; height: 22px; } }

/* ---- Topo da lista: botão de início + título + estado ---- */
.home-btn { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); cursor: pointer; }
.home-btn:hover { border-color: var(--ink); }
.home-btn:focus-visible { outline: 3px solid var(--confirma); outline-offset: 2px; }
.brand { min-width: 0; }
.brand .estado-atual { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.estado-atual img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }

/* ---- Animações ao escolher ---- */
@keyframes passo-feito { 0% { transform: scale(.6); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes linha-enche { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes passo-acende { 0% { transform: scale(.85); box-shadow: 0 0 0 0 color-mix(in srgb, var(--confirma) 55%, transparent); }
  60% { transform: scale(1.12); box-shadow: 0 0 0 12px color-mix(in srgb, var(--confirma) 0%, transparent); }
  100% { transform: scale(1); } }
@keyframes rotulo-acende { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes botao-pulso { 0% { transform: scale(1); } 30% { transform: scale(1.05); box-shadow: 0 0 0 6px color-mix(in srgb, var(--confirma) 35%, transparent); } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
@keyframes conta-sobe { 0% { transform: translateY(60%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .stepper li.anim-feito .bola { animation: passo-feito .45s cubic-bezier(.3, 1.4, .5, 1) both; }
  .stepper li.anim-prox::before { background: var(--confirma); transform-origin: left center; animation: linha-enche .4s ease-out .15s both; }
  .stepper li.anim-prox .bola { animation: passo-acende .6s ease-out .45s both; }
  .stepper li.anim-prox .rot { animation: rotulo-acende .35s ease-out .5s both; }
  .bar .btn.anim-bump { animation: botao-pulso .6s ease-out .1s; }
  .bar .btn.anim-bump .conta { display: inline-block; animation: conta-sobe .35s ease-out .15s both; }
  .stepper .bola, .stepper .rot { transition: background-color .25s, border-color .25s, color .25s; }
}

/* ---- Filtros como botões + painel de opções (substitui o <select> nativo) ---- */
.picker { flex: 1 1 140px; min-width: 0; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 16px var(--font-body); text-align: left; cursor: pointer; }
.picker span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
.picker:hover { border-color: var(--ink); }
.picker:focus-visible { outline: 3px solid var(--confirma); outline-offset: 2px; }
.sheet-opcoes .panel { max-height: 80%; gap: 12px; }
.opcoes { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; margin-inline: -4px; padding: 2px 4px; }
.opcao { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 17px var(--font-body); text-align: left; cursor: pointer; flex: none; }
.opcao:hover { border-color: var(--ink); }
.opcao.atual { border-color: var(--confirma); background: color-mix(in srgb, var(--confirma) 10%, var(--surface)); }
.opcao .marca { color: var(--confirma); font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .sheet-opcoes .panel { animation: sobe .22s ease-out; }
  @keyframes sobe { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.picker .picker-rot { color: var(--muted); font-weight: 500; }

/* ---- Stepper com 6 passos (duas vagas do Senado) e mais respiro ---- */
.stepper { margin: 24px 0 22px; padding-block: 10px 8px; }
.stepper .bola { width: 40px; height: 40px; font-size: 16px; border-width: 2.5px; }
.stepper li + li::before { top: 19px; }
.stepper .rot { font-size: 13px; line-height: 1.15; }
@media (max-width: 620px) {
  .stepper { margin: 20px -16px 18px; padding-inline: 4px; }
  .stepper .bola { width: 34px; height: 34px; font-size: 14px; border-width: 2px; }
  .stepper li + li::before { top: 16px; height: 2.5px; }
  .stepper .rot { font-size: 11px; letter-spacing: -0.01em; }
  .stepper button { gap: 5px; padding: 0 1px; }
}
@media (max-width: 360px) { .stepper .rot { font-size: 10px; } }

/* ---- Painel "Mais informações" ---- */
.sheet-info .panel { max-height: 90%; gap: 0; padding: 0; overflow: hidden; }
.info-cabeca { padding: 18px 16px 12px; border-bottom: 1px solid var(--line); flex: none; }
.info-cabeca .bio { margin: 10px 0 0; }
.info-corpo { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; min-height: 0; }
.info-rodape { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.info-rodape .btn { min-height: 52px; font-size: 17px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Impressão: só a imagem da colinha ---- */
#impressao { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body > *:not(#impressao) { display: none !important; }
  body { background: #fff !important; }
  #impressao { display: flex !important; justify-content: center; align-items: flex-start; }
  #impressao img { width: 100%; max-width: 180mm; max-height: 270mm; object-fit: contain; }
}

/* ---- Perguntas frequentes (abertura) ---- */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq h2 { margin: 0 0 6px; font: 700 20px/1.2 var(--font-display); text-align: center; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 22px/1 var(--font-display); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; font-size: 16px; line-height: 1.55; color: var(--muted); }

/* ---- Conteúdo estático (antes do app carregar) e páginas por estado ---- */
.lista-ufs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.lista-ufs a, .outros a, .indice a, .migalhas a { color: var(--ink); }
.pagina-uf { max-width: 860px; padding-block: 24px 48px; display: flex; flex-direction: column; gap: 18px; }
.pagina-uf h1 { margin: 0; font: 800 clamp(30px, 7vw, 44px)/1.08 var(--font-display); letter-spacing: -0.02em; }
.pagina-uf .lead { margin: 0; font-size: 19px; line-height: 1.5; color: var(--muted); }
.pagina-uf .cta { align-self: flex-start; min-height: 56px; padding-inline: 24px; font-size: 18px; display: inline-grid; place-items: center; text-decoration: none; }
.pagina-uf .nota, .migalhas, .indice { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.pagina-uf section h2, .outros h2 { margin: 18px 0 10px; font: 700 24px/1.2 var(--font-display); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pagina-uf section h2 span { font: 500 15px var(--font-body); color: var(--muted); }
.pagina-uf table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 16px; }
.pagina-uf th, .pagina-uf td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.pagina-uf th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.pagina-uf td.n { font-family: var(--font-digit); font-weight: 600; }
.pagina-uf tr:last-child td { border-bottom: 0; }
.outros p { margin: 0; line-height: 1.9; }

/* Salvar no iPhone (toque longo na imagem) */
.salvar-dica { margin: 0; font-size: 17px; line-height: 1.5; }
.salvar-img { width: 100%; max-width: 420px; align-self: center; border-radius: 10px; -webkit-touch-callout: default; user-select: auto; }

/* Filtro de partido com várias escolhas */
.multi-dica { margin: -4px 0 0; color: var(--muted); font-size: 15px; }
.multi .opcao { cursor: pointer; }
.multi .opcao input { width: 22px; height: 22px; accent-color: var(--confirma); flex: none; margin: 0; }
.multi-acoes { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; flex: none; }
.multi-acoes .btn { min-height: 52px; font-size: 17px; }
.picker.ativo { border-color: var(--confirma); box-shadow: inset 0 0 0 1px var(--confirma); }
.empty .btn { margin-top: 10px; min-height: 48px; }
