/* styles.css – shared styling for all pages (v1.1 polish) */

:root {
  --bg: #020617;
  --card: #020819;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1f2937;

  /* Party colors */
  --dem: #3b82f6;   /* brighter Dem blue */
  --gop: #f97373;   /* soft but clear GOP red */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  background: radial-gradient(circle at top, #111827 0, #020617 55%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Header & nav */

header {
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 18px;
  text-decoration: none;
}

nav a:first-child {
  margin-left: 0;
}

nav a:hover {
  color: var(--text-main);
}

/* Headings & intro */

h1 {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

h2.section-heading {
  font-size: 1.2rem;
  margin: 24px 0 10px;
  color: var(--text-main);
}

.intro-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Homepage buttons */

.button-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-main);
  font-size: 0.95rem;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent);
  color: #020617;
}

/* Cards */

.card {
  background: radial-gradient(circle at top left, #0b1120 0, #020617 55%);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px 18px 14px;
  margin-bottom: 16px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.6);
}
.card.contact-card {
  padding: 10px 14px;
}

.card.contact-card .section-heading {
  margin: 8px 0 4px;
  font-size: 0.95rem;
}

.card.contact-card .summary {
  margin: 0;
  font-size: 0.85rem;
}
/* State-level cards on Senate page */

.state-card {
  margin-top: 18px;          /* more space between states */
}

.state-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.state-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.state-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.state-body {
  margin-top: 4px;
}

.race-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.race-block:first-of-type {
  margin-top: 2px;
  padding-top: 6px;
}

.race-kind {
  font-size: 0.78rem;        /* a bit smaller */
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.race-kind.dem-kind {
  color: var(--dem);
}

.race-kind.gop-kind {
  color: var(--gop);
}

/* Lines inside race blocks */

.race-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.93rem;
  padding: 3px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.race-line:last-of-type {
  border-bottom: none;
}

.race-label {
  color: var(--text-muted);
  margin-right: 6px;
  font-weight: 500;          /* slightly bolder labels */
}

/* Candidate colors */

.dem {
  color: var(--dem);
  font-weight: 600;
}

.gop {
  color: var(--gop);
  font-weight: 600;
}

/* Leader pills */

.leader-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

.leader-dem {
  border-color: rgba(59, 130, 246, 0.9);
  background: rgba(37, 99, 235, 0.22);
  color: #e0ecff;
}

.leader-gop {
  border-color: rgba(248, 113, 113, 0.9);
  background: rgba(248, 113, 113, 0.22);
  color: #fee2e2;
}

/* Candidate list (nomination pages) */

.candidate-list {
  list-style: none;
  margin-top: 8px;
}

.candidate-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
  font-size: 0.95rem;
}

.candidate-list li:last-child {
  border-bottom: none;
}

.candidate-name {
  font-weight: 500;
}

.candidate-percent {
  font-weight: 600;
}

/* Summary block on nomination pages */

.race-summary-block {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(15, 23, 42, 0.9);
}

.summary {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */

footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Small screen tweaks */

@media (max-width: 640px) {
  .button-row {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
  }

  nav a {
    margin-left: 0;
    margin-right: 14px;
  }
}
