/* Base visual compartilhada entre consulta, resultados e apuração. */
:root {
  --gps-primary: #0b3d91;
  --gps-radius: 8px;
  --gps-panel-radius: 12px;
  --gps-panel-gutter-mobile: 16px;
  --gps-page: #f5f7fa;
  --gps-surface: var(--surface, #fff);
  --gps-ink: var(--ink, #142b49);
  --gps-border: var(--line, #d7dfe9);
  --gps-muted: var(--muted, #526477);
  --gps-tint: var(--tint, #edf2f8);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { background: var(--page, var(--gps-page)); color: var(--gps-ink); }
body h1 { font-size: clamp(1.55rem, 2.6vw, 2.25rem); line-height: 1.2; letter-spacing: -.035em; margin: 8px 0 12px; }
body h2, body .panel h2 { font-size: 1.15rem; line-height: 1.35; }
body .eyebrow { font-size: .72rem; letter-spacing: .12em; font-weight: 750; color: var(--gps-muted); }
body .lead, .gps-page .intro > div > p:last-child { font-size: .95rem; line-height: 1.6; color: var(--gps-muted); }
/* Forma comum; cores de seleção, alerta e ações destrutivas continuam semânticas. */
body button:not(.skip-link):not(.bottom-nav-item), body .mode-button, body .gps-button {
  min-height: 44px; border-radius: var(--gps-radius); font-family: inherit;
  font-weight: 650; line-height: 1.35; box-shadow: none;
}
body button:not(.skip-link):not(.bottom-nav-item):disabled { cursor: not-allowed; opacity: .55; }
body :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  min-height: 44px; border-radius: var(--gps-radius); border-color: var(--gps-border); font-family: inherit;
}
body.gps-page summary { min-height: 44px; padding-block: 10px; box-sizing: border-box; }
body .gps-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border: 1px solid var(--gps-border);
  background: var(--gps-surface); color: var(--gps-ink); text-decoration: none; text-align: center;
}
body .gps-button:hover { background: var(--gps-tint); }
body .gps-button[aria-current=page], body .gps-primary, body .actions .gps-primary {
  color: #fff; background: var(--gps-primary); border-color: var(--gps-primary);
}
body .gps-primary:hover:not(:disabled) { color: #fff; background: #082e6e; }
body :is(button,a,input,select,summary,[tabindex="0"]):focus-visible { outline: 3px solid #1e6bd6; outline-offset: 3px; }
body .mode-switch { gap: 8px; flex-wrap: wrap; padding-bottom: 12px; }
body .mode-button { display: inline-flex; justify-content: center; align-items: center; padding: 10px 12px; border: 1px solid var(--gps-border); background: var(--gps-surface); font-size: .86rem; }
body .mode-button[aria-pressed=true], body .mode-button.intelligence-entry[aria-pressed=true] { background: var(--gps-primary); border-color: var(--gps-primary); color: #fff; }
body .mode-button:hover:not([aria-pressed=true]) { background: var(--gps-tint); }
body :is(.panel,.candidate-card,.research-card,.comparison-panel) { border-radius: var(--gps-panel-radius); }
body .panel { padding: 22px; }
.gps-page > main { max-width: 1240px; padding: 24px 20px 64px; margin: auto; }
.gps-page > header { max-width: none; min-height: 80px; padding: 12px max(20px, calc((100vw - 1200px)/2)); background: var(--gps-surface); color: var(--gps-ink); border-bottom: 1px solid var(--gps-border); }
.gps-page > header a { color: var(--gps-primary); }
.gps-page > header img { display: block; width: 284px; max-width: 100%; height: 48px; object-fit: contain; object-position: left center; }
.gps-page .gps-navigation { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding-bottom: 16px; border-bottom: 1px solid var(--gps-border); }
.gps-page :is(section,details,.metric,.candidate,.comparison) { border-radius: var(--gps-panel-radius); border-color: var(--gps-border); }
.gps-page .filters { padding: 20px; background: var(--gps-surface); border: 1px solid var(--gps-border); border-radius: var(--gps-panel-radius); gap: 14px; }
.gps-page :is(th,td) { padding: 12px 14px; }
.gps-page th { background: var(--gps-tint); color: var(--gps-ink); }
.gps-page .intro { align-items: flex-start; }
.gps-page .intro > div:first-child { flex: 1 1 100%; }
.gps-page .intro > button { flex: 0 1 auto; width: auto; }
.gps-page .theme-control { flex-direction: row; width: auto; }
.gps-page .theme-control select { width: auto; }
:root[data-theme=dark] { --gps-primary: #9bcffa; }
:root[data-theme=dark] :is(.gps-primary,.gps-button[aria-current=page]) { color: #10233f; }
:root[data-theme=dark] .gps-primary:hover:not(:disabled) { background: #b8ddfb; color: #10233f; }
:root[data-theme=dark] .gps-page > header img { background: #fff; border-radius: 6px; padding: 4px; }
@media(prefers-color-scheme:dark) {
  :root[data-theme=auto] { --gps-primary: #9bcffa; }
  :root[data-theme=auto] :is(.gps-primary,.gps-button[aria-current=page]) { color: #10233f; }
  :root[data-theme=auto] .gps-primary:hover:not(:disabled) { background: #b8ddfb; color: #10233f; }
  :root[data-theme=auto] .gps-page > header img { background: #fff; border-radius: 6px; padding: 4px; }
}
.tv .gps-navigation { display: none; }
@media(max-width:600px) {
  .gps-page > main { padding: 20px 12px 48px; }
  .gps-page > header { padding: 12px; gap: 12px; flex-wrap: wrap; }
  .gps-page > header img { width: 220px; }
  body .panel, .gps-page .filters { padding: var(--gps-panel-gutter-mobile); }
  body :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
  .gps-page .gps-navigation .gps-button { flex: 1 1 140px; font-size: .85rem; }
  body .mode-button { flex: 1 1 140px; }
}
@media print { .gps-navigation { display: none; } }

/* Pós-eleição: contexto compacto, controles avançados preservados. */
.gps-navigation [aria-current=location] { border-color: var(--gps-primary); font-weight: 750; }
@media(max-width:600px) {
 .gps-page > header { min-height: 56px; padding-block: 8px; }
 .gps-page > header img { width: 180px; height: 36px; }
 .gps-page > main { padding-top: 12px; }
 .gps-page .gps-navigation { margin: 12px 0; gap: 6px; padding-bottom: 10px; }
 .gps-page h1 { margin-block: 6px 8px; }
 .gps-page .intro { gap: 8px; }
}
