/* GPS27 Eleitoral: identidade e hierarquia da consulta pública. */
:root { --brand-navy: #0B3D91; --brand-royal: #1E6BD6; --brand-cyan: #00B3F0; --brand-gray: #6B7280; --brand-light: #E5E7EB; --bg: #f5f7fa; --surface-2: #edf2f8; --border: #d7dfe9; --text: #142b49; --muted: #526477; --blue: var(--brand-royal); --green: #087f8c; }
body { background: var(--bg); }
.shell { width: min(1240px, calc(100% - 40px)); }
header { min-height: 72px; background: #fff; backdrop-filter: none; }
.brand-logo { flex: 0 0 auto; width: 284px; height: 64px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.brand-logo img { object-position: left center; }
.scope-chip { border: 0; border-radius: 4px; background: #edf2f8; }
.scope-live { animation: none; box-shadow: none; }
main { padding-top: 22px; }
.intro { max-width: none; }
.eyebrow { color: var(--muted); font-size: .69rem; letter-spacing: .12em; }
h1 { max-width: none; margin: 8px 0; font-size: clamp(1.55rem, 2.6vw, 2.25rem); line-height: 1.2; letter-spacing: -.035em; }
.lead { max-width: 920px; font-size: .93rem; line-height: 1.55; }
.mode-switch { display: flex; flex-wrap: nowrap; width: 100%; gap: 0; margin-top: 22px; padding: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; }
.mode-button { flex: 1 1 auto; min-height: 48px; padding: 10px 12px; border-radius: 0; border-bottom: 3px solid transparent; font-size: .86rem; color: var(--muted); }
.mode-button[aria-pressed="true"], .mode-button.intelligence-entry[aria-pressed="true"] { border-bottom-color: var(--blue); background: transparent; color: var(--blue); box-shadow: none; }
.mode-button.intelligence-entry { color: var(--muted); }
.metrics { margin-top: 20px; border-radius: 8px; box-shadow: none; }
.metrics .card { min-height: 90px; padding: 17px 20px; }
.card-value { margin-top: 9px; font-size: 1.75rem; }
.panel { padding: 22px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: none; }
.panel-head { margin-bottom: 16px; }
.panel h2 { font-size: 1.08rem; }
.card, .candidate-card, .research-card, .intelligence-module-switch, .comparison-panel { box-shadow: none; }
.candidate-card, .research-card, .office-tab, .profile-field, .monitor-card, .transparency-card, .notice { border-radius: 7px; }
.research-card::before { background: var(--blue); width: 3px; }
.research-card:hover { box-shadow: none; }
.research-status-tabs { flex-wrap: wrap; overflow-x: visible; }
.research-status-button { border-radius: 6px; }
.research-status-button.active { background: var(--blue); box-shadow: none; }
.research-result-section { background: #fff; border-radius: 6px; }
.view-switch, .metric-switch { border-radius: 6px; box-shadow: none; }
.view-button, .metric-button { border-radius: 4px; }
.hierarchy-tab.active, .view-button.active, .metric-button.active, .research-status-button.active { background: var(--brand-navy); color: #fff; }
.report-download, .research-approval .approve, .intelligence-module-button.active svg { background: var(--brand-navy); color: #fff; box-shadow: none; }
.intelligence-module-button.active { border-color: var(--brand-royal); box-shadow: none; }
.assistant-tab.active, .office-tab.active { box-shadow: none; }
.profile-bar-track i { background: var(--brand-royal); }
.ifr-strong { background: var(--surface-2) !important; border-color: var(--border) !important; border-radius: 6px; }
.research-detail-block { border-radius: 7px; background: #fff; }
.research-detail-block p, .research-detail-block a { overflow-wrap: anywhere; }
.research-detail-grid { align-items: start; }
.research-methodology { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 7px; }
.research-methodology > summary { padding: 16px; cursor: pointer; font-weight: 700; font-size: .92rem; }
.research-methodology[open] > summary { border-bottom: 1px solid var(--border); }
.research-methodology > .research-detail-grid { padding: 12px; }
.research-quick-facts { background: var(--surface-2); }
.research-bar-label { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.research-bar-row { grid-template-columns: minmax(0, 1fr) minmax(60px, 1.1fr) auto; }
.profile-bar-list { max-height: 340px; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.profile-categories-note { margin: 0 0 12px; color: var(--muted); font-size: .75rem; }
.profile-content { overscroll-behavior: contain; }
dialog.profile-dialog { border-radius: 12px; box-shadow: 0 20px 70px #142b4933; }
dialog.profile-dialog[open] { display: flex; flex-direction: column; }
.profile-dialog-head { flex: 0 0 auto; }
.profile-dialog-head > div { min-width: 0; overflow-wrap: anywhere; }
.modal-close { flex: 0 0 40px; width: 40px; height: 40px; }
.profile-content { flex: 1 1 auto; min-height: 0; max-height: none; }
dialog.profile-dialog::backdrop { background: #142b4966; backdrop-filter: none; }
#analise-2024 { grid-column: 1 / -1; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue) !important; outline-offset: 3px; }
button:not(:disabled):active, .office-tab:active { transform: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 12px 18px; background: #fff; color: var(--blue); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
@media (min-width: 1000px) {
  #painel-2026 { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  #painel-2026 > aside { grid-column: 1; grid-row: 1; }
  #painel-2026 > aside .panel-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  #painel-2026 > .map-primary { grid-column: 2; grid-row: 1; order: 0; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .brand-logo { width: 244px; }
  .appbar-actions { gap: 8px; }
  .status { font-size: .78rem; }
  .mode-switch { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .metrics .card:nth-child(2) { border-right: 0; }
  .metrics .card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .shell { width: 100%; }
  header { min-height: 60px; }
  .brand-logo { width: 132px; height: 54px; }
  main { padding-top: 8px; }
  .metrics { margin: 8px 10px 0; }
  .metrics .card { min-height: 80px; padding: 13px; }
  .card-value { font-size: 1.35rem; }
  .panel { padding: 17px 13px; border-width: 1px 0; border-radius: 0; }
  .research-section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .research-section-head span { font-size: .73rem; line-height: 1.4; letter-spacing: 0; text-transform: none; }
  .research-bar-row { grid-template-columns: minmax(0,1fr) auto; }
  .research-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .research-status-button { flex: 1 1 140px; padding: 8px; white-space: normal; }
  .profile-content { padding: 14px; }
  .profile-dialog-head { padding: 14px; }
  .research-detail-block { padding: 13px; }
  .research-methodology > .research-detail-grid { padding: 8px; }
  .hierarchy-tabs { grid-template-columns: repeat(5,minmax(0,1fr)); overflow-x: visible; }
  .hierarchy-tab { min-width: 0; padding: 10px 2px; font-size: .72rem; }
  .bottom-nav { background: #fff; box-shadow: none; backdrop-filter: none; }
  .bottom-nav-item.active i { background: var(--brand-cyan); box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Readable, touch-accessible controls and bounded error feedback. */
.module-feedback { padding: 12px; border: 1px solid #c67a18; border-radius: 6px; background: #fff8e8; color: #503700; font-size: .875rem; }
.module-feedback p { margin: 0 0 8px; }
.module-feedback button { min-height: 44px; padding: 8px 12px; border: 1px solid currentColor; border-radius: 6px; background: #fff; color: #503700; cursor: pointer; }
.methodology-note { color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.clear-filters-button, .view-button, .metric-button, .bottom-nav-popover button, .research-open, .hierarchy-tab, .comparator-button { min-height: 44px; }
.research-compliance-notice a { display: inline-flex; align-items: center; min-height: 44px; }
.leaflet-control-zoom a, .leaflet-touch .leaflet-control-zoom a, .leaflet-control-fullscreen button { width: 44px; height: 44px; line-height: 44px; }
.leaflet-control-touch-toggle button { min-height: 44px; font-size: .75rem; }
.modal-close { flex-basis: 44px; width: 44px; height: 44px; }
.intelligence-badge, .intelligence-score { color: #28516b; }
.map-shell:fullscreen, .map-shell.map-expanded { margin: 0; }
@media (max-width: 560px) {
  .bottom-nav { grid-template-columns: repeat(5, auto); justify-content: space-around; column-gap: 4px; }
  .bottom-nav-item { min-width: 44px; min-height: 44px; }
  .bottom-nav-menu > summary { height: 100%; }
  .bottom-nav-item.active, .bottom-nav-menu[open] > summary { color: var(--brand-navy); }
  .bottom-nav-item span { white-space: normal; line-height: 1.1; text-align: center; overflow: visible; }
  .card-label, .participation-kpi span, .intelligence-kpi span, .hierarchy-metric span { font-size: .6875rem; }
  .source, .detail-subtitle, .candidate-meta, .municipality-meta { font-size: .75rem; }
  .profile-source a, .profile-link, .research-source a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 340px) {
  .bottom-nav { height: calc(74px + env(safe-area-inset-bottom)); column-gap: 2px; }
  .bottom-nav-item { padding-inline: 3px; }
  .bottom-nav-item span { display: grid; place-items: center; max-width: none; min-height: 2.2em; font-size: .625rem; }
  .bottom-nav-item[data-mobile-mode="candidaturas2026"] span { max-width: 56px; }
  main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}
