/* आपका जनप्रतिनिधि — base stylesheet */
:root {
  --brand: #17405c;
  --brand-dark: #0e2c41;
  --brand-light: #e8f1f7;
  --accent: #e07b22;
  --accent-dark: #b85f11;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #15202b;
  --muted: #5d6b79;
  --line: #e2e7ec;
  --ok: #157a4a;
  --warn: #b8860b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .05);
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

/* ---------------------------------------------------------- header */
.topbar {
  background: var(--accent);
  color: #fff;
  font-size: .82rem;
  padding: 6px 0;
}
.topbar a { color: #fff; text-decoration: underline; }

header.site {
  background: var(--brand);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
header.site .bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--accent);
  border-radius: 9px;
  font-size: 1.1rem;
  flex: none;
}
.logo small { display: block; font-size: .62rem; font-weight: 400; opacity: .8; line-height: 1; }

nav.main { margin-inline-start: auto; display: flex; gap: 2px; }
nav.main a {
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: .9rem;
  white-space: nowrap;
}
nav.main a:hover, nav.main a.active { background: rgba(255, 255, 255, .15); text-decoration: none; }

.burger {
  margin-inline-start: auto;
  background: rgba(255, 255, 255, .13);
  border: 0; color: #fff;
  font-size: 1.3rem;
  width: 40px; height: 38px;
  border-radius: 9px;
  cursor: pointer;
  display: none;
}
@media (max-width: 1100px) {
  nav.main {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--brand-dark);
    flex-direction: column;
    padding: 8px 16px 14px;
    gap: 0;
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 11px 6px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .burger { display: block; }
}

/* ---------------------------------------------------------- hero */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #22608a 100%);
  color: #fff;
  padding: 34px 0 30px;
}
.hero h1 { font-size: clamp(1.6rem, 5.5vw, 2.5rem); margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: #ffd9a8; }
.hero p.lead { font-size: 1.02rem; opacity: .93; max-width: 46rem; }
.pill {
  display: inline-block;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: .78rem;
  margin-bottom: 14px;
}

/* ---------------------------------------------------------- search */
.searchbox { display: flex; gap: 8px; margin: 18px 0 6px; max-width: 540px; }
.searchbox input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  border: 0; border-radius: 10px;
  font: inherit; font-size: 1rem;
  background: #fff; color: var(--text);
}
.btn {
  background: var(--accent); color: #fff;
  border: 0; border-radius: 10px;
  padding: 12px 18px;
  font: inherit; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: rgba(255, 255, 255, .17); }
.btn.sec { background: var(--brand); }

.results { margin-top: 10px; }
.result-item {
  display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; margin-bottom: 8px;
}
.result-item .t { font-weight: 700; }
.result-item .s { color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------- layout bits */
section { padding: 26px 0; }
section.tight { padding: 16px 0; }
.sec-head { margin-bottom: 14px; }
.sec-head h2 { margin-bottom: 2px; }
.sec-head p { color: var(--muted); font-size: .9rem; margin: 0; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
}
.card.link { display: block; color: inherit; }
.card.link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.card h3 { margin-bottom: .25em; }
.card .sub { color: var(--muted); font-size: .85rem; }

.stat { text-align: center; }
.stat .n { font-size: 1.5rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.stat .l { font-size: .85rem; color: var(--muted); }

.tile {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; color: inherit;
}
.tile:hover { border-color: var(--brand); text-decoration: none; }
.tile .ic { font-size: 1.3rem; line-height: 1; flex: none; }
.tile b { display: block; font-size: .95rem; }
.tile b + span { color: var(--muted); font-size: .8rem; }

/* ---------------------------------------------------------- party bits */
.party {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: var(--muted);
  white-space: nowrap;
}
.tally { display: grid; gap: 8px; }
.tally-row { display: grid; grid-template-columns: 7.5rem 1fr 3rem; align-items: center; gap: 8px; font-size: .9rem; }
.tally-row .bar { background: var(--line); border-radius: 999px; height: 16px; overflow: hidden; }
.tally-row .bar i { display: block; height: 100%; border-radius: 999px; }
.tally-row .v { text-align: right; font-weight: 700; }

/* ---------------------------------------------------------- tables & lists */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input {
  padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; font: inherit; background: #fff; color: var(--text);
  max-width: 100%;
}
.filters input { flex: 1; min-width: 160px; }

.count { color: var(--muted); font-size: .88rem; margin-bottom: 8px; }

.seatlist { display: grid; gap: 8px; }
.seat-row {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; color: inherit;
}
.seat-row:hover { border-color: var(--brand); text-decoration: none; }
.seat-row .no {
  background: var(--brand-light); color: var(--brand);
  font-weight: 700; border-radius: 8px;
  text-align: center; padding: 4px 0; font-size: .85rem;
}
.seat-row .nm { font-weight: 700; }
.seat-row .dt { color: var(--muted); font-size: .82rem; }
.seat-row .wn { font-size: .88rem; }
.seat-row .rt { text-align: end; font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) {
  .seat-row { grid-template-columns: 2.4rem 1fr; }
  .seat-row .rt { grid-column: 2; text-align: start; }
}

table.data { width: 100%; border-collapse: collapse; background: var(--card); font-size: .9rem; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; }
table.data th { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; vertical-align: top; }
/* तालिका का शीर्षक चिपकाया नहीं जाता: .tablewrap में overflow-x होने से sticky
   वैसे भी काम नहीं करता था, और चिपकी पट्टी नीचे की पंक्ति को ढक लेती थी। */
table.data thead th { background: var(--brand-light); box-shadow: 0 1px 0 var(--line); }
table.data tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------------------------------------------------------- misc */
.breadcrumb { font-size: .82rem; color: var(--muted); padding: 10px 0 0; }
.breadcrumb a { color: var(--muted); }

.notice {
  background: #fff8e8; border: 1px solid #f0dcae;
  border-radius: 10px; padding: 11px 13px; font-size: .88rem;
}
.notice.info { background: var(--brand-light); border-color: #cfe0ec; }

.src { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px; }
.src a { color: var(--muted); text-decoration: underline; }

.countdown { display: flex; gap: 8px; flex-wrap: wrap; }
.countdown div {
  background: rgba(255, 255, 255, .14); border-radius: 10px;
  padding: 7px 13px; text-align: center; min-width: 62px;
}
.countdown b { display: block; font-size: 1.35rem; line-height: 1.1; }
.countdown span { font-size: .72rem; opacity: .85; }
.countdown.dark div { background: var(--brand-light); color: var(--brand-dark); }

.timeline { display: grid; gap: 10px; }
.tl-item {
  display: grid; grid-template-columns: 4.6rem 1fr; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px;
}
.tl-item .d { text-align: center; background: var(--brand-light); border-radius: 8px; padding: 5px 2px; }
.tl-item .d b { display: block; font-size: 1.15rem; color: var(--brand); line-height: 1.1; }
.tl-item .d span { font-size: .72rem; color: var(--muted); }
.tl-item.past { opacity: .6; }
.tl-item.next { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(224, 123, 34, .13); }

details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; }
details.faq summary { cursor: pointer; font-weight: 700; }
details.faq p { margin: 9px 0 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: inherit;
}
.chip:hover, .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }

.vs { display: grid; gap: 6px; margin: 10px 0; }
.vs .row { display: grid; grid-template-columns: 1fr; gap: 3px; }
.vs .nmline { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.vs .barline { background: var(--line); height: 10px; border-radius: 999px; overflow: hidden; }
.vs .barline i { display: block; height: 100%; }

footer.site { background: var(--brand-dark); color: #cfdae3; margin-top: 30px; padding: 26px 0 18px; font-size: .9rem; }
footer.site a { color: #fff; }
footer.site h4 { color: #fff; font-size: .95rem; margin: 0 0 8px; }
footer.site ul { list-style: none; margin: 0 0 16px; padding: 0; }
footer.site li { margin-bottom: 5px; }
footer.site .legal { border-top: 1px solid rgba(255, 255, 255, .13); margin-top: 10px; padding-top: 12px; font-size: .82rem; opacity: .85; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }

.loading { color: var(--muted); padding: 20px 0; }

/* ------------------------------------------------- share bar */
.sharebar { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.sharebar .sb {
  font: inherit; font-size: .85rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 6px 13px; border-radius: 999px;
}
.sharebar .sb:hover { border-color: var(--brand); }
.sharebar .sb.wa { background: #e8f6ec; border-color: #bfe3c9; color: #14683a; }
.sharebar .sb.wa:hover { background: #d8efdf; }
.hero .sharebar .sb { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.28); color: #fff; }
.hero .sharebar .sb.wa { background: rgba(255,255,255,.22); }

/* sticky header के नीचे न छिपें anchor वाले सेक्शन */
section[id], h2[id], div[id] { scroll-margin-top: 72px; }

@media print {
  header.site, footer.site, .topbar, .sharebar, .filters, .burger { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}

/* क्षेत्र चुनने वाला चार-खाने का फ़ॉर्म (होमपेज) */
.areapick { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.areapick label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.areapick label > span { font-size: .9rem; font-weight: 600; color: var(--muted); }
.areapick select {
  width: 100%; padding: 15px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: inherit;
  font: inherit; font-size: 1.02rem; line-height: 1.3; height: auto;
}
.areapick select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.areapick select:disabled { color: var(--muted); background: var(--bg); }
.btn.areago {
  display: block; width: 100%; margin-top: 14px; padding: 14px 16px;
  font-size: 1.02rem; font-weight: 700; text-align: center;
}
@media (max-width: 900px) { .areapick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .areapick { grid-template-columns: 1fr; } }

/* ग्राम पंचायत — वार्डवार कार्ड */
.wardlist { display: grid; gap: 10px; }
.wardcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.wardtop { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.wardtop .wv { font-weight: 700; margin-inline-start: 6px; }
.wpdf { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.wline { margin-top: 5px; font-size: .92rem; }
.gpnav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.btn.ghost {
  border: 1px solid var(--line); background: var(--card); color: inherit;
  padding: 9px 14px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.btn.ghost:hover { border-color: var(--brand); }
