/* One stylesheet for every page outside the map. The map keeps its own, because it
   is one enormous document; everything else - home, the state pages, the legal pages -
   shares these tokens so a colour can only be changed in one place.

   The accent is teal because no major Indian party uses teal: the site's own chrome can
   never be mistaken for a party colour on a page full of party colours. */
:root {
  color-scheme: light;
  --bg: #F2F4F3; --surface: #FFFFFF; --surface-2: #E9EEEC;
  --fg: #16211F; --muted: #5E6B68; --line: #D6DCD9;
  --accent: #0F6E5C; --accent-ink: #FFFFFF; --warm: #B4541F;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161A; --surface: #192026; --surface-2: #222B32; --fg: #E8EDEA;
    --muted: #94A3A0; --line: #2C363D; --accent: #45C4A8; --accent-ink: #0B1412;
    --warm: #E08B5A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161A; --surface: #192026; --surface-2: #222B32; --fg: #E8EDEA;
  --muted: #94A3A0; --line: #2C363D; --accent: #45C4A8; --accent-ink: #0B1412;
  --warm: #E08B5A; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 16px/1.6 "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body[data-lang="en"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 1060px; margin: 0 auto; padding-inline: 18px; }
a { color: var(--accent); }

header.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.topbar { display: flex; align-items: center; gap: 14px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700;
  font-size: 17px; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  color: var(--accent-ink); display: grid; place-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: -0.03em; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.main a { color: var(--muted); text-decoration: none; font-size: 14px;
  font-weight: 500; padding: 7px 10px; border-radius: 8px; }
nav.main a:hover { color: var(--fg); background: var(--surface-2); }
.ghost, .solid { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.solid { background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); }

.crumb { font-size: 13px; color: var(--muted); padding: 22px 0 0; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
h1 { font-size: clamp(27px, 4.4vw, 40px); line-height: 1.12; margin: 10px 0 10px;
  letter-spacing: -0.025em; text-wrap: balance; }
.lede { font-size: 16.5px; color: var(--muted); margin: 0 0 22px; max-width: 62ch; }

/* The honest notice. A state with three parliamentary elections is not a state with
   eight elections, booth counts and a grading, and the difference has to be on the page
   rather than left for a buyer to discover. */
.partial { background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--warm); border-radius: 12px;
  padding: 14px 17px; margin: 0 0 26px; font-size: 14.5px; }
.partial b { color: var(--fg); }
.partial p { margin: 0; color: var(--muted); }
.partial p + p { margin-top: 7px; }

section.year { padding: 34px 0 0; border-top: 1px solid var(--line); margin-top: 34px; }
.yhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h2 { font-size: 25px; margin: 0; letter-spacing: -0.02em; }
.ysum { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 11px; border-radius: 6px; overflow: hidden; gap: 2px;
  margin: 15px 0 10px; }
.bar .seg { background: var(--p, var(--muted)); min-width: 3px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 16px; }
.keys .k { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.keys .k b { color: var(--fg); font-weight: 650; margin-left: 2px; }
i[data-p] { display: inline-block; width: 9px; height: 9px; border-radius: 2.5px;
  background: var(--p, var(--muted)); margin-right: 7px; vertical-align: baseline; }

.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 640px; }
th, td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--line); }
th { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em;
  text-transform: uppercase; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums;
  white-space: nowrap; }
td.pc { font-weight: 600; white-space: nowrap; }
td.who { line-height: 1.35; }
td.who span { display: block; font-size: 12.5px; color: var(--muted); }
tbody tr:hover { background: var(--surface-2); }

footer.site { border-top: 1px solid var(--line); margin-top: 48px;
  padding: 32px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--muted); font-size: 13.5px; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--fg); text-decoration: underline; }
footer.site p { margin: 0 0 9px; line-height: 1.7; }
