/* eBallot SACDECO - Representative election (mobile). Same look as the General Assembly page; the font is served from here, not from Google. */
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{--forest:#1F7A33;--deep:#124A27;--leaf:#27AE60;--ink:#16251B;--mute:#5D6B61;--line:#D5E2D8;--bad:#C0392B;--f:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--headH:128px}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:#fff}
body{margin:0;color:var(--ink);font:400 18px/1.5 var(--f);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
body::before{content:"";position:fixed;inset:0;z-index:-1;background:#fff url(bg.webp) no-repeat left top/170% auto}
@media(min-width:700px){body::before{background-size:cover}}
main{max-width:480px;margin:0 auto}
section{min-height:100dvh;display:flex;flex-direction:column;padding:20px}
[hidden]{display:none!important}
h1{font-size:28px;line-height:1.15;margin:0 0 6px;text-wrap:balance}
p{margin:0 0 12px}
#home,#result,#receipt{justify-content:center}
.logo{display:block;width:min(86%,340px);margin:0 auto 14px;filter:drop-shadow(0 0 10px #fff) drop-shadow(0 0 4px #fff)}
.card{background:var(--forest);color:#fff;border-radius:20px;padding:26px 22px;box-shadow:0 0 36px rgba(255,255,255,.75),0 8px 24px rgba(18,74,39,.25)}
.card p{color:#E3F3E8}
.card .kicker{margin:0 0 4px;font-size:16px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#BFF0CC}
.card.white{background:rgba(255,255,255,.96);color:var(--ink);text-align:center;box-shadow:0 8px 28px rgba(18,74,39,.22)}
.card.white p{color:var(--mute)}
input{width:100%;font:700 24px var(--f);letter-spacing:.06em;padding:15px 16px;border:0;border-radius:12px;background:#fff;color:var(--ink)}
input:focus{outline:3px solid #BFF0CC}
button{font:700 20px var(--f);min-height:56px;border:0;border-radius:14px;padding:14px 20px;cursor:pointer;background:var(--forest);color:#fff;width:100%;touch-action:manipulation}
input{touch-action:manipulation}
.card:not(.white) button{background:#fff;color:var(--deep)}
button:disabled{background:#DDE7DF!important;color:#7A887E!important;cursor:default}
button.alt{background:#fff;color:var(--deep);border:2px solid var(--line)}
button:focus-visible{outline:3px solid var(--deep);outline-offset:2px}
.err{margin:12px 0}.err:not(:empty){background:#fff;color:var(--bad);font-weight:700;padding:9px 12px;border-radius:10px}
.ic{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;font-size:40px;font-weight:700;color:#fff;background:var(--bad);margin:0 auto 10px}
.track{width:100%;height:6px;background:var(--line);border-radius:9px;overflow:hidden;margin:16px 0 8px}
.track i{display:block;height:100%;background:var(--forest);animation:drain var(--secs,15s) linear forwards}
@keyframes drain{from{width:100%}to{width:0}}
@media(prefers-reduced-motion:reduce){.track i{animation:none;width:0}}
#rc{font-style:italic;font-size:17px}
.help{margin:16px 0 0;font-size:17px}
.ic.ok{width:60px;height:60px;margin-bottom:8px;background:var(--forest)}
.ic.ok::after{content:"";width:12px;height:24px;margin-top:-4px;border:solid #fff;border-width:0 5px 5px 0;transform:rotate(45deg)}

/* ballot (made for senior citizens: big letters, big buttons, words instead of small icons) */
#ballot{padding:0}
.top{display:flex;align-items:center;gap:12px;padding:10px 16px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px)}
.top img{height:46px;flex:none}.top b{display:block;font-size:19px;color:var(--deep)}.top span{display:block;font-size:16px;line-height:1.25;color:var(--mute)}
.head{position:sticky;top:0;z-index:6;display:flex;align-items:center;gap:10px;padding:8px 16px 9px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border-bottom:3px solid var(--forest)}
.srch{position:relative;flex:1;min-width:0}
#q{font:400 20px var(--f);letter-spacing:0;padding:11px 52px 11px 14px;border:2px solid var(--line);border-radius:12px;-webkit-appearance:none;appearance:none}
#q:placeholder-shown{padding-right:14px}
#q::-webkit-search-cancel-button{display:none}
#q:focus{outline:3px solid #BFF0CC;border-color:var(--forest)}
#q:disabled{background:#F1F5F2;color:#7A887E}
#qc{position:absolute;right:1px;top:50%;transform:translateY(-50%);width:48px;height:48px;min-height:0;padding:0;border-radius:10px;background:transparent;color:var(--mute);font-size:22px;line-height:1}
#vpick{flex:none;width:auto;min-height:0;font-size:17px;padding:11px 12px;background:#fff;color:var(--deep);border:2px solid var(--line);border-radius:12px;white-space:nowrap}
#vpick .v2{display:none}
#vpick[aria-pressed=true]{background:var(--forest);border-color:var(--forest);color:#fff}
#vpick[aria-pressed=true] .v1{display:none}
#vpick[aria-pressed=true] .v2{display:inline}
.how{margin:12px 16px 0;padding:12px 16px;background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:16px;box-shadow:0 4px 16px rgba(18,74,39,.1);line-height:1.4}
.how p{margin:0}.how p+p{margin-top:6px}
.how b{color:var(--deep)}
.grp{margin:14px 16px 0;background:rgba(255,255,255,.96);border-radius:16px;border:1px solid var(--line);overflow:clip;box-shadow:0 4px 16px rgba(18,74,39,.1)}
@supports not (overflow:clip){.grp{overflow:visible}}
.gh{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:11px 16px;background:var(--forest);color:#fff}
@media(min-height:640px){.gh{position:sticky;top:var(--headH);z-index:4}}
.gh b{font-size:21px;line-height:1.25;display:block}.gh small{display:block;color:#D6EEDD;font-size:17px;line-height:1.3}
.gi{margin:0;padding:8px 16px;font-size:16px;color:var(--mute);background:#F4F8F5;border-bottom:1px solid var(--line)}
.cnt{font-weight:700;font-size:19px;padding:2px 12px;border-radius:99px;background:#fff;color:var(--deep);white-space:nowrap}.cnt.ok{background:#7CE0A0;color:#0B3A1D}
.cand{border-top:1px solid var(--line)}
.cand:first-of-type{border-top:0}
.cand.on{background:#E4F4E9}
.r1{display:flex;align-items:stretch}
.pick{display:flex;align-items:center;gap:14px;flex:1;min-width:0;text-align:left;border-radius:0;background:transparent;color:var(--ink);padding:12px 12px 12px 16px;font-weight:400;font-size:20px;line-height:1.3;min-height:68px}
.cand.on .pick{font-weight:700}
.bub{flex:none;display:grid;place-items:center;width:38px;height:28px;border:3px solid var(--forest);border-radius:50%;background:#fff}
.pick[aria-checked=true] .bub{background:var(--forest)}
.pick[aria-checked=true] .bub::after{content:"";width:8px;height:14px;margin-top:-3px;border:solid #fff;border-width:0 3.5px 3.5px 0;transform:rotate(45deg)}
.av{flex:none;width:52px;height:52px;border-radius:50%;background:#DDE7DF;color:var(--deep);display:grid;place-items:center;font:700 17px var(--f);overflow:hidden}
.av img{display:block;width:100%;height:100%;object-fit:cover}
.who{display:block;min-width:0;overflow-wrap:anywhere}
.who .no{display:block;margin-top:2px;font-weight:700;font-size:17px;color:var(--forest)}
.more{display:block;width:calc(100% - 32px);min-height:48px;margin:0 16px 12px;padding:9px 14px;border-radius:12px;border:2px solid var(--forest);background:#fff;color:var(--forest);font:700 18px var(--f)}
.more::after{content:"";display:inline-block;width:8px;height:8px;margin:0 0 3px 10px;border:solid currentColor;border-width:0 3px 3px 0;transform:rotate(45deg)}
.more[aria-expanded=true]{background:var(--forest);color:#fff}
.more[aria-expanded=true]::after{margin-bottom:-2px;transform:rotate(-135deg)}
.det{margin:0;padding:0 16px 16px;font-size:18px;line-height:1.45;color:var(--ink)}
.det dt{font-weight:700;font-size:17px;color:var(--forest);margin-top:10px}
.det dd{margin:0;overflow-wrap:anywhere}
.foot{padding:12px 16px 16px;border-top:1px solid var(--line);text-align:center;color:var(--mute);font-size:17px}
.foot button{font-size:19px;padding:12px 16px}
.foot .e{color:var(--bad);font-weight:700;margin-bottom:8px}
.skel{height:68px;margin:0 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px}
.skel i{display:block;height:14px;border-radius:7px;background:#E3EBE5;animation:pulse 1.2s ease-in-out infinite}
.skel i:first-child{width:38px;height:28px;border-radius:50%}.skel i:last-child{flex:1;max-width:60%}
@keyframes pulse{50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.skel i{animation:none}}
.none{margin:18px 16px 0;padding:18px 16px;text-align:center;background:rgba(255,255,255,.96);border-radius:16px;border:1px solid var(--line);color:var(--mute)}
.bar{position:sticky;bottom:0;margin-top:auto;padding:12px 16px;background:rgba(255,255,255,.96);border-top:1px solid var(--line)}
#rvb{min-height:60px;font-size:21px}
.sp{height:20px}
#rimg{display:block;width:100%;max-width:360px;border-radius:6px;box-shadow:0 6px 24px rgba(18,74,39,.2);margin:12px auto 8px}
#rcode{margin-bottom:4px;color:var(--ink)}
#rcode span{display:block;font-size:16px;color:var(--mute)}
#rcode b{display:block;font-size:clamp(15px,5.2vw,21px);white-space:nowrap}
#rhelp{margin:10px 0 0;font-size:17px}
#receipt button{margin-top:10px}
dialog{border:0;border-radius:18px;padding:20px;width:min(440px,94vw);max-height:90dvh;color:var(--ink)}
dialog::backdrop{background:rgba(10,40,20,.6)}dialog h2{margin:0 0 10px;font-size:24px;line-height:1.2;color:var(--deep);text-wrap:balance}
.rv{overflow:auto;max-height:38dvh;font-size:19px}.rv b{display:block;margin-top:10px;font-size:20px;color:var(--forest)}.rv small{margin-left:8px;font-size:17px;font-weight:700;color:var(--forest);white-space:nowrap}
.rv div{padding:3px 0}
.rv .tot{margin-top:12px;color:var(--mute)}
.warn{margin:12px 0 0;font-weight:700;color:var(--deep)}
.col{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.col button{min-height:60px}
#toast{position:fixed;left:50%;bottom:calc(100px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--deep);color:#fff;padding:14px 18px;border-radius:12px;font-size:19px;line-height:1.35;max-width:92vw;text-align:center;z-index:9}
@media(max-width:300px){#rcode b{white-space:normal;overflow-wrap:anywhere}.head{flex-wrap:wrap}.srch{flex-basis:100%}#vpick{flex:1}}
