/* नेता का हिसाब: मुख्य स्टाइल */
:root {
  --paper: #f6f3ec;
  --card: #ffffff;
  --ink: #17161b;
  --muted: #5f5b54;
  --faint: #8b867c;
  --line: #e3ddd0;
  --accent: #5a2a86;       /* चुनावी स्याही वाला बैंगनी */
  --accent-ink: #3f1c60;
  --accent-soft: #f1eaf7;
  --runner: #b9b3a6;
  --warn-bg: #fff4e5;
  --warn-ink: #8a4b08;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 22, 27, .05), 0 4px 18px rgba(23, 22, 27, .05);
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
img, svg { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 18px; }

/* ---------- header ---------- */
.site-head {
  background: var(--ink);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
}
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.2px; }
.brand:hover { color: #fff; }
.brand-mark { width: 12px; height: 26px; border-radius: 6px 6px 3px 3px; background: linear-gradient(#8a55c2, var(--accent)); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.site-nav { margin-left: auto; display: flex; gap: 16px; font-size: 15px; }
.site-nav a { color: #e6e1f0; text-decoration: none; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) {
  .site-nav { gap: 12px; font-size: 14px; }
  .site-nav .hide-sm { display: none; }
  .brand { font-size: 19px; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: 14px; color: var(--faint); margin: 16px 0 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span.sep { margin: 0 6px; }

/* ---------- type ---------- */
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; margin: 8px 0 10px; letter-spacing: -.5px; font-weight: 800; }
h2 { font-size: clamp(21px, 3.2vw, 27px); line-height: 1.25; margin: 0 0 14px; font-weight: 800; }
h3 { font-size: 18px; margin: 0 0 8px; }
.lede { font-size: 18.5px; color: var(--muted); max-width: 720px; margin: 0 0 18px; }
.meta { color: var(--muted); font-size: 15.5px; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; }
.meta b { color: var(--ink); font-weight: 700; }

/* ---------- layout blocks ---------- */
main { padding-bottom: 40px; }
.section { margin: 28px 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: clamp(32px, 6.4vw, 54px); max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.kpis { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: var(--muted); }
.kpi b { color: var(--ink); }

/* ---------- search ---------- */
.search { position: relative; max-width: 640px; margin: 18px 0 8px; }
.search input {
  width: 100%;
  font: inherit; font-size: 18px;
  padding: 15px 18px 15px 48px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 6px; z-index: 15; display: none; max-height: 420px; overflow: auto;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a.active { background: var(--accent-soft); }
.search-results .t { font-weight: 700; }
.search-results .s { font-size: 14px; color: var(--muted); }
.search-results .empty { padding: 10px 12px; color: var(--muted); }

/* ---------- state cards ---------- */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.state-card { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.state-card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.state-card .nm { font-size: 22px; font-weight: 800; line-height: 1.2; }
.state-card .en { font-size: 14px; color: var(--faint); }
.state-card .row { display: flex; justify-content: space-between; margin-top: 12px; font-size: 15px; color: var(--muted); }
.state-card .row b { color: var(--ink); }
.state-card .when { margin-top: 10px; display: inline-block; font-size: 13.5px; background: var(--accent-soft); color: var(--accent-ink); padding: 3px 10px; border-radius: 999px; font-weight: 600; }

/* ---------- party pill ---------- */
.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: #f3f0ea; color: var(--ink); white-space: nowrap; vertical-align: middle; }

/* ---------- MLA card ---------- */
.mla { display: flex; gap: 16px; align-items: center; }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 24px; }
.mla .label { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: none; }
.mla .name { font-size: 25px; font-weight: 800; line-height: 1.2; }
.mla .sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.vacant { background: var(--warn-bg); border-color: #f3d9b1; }
.notice { background: var(--warn-bg); border: 1px solid #f3d9b1; color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; font-size: 15.5px; margin: 14px 0; }

/* ---------- result bars ---------- */
.vs { display: grid; gap: 14px; margin-top: 6px; }
.vs-row .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.vs-row .who { font-weight: 700; }
.vs-row .who small { font-weight: 500; color: var(--muted); }
.vs-row .v { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }
.vs-row .v b { color: var(--ink); }
.bar { height: 14px; background: #eeeae2; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar.runner i { background: var(--runner); }
.badge-win { display: inline-block; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 6px; padding: 0 7px; margin-left: 6px; vertical-align: 2px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.stat { background: #faf8f4; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .k { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat .s { font-size: 13px; color: var(--faint); }

.insights { margin: 16px 0 0; padding-left: 20px; }
.insights li { margin: 6px 0; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee9df; vertical-align: top; }
th { font-size: 13.5px; color: var(--muted); font-weight: 700; background: #faf8f4; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.win td { background: #fbf8ff; }
tr.nota td { color: var(--muted); font-style: italic; }
.district-head td { background: #f3f0ea; font-weight: 800; font-size: 14.5px; color: var(--ink); }
.seat-link { font-weight: 700; text-decoration: none; }
.seat-link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.filter { font: inherit; font-size: 16px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); width: 100%; max-width: 380px; margin-bottom: 12px; background: #fff; }

/* ---------- tally ---------- */
.tally { display: grid; gap: 8px; }
.tally-row { display: grid; grid-template-columns: 120px 1fr 48px; gap: 10px; align-items: center; font-size: 15px; }
.tally-row .p { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tally-row .n { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.tally-row .bar { margin: 0; height: 12px; }

/* ---------- share ---------- */
.share { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px; }
.share h2 { color: #fff; }
.share p { color: #d9d4e4; margin: 0 0 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #ece7f5; color: var(--ink); }
.card-preview { margin-top: 14px; display: none; }
.card-preview img { width: 100%; max-width: 360px; border-radius: 12px; display: block; }
.card-preview.open { display: block; }

/* ---------- link lists ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 15px; text-decoration: none; color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- faq ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* ---------- prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; }
.prose p, .prose li { color: #2c2a30; }

/* ---------- ads ---------- */
.ad-slot { margin: 24px auto; text-align: center; min-height: 100px; }
.ad-slot.placeholder { border: 2px dashed #cfc7b8; border-radius: 12px; display: grid; place-items: center; color: var(--faint); font-size: 14px; min-height: 110px; background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(0,0,0,.015) 10px 20px); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 0 40px; font-size: 14.5px; color: var(--muted); }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 12px; }
.site-foot a { color: var(--muted); }
.site-foot p { margin: 6px 0; max-width: 820px; }

.source { font-size: 13.5px; color: var(--faint); margin-top: 12px; }
.source a { color: var(--muted); }

/* ---------- छोटे फ़ोन ---------- */
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  table { font-size: 14.5px; }
  th, td { padding: 8px 9px; }
  .pill { font-size: 12px; padding: 0 7px; }
  .col-sm-hide { display: none; }
  .card { padding: 16px; }
  .mla .name { font-size: 22px; }
}

[id] { scroll-margin-top: 72px; }

.mla .sub.en { font-size: 14px; color: var(--faint); margin-top: 0; }
