/* Congress Vote Tracker — Civic Dashboard Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #1a2332;
  --navy-80: #2c3a50;
  --navy-60: #3e5070;
  --white:   #ffffff;
  --card-bg: #ffffff;
  --accent:  #2563eb;
  --accent-dark: #1d4ed8;
  --red:     #dc2626;
  --blue:    #2563eb;
  --gray:    #6b7280;
  --gray-light: #f1f5f9;
  --gray-border: #e2e8f0;
  --text:    #0f172a;
  --text-muted: #64748b;
  --mono:    'IBM Plex Mono', monospace;
  --sans:    'Inter', sans-serif;
  --radius:  8px;
  --shadow:  0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--gray-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ─── Header ─── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; }
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.logo-tagline {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  gap: 4px;
}
.site-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  transition: all 0.15s;
}
.site-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}
.site-nav a.active { color: var(--white); background: rgba(37,99,235,0.4); }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  padding: 8px;
}

/* ─── Hero / Breaking Bar ─── */
.breaking-bar {
  background: var(--accent);
  color: var(--white);
  text-align: center;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.3px;
}
.breaking-bar span { opacity: 0.8; margin: 0 8px; }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.main-content { padding: 40px 0 60px; }

/* ─── Featured Article ─── */
.featured-section { margin-bottom: 48px; }
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-border);
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.featured-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.featured-card:hover { box-shadow: var(--shadow-md); }
.featured-card .card-image { aspect-ratio: 2/1; overflow: hidden; }
.featured-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .card-body { padding: 24px; }
.featured-card .card-category {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.featured-card h2 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.featured-card h2 a { color: var(--text); }
.featured-card h2 a:hover { color: var(--accent); text-decoration: none; }
.featured-card .card-excerpt { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
.card-meta { font-family: var(--mono); font-size: 12px; color: var(--gray); display: flex; align-items: center; gap: 8px; }
.card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gray); }

/* Sidebar cards */
.sidebar-cards { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  gap: 0;
  transition: box-shadow 0.2s;
}
.sidebar-card:hover { box-shadow: var(--shadow-md); }
.sidebar-card .card-image { width: 100px; flex-shrink: 0; }
.sidebar-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-card .card-body { padding: 12px 14px; flex: 1; }
.sidebar-card .card-category { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.sidebar-card h3 { font-size: 13px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.sidebar-card h3 a { color: var(--text); }
.sidebar-card h3 a:hover { color: var(--accent); text-decoration: none; }
.sidebar-card .card-meta { font-family: var(--mono); font-size: 10px; color: var(--gray); }

/* ─── Stats Bar ─── */
.stats-bar {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 40px;
  display: flex;
  gap: 40px;
  align-items: center;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
}
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); }

/* ─── Articles Grid ─── */
.articles-section { margin-bottom: 48px; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card .card-image { aspect-ratio: 2/1; overflow: hidden; }
.article-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card .card-body { padding: 16px; }
.article-card .card-category {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 8px;
}
.article-card h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); text-decoration: none; }
.article-card .card-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.article-card .card-meta { font-family: var(--mono); font-size: 11px; color: var(--gray); display: flex; align-items: center; gap: 6px; }
.article-card .card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gray); }

/* ─── Party Badge ─── */
.party-r { color: var(--red); font-weight: 600; }
.party-d { color: var(--blue); font-weight: 600; }
.party-i { color: var(--gray); font-weight: 600; }
.vote-yes { color: #16a34a; font-family: var(--mono); font-weight: 500; }
.vote-no  { color: var(--red); font-family: var(--mono); font-weight: 500; }

/* ─── Article Page ─── */
.article-header { padding: 40px 0 0; }
.article-breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 20px;
}
.article-breadcrumb a { color: var(--gray); }
.article-breadcrumb a:hover { color: var(--accent); }
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article-category {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 3px;
}
.article-date, .article-author, .article-read-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray);
}
.article-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 820px;
}
.article-hero {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.article-body {
  max-width: 820px;
}
.article-body p { margin-bottom: 18px; font-size: 17px; line-height: 1.75; color: var(--text); }
.article-body h2 { font-size: 24px; font-weight: 700; margin: 36px 0 14px; color: var(--text); }
.article-body h3 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 8px; font-size: 17px; line-height: 1.7; }
.article-body a { color: var(--accent); }
.article-body a:hover { text-decoration: underline; }
.article-body strong { font-weight: 600; }

/* Vote table */
.vote-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
  margin: 24px 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.vote-table th {
  background: var(--navy);
  color: rgba(255,255,255,0.9);
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vote-table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-border); }
.vote-table tr:last-child td { border-bottom: none; }
.vote-table tr:hover td { background: var(--gray-light); }

/* Stat callout */
.stat-callout {
  background: var(--navy);
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}
.stat-callout .callout-value {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 500;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-callout .callout-label { font-size: 14px; color: rgba(255,255,255,0.65); }

/* Source box */
.source-box {
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 36px 0 0;
}
.source-box h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 12px;
}
.source-box ul { list-style: none; margin: 0; padding: 0; }
.source-box li { font-size: 13px; padding: 4px 0; }
.source-box li::before { content: '↗ '; color: var(--accent); font-family: var(--mono); }

/* Related articles */
.related-section { padding: 40px 0; }
.related-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 24px; }

/* ─── About / Static Pages ─── */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 60px 0;
  margin-bottom: 48px;
}
.page-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.page-hero p { font-size: 17px; color: rgba(255,255,255,0.75); max-width: 600px; }
.content-block { max-width: 820px; margin-bottom: 40px; }
.content-block h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.content-block p { font-size: 16px; line-height: 1.75; color: var(--text); margin-bottom: 14px; }

/* ─── Footer ─── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 40px 0 28px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo-text { color: var(--white); font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.footer-brand .footer-tagline { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.4); letter-spacing: 0.5px; }
.footer-nav { display: flex; gap: 32px; }
.footer-nav-col h4 { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.footer-nav-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.5); padding: 3px 0; transition: color 0.15s; }
.footer-nav-col a:hover { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
}
.footer-data-note { font-size: 11px; color: rgba(255,255,255,0.35); font-family: var(--mono); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { flex-wrap: wrap; gap: 20px; }
  .footer-top { flex-direction: column; gap: 28px; }
}
@media (max-width: 600px) {
  .site-nav { display: none; }
  .menu-toggle { display: flex; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 24px; }
  .stats-bar { flex-direction: column; align-items: flex-start; }
  .stat-divider { display: none; }
}

/* ─── Utility ─── */
.fade-in { animation: fadeIn 0.4s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
