/* Apple-minimal theme: shared surfaces, controls and responsive layouts. */
:root{--bg:#f6f7f8;--surface:#fff;--text:#15171a;--muted:#626873;--accent:#246bfe;--border:#e7e8eb;--radius:18px;--shadow:0 1px 2px rgba(20,24,31,.03),0 8px 30px rgba(20,24,31,.04)}
body{font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:#155ed6;text-underline-offset:4px}
.topbar{height:auto;min-height:72px;padding:14px max(24px,calc((100% - 1200px)/2));gap:20px;backdrop-filter:blur(24px)}
.brand{display:inline-flex;align-items:center;gap:12px;font-size:15px;font-weight:650;letter-spacing:-.025em;white-space:nowrap}
.brand-mark{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--border);border-radius:11px;background:var(--bg)}
.brand-mark svg{width:20px;height:20px}
.topbar nav{align-items:center;flex-wrap:wrap;gap:4px}
.topbar nav a{padding:10px 14px;border-radius:10px;font-size:13px;font-weight:550}
.topbar nav a:hover{background:var(--bg);color:var(--text)}
.topbar nav a[aria-current="page"]{background:#edf3ff;color:#155ed6}
.container{width:min(1200px,calc(100% - 108px));margin:54px auto 80px}
h1,h2,p{overflow-wrap:anywhere}
.auth h1,.page-head h1{font-size:clamp(30px,4vw,42px);font-weight:650;line-height:1.08;letter-spacing:-.045em;margin:12px 0 16px}
h2{font-size:17px;font-weight:650;letter-spacing:-.02em;margin:0 0 8px}
p{margin:0 0 20px}
.eyebrow{color:var(--muted);font-size:10px;letter-spacing:.16em}
.auth{width:min(448px,100%);margin:clamp(24px,8vh,80px) auto;padding:40px;border-radius:22px}
.auth h1{font-size:34px}
.auth .subtle-link{display:block;text-align:center;margin-top:24px;font-size:13px;color:#155ed6}
.auth-note{text-align:center;font-size:12px;margin:18px 0 0;color:var(--muted)}
.election-summary{margin:24px 0;padding:16px;border-radius:10px;background:var(--bg)}
.election-summary strong{display:block;font-size:13px;margin-bottom:4px}
.election-summary p{font-size:12px;margin:0;color:var(--muted)}
form label{gap:8px;font-size:12px;margin:20px 0}
input,select{width:100%;min-width:0;height:44px;min-height:44px;padding:0 13px;border-radius:10px;color:var(--text)}
input::placeholder{color:var(--muted);font-size:14px}
button,.button{min-height:44px;padding:10px 17px;border-radius:11px;background:var(--bg);color:var(--text);font-size:14px;font-weight:600;line-height:1.4}
button,a,input,select,.candidate{transition:background-color 150ms ease,border-color 150ms ease,box-shadow 150ms ease,transform 150ms ease}
button:hover,.button:hover{background:#eceef1;transform:translateY(-1px)}
button:active,.button:active{transform:translateY(0)}
.primary{width:auto;background:var(--accent);color:white;box-shadow:0 3px 8px rgba(36,107,254,.12)}
.primary:hover{background:#155ed6;border-color:#155ed6}
.auth .primary{width:100%;min-height:48px;margin-top:4px}
:focus-visible{outline:3px solid rgba(36,107,254,.35);outline-offset:3px}
input:focus,select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #edf3ff}
button:disabled,input:disabled,select:disabled{opacity:.55;cursor:not-allowed;transform:none}
.alert{padding:14px 16px;border:1px solid #f4d7d7;border-radius:10px;background:#fff0f0;color:#b33d3d}
.page-head{max-width:800px;margin-bottom:32px}
.page-head p{margin-bottom:0;max-width:620px}
.ballot{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.committee{min-width:0;padding:24px}
.committee legend{font-size:16px;font-weight:650;letter-spacing:-.02em;padding:0 8px}
.committee label{margin:12px 0 0}
.candidate{padding:14px;border-radius:10px;cursor:pointer}
.candidate:hover{background:var(--bg)}
.candidate:has(input:checked){border-color:var(--accent);background:#edf3ff}
.candidate input{flex:0 0 20px;min-height:20px;accent-color:var(--accent)}
.candidate span{min-width:0}
.candidate small{font-size:12px;font-weight:400}
.sticky-action{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:24px;backdrop-filter:blur(24px);padding:18px 24px;z-index:2}
.sticky-action p{margin:0;font-size:13px}
.sticky-action button{flex-shrink:0}
.check{margin:0 auto 24px;background:#eaf8f2;color:#18875c}
.kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.kpis small{font-size:12px;font-weight:500}
.kpis strong{font-size:38px;font-weight:700;letter-spacing:-.06em;line-height:1.2;margin-top:16px}
.action{margin-top:32px}
.action>p{color:var(--muted)}
.action form{margin-top:20px}
input[type="file"]{width:min(100%,480px);height:auto;padding:5px;margin:0 12px 12px 0;font-size:13px}
input::file-selector-button{border:0;border-radius:6px;padding:8px 12px;background:var(--bg);color:var(--text);margin-right:12px;cursor:pointer}
.results-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.results-grid article{padding:24px}
.status{display:inline-block;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:650;letter-spacing:.04em;color:#18875c;background:#eaf8f2;margin-bottom:16px}
.status.tied{color:#8c651e;background:#fff8e9}
.result-row{gap:16px;padding:14px 0}
.empty{grid-column:1/-1;padding:48px 24px;text-align:center;color:var(--muted)}
.table-wrap{padding:0;margin-bottom:24px}
table{font-size:13px}
th,td{padding:14px 20px}
th{background:#fafbfc;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;color:var(--muted)}
td{min-width:160px}
tbody tr:hover{background:#fafbfc}
tbody tr:last-child td{border-bottom:0}
.skip-link{position:fixed;top:-80px;left:18px;z-index:20;padding:12px;background:white;border-radius:10px}
.skip-link:focus{top:12px}
@media(max-width:1100px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.topbar{padding:16px 18px;flex-wrap:wrap;gap:12px}.topbar nav{display:flex;width:100%}.topbar nav a{padding:10px 12px}.container{width:calc(100% - 36px);margin:32px auto 56px}.auth{margin:24px auto;padding:28px 24px}.auth h1{font-size:32px}.ballot,.results-grid,.kpis{grid-template-columns:minmax(0,1fr)}.kpis article{display:flex;align-items:center;justify-content:space-between;gap:16px}.kpis strong{margin:0;font-size:28px}.sticky-action{flex-direction:column;align-items:stretch;gap:12px;padding:16px;bottom:8px}.sticky-action button,.action button{width:100%;min-height:48px}input[type="file"]{width:100%;margin-right:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
