/* ============================================
   REPUBLICAN IDAHO — Design System v2.0
   Bridge Child Theme
   Blue & Gold + Editorial Typography
   ============================================ */

/* --- Brand Palette --- */
:root {
  --ri-blue: #002868;
  --ri-gold: #D4A843;
  --ri-red: #BF0A30;
  --ri-white: #FFFFFF;
  --ri-paper: #F5F3EE;
  --ri-light: #F7F9FC;
  --ri-border: #E2E8F0;
  --ri-dark: #0A1628;
  --ri-slate: #2D3748;
  --ri-muted: #6B7B8D;
  --ri-ink: #1A1A1A;

  /* Typography stacks */
  --ri-font-editorial: 'Playfair Display', Georgia, serif;
  --ri-font-body: 'Inter', -apple-system, sans-serif;
  --ri-font-data: 'IBM Plex Mono', 'Courier New', monospace;
}

/* --- Base / Body --- */
body {
  background-color: var(--ri-paper) !important;
  color: var(--ri-slate);
  font-family: var(--ri-font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography: Editorial Headlines --- */
h1 {
  font-family: var(--ri-font-editorial);
  font-weight: 800;
  font-size: 52px;
  color: var(--ri-ink);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
h2 {
  font-family: var(--ri-font-editorial);
  font-weight: 700;
  font-size: 36px;
  color: var(--ri-blue);
  margin-bottom: 20px;
  line-height: 1.2;
}
h3 {
  font-family: var(--ri-font-body);
  font-weight: 700;
  font-size: 22px;
  color: var(--ri-blue);
  line-height: 1.3;
}
h4 {
  font-family: var(--ri-font-body);
  font-weight: 600;
  font-size: 18px;
  color: var(--ri-blue);
}
h5 {
  font-family: var(--ri-font-data);
  font-weight: 600;
  font-size: 13px;
  color: var(--ri-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}
p { color: var(--ri-slate); font-size: 16px; line-height: 1.75; }

/* --- Section Labels (eyebrow text) --- */
.ri-section-label {
  font-family: var(--ri-font-data);
  color: var(--ri-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* --- Data Typography --- */
.ri-data, .ri-score, .ri-tier-price {
  font-family: var(--ri-font-data);
}

/* --- Utility --- */
.ri-body-text { color: var(--ri-slate); font-size: 16px; line-height: 1.75; }
.ri-counter-label {
  font-family: var(--ri-font-data);
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}
.ri-quote {
  font-family: var(--ri-font-editorial);
  color: var(--ri-blue);
  font-style: italic;
  font-size: 24px;
  border-left: 3px solid var(--ri-gold);
  padding-left: 24px;
  margin: 40px 0;
  line-height: 1.4;
}
.ri-gold-accent { color: var(--ri-gold); }
.ri-red-alert { color: var(--ri-red); }

/* --- Live Bill Ticker --- */
.ri-ticker-bar {
  background: var(--ri-dark);
  color: #ffffff;
  font-family: var(--ri-font-data);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 36px;
  line-height: 36px;
  border-bottom: 2px solid var(--ri-gold);
}
.ri-ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  background: var(--ri-red);
  color: #ffffff;
  padding: 0 12px;
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 11px;
  height: 36px;
  line-height: 36px;
}
.ri-ticker-track {
  display: inline-block;
  padding-left: 60px;
  animation: ri-ticker-scroll linear infinite;
}
.ri-ticker-item { margin-right: 40px; }
.ri-ticker-sep { color: var(--ri-gold); margin: 0 20px; }
.ri-ticker-signed { color: #4ADE80; font-weight: 600; font-size: 10px; letter-spacing: 1px; }
.ri-ticker-failed { color: var(--ri-red); font-weight: 600; font-size: 10px; letter-spacing: 1px; }
.ri-ticker-active { color: var(--ri-gold); font-weight: 600; font-size: 10px; letter-spacing: 1px; }
.ri-ticker-spacer { margin-right: 80px; }
@keyframes ri-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Scorecard Cards --- */
.ri-scorecard-card {
  background: #ffffff;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
  padding: 32px 24px;
  transition: box-shadow 0.2s ease;
  text-align: center;
}
.ri-scorecard-card:hover {
  box-shadow: 0 4px 20px rgba(0, 40, 104, 0.08);
}
.ri-scorecard-featured {
  border-color: var(--ri-gold);
  border-width: 2px;
  border-top: 3px solid var(--ri-gold);
}
.ri-score {
  font-family: var(--ri-font-data);
  font-size: 48px;
  font-weight: 600;
  color: var(--ri-blue);
  margin: 12px 0;
  line-height: 1;
}
.ri-score-label {
  font-family: var(--ri-font-data);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ri-muted);
}

/* --- Legislator Cards --- */
.ri-legislator-card {
  background: #ffffff;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
  padding: 24px;
  border-left: 3px solid var(--ri-blue);
  transition: box-shadow 0.2s ease;
}
.ri-legislator-card:hover {
  box-shadow: 0 4px 16px rgba(0, 40, 104, 0.08);
}
.ri-legislator-name {
  font-family: var(--ri-font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--ri-ink);
  margin-bottom: 4px;
}
.ri-legislator-district {
  font-family: var(--ri-font-data);
  font-size: 12px;
  color: var(--ri-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ri-legislator-stats { list-style: none; padding: 0; margin-top: 16px; }
.ri-legislator-stats li {
  font-family: var(--ri-font-data);
  padding: 6px 0;
  border-bottom: 1px solid var(--ri-border);
  font-size: 13px;
  color: var(--ri-slate);
}
.ri-legislator-stats li:last-child { border-bottom: none; }

/* --- Bill Tracker Table --- */
.ri-bill-table { width: 100%; border-collapse: collapse; }
.ri-bill-table th {
  background: var(--ri-dark);
  color: #ffffff;
  font-family: var(--ri-font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
}
.ri-bill-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ri-border);
  font-size: 14px;
  color: var(--ri-slate);
}
.ri-bill-table td:first-child {
  font-family: var(--ri-font-data);
  font-weight: 600;
}
.ri-bill-table tr:hover { background: rgba(0, 40, 104, 0.02); }
.ri-bill-status-passed { color: #16A34A; font-family: var(--ri-font-data); font-weight: 600; font-size: 12px; }
.ri-bill-status-failed { color: var(--ri-red); font-family: var(--ri-font-data); font-weight: 600; font-size: 12px; }
.ri-bill-status-pending { color: var(--ri-gold); font-family: var(--ri-font-data); font-weight: 600; font-size: 12px; }

/* --- District Finder --- */
.ri-district-finder {
  background: #ffffff;
  border: 2px solid var(--ri-blue);
  border-radius: 2px;
  padding: 48px;
  text-align: center;
}
.ri-district-finder input {
  font-family: var(--ri-font-data);
  padding: 14px 20px;
  border: 2px solid var(--ri-border);
  border-radius: 0;
  font-size: 16px;
  width: 320px;
  max-width: 100%;
}
.ri-district-finder input:focus {
  border-color: var(--ri-blue);
  outline: none;
}

/* --- Article Cards --- */
.ri-article-card {
  background: #ffffff;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.ri-article-card:hover {
  box-shadow: 0 4px 16px rgba(0, 40, 104, 0.08);
}
.ri-article-card-body { padding: 24px; }
.ri-article-category {
  font-family: var(--ri-font-data);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ri-gold);
  margin-bottom: 8px;
}
.ri-article-title {
  font-family: var(--ri-font-editorial);
  font-size: 20px;
  font-weight: 700;
  color: var(--ri-ink);
  line-height: 1.3;
}
.ri-article-meta {
  font-family: var(--ri-font-data);
  font-size: 12px;
  color: var(--ri-muted);
  margin-top: 12px;
}

/* --- Newsletter Signup --- */
.ri-newsletter-box {
  background: var(--ri-blue);
  border-radius: 0;
  padding: 56px 48px;
  text-align: center;
}
.ri-newsletter-box h2, .ri-newsletter-box h3 {
  font-family: var(--ri-font-editorial);
  color: #ffffff;
}
.ri-newsletter-box p { color: #B0C4DE; }
.ri-newsletter-box input[type="email"] {
  font-family: var(--ri-font-data);
  padding: 14px 20px;
  border: none;
  border-radius: 0;
  font-size: 14px;
  width: 320px;
  max-width: 100%;
}
.ri-newsletter-box button {
  background: var(--ri-gold);
  color: var(--ri-dark);
  border: none;
  padding: 14px 32px;
  border-radius: 0;
  font-family: var(--ri-font-data);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ri-newsletter-box button:hover { background: #E8BC5A; }

/* --- Tier/Pricing Cards --- */
.ri-tier-card {
  background: #ffffff;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
  padding: 40px 24px;
  transition: box-shadow 0.2s ease;
}
.ri-tier-card:hover {
  box-shadow: 0 4px 20px rgba(0, 40, 104, 0.08);
}
.ri-tier-featured { border-color: var(--ri-gold); border-width: 2px; border-top: 3px solid var(--ri-gold); }
.ri-tier-price { font-family: var(--ri-font-data); font-size: 42px; font-weight: 600; color: var(--ri-blue); margin: 16px 0; }
.ri-tier-price span { font-size: 14px; font-weight: 400; color: var(--ri-muted); }
.ri-tier-features { list-style: none; padding: 0; text-align: left; }
.ri-tier-features li { padding: 8px 0; border-bottom: 1px solid var(--ri-border); font-size: 14px; color: var(--ri-slate); }
.ri-tier-features li:last-child { border-bottom: none; }
.ri-tier-features li::before { content: '\2713'; color: var(--ri-gold); font-weight: 700; margin-right: 8px; }

/* --- Accordion (FAQ) --- */
.qode_accordion_holder .accordion_mark { display: none; }
.qode_accordion_holder .accordion_title {
  background-color: #ffffff !important;
  color: var(--ri-blue) !important;
  border-bottom: 1px solid var(--ri-border);
  font-weight: 600;
  padding: 18px 0 !important;
}
.qode_accordion_holder .accordion_title:hover { color: var(--ri-gold) !important; }
.qode_accordion_holder .accordion_content {
  background-color: #ffffff !important;
  color: var(--ri-slate) !important;
  padding: 16px 0 !important;
}

/* --- Buttons Override --- */
.qbutton {
  border-radius: 0 !important;
  font-family: var(--ri-font-data) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}

/* --- Header / Nav --- */
header.page_header .header_inner_left .logo_wrapper img { max-height: 40px; }
header.page_header {
  background-color: var(--ri-dark) !important;
  border-bottom: 2px solid var(--ri-gold);
}
nav.main_menu ul li a {
  font-family: var(--ri-font-data) !important;
  color: #ffffff !important;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
nav.main_menu ul li a:hover { color: var(--ri-gold) !important; }

/* --- Footer --- */
footer.uncover { background-color: var(--ri-dark) !important; }
footer .footer_inner .column_inner { color: #A0AEC0; }
footer .footer_inner h5 { color: #ffffff; font-family: var(--ri-font-data); }
footer a { color: var(--ri-gold) !important; }
footer a:hover { color: #ffffff !important; }

/* --- Dark Section Overrides --- */
.dark-section { background-color: var(--ri-dark); }
.dark-section h2, .dark-section h3 { color: #ffffff; }
.dark-section p { color: #A0AEC0; }
.dark-section .ri-section-label { color: var(--ri-gold); }

/* --- Blue Section (hero/CTA) --- */
.blue-section { background-color: var(--ri-blue); }
.blue-section h2, .blue-section h3 { color: #ffffff; font-family: var(--ri-font-editorial); }
.blue-section p { color: #B0C4DE; }
.blue-section .ri-section-label { color: var(--ri-gold); }

/* --- Badge/Tag styles --- */
.ri-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 2px;
  font-family: var(--ri-font-data);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.ri-tag-blue { background: rgba(0,40,104,0.1); color: var(--ri-blue); }
.ri-tag-gold { background: rgba(212,168,67,0.15); color: #B8922E; }
.ri-tag-red { background: rgba(191,10,48,0.1); color: var(--ri-red); }

/* --- Scroll Containers --- */
.ri-legislator-grid {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
  padding: 16px;
  background: #ffffff;
}
.ri-legislator-grid::-webkit-scrollbar { width: 4px; }
.ri-legislator-grid::-webkit-scrollbar-track { background: transparent; }
.ri-legislator-grid::-webkit-scrollbar-thumb { background: var(--ri-border); border-radius: 2px; }
.ri-legislator-grid::-webkit-scrollbar-thumb:hover { background: #CBD5E0; }

.ri-bill-table-wrap {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
}
.ri-bill-table-wrap::-webkit-scrollbar { width: 4px; }
.ri-bill-table-wrap::-webkit-scrollbar-track { background: #ffffff; }
.ri-bill-table-wrap::-webkit-scrollbar-thumb { background: var(--ri-border); border-radius: 2px; }
.ri-bill-table-wrap .ri-bill-table th { position: sticky; top: 0; z-index: 1; }

.ri-notable-votes {
  max-height: 600px;
  overflow-y: auto;
}
.ri-notable-votes::-webkit-scrollbar { width: 4px; }
.ri-notable-votes::-webkit-scrollbar-track { background: transparent; }
.ri-notable-votes::-webkit-scrollbar-thumb { background: var(--ri-border); border-radius: 2px; }

/* --- No Data State --- */
.ri-no-data {
  font-family: var(--ri-font-data);
  color: var(--ri-muted);
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
  font-size: 13px;
}

/* --- Page-specific: Hero section --- */
.ri-hero-section {
  background: var(--ri-dark);
  position: relative;
}
.ri-hero-section h1 {
  font-family: var(--ri-font-editorial);
  color: #ffffff;
  font-size: 56px;
}
.ri-hero-section .ri-section-label { color: var(--ri-gold); }

/* --- Stat Panel (hero sidebar) --- */
.ri-stat-panel {
  background: #ffffff;
  border: 1px solid var(--ri-border);
  border-radius: 2px;
  padding: 0;
}
.ri-stat-panel-header {
  background: var(--ri-dark);
  color: #ffffff;
  font-family: var(--ri-font-data);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
}
.ri-stat-panel-header .ri-live-dot {
  width: 6px;
  height: 6px;
  background: #4ADE80;
  border-radius: 50%;
  display: inline-block;
  animation: ri-pulse 2s infinite;
}
@keyframes ri-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.ri-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ri-border);
  font-size: 14px;
}
.ri-stat-row:last-child { border-bottom: none; }
.ri-stat-row-label { color: var(--ri-slate); }
.ri-stat-row-value {
  font-family: var(--ri-font-data);
  font-weight: 600;
  color: var(--ri-blue);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  .ri-hero-section h1 { font-size: 44px; }
}

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .ri-hero-section h1 { font-size: 36px; }
  .ri-scorecard-card, .ri-legislator-card, .ri-tier-card, .ri-article-card { margin-bottom: 16px; }
  .ri-score { font-size: 36px; }
  .ri-tier-price { font-size: 32px; }
  .ri-newsletter-box { padding: 32px 20px; }
  .ri-newsletter-box input[type="email"] { width: 100%; margin-bottom: 12px; }
  .ri-district-finder { padding: 32px 20px; }
  .ri-district-finder input { width: 100%; }
  .ri-ticker-bar { font-size: 11px; }
  .ri-stat-panel { margin-top: 24px; }
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  .ri-hero-section h1 { font-size: 30px; }
  .ri-score { font-size: 28px; }
}
