/* Election Master | Consistent visual language and theme tokens for every archive. */
:root,html[data-em-theme="violet"]{--em-bg:#f7f4fb;--em-panel:#fff;--em-head:#24153c;--em-ink:#251b37;--em-muted:#766d85;--em-edge:#e8def0;--em-accent:#673bb3;--em-accent-ink:#fff;--em-soft:#f0e8fb;--em-glow:#ddf4e7;--em-secondary:#008a75;--em-hero:#3e2269;--em-gradient:linear-gradient(125deg,#321951,#67429d 80%,#71509c)}
html[data-em-theme="plum"]{--em-bg:#fbf6f0;--em-panel:#fffdf9;--em-head:#352036;--em-ink:#382a33;--em-muted:#796d72;--em-edge:#eaded9;--em-accent:#843f79;--em-accent-ink:#fff;--em-soft:#f6e9f1;--em-glow:#fff0d4;--em-secondary:#95671d;--em-hero:#512947;--em-gradient:linear-gradient(125deg,#3d213b,#955377)}
html[data-em-theme="graphite"]{--em-bg:#f6f5f3;--em-panel:#fff;--em-head:#27262d;--em-ink:#29262b;--em-muted:#716e73;--em-edge:#e6e2df;--em-accent:#a43e58;--em-accent-ink:#fff;--em-soft:#fae9ed;--em-glow:#ffe3d2;--em-secondary:#94714a;--em-hero:#302e34;--em-gradient:linear-gradient(125deg,#292731,#57505a)}
*,*::before,*::after{box-sizing:border-box}
html{scroll-padding-top:105px}
html body{font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif!important;color:var(--em-ink);background:var(--em-bg);-webkit-font-smoothing:antialiased;}
html body input,html body select,html body textarea,html body button{font-family:inherit}
body a{transition:color .15s,background-color .15s,border-color .15s}
body a:focus-visible,body button:focus-visible,body select:focus-visible,body input:focus-visible{outline:3px solid var(--em-secondary);outline-offset:3px}
#iem-global{position:sticky;top:0;z-index:99999!important;background:var(--em-panel);border-bottom:1px solid var(--em-edge);box-shadow:0 5px 28px #23152d0b;color:var(--em-ink);font-size:13px;line-height:1.3}
#iem-global *{box-sizing:border-box}
#iem-global .iem-inner{max-width:1500px;min-height:73px;margin:auto;padding:11px 30px;display:flex;align-items:center;gap:18px}
#iem-global a{color:var(--em-muted);text-decoration:none;font:650 13px/1.3 Inter,"Segoe UI",system-ui,sans-serif;letter-spacing:0}
#iem-global .iem-wordmark{display:flex;align-items:center;gap:11px;color:var(--em-head);white-space:nowrap;margin-right:auto}
#iem-global .iem-logo{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--em-accent);color:#fff;box-shadow:0 5px 14px #5a36751e;font-size:13px;font-weight:900;letter-spacing:-.05em}
#iem-global .iem-brandtext{font-size:14px;letter-spacing:.015em;line-height:1.05;font-weight:850}
#iem-global .iem-brandtext b{color:var(--em-accent)}
#iem-global .iem-brandtext small{display:block;letter-spacing:.045em;color:var(--em-muted);font-size:10px;font-weight:500;margin-top:4px;text-transform:lowercase}
#iem-global .iem-links{display:flex;flex-wrap:wrap;justify-content:center;gap:3px}
#iem-global .iem-links a{padding:10px 12px;border-radius:8px;white-space:nowrap}
#iem-global .iem-links a.active,#iem-global .iem-links a:hover{color:var(--em-accent);background:var(--em-soft)}
#iem-global .iem-control{display:flex;align-items:center;gap:8px;margin-left:auto;white-space:nowrap}
#iem-global .iem-theme-label{font-size:12px;font-weight:650;color:var(--em-muted)}
#iem-global select{max-width:170px;border:1px solid var(--em-edge);border-radius:9px;background:var(--em-panel);color:var(--em-ink);font-size:12px;padding:9px 27px 9px 10px;min-width:0;cursor:pointer}
/* Universal legal attribution bar is always available on every page. */
#em-legal-strip{background:var(--em-head);color:#f3ecf8!important;border-top:1px solid var(--em-edge);padding:18px 25px;font-size:12px!important;line-height:1.65!important;text-align:left!important}
#em-legal-strip .em-foot-wrap{max-width:1430px;margin:0 auto;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
#em-legal-strip strong{color:#fff!important;font-size:13px}
#em-legal-strip span{color:#e3d8ea!important}
#em-legal-strip .em-foot-wrap>div{margin-left:auto;display:flex;gap:19px;flex-wrap:wrap}
#em-legal-strip a{color:#e3d4ff!important;font-size:12px!important;text-decoration:underline;text-underline-offset:3px;font-weight:500!important}
/* Homepage: polished editorial surface without promotional clutter. */
body[data-master-section="home"]{margin:0}
.em-home{max-width:1330px;margin:auto;padding:0 28px}
.em-hero{position:relative;isolation:isolate;display:grid;grid-template-columns:1.25fr .75fr;align-items:center;margin-top:26px;min-height:388px;padding:55px clamp(30px,5vw,70px);border-radius:22px;overflow:hidden;background:var(--em-gradient);color:#fff}
.em-kicker{font-size:11px;line-height:1.4;font-weight:800;letter-spacing:.17em;color:var(--em-secondary);text-transform:uppercase}
.em-hero .em-kicker{color:#d9f9e7}
.em-hero h1{font-size:clamp(34px,4.5vw,61px);font-weight:850;letter-spacing:-.052em;line-height:1.06;margin:20px 0 20px;max-width:660px;color:white}
.em-hero h1 em{font-style:normal;color:#dff8d6}
.em-hero p{max-width:520px;color:#f1e6f8;font-size:16px;line-height:1.75;margin:0}
.em-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:29px}
.em-hero-actions a{display:inline-flex;align-items:center;gap:25px;justify-content:space-between;min-height:43px;border-radius:9px;padding:12px 18px;text-decoration:none;font-weight:750;font-size:13px}
.em-btn-primary{background:#fff;color:var(--em-hero)}.em-btn-secondary{border:1px solid #ffffff70;color:#fff}
.em-hero-art{height:320px;position:relative;display:grid;place-items:center}.em-art-orbit{position:absolute;border-radius:50%;aspect-ratio:1;border:1px solid #ffffff45}.em-art-1{width:290px}.em-art-2{width:370px;border-color:#ffffff25}
.em-art-graphic{position:relative;width:210px;height:210px;border-radius:50%;background:#fff2;backdrop-filter:blur(10px);border:1px solid #ffffff50;box-shadow:0 0 80px #2b152c40;display:flex;flex-direction:column;align-items:center;justify-content:center}
.em-art-graphic span{font-weight:850;font-size:65px;letter-spacing:-.06em}.em-art-graphic small{font-size:9px;font-weight:850;letter-spacing:.2em;color:#f7eafc}
.em-section{margin:55px 0}
.em-section-heading{display:flex;justify-content:space-between;gap:15px;align-items:end;margin:0 0 22px}
.em-section-heading h2{font-size:clamp(24px,2.7vw,30px);font-weight:800;letter-spacing:-.035em;color:var(--em-head);margin:9px 0 0}
.em-section-heading p{font-size:13px;color:var(--em-muted);margin:0 0 5px}.em-section-link{font-size:13px;color:var(--em-accent);font-weight:750;text-decoration:none}
.em-datasets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.em-datasets[hidden]{display:none}
.em-datasets .dataset{min-height:222px;background:var(--em-panel);padding:24px;display:flex;flex-direction:column;text-decoration:none;border:1px solid var(--em-edge);border-radius:15px;color:var(--em-ink);box-shadow:0 5px 18px #321e4110;transition:transform .15s,box-shadow .15s}
.em-datasets .dataset:hover{transform:translateY(-3px);box-shadow:0 12px 32px #321e411a;border-color:var(--em-accent)}
.em-datasets .kind{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--em-secondary);text-transform:uppercase}
.em-datasets h3{font-size:22px;font-weight:800;line-height:1.25;letter-spacing:-.04em;margin:25px 0 9px;color:var(--em-head)}
.em-datasets p{font-size:13px;line-height:1.75;color:var(--em-muted);margin:0}
.em-datasets .explore{font-size:12px;margin-top:auto;padding-top:22px;color:var(--em-accent);font-weight:750}
.em-source-credit{display:flex;gap:24px;align-items:start;background:var(--em-soft);border:1px solid var(--em-edge);border-radius:13px;padding:20px 23px;margin-bottom:45px}
.em-source-credit>span{font-size:10px;font-weight:800;letter-spacing:.1em;white-space:nowrap;color:var(--em-secondary);padding-top:3px}
.em-source-credit p{font-size:13px;line-height:1.7;color:var(--em-muted);margin:0}
.em-source-credit a,.em-legal-page a{color:var(--em-accent);font-weight:650}
/* Harmonization of the existing election modules without rewriting data logic. */
body[data-master-section]{--bg:var(--em-bg);--panel:var(--em-panel);--ink:var(--em-ink);--text:var(--em-ink);--muted:var(--em-muted);--line:var(--em-edge);--accent:var(--em-accent);--primary:var(--em-accent);--navy:var(--em-hero);--head:var(--em-hero);--soft:var(--em-soft)}
body[data-master-section] :where(h1,h2,h3,h4),body[data-master-section] :where(.stat strong,.value){font-family:Inter,"Segoe UI",system-ui,sans-serif}
body[data-master-section] :where(.card,.section,.stat,.yearcard,.year-card,.toolbar,.year-card.old){border-radius:13px}
body[data-master-section] :where(input,select,button){accent-color:var(--em-accent)}
body[data-master-section] :where(a){text-decoration-thickness:1px}
body[data-master-section] :where(.card,.section,.yearcard,.stat,.toolbar){border-color:var(--em-edge)}
body[data-master-section="loksabha"] .wrap>nav{display:none!important}
body[data-master-section="loksabha"] .hero{background:var(--em-gradient)!important;background-image:none!important;border-radius:16px!important}
body[data-master-section="loksabha"] .tab.active,body[data-master-section="loksabha"] button.primary{background:var(--em-accent)!important;color:#fff!important}
body[data-master-section="loksabha"] .logo{background:var(--em-accent)!important}
body[data-master-section="haryana"]>header:not(#iem-global){background:var(--em-gradient)!important;background-image:none!important;box-shadow:none!important}
body[data-master-section="haryana"] :where(.party-card,.card,.winners-toolbar){background:var(--em-panel)!important;border-color:var(--em-edge)!important}
body[data-master-section="haryana"] :where(h2,.card h3,.party-card .seats){color:var(--em-accent)!important}
body[data-master-section="haryana"] .party-card{border-top-color:var(--em-accent)!important}
body[data-master-section="haryana"] :where(th){background:var(--em-soft)!important;color:var(--em-accent)!important}
body[data-master-section="haryana"] a{color:var(--em-accent)}
body[data-master-section="punjab"] .nav-logo,body[data-master-section="punjab"] .nav-links{display:none!important}
body[data-master-section="punjab"] .nav{position:relative!important;top:auto!important;background:var(--em-panel)!important;border-bottom:1px solid var(--em-edge)!important;box-shadow:none!important;padding:5px 0!important}
body[data-master-section="punjab"] .nav-inner{justify-content:flex-end!important}
body[data-master-section="punjab"] .home-hero{background:var(--em-gradient)!important;background-image:none!important;box-shadow:none!important;color:#fff!important}
body[data-master-section="punjab"] .home-hero :where(h1,h2,p){color:#fff!important;-webkit-text-fill-color:#fff!important}
body[data-master-section="punjab"] .year-card,body[data-master-section="punjab"] .year-card.old{background:var(--em-hero)!important;color:white!important;box-shadow:none!important}
body[data-master-section="punjab"] :where(.year-card a,.year-card span){color:white!important}
body[data-master-section="punjab"] .home-search button{background:var(--em-accent)!important;color:white!important}
body[data-master-section="punjab"] :where(.stat-card,.section,.home-kpis div){box-shadow:none!important;border-color:var(--em-edge)!important}
body[data-master-section="up"] .top{position:relative!important;top:auto!important;background:var(--em-panel)!important;border-bottom:1px solid var(--em-edge)!important;z-index:20}
body[data-master-section="up"] .top .brand,body[data-master-section="up"] .top .links{display:none!important}
body[data-master-section="up"] .top .nav{justify-content:flex-end!important}
body[data-master-section="up"] .hero{background:var(--em-gradient)!important;background-image:none!important;border-radius:14px!important;color:#fff!important}
body[data-master-section="up"] .tab:not(.off){color:var(--em-accent);background:var(--em-soft)}
body[data-master-section="up"] .badge{background:var(--em-accent)}
body[data-master-section="up"] .card{background:var(--em-panel)}
body[data-master-section="up"] :where(.section-title,.bigtitle){color:var(--em-head)}
body[data-master-section="up"] .links a{color:var(--em-accent)}
body[data-master-section="news"]{margin:0}
/* Privacy and disclaimer */
.em-legal-page{max-width:930px;padding:42px 26px 60px;margin:auto}
.em-legal-page h1{font-size:clamp(32px,4vw,46px);letter-spacing:-.05em;color:var(--em-head);margin:13px 0 13px}
.em-legal-lead{font-size:17px;color:var(--em-muted);line-height:1.75;margin-bottom:28px}
.em-legal-page section{margin:14px 0;padding:19px 25px 22px;background:var(--em-panel);border:1px solid var(--em-edge);border-radius:13px}
.em-legal-page h2{font-size:19px;margin:0 0 8px;color:var(--em-head)}
.em-legal-page section p{line-height:1.8;font-size:14px;color:var(--em-muted);margin:10px 0}
.em-legal-note{font-size:12px;color:var(--em-muted);margin:27px 0}
@media(max-width:1130px){#iem-global .iem-inner{flex-wrap:wrap;gap:8px 16px}#iem-global .iem-links{order:3;width:100%;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding:0 0 2px}#iem-global .iem-control{margin-left:auto}}
@media(max-width:900px){.em-datasets{grid-template-columns:repeat(2,1fr)}.em-hero{grid-template-columns:1fr;padding:45px 36px}.em-hero-art{display:none}.em-home{padding:0 18px}}
@media(max-width:600px){#iem-global .iem-inner{padding:10px 14px;min-height:0}#iem-global .iem-links a{font-size:12px;padding:9px 10px}#iem-global .iem-brandtext{font-size:13px}#iem-global .iem-control{gap:5px}#iem-global .iem-theme-label{display:none}#iem-global select{max-width:135px;font-size:11px}.em-home{padding:0 13px}.em-hero{margin-top:13px;padding:38px 25px;border-radius:14px;min-height:320px}.em-hero h1{font-size:38px}.em-hero p{font-size:14px}.em-section{margin:37px 0}.em-datasets{grid-template-columns:1fr}.em-datasets .dataset{min-height:175px}.em-datasets h3{margin:14px 0 7px}.em-section-heading{align-items:start;flex-wrap:wrap}.em-source-credit{display:block}.em-source-credit>span{display:block;margin-bottom:9px}#em-legal-strip .em-foot-wrap>div{margin-left:0;width:100%}.em-legal-page{padding:27px 14px 40px}.em-legal-page section{padding:16px 18px}}
@media print{#iem-global,#em-legal-strip{display:none!important}}
/* Shared archive typography and contrast, including legacy detail routes. */
body[data-master-section] {font-size:14px;line-height:1.5}
body[data-master-section] .wrap {padding-top:24px}
body[data-master-section] .wrap>nav {display:none!important}
body[data-master-section] :is(.hero,.home-hero,.candidate-hero) {background:var(--em-gradient)!important;color:#fff!important;border-radius:16px}
body[data-master-section] :is(.hero,.home-hero,.candidate-hero) :is(h1,h2,p,.eyebrow,.meta) {color:#fff!important;-webkit-text-fill-color:#fff!important;background-clip:border-box!important}
body[data-master-section] :is(.hero,.home-hero,.candidate-hero) h1 {background:none!important}
body[data-master-section] :is(.card,.section,.stat,.stat-card,.candidate-stat,.const-card,.seat,.yearcard,dialog) {background:var(--em-panel)!important;color:var(--em-ink)!important;border-color:var(--em-edge)!important}
body[data-master-section] :is(input,select,textarea) {background:var(--em-panel)!important;color:var(--em-ink)!important}
body[data-master-section] :is(.sub,.meta,.small,.hint,.label,.const-meta,.const-winner) {color:var(--em-muted)}
body[data-master-section] :is(th) {background:var(--em-soft)!important;color:var(--em-ink)!important}
body[data-master-section] :is(td,.seatname,.const-name,.party-seats) {color:var(--em-ink)}
body[data-master-section] :is(.tab.active,button.primary) {background:var(--em-accent)!important;color:white!important}
body[data-master-section] .badge {background:var(--em-soft)!important;color:var(--em-ink)!important;border:1px solid var(--em-edge)}
body[data-master-section] .seatbtn {color:var(--em-accent)!important}
body[data-master-section] .year-card :is(div,span,a) {color:white!important}

/* Final review: the four archives share one master navigation and one theme selector.
   Hide the legacy Explorer navigation, not search/filter controls. */
body[data-master-section="loksabha"] .wrap>nav,
body[data-master-section="haryana"] .wrap>nav,
body[data-master-section="punjab"] .wrap>nav,
body[data-master-section="up"] .wrap>nav{display:none!important}
body[data-master-section="loksabha"] .hero,
body[data-master-section="haryana"] .hero,
body[data-master-section="punjab"] .hero,
body[data-master-section="up"] .hero{background:var(--em-gradient)!important;color:#fff!important}
body[data-master-section] .hero .eyebrow,
body[data-master-section] .hero p{color:#f4eafa!important}
body[data-master-section] .hero h1{color:#fff!important}
body[data-master-section] .tab.active{background:var(--em-accent)!important;color:#fff!important}
body[data-master-section] .seatbtn{color:var(--em-accent)!important}
body[data-master-section] :where(.toolbar,.card,.stat){background:var(--em-panel)!important;border-color:var(--em-edge)!important}
