
:root{--ink:#24103f;--purple:#3b1761;--bright:#7933c5;--muted:#776584;--line:#e4d8ed;--display:Arial,Helvetica,sans-serif;--body:Arial,Helvetica,sans-serif}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;height:100dvh;min-height:100svh;display:flex;flex-direction:column;align-items:center;padding:0 16px;background:linear-gradient(135deg,#e2cdf4,#faf7fc 45%,#eadef3);color:var(--ink);font:14px var(--body)}button,input{font:inherit}button{cursor:pointer}button,a,input{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #a36cdb;outline-offset:3px}.topbar{width:min(100%,480px);flex:0 0 52px;display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid var(--purple);gap:10px}.wordmark{color:var(--purple);text-decoration:none;font-size:11px;font-weight:800;letter-spacing:.04em;line-height:1.35}.wordmark span{display:block}.topright{display:flex;align-items:center;gap:12px}.topright>span{font-size:10px;font-weight:700;line-height:1.3}.tsebadge{background:#e4d1f5;color:#53118c;padding:6px 7px;border-radius:3px;white-space:nowrap;font-size:9px!important}.tsebadge.unavailable{background:#eee;color:#666}.textbutton{border:1px solid #dfd2e9;color:var(--purple);background:transparent;border-radius:4px;padding:7px 10px;font-size:11px;font-weight:800}main{width:min(100%,480px);flex:1;min-height:0;display:flex;align-items:center;padding:12px 0 0}.workspace{width:100%;height:100%;max-height:770px}.editor{height:100%;display:flex;flex-direction:column;position:relative;background:#fffdfd;border:1px solid #dccde8;border-top:4px solid var(--purple);border-radius:7px;padding:16px 20px 10px;box-shadow:0 12px 40px #3b176114}.editor:before{content:'';position:absolute;top:-4px;right:20px;width:66px;height:4px;background:#a95de2}.ballotbrand{display:flex;align-items:center;gap:16px;flex:0 0 auto;min-height:100px;margin-bottom:8px}.ballotbrand>img{width:43%;height:104px;object-fit:contain;filter:drop-shadow(0 3px 0 #d8b9ed)}.ballotbrand>div{flex:1}.eyebrow{font-size:9px;font-weight:800;letter-spacing:.09em;color:#845c9f}h1{font:800 38px/.91 var(--display);margin:5px 0 7px;letter-spacing:-.025em}h1 em{font-style:normal;color:var(--bright)}.ballotbrand p{font-size:10px;line-height:1.4;margin:0;color:#5a2678}.editorhint{font-size:10px;color:var(--muted);margin:0 0 8px;line-height:1.3}#ballot{display:flex;flex-direction:column;flex:1;min-height:0}#fields{display:flex;flex-direction:column;flex:1;min-height:0;gap:5px}.fieldrow{position:relative;flex:1;min-height:58px;display:flex;flex-direction:column;justify-content:center;padding:7px 9px 7px 37px;border:1px solid #e9e0f0;border-radius:4px;background:#fcf9ff}.fieldtitle{display:flex;align-items:center;justify-content:space-between;margin-bottom:3px;gap:8px}.order{position:absolute;left:9px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:grid;place-items:center;background:var(--purple);color:#fff;font-size:11px;font-weight:800;border-radius:50%}.fieldtitle strong{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.015em}.fieldtitle small{font-size:9px;color:#9b80b1;white-space:nowrap}.inputs{display:grid;grid-template-columns:1fr 94px;gap:10px}.inputs label{font-size:0;min-width:0}.inputs input{display:block;width:100%;min-width:0;padding:2px 0;border:0;border-bottom:1px solid #c2a7d6;border-radius:0;background:transparent;color:var(--ink);font-size:16px;line-height:24px;height:28px}.inputs input::placeholder{color:#9b85b0;font-size:11px}.inputs input.number{text-align:right;font-weight:800;letter-spacing:.075em;color:var(--purple)}.inputs input.number::placeholder{font-size:20px;color:#c3b0d4}.inputs input:focus{outline:0;border-bottom:2px solid var(--bright)}.fixedrow{background:#eee1fa;border:1px solid #d5b6ec}.fixedrow .order{background:var(--bright)}.fixedinfo{display:flex;justify-content:space-between;align-items:center;height:28px}.fixedinfo span{font-size:14px;font-weight:800;color:#542080}.fixedinfo b{font:800 28px/1 var(--display);color:var(--bright);letter-spacing:.04em}.primary,.secondary{width:100%;min-height:42px;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border:0;border-radius:4px;font-size:12px;font-weight:800}.primary{background:var(--purple);color:#fff;margin-top:10px;box-shadow:0 3px 0 #aa6ee0}.primary:hover{background:#542080}.primary:disabled{opacity:.6}.primary span{font-size:20px;line-height:1}.secondary{border:1px solid #d7c5e4;background:#fff;color:var(--purple);margin-top:8px}.error{color:#aa2347;font-size:11px;margin:5px 0;line-height:1.3}.sheetfoot{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:0 0 24px;margin-top:10px}.sheetfoot>img{width:57px;height:20px;object-fit:contain}.sheetfoot>span{font-size:8px;color:var(--muted)}.sourceinfo{font-size:8px;color:var(--muted)}.sourceinfo summary{cursor:pointer;text-decoration:underline}.sourceinfo[open]{position:absolute;bottom:36px;left:15px;right:15px;z-index:35;background:#fff;border:1px solid #caa9e1;border-radius:4px;padding:12px;box-shadow:0 6px 20px #3b176120}.datasource{font-size:11px;line-height:1.6;margin:5px 0}.datasource a{color:var(--purple)}footer{width:min(100%,480px);flex:0 0 22px;display:flex;align-items:center;justify-content:center;color:#90799f;font-size:7px;letter-spacing:.04em}.searchfield{position:relative}.suggestions{position:absolute;top:100%;left:0;width:calc(100% + 104px);max-height:220px;overflow:auto;z-index:30;background:#fff;border:2px solid #8528d5;border-radius:4px;box-shadow:0 12px 26px #32134a33;margin-top:4px}.suggestions.dropup{top:auto;bottom:100%;margin-top:0;margin-bottom:4px}.suggestions button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 11px;background:#fff;border:0;border-bottom:1px solid #eee4f7;text-align:left;color:#32104f}.suggestions button:hover,.suggestions button.active{background:#f1e5fc}.suggestions strong{font-size:12px;display:block}.suggestions small{font-size:9px;display:block;color:#71617e;margin-top:3px}.suggestions b{font-size:20px;color:#7a14c9;flex-shrink:0}.searchmessage{display:block;font-size:11px;line-height:1.4;padding:12px;color:#756380}
#result{width:100%;height:100%;max-height:770px;display:flex;flex-direction:column;min-height:0}.resulthead{padding:0 4px 9px}.resulthead h1{font-size:28px;margin:5px 0}.resulthead p{font-size:10px;margin:0;color:var(--muted)}.resulthead .eyebrow{font-size:8px}.resultlayout{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}.printcard{flex:1;min-height:0;display:flex;flex-direction:column;border:1px solid #decce9;border-radius:5px;background:#fff;overflow:hidden}.cardtop{display:flex;justify-content:space-between;background:var(--purple);color:#fff;padding:9px 15px;font-size:9px;font-weight:800}.cardbrand{height:75px;width:150px;object-fit:contain;margin:3px auto}#cardrows{flex:1;min-height:0;display:flex;flex-direction:column}.cardrow{flex:1;min-height:40px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;margin:0 16px;border-top:1px solid var(--line);padding:5px 0}.cardrow .role{display:block;font-size:8px;color:var(--muted);margin-bottom:2px}.cardrow .name{font-size:12px;font-weight:800;display:block;overflow-wrap:anywhere}.cardrow .digits{font:800 27px var(--display);letter-spacing:.03em;white-space:nowrap}.cardrow.highlight{background:#eee1fa;padding:5px 16px;margin:0;color:#6614a1}.empty{color:#b1a0be!important}.cardfoot{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;border-top:1px solid var(--line)}.cardfoot img{width:55px}.cardfoot p{font-size:8px;color:var(--muted);margin:0}.resultactions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.resultactions button{margin:0;min-height:36px;font-size:10px;padding:8px}.resultactions .primary{box-shadow:none}.resultactions .tip{display:none}#feedback{grid-column:1/-1;margin:0;font-size:10px;color:var(--muted)}
@media(min-width:700px){.topbar{flex-basis:56px}.editor{padding:18px 22px 10px}.ballotbrand{min-height:116px}.ballotbrand>img{height:115px}h1{font-size:44px}.ballotbrand p{font-size:11px}.fieldtitle strong,.fieldtitle small{font-size:10px}.sheetfoot>span{font-size:9px}}
@media(max-height:720px){.topbar{flex-basis:43px}main{padding-top:7px}.editor{padding:10px 14px 7px}.ballotbrand{min-height:80px;margin-bottom:5px}.ballotbrand>img{height:80px}h1{font-size:32px}.editorhint{margin-bottom:5px;font-size:9px}.fieldrow{min-height:55px;padding-top:3px;padding-bottom:3px}#fields{gap:4px}.sheetfoot{margin-top:7px;flex-basis:20px}.primary{margin-top:7px;min-height:38px;padding:8px 12px}footer{flex-basis:18px}.cardbrand{height:60px}.resulthead h1{font-size:25px}.resulthead{padding-bottom:5px}}
@media(max-width:360px){body{padding:0 10px}.topright{gap:6px}.tsebadge{font-size:8px!important;padding:5px}.editor{padding-left:10px;padding-right:10px}.ballotbrand{gap:10px}.fieldtitle small{font-size:8px}.inputs{grid-template-columns:1fr 80px;gap:8px}.suggestions{width:calc(100% + 88px)}.sheetfoot>span{font-size:7px}}
@media(max-height:590px){body{height:auto;min-height:100svh}main{min-height:530px}.workspace{height:530px}#result{min-height:530px}.fieldrow{min-height:53px}}
@media print{body{height:auto;background:#fff;padding:0;display:block}.topbar,.workspace,.resulthead,.resultactions,footer{display:none!important}main{display:block;width:100%;padding:0}#result{display:block!important;height:auto;max-height:none}.resultlayout{display:block}.printcard{width:95mm;height:auto;min-height:150mm;border-radius:0;box-shadow:none;margin:auto;break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}.cardrow{min-height:16mm}.cardbrand{height:22mm}.cardrow .role{font-size:9px}.cardrow .digits{font-size:28px}.cardrow .name{font-size:12px}@page{size:A4;margin:14mm}}

/* Paper collage composition; all content stays inside the full-width sheet. */
@media screen{
body{background:#351255;background-image:radial-gradient(ellipse at 80% 10%,#7933c5,transparent 65%),linear-gradient(145deg,#3b1761,#24103f);padding:0 12px;color:#3b1761}
.topbar{width:min(100%,500px);border:0;flex-basis:47px;color:#fff}.wordmark{color:white}.topright{gap:7px}.topright>span{color:#f0ddff}.topright .textbutton{border-color:#ac7fcb;color:white}.tsebadge{background:#dfc5f2;color:#3b1761;font-size:9px!important;padding:5px}
main{width:min(100%,500px);padding:0;align-items:center}.workspace{padding:16px 26px 18px;background:#fffdf8 url('assets/paper-collage.png') center/100% 100%;box-shadow:0 12px 30px #18052945;max-height:820px;position:relative;border:0;border-radius:0}.workspace:before,.editor:before{display:none}.editor{padding:0;border:0;box-shadow:none;border-radius:0;background:transparent;min-width:0}
.ballotbrand{gap:13px;margin:0 0 8px;padding:0;background:none;min-height:128px;overflow:visible}.ballotbrand>.brandlockup{flex:0 0 43%;width:43%;min-width:0;display:flex;flex-direction:column;align-items:center}.brandlockup img{height:86px;width:100%;object-fit:contain}.brandlockup strong{font:900 43px/1 Arial;color:#7933c5;letter-spacing:-2px;margin-top:-2px}.ballotbrand>div:last-child{min-width:0}.ballotbrand h1{font:800 clamp(25px,6.4vw,33px)/1.03 Arial;text-transform:uppercase;letter-spacing:-1px;margin:4px 0 6px;color:#3b1761}.ballotbrand h1 em{color:#7933c5}.ballotbrand p{font:700 12px/1.35 Arial;color:#5a2678}.ballotbrand .eyebrow{font-size:9px;color:#74408c}.editorhint{font:12px/1.3 Arial;color:#74408c;margin:0 0 7px}
#fields{gap:8px}.fieldrow{border:0;background:transparent url('assets/paper-strip.svg') center/100% 100%;border-radius:0;box-shadow:none;padding:7px 12px 7px 36px;min-height:57px;min-width:0;overflow:visible}.order{left:-7px;width:27px;height:27px;border-radius:50%;font:700 15px Arial;background:#5a2678;transform:translateY(-50%)}.fieldtitle{margin-bottom:2px}.fieldtitle strong{font:700 11px Arial;color:#74408c;letter-spacing:0}.fieldtitle small{font:10px Arial;color:#9673a8}.inputs{grid-template-columns:minmax(0,1fr) 84px;gap:9px;min-width:0}.inputs input{font:700 17px/24px Arial;letter-spacing:0;color:#3b1761;height:27px;border-bottom:1px solid #dfd1e7;padding:1px 0}.inputs input::placeholder{font:400 14px Arial;color:#9a81a9}.inputs input.number{font:700 24px/26px Arial;color:#5a2678;letter-spacing:-.5px}.inputs input.number::placeholder{font:700 22px Arial;color:#b39ac1}.inputs input:focus{border-bottom:2px solid #7933c5}.fixedrow{border:0;background:transparent url('assets/paper-strip.svg') center/100% 100%;box-shadow:none}.fixedrow .order{background:#7933c5;color:#fff}.fixedrow .fieldtitle strong{color:#74408c}.fixedrow .fieldtitle small{color:#9673a8;font-size:9px}.fixedinfo{height:27px;gap:9px;min-width:0}.fixedinfo span{font:700 18px Arial;color:#5a2678;text-transform:uppercase}.fixedinfo b{font:800 26px Arial;color:#7933c5;letter-spacing:-1px;flex-shrink:0}
.primary{background:#7933c5;color:white;border:0;border-radius:3px;box-shadow:0 3px 0 #4b1b75;font:700 14px Arial;min-height:42px;margin-top:12px;padding:11px 14px;justify-content:center}.primary span{display:none}.primary:hover{background:#6222a3}.sheetfoot{margin-top:11px;border:0;flex-basis:23px}.sheetfoot>img{width:60px;height:23px}.sheetfoot>span{font-size:10px;color:#74408c}.sourceinfo{font-size:10px}.sourceinfo[open]{background:#fffdf8;left:0;right:0}.searchinputs{position:relative}.searchinputs>.suggestions{width:100%;left:0}.suggestions{border-radius:3px;border-color:#7933c5;max-height:220px}.suggestions strong{font-size:14px}.suggestions small{font-size:11px}.suggestions b{font:700 22px Arial}
footer{width:min(100%,500px);color:#d0afe6;flex-basis:22px;font-size:8px}
#result{max-height:820px}.resulthead{padding:5px 3px 10px;color:white}.resulthead .eyebrow,.resulthead p{color:#dcc3ef}.resulthead h1{font:700 25px Arial;color:white;letter-spacing:-.5px}.printcard{background:#fffdf8 url('assets/paper-collage.png') center/100% 100%;padding:13px 28px 18px;border:0;border-radius:0;overflow:visible}.cardtop{background:none;color:#74408c;padding:0;font-size:9px}.cardhero{display:flex;align-items:center;gap:20px;justify-content:center;margin:4px 0 10px;flex-shrink:0}.cardhero>div{width:40%;text-align:center}.cardbrand{width:100%;height:62px;object-fit:contain;margin:0}.cardhero strong{display:block;font:800 31px Arial;color:#7933c5;letter-spacing:-1px}.cardhero h2{font:800 27px/1.02 Arial;margin:0;color:#3b1761;letter-spacing:-1px}.cardhero h2 em{font-style:normal;color:#7933c5}.cardhero small{display:block;font:700 11px Arial;letter-spacing:0;margin-top:8px;color:#74408c}#cardrows{gap:7px}.cardrow,.cardrow.highlight{background:url('assets/paper-strip.svg') center/100% 100%;border:0;margin:0;padding:6px 15px;min-height:41px;grid-template-columns:minmax(0,1fr) auto;color:#3b1761}.cardrow .role,.cardrow.highlight .role{color:#74408c;font:700 10px Arial;text-transform:uppercase}.cardrow .name{font:700 15px Arial;text-transform:uppercase}.cardrow .digits{font:800 27px Arial;letter-spacing:-1px}.cardrow.highlight .digits{color:#7933c5}.cardfoot{border:0;padding:10px 0 0}.cardfoot p{font-size:10px}.resultactions .secondary{background:#f5eafb;border-color:#c8a1e2}.resultactions .textbutton{background:#eee0f7}.resultactions button{font-size:12px;min-height:40px}#feedback{color:#eddcf7}
}
@media screen and (max-height:740px){.workspace{padding-top:10px;padding-bottom:12px}.ballotbrand{min-height:86px;margin-bottom:5px}.brandlockup img{height:55px}.brandlockup strong{font-size:30px}.ballotbrand h1{font-size:27px}.ballotbrand p{font-size:11px}.editorhint{font-size:11px;margin-bottom:5px}.fieldrow{min-height:50px;padding-top:4px;padding-bottom:4px}#fields{gap:5px}.primary{min-height:38px;margin-top:8px}.sheetfoot{margin-top:8px}.cardhero{margin:0 0 5px}.cardbrand{height:43px}.cardhero strong{font-size:26px}.cardhero h2{font-size:23px}.resulthead h1{font-size:22px}}
@media screen and (max-width:365px){body{padding:0 8px}.workspace{padding-left:22px;padding-right:22px}.ballotbrand{gap:8px}.ballotbrand h1{font-size:25px}.inputs{grid-template-columns:minmax(0,1fr) 72px;gap:6px}.fieldrow{padding-left:29px;padding-right:10px}.fieldtitle strong{font-size:10px}.fixedinfo span{font-size:16px}.inputs input{font-size:16px}.fixedinfo b{font-size:24px}.sheetfoot>span{font-size:9px}.printcard{padding-left:22px;padding-right:22px}.cardrow .name{font-size:13px}.cardrow .digits{font-size:25px}}
@media screen and (max-height:680px){body{height:auto;min-height:100dvh}main{min-height:555px}.workspace{height:auto;min-height:640px}#result{min-height:555px}.fieldrow{min-height:54px}}
@media print{.cardhero{display:flex;align-items:center;justify-content:center;gap:15px;padding:10px}.cardhero>div{width:40%;text-align:center}.cardhero .cardbrand{height:20mm;width:100%;margin:0}.cardhero strong{font:800 30px Arial;color:#7933c5}.cardhero h2{font:800 25px/1 Arial;margin:0}.cardhero small{display:block;font:10px Arial;margin-top:5px}.cardhero em{font-style:normal;color:#7933c5}}

/* Give the transparent official party mark enough presence on paper. */
@media screen{.sheetfoot{flex-basis:30px}.sheetfoot>img{width:84px;height:30px;object-fit:contain;flex-shrink:0}.cardfoot img{width:88px;height:40px;object-fit:contain;flex-shrink:0}}
@media screen and (max-width:365px){.sheetfoot>img{width:72px;height:28px}.sheetfoot>span{font-size:8px}.cardfoot img{width:78px}}
@media print{.cardfoot img{width:23mm;height:auto}}
