@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap');

/* ============================================================
   PUNJAB ELECTIONS 2027 — Design System
   Editorial, professional, zero-framework CSS
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --accent:        #E8490F;
  --accent-dark:   #C13C0A;
  --accent-bg:     #FFF2EC;
  --accent-border: #F4C4AE;

  --bg:            #FAFAF8;
  --surface:       #FFFFFF;
  --surface-2:     #F4F4F0;
  --surface-3:     #EDEDE8;

  --border:        #E4E4DE;
  --border-2:      #D0D0C8;

  --text:          #141414;
  --text-2:        #444440;
  --text-3:        #808078;
  --text-inv:      #FFFFFF;

  /* Party colours */
  --c-bjp: #FF9933;
  --c-sp: #FF2222;
  --c-bsp: #0000FF;
  --c-inc: #19AAED;
  --c-rld: #008000;
  --c-ads: #00FFFF;
  --c-nishad: #FF00FF;
  --c-sbsp: #FFFF00;
  --c-jsdl: #FFCC00;
  --c-ind: #808080;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   20px;
  --text-xl:   26px;
  --text-2xl:  34px;
  --text-3xl:  44px;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px;--s-16: 64px; --s-20: 80px; --s-24: 96px;

  --radius-sm: 3px;
  --radius:    6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10);

  --max-w: 1280px;
  --nav-h: 56px;
  --transition: 140ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-6);
}
@media (max-width: 768px) { .container { padding: 0 var(--s-4); } }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--s-6);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
}
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.5px;
  border-radius: var(--radius-sm);
}
.logo-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.logo-sub {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 400;
  line-height: 1;
}
.nav-main {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  flex: 1;
}
.nav-main a,
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-main a:hover,
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-main a.active { color: var(--accent); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-dropdown-btn svg { width: 12px; height: 12px; opacity: .6; transition: transform var(--transition); }
.nav-dropdown:hover .nav-dropdown-btn svg { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 10;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: var(--s-2) var(--s-4);
  font-size: var(--text-sm);
  color: var(--text-2);
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
}
.dropdown-menu a:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.dropdown-menu a:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); }

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}
.lang-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: calc(var(--radius) - 2px);
  transition: all var(--transition);
  letter-spacing: .3px;
}
.lang-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.lang-btn:hover:not(.active) { color: var(--text-2); }

/* Mobile menu button */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--s-2);
}
.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all var(--transition);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-left: auto;
}

/* ---- Mobile nav ---- */
@media (max-width: 900px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--s-4) var(--s-4) var(--s-6);
    gap: 2px;
    box-shadow: var(--shadow);
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    margin-left: var(--s-4);
    margin-top: 2px;
  }
  .nav-dropdown-btn svg { display: none; }
  .menu-btn { display: flex; }
}

/* ---- Hero ---- */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s-16) 0 var(--s-12);
}
.hero-inner { display: grid; grid-template-columns: 1fr 420px; gap: var(--s-12); align-items: start; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: var(--s-4);
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -1.5px;
  margin-bottom: var(--s-4);
}
.hero-lead {
  font-size: var(--text-md);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: var(--s-8);
  max-width: 540px;
}
.hero-cta {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* Countdown card */
.countdown-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.countdown-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--s-4);
}
.countdown-units { display: flex; gap: var(--s-3); }
.countdown-unit { text-align: center; flex: 1; }
.countdown-num {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-name {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 500;
  display: block;
  margin-top: var(--s-1);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.countdown-divider {
  font-size: var(--text-xl);
  color: var(--border-2);
  font-weight: 300;
  align-self: flex-start;
  margin-top: var(--s-1);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: var(--text-2xl); }
  .hero { padding: var(--s-12) 0 var(--s-8); }
}

/* ---- Stats Bar ---- */
.stats-bar {
  background: var(--text);
  color: var(--text-inv);
  padding: var(--s-5) 0;
}
.stats-bar-inner {
  display: flex;
  gap: 0;
  justify-content: space-between;
}
.stat-item { text-align: center; flex: 1; padding: 0 var(--s-4); }
.stat-item + .stat-item { border-left: 1px solid rgba(255,255,255,.12); }
.stat-num {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: var(--text-xs); color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .8px; margin-top: 2px; display: block; }

@media (max-width: 640px) {
  .stats-bar-inner { flex-wrap: wrap; }
  .stat-item { flex: 1 1 50%; padding: var(--s-3) var(--s-4); }
  .stat-item + .stat-item { border-left: none; border-top: 1px solid rgba(255,255,255,.12); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 10px var(--s-5);
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); border-color: var(--border-2); color: var(--text-2); }
.btn-secondary:hover { border-color: var(--text-3); color: var(--text); }
.btn-sm { padding: 6px var(--s-3); font-size: var(--text-xs); }

/* ---- Section ---- */
.section { padding: var(--s-12) 0; }
.section-sm { padding: var(--s-8) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { margin-bottom: var(--s-8); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.section-title { font-size: var(--text-xl); font-weight: 700; color: var(--text); letter-spacing: -.5px; }
.section-sub { font-size: var(--text-sm); color: var(--text-3); margin-top: var(--s-1); }
.section-link { font-size: var(--text-sm); font-weight: 600; color: var(--accent); white-space: nowrap; }
.section-link:hover { color: var(--accent-dark); }

/* ---- Party Tally ---- */
.tally-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-4); }
.tally-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.tally-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); }
.tally-card-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.tally-seats {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1;
  margin-bottom: var(--s-1);
  font-variant-numeric: tabular-nums;
}
.tally-party { font-size: var(--text-sm); font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.tally-share { font-size: var(--text-xs); color: var(--text-3); }

/* ---- Feature Cards ---- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-4); }
.feature-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5) var(--s-5) var(--s-6);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); transform: translateY(-2px); }
.feature-card-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  margin-bottom: var(--s-4);
}
.feature-card-icon svg { width: 20px; height: 20px; color: var(--accent); }
.feature-card-title { font-size: var(--text-md); font-weight: 600; color: var(--text); margin-bottom: var(--s-1); }
.feature-card-desc { font-size: var(--text-sm); color: var(--text-3); line-height: 1.5; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table th {
  background: var(--surface-2);
  padding: 10px var(--s-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}
.data-table th:hover { color: var(--text-2); }
.data-table th.sorted { color: var(--accent); }
.data-table th .sort-icon { display: inline-block; margin-left: 4px; opacity: .4; }
.data-table th.sorted .sort-icon { opacity: 1; }
.data-table td {
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table td:first-child { color: var(--text); font-weight: 500; }
.data-table .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.data-table .ac-link { color: var(--accent); font-weight: 600; }
.data-table .ac-link:hover { color: var(--accent-dark); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: .3px;
}
.badge-bjp  { background: rgba(255,153,51,.12); color: var(--c-bjp); }
.badge-sp   { background: rgba(255,34,34,.12);   color: var(--c-sp); }
.badge-bsp  { background: rgba(0,0,255,.12);     color: var(--c-bsp); }
.badge-inc  { background: rgba(25,170,237,.12);  color: var(--c-inc); }
.badge-rld  { background: rgba(0,128,0,.12);     color: var(--c-rld); }
.badge-ads  { background: rgba(0,255,255,.12);   color: var(--c-ads); }
.badge-nishad { background: rgba(255,0,255,.12); color: var(--c-nishad); }
.badge-sbsp { background: rgba(255,255,0,.12);   color: var(--c-sbsp); }
.badge-jsdl { background: rgba(255,204,0,.12);   color: var(--c-jsdl); }
.badge-ind  { background: rgba(128,128,128,.12); color: var(--c-ind); }
.badge-sc   { background: rgba(232,73,15,.1);   color: var(--accent); }
.badge-st   { background: rgba(16,185,129,.1);   color: #10b981; }
.badge-gen  { background: var(--surface-2); color: var(--text-3); }

/* ---- Search & Filter Bar ---- */
.filter-bar {
  display: flex;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
  align-items: center;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap svg {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.search-input::placeholder { color: var(--text-3); }
.filter-select {
  padding: 9px 32px 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-2);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--accent); }
.result-count { font-size: var(--text-xs); color: var(--text-3); font-weight: 500; white-space: nowrap; margin-left: auto; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
  justify-content: center;
}
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
  transition: all var(--transition);
}
.page-btn:hover:not(:disabled) { border-color: var(--border-2); color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Charts ---- */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
}
.chart-title { font-size: var(--text-base); font-weight: 600; color: var(--text); margin-bottom: var(--s-5); }
.bar-chart { display: flex; flex-direction: column; gap: var(--s-3); }
.bar-row { display: flex; align-items: center; gap: var(--s-3); }
.bar-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-2); width: 40px; flex-shrink: 0; }
.bar-track { flex: 1; height: 22px; background: var(--surface-2); border-radius: 3px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); display: flex; align-items: center; padding-left: 8px; }
.bar-fill span { font-size: var(--text-xs); font-weight: 700; color: #fff; white-space: nowrap; }
.bar-num { font-size: var(--text-xs); font-weight: 600; color: var(--text-3); width: 28px; text-align: right; flex-shrink: 0; }

/* SVG Chart */
.svg-chart { overflow: visible; }
.chart-grid line { stroke: var(--border); stroke-dasharray: 3 3; }
.chart-axis text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart-bar { transition: opacity var(--transition); }
.chart-bar:hover { opacity: .85; }

/* ---- Schedule ---- */
.timeline { position: relative; padding-left: var(--s-6); }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: var(--s-5); }
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--s-6) + 3px);
  top: 5px;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--border-2);
  box-shadow: 0 0 0 1px var(--border-2);
}
.timeline-dot.done { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timeline-dot.upcoming { background: var(--surface); border-color: var(--border-2); }
.timeline-date { font-size: var(--text-xs); color: var(--text-3); font-weight: 500; margin-bottom: 2px; }
.timeline-event { font-size: var(--text-sm); font-weight: 600; color: var(--text-2); }

/* ---- Constituency Detail ---- */
.ac-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s-10) 0;
}
.ac-breadcrumb { font-size: var(--text-xs); color: var(--text-3); margin-bottom: var(--s-4); }
.ac-breadcrumb a:hover { color: var(--accent); }
.ac-title { font-size: var(--text-2xl); font-weight: 700; color: var(--text); letter-spacing: -.5px; margin-bottom: var(--s-2); }
.ac-meta { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }

.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-8); }
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
}
.result-card-year { font-size: var(--text-xs); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .8px; margin-bottom: var(--s-3); }
.result-card-winner { font-size: var(--text-md); font-weight: 700; color: var(--text); margin-bottom: var(--s-1); }
.result-card-stats { display: flex; gap: var(--s-4); margin-top: var(--s-3); flex-wrap: wrap; }
.result-card-stat span { display: block; }
.result-card-stat .val { font-size: var(--text-base); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.result-card-stat .lbl { font-size: var(--text-xs); color: var(--text-3); }

@media (max-width: 600px) { .result-cards { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.faq-question svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer { font-size: var(--text-sm); color: var(--text-2); line-height: 1.7; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-answer { max-height: 600px; padding-bottom: var(--s-5); }

/* ---- Party Page ---- */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-6); }
.party-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.party-card:hover { box-shadow: var(--shadow); }
.party-card-header { padding: var(--s-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: var(--s-4); }
.party-abbr {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: var(--text-lg);
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.party-card-name { font-size: var(--text-base); font-weight: 700; color: var(--text); line-height: 1.3; }
.party-card-abbr-text { font-size: var(--text-xs); color: var(--text-3); font-weight: 500; }
.party-card-body { padding: var(--s-5); }
.party-stat-row { display: flex; justify-content: space-between; padding: var(--s-2) 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.party-stat-row:last-child { border-bottom: none; }
.party-stat-row .label { color: var(--text-3); }
.party-stat-row .value { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- District Cards ---- */
.district-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-4); }
.district-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.district-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); }
.district-name { font-size: var(--text-base); font-weight: 700; color: var(--text); margin-bottom: var(--s-3); }
.district-bar { height: 6px; background: var(--surface-3); border-radius: 100px; margin-bottom: var(--s-3); overflow: hidden; display: flex; }
.district-bar-seg { height: 100%; transition: width .6s cubic-bezier(.4,0,.2,1); }
.district-stats { display: flex; gap: var(--s-4); }
.district-stat .val { font-size: var(--text-sm); font-weight: 600; color: var(--text); display: block; }
.district-stat .lbl { font-size: var(--text-xs); color: var(--text-3); }

/* ---- Page Header ---- */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s-10) 0 var(--s-8);
}
.page-eyebrow { font-size: var(--text-xs); font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--s-3); display: block; }
.page-title { font-size: var(--text-2xl); font-weight: 700; color: var(--text); letter-spacing: -.5px; margin-bottom: var(--s-2); }
.page-desc { font-size: var(--text-base); color: var(--text-2); max-width: 640px; }

/* ---- Trends ---- */
.trend-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
  overflow: hidden;
}
.trend-legend { display: flex; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-4); }
.legend-item { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-xs); font-weight: 500; color: var(--text-2); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ---- Footer ---- */
.site-footer {
  background: var(--text);
  color: var(--text-inv);
  padding: var(--s-12) 0 var(--s-8);
  margin-top: var(--s-16);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-10);
}
.footer-brand .logo-mark { width: 40px; height: 40px; font-size: 16px; margin-bottom: var(--s-4); }
.footer-brand-name { font-size: var(--text-base); font-weight: 700; color: #fff; margin-bottom: var(--s-2); }
.footer-brand-desc { font-size: var(--text-sm); color: rgba(255,255,255,.5); line-height: 1.6; max-width: 280px; }
.footer-col-title { font-size: var(--text-xs); font-weight: 700; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: .8px; margin-bottom: var(--s-4); }
.footer-links { display: flex; flex-direction: column; gap: var(--s-2); }
.footer-links a { font-size: var(--text-sm); color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-links a:hover { color: rgba(255,255,255,.9); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--s-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer-copy { font-size: var(--text-xs); color: rgba(255,255,255,.4); }
.footer-disclaimer { font-size: var(--text-xs); color: rgba(255,255,255,.3); max-width: 480px; line-height: 1.5; text-align: right; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; align-items: flex-start; } .footer-disclaimer { text-align: left; } }

/* ---- Misc Utilities ---- */
.divider { height: 1px; background: var(--border); margin: var(--s-8) 0; }
.notice {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  font-size: var(--text-sm);
  color: var(--accent-dark);
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-3); }
.font-tabular { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* ---- Social Share Bar ---- */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  padding: var(--s-3) 0;
}
.share-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-right: var(--s-2);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  color: #fff;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none !important;
  cursor: pointer;
  border: none;
}
.share-btn:hover { opacity: .9; transform: translateY(-1px); }
.share-btn svg { width: 14px; height: 14px; fill: currentColor; }
.share-btn-wa   { background: #25D366; }
.share-btn-x    { background: #000000; }
.share-btn-fb   { background: #1877F2; }
.share-btn-tg   { background: #24A1DE; }
.share-btn-copy { background: var(--surface-3); color: var(--text); border: 1px solid var(--border); }
.share-btn-copy:hover { background: var(--surface-2); color: var(--text); }

/* ---- Responsive Enhancements ---- */
@media (max-width: 768px) {
  .hero { padding: var(--s-8) 0 var(--s-6); }
  .hero h1 { font-size: 28px; letter-spacing: -0.5px; }
  .hero-lead { font-size: var(--text-base); margin-bottom: var(--s-6); }
  .page-header { padding: var(--s-6) 0 var(--s-4); }
  .page-title { font-size: 26px; }
  .section { padding: var(--s-8) 0; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .search-wrap { width: 100%; }
  .filter-select { width: 100%; }
  .result-count { margin-left: 0; text-align: right; }
  .tally-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .district-grid { grid-template-columns: 1fr; }
  .party-grid { grid-template-columns: 1fr; }
  .chart-wrap { padding: var(--s-4); }
  .data-table th, .data-table td { padding: 8px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .countdown-card { padding: var(--s-4); }
  .countdown-num { font-size: var(--text-xl); }
  .countdown-name { font-size: 9px; }
  .tally-grid { grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .tally-card { padding: var(--s-3); }
  .tally-seats { font-size: var(--text-xl); }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { width: 100%; flex-direction: column; }
  .ac-title { font-size: 22px; }
}

/* ---- Print ---- */
@media print {
  .site-header, .site-footer, .filter-bar, .pagination, .lang-switcher, .menu-btn { display: none !important; }
  .data-table { font-size: 12px; }
  body { background: #fff; }
}
