/* Larger type and touch targets, preserving the existing visual identity. */
body{font-size:16px;line-height:1.5}
main{min-width:0;padding:36px 30px 24px}
aside{overflow-y:auto;padding-top:26px}
nav button{min-height:48px;padding:12px;font-size:20px}
nav button span{font-size:15px;line-height:1.4}
nav b{font-size:12px}
.menu-toggle{display:none}
.filter-toggle{display:none}
.ranking-explainer summary{padding:4px 22px 18px;font-size:13px;color:#52737b;cursor:pointer;min-height:44px;line-height:1.7}
.eyebrow,.navlabel{font-size:11px}
h1{font-size:34px;line-height:1.25;letter-spacing:-1px}
header p{font-size:15px;color:#647b82;line-height:1.6}
.outline,.primary,.toolbar .primary,.back{font-size:14px;min-height:44px;padding:11px 16px}
.back{padding-left:0}
.notice,.notice #updated{font-size:12px;line-height:1.6}
.filters label,.status-filter{font-size:11px;letter-spacing:.6px;color:#60777e}
select,.status-filter select,.search{font-size:16px;min-height:48px;padding:11px 12px}
.filters{grid-template-columns:1.1fr 1.4fr 1.6fr .8fr 44px;gap:12px}
.reset{height:48px;min-width:44px}
.stat label{font-size:13px;line-height:1.5;color:#667e85;max-width:90%;display:block}
.stat strong{font-size:34px;line-height:1.25}
.stat small{font-size:12px;line-height:1.65;color:#6c8188}
.stat .named-person{font-size:12px}
.panel h2,.table-head h2{font-size:21px;line-height:1.4}
.panel p,.table-head p,.toolbar small{font-size:13px;line-height:1.75;color:#617980}
.table-head{align-items:flex-start;gap:20px}
.table-head>div{min-width:0}
.search{width:280px;max-width:100%}
.table-wrap{max-width:100%;overscroll-behavior-x:contain}
table{font-size:15px}
th{font-size:11px;letter-spacing:.5px;white-space:normal;color:#60777e;padding:14px 12px;line-height:1.5}
td{padding:17px 12px}
.candidate{min-width:220px;gap:14px}
.candidate button{min-height:48px;min-width:0}
.candidate strong{font-size:16px;line-height:1.5;white-space:normal;max-width:330px}
.candidate small{font-size:12px;line-height:1.6;color:#657d85;white-space:normal}
.avatar{width:56px;height:56px;flex-basis:56px;font-size:16px}
.named-person>.avatar{width:36px;height:36px;flex-basis:36px;font-size:11px}
.detail-identity>.avatar{width:88px;height:88px;flex-basis:88px}
.detail-top h2{font-size:27px;line-height:1.35}
.detail-top p{font-size:14px;line-height:1.65}
.detail-identity{min-width:0}
.status-chips{min-width:185px;max-width:280px;gap:6px}
.status-pill{font-size:11px;padding:5px 9px}
.status-chips small{font-size:12px;color:#5b747c;line-height:1.6}
.status-legend{font-size:12px;gap:12px 18px;line-height:1.6}
.ranking-note{font-size:12px;line-height:1.8;color:#647b82}
.rank-tabs button{font-size:14px;min-height:46px;padding:11px 16px}
.rank-tabs button.active{border-width:2px;padding:10px 15px}
.rank-number{font-size:16px}
.ranking-table .candidate{min-width:220px}
.ranking-table th{font-size:11px}
.votes{font-size:17px}
.percent{font-size:14px}
.percent i{width:40px}
.star{font-size:24px;width:44px;height:44px;min-width:44px}
input[type=checkbox]{width:22px;height:22px;flex-shrink:0}
.compare-pick{display:inline-flex;align-items:center;gap:10px;min-height:44px;min-width:44px;cursor:pointer}
.compare-label{display:none}
.pagination{font-size:13px;gap:14px;flex-wrap:wrap}
.pagination button{font-size:16px;min-width:44px;min-height:44px;padding:8px 12px}
.levels{flex-wrap:wrap}
.levels button{font-size:14px;min-height:44px;padding:10px 14px}
.barrow{font-size:13px;grid-template-columns:minmax(175px,1.3fr) 1fr 75px;gap:12px}
.barrow strong{font-size:14px}
.barname>.avatar{width:36px;height:36px;flex-basis:36px;font-size:11px}
.barname{gap:9px}
.insight strong{font-size:15px}
.insight p{font-size:13px}
.pill{font-size:12px}
.method h3{font-size:19px}
.method p,.method li,.quotient-panel p{font-size:15px;line-height:1.9}
.party-sub,.no-records{font-size:12px;color:#657d85}
.seat-number{font-size:21px;min-width:38px}
.municipality-link .municipality-arrow{font-size:13px}
.chip{font-size:14px}
footer{font-size:12px;line-height:1.7;color:#6e848b}
#toast{font-size:14px;max-width:calc(100vw - 32px);width:max-content}
@media(max-width:1200px){
 .grid{grid-template-columns:1fr}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .filters{grid-template-columns:1fr 1.3fr 1.5fr .8fr 44px}
 .barrow{grid-template-columns:minmax(180px,1fr) 1.5fr 80px}
}
@media(min-width:761px) and (max-width:1000px){
 .filters{grid-template-columns:1fr 1fr}
 .reset{grid-column:2;justify-self:end}
 .table-head{flex-wrap:wrap}
 .status-filter{margin-left:0;min-width:260px}
}
@media(max-width:760px){
 aside{position:sticky;inset:auto;top:0;z-index:30;width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px;overflow:visible;box-shadow:0 3px 15px #0b293326}
 .brand{font-size:26px;padding:0;width:max-content;max-width:100%;white-space:nowrap}
 .brand .logo{font-size:30px;margin-right:6px}
 .brand small,.workspace,.navlabel,.aside-bottom,.profile{display:none}
 .menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:104px;min-height:48px;font-size:16px;font-weight:600;padding:10px 14px;border:1px solid #4c727a;border-radius:8px;background:#24484f;color:white}
 .menu-toggle>span{font-size:22px;line-height:1}
 .menu-toggle[aria-expanded=true]{background:#32635f;border-color:#84cfc0}
 aside nav{display:none;position:absolute;top:calc(100% - 1px);left:0;right:0;margin:0;padding:12px 16px 18px;max-height:calc(100dvh - 76px);overflow:auto;background:#102e35;border-top:1px solid #36545c;box-shadow:0 12px 18px #17383a29}
 aside.nav-open nav{display:grid;grid-template-columns:1fr;gap:4px}
 aside nav button{width:100%;min-height:52px;white-space:normal;margin:0;padding:12px 14px;gap:14px;font-size:21px;line-height:1.5}
 aside nav button span{font-size:16px}
 aside nav b{font-size:13px}
 main{margin:0;padding:24px 14px;max-width:100%}
 header{flex-direction:column;align-items:stretch;gap:16px;margin-bottom:22px}
 h1{font-size:29px;letter-spacing:-.8px;margin:10px 0;overflow-wrap:anywhere}
 header p{font-size:15px}
 header .outline{align-self:flex-start;font-size:14px;min-height:44px;padding:11px 15px}
 .eyebrow{font-size:10px;letter-spacing:1.1px}
 .notice{gap:8px;font-size:12px;padding:12px;align-items:flex-start}
 .notice #updated{font-size:12px;flex-basis:100%;padding-left:15px}
 .filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:16px 10px;margin:18px 0}
 .filters label{min-width:0;font-size:11px;gap:7px}
 .filter-toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:64px;padding:13px 15px;margin:18px 0;background:white;border:1px solid #dce6e4;border-radius:9px;text-align:left;color:#254c54}
 .filter-toggle>span:first-child{min-width:0}
 .filter-toggle small{display:block;font-size:10px;letter-spacing:1px;color:#6d858a;margin-bottom:4px}
 .filter-toggle strong{font-size:14px;font-weight:600;line-height:1.6;display:block;overflow-wrap:anywhere}
 .filter-toggle>span:last-child{font-size:23px;color:#48796f}
 .filter-toggle[aria-expanded=true]{border-color:#8fbfb0;background:#f6fbf8}
 .filters:not(.filters-open){display:none}
 .filters label:nth-child(1){grid-area:1/1}
 .filters label:nth-child(4){grid-area:1/2}
 .filters label:nth-child(2){grid-area:2/1/3/-1}
 .filters label:nth-child(3){grid-area:3/1/4/-1}
 select,.status-filter select,.search{font-size:16px;min-width:0;min-height:48px}
 .reset{display:none}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:20px}
 .stat{padding:16px 13px;border-radius:10px}
 .stat label{font-size:12px;max-width:88%;min-height:36px}
 .stat strong{font-size:28px;letter-spacing:-.8px;margin:10px 0}
 .stat small,.stat small .named-person{font-size:12px;line-height:1.6}
 .stat .mini{font-size:14px;right:10px;top:15px}
 .stat small .avatar{width:32px;height:32px;flex-basis:32px}
 .grid{gap:16px}
 .panel{padding:18px}
 .panel h2,.table-head h2{font-size:21px;letter-spacing:-.4px}
 .panel p,.table-head p,.toolbar small{font-size:13px;line-height:1.7}
 .table-head{padding:18px 16px;gap:16px;flex-direction:column}
 .table-head .search{width:100%}
 .toolbar{padding:0 16px 16px;gap:14px}
 .toolbar .search{width:100%}
 .toolbar .primary{width:100%;min-height:48px;font-size:14px}
 .status-filter{width:100%;min-width:0;max-width:none;margin-left:0;font-size:11px}
 .status-filter select{max-width:none}
 .rank-tabs{padding:0 16px 16px;gap:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .rank-tabs>button:first-child{grid-column:1/-1}
 .rank-tabs button{min-height:48px;text-align:left;white-space:normal;font-size:15px;padding:11px 14px}
 .rank-tabs button.active{padding:10px 13px}
 .status-legend{padding:0 16px 14px;font-size:12px;gap:9px 14px}
 .ranking-note{padding:0 16px 16px;font-size:12px;line-height:1.8}
 .ranking-explainer summary{padding:4px 16px 18px;font-size:13px;line-height:1.7}
 .ranking-table,.ranking-table tbody{display:block;width:100%}
 .ranking-table thead{display:none}
 .ranking-table tbody{padding:0 12px 12px;display:grid;gap:14px}
 .ranking-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;background:white;border:1px solid #dce7e3;border-radius:12px;padding:14px;white-space:normal}
 .ranking-table td{display:block;padding:0;border:0;min-width:0}
 .ranking-table .cell-rank{grid-area:1/1;align-self:center;font-size:17px;white-space:normal}
 .ranking-table .cell-rank:before{content:'Posição em votos: ';font:500 12px 'DM Sans',sans-serif;color:#647c84}
 .ranking-table .cell-save{grid-area:1/2;justify-self:end}
 .ranking-table .cell-candidate{grid-area:2/1/3/-1}
 .ranking-table .candidate{min-width:0;width:100%;gap:14px;align-items:center}
 .ranking-table .candidate>.avatar{width:72px;height:72px;flex-basis:72px;font-size:20px}
 .ranking-table .candidate button{min-width:0;min-height:56px;flex:1}
 .ranking-table .candidate strong{font-size:18px;line-height:1.4;max-width:none;overflow-wrap:anywhere}
 .ranking-table .candidate small{font-size:14px;color:#657b83;line-height:1.5;margin-top:6px}
 .ranking-table .cell-status{grid-area:3/1/4/-1;padding-top:2px}
 .ranking-table .status-chips{min-width:0;max-width:none;gap:6px}
 .ranking-table .status-pill{font-size:12px;padding:5px 9px}
 .ranking-table .status-chips small{font-size:13px;line-height:1.55}
 .ranking-table .cell-votes{grid-area:4/1;font-size:25px;color:#17484c;padding-top:5px}
 .ranking-table .cell-votes:before{content:'Votos registrados';display:block;font-size:12px;font-weight:500;line-height:1.5;color:#647c84;margin-bottom:4px}
 .ranking-table .cell-percent{grid-area:4/2;align-self:end;padding-bottom:3px}
 .ranking-table .cell-percent:before{content:'% dos nominais';display:block;font-size:11px;line-height:1.5;color:#647c84;margin-bottom:4px}
 .ranking-table .percent{font-size:17px;font-weight:650}
 .ranking-table .percent i{display:none}
 .ranking-table .cell-compare{grid-area:5/1/6/-1;border-top:1px solid #e5ece9;padding-top:5px}
 .compare-pick{width:100%;min-height:44px;font-size:13px}
 .compare-label{display:inline;color:#506e76}
 .ranking-table .no-records{max-width:none;font-size:12px}
 .ranking-table td.empty{grid-column:1/-1;padding:20px 4px;font-size:14px}
 .pagination{padding:16px;gap:12px;font-size:13px;line-height:1.6}
 .pagination button{min-height:46px;min-width:46px}
 .pagination>span{flex:1;min-width:140px}
 .detail-top{gap:18px}
 .detail-identity{align-items:flex-start;gap:14px}
 .detail-identity>.avatar{width:76px;height:76px;flex-basis:76px}
 .detail-identity h2{font-size:24px;overflow-wrap:anywhere}
 .detail-top p{font-size:14px}
 .detail-identity .status-chips{gap:7px}
 .detail-identity .status-chips small{font-size:12px;margin:0}
 .levels{width:100%;gap:5px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .levels button{font-size:14px;min-height:46px;white-space:normal;padding:9px}
 #detail-table table,#detail-table tbody{display:block;width:100%}
 #detail-table thead{display:none}
 #detail-table tbody{display:grid;gap:12px;padding:0 12px 12px}
 #detail-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:16px;border:1px solid #dce7e3;border-radius:11px;white-space:normal}
 #detail-table td{display:block;border:0;padding:0;min-width:0}
 #detail-table .rank-number{grid-column:1/-1;font-size:14px;color:#658087}
 #detail-table .detail-name{grid-column:1/-1}
 #detail-table .candidate{min-width:0;width:100%}
 #detail-table .candidate strong{font-size:17px;max-width:none}
 #detail-table .candidate small{font-size:12px}
 #detail-table .votes{font-size:23px}
 #detail-table .votes:before{content:'Votos';display:block;font-size:12px;font-weight:400;color:#657c84;margin-bottom:4px}
 #detail-table .detail-percent{font-size:17px;text-align:right;align-self:end}
 #detail-table .detail-percent:before{content:'% do candidato';display:block;font-size:11px;color:#657c84;margin-bottom:4px}
 #detail-table td.empty{grid-column:1/-1;font-size:14px;padding:18px 0}
 .candidate .municipality-link{min-height:48px;gap:12px}
 .municipality-link .municipality-arrow{font-size:12px}
 .barrow{grid-template-columns:minmax(0,1fr) 74px;gap:8px;margin:22px 0;font-size:14px}
 .barrow .barname{grid-column:1;white-space:normal;min-width:0}
 .barrow .bar-label{white-space:normal;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
 .barname>.avatar{width:42px;height:42px;flex-basis:42px}
 .barrow>.track{grid-column:1/-1;grid-row:2;height:10px}
 .barrow>strong{grid-column:2;grid-row:1;font-size:15px}
 .insight{padding:14px;gap:10px}
 .insight strong{font-size:15px}
 .insight p{font-size:13px}
 .chip{font-size:14px;max-width:100%}
 .chip .named-person{min-width:0}
 .chip button{min-width:36px;min-height:40px}
 .method p,.method li,.quotient-panel p{font-size:15px}
 footer{font-size:12px;gap:7px;margin-top:22px}
 #toast{bottom:16px;padding:12px 16px;line-height:1.6}
}
@media(max-width:360px){.ranking-table .candidate>.avatar{width:64px;height:64px;flex-basis:64px}.stat strong{font-size:25px}.brand{font-size:23px}.menu-toggle{min-width:94px;padding-inline:10px}}
@media print{aside,.menu-toggle,.filter-toggle{display:none!important}.ranking-table thead,#detail-table thead{display:table-header-group}.ranking-table,.ranking-table tbody,#detail-table table,#detail-table tbody{display:table}.ranking-table tbody tr,#detail-table tbody tr{display:table-row}.ranking-table td,#detail-table td{display:table-cell}.cell-rank:before,.cell-votes:before,.cell-percent:before,#detail-table .votes:before,#detail-table .detail-percent:before{display:none}}
/* Historical comparisons remain readable without horizontal page scrolling. */
.detail-actions{display:flex;gap:10px;flex-wrap:wrap}
.history-picker{margin-bottom:22px}.history-controls{display:grid;grid-template-columns:1fr 1.4fr .7fr;gap:16px;align-items:end}
.history-controls label{display:grid;gap:9px;font-size:12px;color:#526e75;font-weight:650}.history-controls input{width:100%;min-height:48px}.history-controls select{min-height:48px}
.history-picker .history-scope{margin:20px 0 8px;color:#255e55;font-weight:650}.history-picker #history-count{margin:0;font-size:13px}
.history-years{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:22px}.history-year-label{display:block;font-size:13px;letter-spacing:1px;color:#567b76;margin-bottom:20px;font-weight:700}
.history-year .detail-identity{align-items:center}.history-year .detail-identity p{margin:8px 0 0}.history-year .detail-identity .avatar{align-self:center;width:72px;height:72px;flex-basis:72px}
.history-votes{display:block;font-size:36px;color:#174d48;margin:22px 0 9px;font-variant-numeric:tabular-nums}.history-votes small{font-size:15px;font-weight:400}
.history-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.history-stats .stat strong{font-size:29px}.history-method{margin-top:22px}.history-method p{font-size:14px;line-height:1.8;margin-bottom:12px}.history-table .gain{color:#08724c;font-weight:700}.history-table .loss{color:#a33e39;font-weight:700}
@media(max-width:1000px){.history-controls{grid-template-columns:1fr 1fr}.history-controls label:nth-child(2){grid-row:2;grid-column:1/-1}.history-stats{grid-template-columns:1fr}}
@media(max-width:760px){.history-years{grid-template-columns:1fr}.history-year .detail-identity h2{font-size:22px}.history-year .status-chips{max-width:none}.history-table,.history-table tbody,.history-table tr,.history-table td{display:block;width:100%}.history-table thead{display:none}.history-table{white-space:normal}.history-table tr{padding:14px;border-bottom:1px solid #dfe9e5}.history-table td{border:0;display:flex;justify-content:space-between;gap:14px;padding:8px 0}.history-table td:before{content:attr(data-label);color:#73888a;font-size:13px}.history-table td:first-child{display:block;font-size:17px}.history-table td:first-child:before{display:none}.history-table td:last-child{border:0}.history-controls{grid-template-columns:1fr}.history-controls label:nth-child(2){grid-row:auto;grid-column:auto}.history-controls select{width:100%;min-width:0}.history-year .detail-identity>div{min-width:0}.history-year h2{overflow-wrap:anywhere}}
.history-view .filters{grid-template-columns:1fr 44px}
.history-view .filters>label:nth-child(1),.history-view .filters>label:nth-child(2),.history-view .filters>label:nth-child(4){display:none}
.history-view .filters>label:nth-child(3){grid-column:1;grid-row:1}
@media(max-width:760px){.history-view .filters{grid-template-columns:1fr}}
