/*
Theme Name: Election Decoder Child
Template: generatepress
Description: Child theme for electiondecoder.com — carries the "202" design system (parchment/ink/indigo/gold palette, IBM Plex + Source Serif type) from the site mockup.
Version: 1.0
*/

/* ---------- Design tokens (from mockup) ---------- */
:root{
  --paper:#EDEAE0;
  --paper-raised:#F5F3EC;
  --ink:#1C2321;
  --indigo:#26324A;
  --gold:#A9791E;
  --grey:#6B6A63;
  --line: rgba(28,35,33,0.14);
  --bjp:#E08327;
  --sp:#B23A3A;
  --bsp:#2E5C8A;
  --inc:#5E9AC7;
  --other:#9A9587;
}

/* ---------- Reset generic theme look ---------- */
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'IBM Plex Sans','IBM Plex Sans Devanagari',sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
.site-header, .site-footer{ background:var(--paper); border-color:var(--line); }

/* ---------- Header / wordmark ---------- */
.site-branding .wordmark{
  display:flex;
  align-items:baseline;
  gap:10px;
}
.wordmark .num{
  font-family:'Source Serif 4',serif;
  font-weight:600;
  font-size:28px;
  letter-spacing:-0.01em;
  color:var(--ink);
}
.wordmark .sub{
  font-size:13px;
  color:var(--grey);
  border-left:1px solid var(--line);
  padding-left:10px;
}

.main-navigation a{
  font-size:15px;
  padding-bottom:2px;
  border-bottom:1px solid transparent;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a{
  border-color:var(--gold);
  color:var(--indigo);
}

/* ---------- Shared editorial type ---------- */
h1, h2, h3{ font-family:'Source Serif 4',serif; font-weight:400; }
.eyebrow{ font-size:13px; color:var(--grey); margin-bottom:6px; }
.section-title{ font-size:22px; margin:0 0 6px; }
.section-title .hi{
  font-family:'IBM Plex Sans Devanagari',sans-serif;
  color:var(--grey);
  font-size:15px;
  font-weight:400;
  margin-left:8px;
}
.section-desc{
  font-size:14px;
  line-height:1.6;
  max-width:34ch;
  margin-bottom:20px;
}
.data-mono{ font-family:'IBM Plex Mono',monospace; }

/* ---------- Seat grid (hero) ---------- */
.seat-grid{
  display:grid;
  grid-template-columns:repeat(31, 1fr);
  gap:3px;
  margin-bottom:22px;
}
.seat{ aspect-ratio:1; border-radius:1px; }

.legend{
  display:flex;
  gap:24px;
  flex-wrap:wrap;
  font-size:13px;
  color:var(--grey);
  align-items:center;
}
.legend .chip{ display:flex; align-items:center; gap:7px; }
.legend .swatch{ width:11px; height:11px; border-radius:1px; }
.legend .majority{
  margin-left:auto;
  font-family:'IBM Plex Mono',monospace;
  color:var(--ink);
}
.legend .majority .num{ color:var(--gold); font-weight:500; }

.year-toggle{
  display:flex;
  border:1px solid var(--line);
  font-family:'IBM Plex Mono',monospace;
  font-size:13px;
}
.year-toggle button{
  background:none;
  border:none;
  padding:8px 14px;
  cursor:pointer;
  color:var(--grey);
  border-right:1px solid var(--line);
}
.year-toggle button:last-child{ border-right:none; }
.year-toggle button.on{ background:var(--indigo); color:var(--paper-raised); }

/* ---------- Ledger rows ---------- */
.ledger-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:9px 0;
  border-top:1px solid var(--line);
  font-size:13px;
}
.ledger-row:last-child{ border-bottom:1px solid var(--line); }
.ledger-row .ac{ font-weight:500; }
.ledger-row .trend{
  font-family:'IBM Plex Mono',monospace;
  color:var(--grey);
  display:flex;
  gap:4px;
  align-items:center;
}
.ledger-row .trend .dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }

/* ---------- Candidate cards (Contenders section) ---------- */
.cand-tabs{
  display:flex;
  gap:14px;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  color:var(--grey);
  margin-bottom:16px;
}
.cand-tabs a.on, .cand-tabs a:hover{ color:var(--ink); border-bottom:1px solid var(--gold); }
.cand-card{ padding:12px 0; border-top:1px solid var(--line); }
.cand-card:last-child{ border-bottom:1px solid var(--line); }
.cand-name{ font-weight:500; font-size:14px; }
.cand-meta{ font-size:12px; color:var(--grey); margin-top:3px; }
.cand-tag{
  display:inline-block;
  font-size:11px;
  font-family:'IBM Plex Mono',monospace;
  color:var(--indigo);
  border:1px solid var(--indigo);
  padding:1px 6px;
  border-radius:2px;
  margin-top:6px;
}

/* ---------- Ground Pulse list ---------- */
.pulse-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 12px;
  padding:11px 0;
  border-top:1px solid var(--line);
  font-size:13px;
}
.pulse-item:last-child{ border-bottom:1px solid var(--line); }
.pulse-from{ color:var(--grey); font-size:12px; }
.pulse-score{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--indigo); }

@media (max-width: 700px){
  .seat-grid{ grid-template-columns:repeat(16, 1fr); }
}
