/* Better Government — Shared mobile-first styles with CSS custom property theming */

/* ========================================================================
   Variables (defaults — overridden by jurisdiction theme files)
   ======================================================================== */

.better-government {
  --bg-accent: #dc2626;
  --bg-accent-light: #fef2f2;
  --bg-accent-dark: #991b1b;
  --bg-accent-rgb: 220, 38, 38;
  --font-display: 'Instrument Serif', serif;
  --font-mono: 'DM Mono', monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --bc-red: var(--bg-accent);
  --bc-red-glow: rgba(var(--bg-accent-rgb), 0.08);
  --bc-grey-light: #e5e5e5;
  --bc-text: #111;
  --bc-muted: #666;
  --bc-faint: #999;
  --bc-whisper: #aaa;
  --bc-bg: #fafaf8;
  --bc-surface: #fff;
  --bc-surface-alt: #f5f5f3;
  --bc-border: #e5e5e5;
  --bc-keep: #22c55e;
  --bc-keep-bg: #dcfce7;
  --bc-keep-text: #15803d;
  --bc-delete: #ef4444;
  --bc-delete-bg: #fee2e2;
  --bc-delete-text: #b91c1c;
  --bc-font-display: var(--font-display), Georgia, "Times New Roman", serif;
  --bc-font-mono: var(--font-mono), "Courier New", Courier, monospace;
  --bc-font-body: var(--font-body);
  --bc-pad: 20px;
}

/* ========================================================================
   Reset & Base
   ======================================================================== */

.better-government *,
.better-government *::before,
.better-government *::after {
  box-sizing: border-box;
}

body.better-government {
  margin: 0;
  font-family: var(--bc-font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--bc-text);
  background: var(--bc-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================================================
   Animations
   ======================================================================== */

@keyframes bc-fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bc-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bc-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 0.8; }
}

@keyframes bc-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .better-government *,
  .better-government *::before,
  .better-government *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   Focus & Accessibility
   ======================================================================== */

.better-government :focus-visible {
  outline: 2px solid var(--bc-red);
  outline-offset: 2px;
}

.better-government button:focus-visible {
  outline: 2px solid var(--bc-red);
  outline-offset: 2px;
}

/* Screen-reader only utility */
.bc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to content link */
.bc-skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--bc-red);
  color: #fff;
  font-family: var(--bc-font-mono);
  font-size: 12px;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: top 0.15s;
}

.bc-skip-link:focus {
  top: 0;
}

/* ========================================================================
   Shared Typography
   ======================================================================== */

.bc-eyebrow {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bc-red);
  margin-bottom: 12px;
}

.bc-hero__content .bc-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  white-space: normal;
}

.bc-eyebrow strong {
  color: var(--bc-text);
  font-weight: 500;
}

.bc-section-title {
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--bc-text);
  margin: 0 0 12px 0;
  line-height: 1.1;
}

.bc-section-title em {
  font-style: italic;
  color: var(--bc-red);
}

.bc-section-desc {
  font-family: var(--bc-font-body);
  font-size: 13px;
  color: var(--bc-faint);
  margin: 0;
  max-width: 560px;
  line-height: 1.7;
}

/* ========================================================================
   STICKY NAV
   ======================================================================== */

.bc-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  height: 44px;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bc-border);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-nav::-webkit-scrollbar {
  display: none;
}

.bc-nav--visible {
  transform: translateY(0);
}

.bc-nav__link {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-muted);
  text-decoration: none;
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
  flex-shrink: 0;
}

.bc-nav__link:hover {
  color: var(--bc-text);
}

.bc-nav__link--active {
  color: var(--bc-red);
  border-bottom-color: var(--bc-red);
}

/* ========================================================================
   HERO
   ======================================================================== */

.bc-hero {
  min-height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px var(--bc-pad) 32px;
  position: relative;
  overflow: hidden;
  background: var(--bc-surface);
}

/* Decorative leaves — hidden on mobile */
.bc-leaf {
  position: absolute;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.07);
  display: none;
}

.bc-leaf--1 { width: 120px; top: 8%;  left: 5%;  transform: rotate(-25deg); }
.bc-leaf--2 { width: 80px;  top: 15%; right: 15%; transform: rotate(40deg); }
.bc-leaf--3 { width: 60px;  top: 55%; left: 12%; transform: rotate(15deg); }
.bc-leaf--4 { width: 100px; top: 70%; right: 8%;  transform: rotate(-50deg); }
.bc-leaf--5 { width: 50px;  top: 35%; left: 45%; transform: rotate(65deg); }
.bc-leaf--6 { width: 90px;  bottom: 10%; left: 30%; transform: rotate(-35deg); }
.bc-leaf--7 { width: 70px;  top: 5%;  right: 35%; transform: rotate(20deg); }

/* Glow blob — hidden on mobile */
.bc-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--bc-red-glow) 0%, transparent 70%);
  pointer-events: none;
  display: none;
}

.bc-hero__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.bc-hero__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bc-hero__content .bc-eyebrow {
  opacity: 0;
  animation: bc-fadeUp 0.6s ease forwards 0.2s;
}

.bc-hero__heading {
  font-family: var(--bc-font-display);
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 400;
  line-height: 1.0;
  color: var(--bc-text);
  margin: 0 0 16px 0;
  opacity: 0;
  animation: bc-fadeUp 0.7s ease forwards 0.35s;
}

.bc-hero__heading em {
  font-style: italic;
  color: var(--bc-red);
}

.bc-hero__sub {
  font-family: var(--bc-font-body);
  font-size: 14px;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.45);
  max-width: 560px;
  line-height: 1.7;
  margin: 0 0 32px 0;
  opacity: 0;
  animation: bc-fadeUp 0.7s ease forwards 0.5s;
}

.bc-hero__sub strong {
  color: var(--bc-text);
  font-weight: 500;
}

/* ── Pie chart ── */

.bc-hero__pie-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: bc-fadeIn 0.8s ease forwards 1s;
  align-self: center;
}

.bc-pie-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.bc-pie-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 8px 32px rgba(var(--bg-accent-rgb), 0.12));
}

.bc-pie-track {
  fill: none;
  stroke: #f0f0ee;
  stroke-width: 28;
}

.bc-pie-keep {
  fill: none;
  stroke: var(--bc-grey-light);
  stroke-width: 28;
  stroke-linecap: butt;
}

.bc-pie-delete {
  fill: none;
  stroke: var(--bc-red);
  stroke-width: 28;
  stroke-linecap: butt;
  transition: stroke-dasharray 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-pie-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.bc-pie-pct {
  font-family: var(--bc-font-display);
  font-style: italic;
  font-size: 32px;
  color: var(--bc-red);
  line-height: 1;
}

.bc-pie-label {
  font-family: var(--bc-font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bc-whisper);
  margin-top: 4px;
}

.bc-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
}

.bc-pie-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--bc-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #888;
}

.bc-pie-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bc-pie-legend__dot--delete {
  background: var(--bc-red);
}

.bc-pie-legend__dot--keep {
  background: var(--bc-grey-light);
}

/* ── Progress bar ── */

.bc-progress-wrap {
  width: 100%;
  opacity: 0;
  animation: bc-fadeUp 0.7s ease forwards 0.65s;
}

.bc-progress-track {
  position: relative;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}

.bc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bg-accent), rgba(var(--bg-accent-rgb), 0.6));
  border-radius: 99px;
  width: 0%;
  transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-progress-marker {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  line-height: 1;
  transition: left 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  animation: bc-pulse 2.5s ease-in-out 3 2.5s;
}

.bc-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.bc-progress-label {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  color: rgba(0, 0, 0, 0.35);
  letter-spacing: 0.05em;
}

.bc-progress-count {
  font-family: var(--bc-font-mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  letter-spacing: 0.04em;
}

.bc-progress-count strong {
  color: var(--bc-red);
  font-weight: 500;
}

/* ========================================================================
   CHART SECTION
   ======================================================================== */

.bc-section-chart {
  width: 100%;
  background: var(--bc-bg);
  display: flex;
  flex-direction: column;
}

.bc-chart-container {
  width: 100%;
  margin: 0 auto;
  padding: 48px var(--bc-pad) 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bc-chart-header {
  margin-bottom: 24px;
}

/* ── Mobile: horizontal rows ── */

.bc-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.bc-chart__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.bc-chart__row-year {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  color: var(--bc-muted);
  width: 36px;
  flex-shrink: 0;
  text-align: right;
}

.bc-chart__row-track {
  flex: 1;
  height: 20px;
  background: var(--bc-grey-light);
  border-radius: 4px;
  overflow: hidden;
}

.bc-chart__row-fill {
  height: 100%;
  background: var(--bc-red);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-chart__row-count {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  color: var(--bc-text);
  font-weight: 500;
  width: 32px;
  flex-shrink: 0;
  text-align: right;
}

/* ── Desktop: vertical columns (hidden on mobile, shown via JS) ── */

.bc-chart__col {
  min-width: 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.bc-chart__bar {
  width: 100%;
  background: var(--bc-grey-light);
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.bc-chart__bar-fill {
  width: 100%;
  background: var(--bc-red);
  border-radius: 6px;
  position: relative;
}

.bc-chart__bar-active {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  animation: bc-pulse 2.5s ease-in-out infinite;
}

.bc-chart__year-label {
  margin-top: 6px;
  font-size: 10px;
  color: #555;
  font-family: var(--bc-font-mono);
}

.bc-chart-legend {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-family: var(--bc-font-mono);
  color: var(--bc-muted);
}

.bc-chart-legend__swatch {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.bc-chart-legend__swatch--total {
  background: var(--bc-grey-light);
}

.bc-chart-legend__swatch--reviewed {
  background: var(--bc-red);
}

/* ========================================================================
   VERDICTS SECTION
   ======================================================================== */

.bc-section-verdicts {
  width: 100%;
  background: var(--bc-surface);
  padding: 48px var(--bc-pad);
  overflow-x: hidden;
}

.bc-verdicts-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.bc-verdicts-title-block .bc-section-desc {
  margin-top: 0;
}

/* ── Search input ── */

.bc-search-wrap {
  margin-bottom: 16px;
}

.bc-search {
  width: 100%;
  border: 1px solid var(--bc-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--bc-font-body);
  font-size: 14px;
  color: var(--bc-text);
  background: var(--bc-surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bc-search::placeholder {
  color: var(--bc-whisper);
}

.bc-search:focus {
  border-color: var(--bc-red);
  box-shadow: 0 0 0 3px rgba(var(--bg-accent-rgb), 0.08);
}

/* ── Year selector ── */

.bc-year-selector-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  position: relative;
  margin-bottom: 16px;
}

.bc-year-selector-label {
  font-family: var(--bc-font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bc-whisper);
}

.bc-year-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--bc-border);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bc-bg);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.bc-year-selector::-webkit-scrollbar {
  display: none;
}

.bc-year-selector.grabbing {
  cursor: grabbing;
}

/* Gradient fade on overflow edges */
.bc-year-selector-wrap::before,
.bc-year-selector-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 32px;
  height: calc(100% - 24px);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s;
}

.bc-year-selector-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bc-surface), transparent);
}

.bc-year-selector-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bc-surface), transparent);
}

.bc-year-selector-wrap.bc-year-selector--fade-left::before {
  opacity: 1;
}

.bc-year-selector-wrap.bc-year-selector--fade-right::after {
  opacity: 1;
}

.bc-year-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-family: var(--bc-font-mono);
  font-size: 13px;
  cursor: pointer;
  color: var(--bc-muted);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.bc-year-btn:not(:last-child) {
  border-right: 1px solid var(--bc-border);
}

.bc-year-btn:hover {
  background: #f0f0ee;
  color: var(--bc-text);
}

.bc-year-btn.active {
  background: var(--bc-red);
  color: #fff;
}

/* ── Stat pills ── */

.bc-verdicts-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bc-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--bc-font-mono);
  font-size: 12px;
  color: var(--bc-muted);
  letter-spacing: 0.04em;
}

.bc-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bc-stat-dot--total  { background: var(--bc-red); }
.bc-stat-dot--keep   { background: var(--bc-keep); }
.bc-stat-dot--delete { background: var(--bc-delete); }

.bc-stat-pill strong {
  color: var(--bc-text);
  font-weight: 500;
}

/* ── Verdict badges ── */

.bc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--bc-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.bc-badge--keep {
  background: var(--bc-keep-bg);
  color: var(--bc-keep-text);
}

.bc-badge--delete {
  background: var(--bc-delete-bg);
  color: var(--bc-delete-text);
}

/* ── Verdict cards ── */

.bc-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bc-card {
  border: 1px solid var(--bc-border);
  border-radius: 10px;
  background: var(--bc-surface);
  overflow: hidden;
  transition: border-color 0.15s;
}

.bc-card__header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  gap: 12px;
  user-select: none;
}

.bc-card__title {
  font-family: var(--bc-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--bc-text);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.bc-truncated-tag {
  display: inline-block;
  font-family: var(--bc-font-mono);
  font-size: 9px;
  color: var(--bc-whisper);
  background: #f3f3ee;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.bc-card__chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--bc-whisper);
  transform: rotate(0deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-card--expanded .bc-card__chevron {
  transform: rotate(180deg);
}

.bc-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.25s ease;
  padding: 0 16px;
}

.bc-card--expanded .bc-card__body {
  max-height: 2000px;
  padding: 0 16px 16px;
}

.bc-card__section {
  margin-bottom: 12px;
}

.bc-card__section:last-child {
  margin-bottom: 0;
}

.bc-card__label {
  display: block;
  font-family: var(--bc-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bc-faint);
  margin-bottom: 4px;
}

.bc-card__text {
  font-family: var(--bc-font-body);
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  margin: 0;
}

/* Desktop hover for cards */
@media (hover: hover) {
  .bc-card:hover {
    border-color: rgba(var(--bg-accent-rgb), 0.25);
  }
}

/* ── Skeleton loading cards ── */

.bc-card--skeleton {
  pointer-events: none;
}

.bc-card--skeleton .bc-card__header {
  cursor: default;
}

.bc-skeleton {
  background: #e8e8e6;
  border-radius: 4px;
  background-image: linear-gradient(
    90deg,
    #e8e8e6 0%,
    #f2f2f0 40%,
    #e8e8e6 80%
  );
  background-size: 200% 100%;
  animation: bc-shimmer 1.5s ease-in-out infinite;
}

.bc-skeleton--badge {
  width: 60px;
  height: 22px;
  border-radius: 99px;
  flex-shrink: 0;
}

.bc-skeleton--text {
  height: 14px;
  flex: 1;
}

.bc-skeleton--text:nth-child(2) {
  width: 80%;
}

.bc-skeleton--text:nth-child(3) {
  width: 60%;
}

/* ── Empty state ── */

.bc-empty-state {
  padding: 48px 24px;
  text-align: center;
  color: #bbb;
  font-family: var(--bc-font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ── Pagination ── */

.bc-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.bc-pagination-info {
  font-family: var(--bc-font-mono);
  font-size: 12px;
  color: var(--bc-whisper);
  letter-spacing: 0.04em;
}

.bc-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bc-page-btn {
  background: none;
  border: 1px solid var(--bc-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--bc-font-mono);
  font-size: 12px;
  cursor: pointer;
  color: #555;
  transition: all 0.15s;
  min-width: 36px;
  text-align: center;
}

.bc-page-btn:hover:not(:disabled) {
  border-color: var(--bc-red);
  color: var(--bc-red);
}

.bc-page-btn.active {
  background: var(--bc-red);
  border-color: var(--bc-red);
  color: #fff;
}

.bc-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bc-page-ellipsis {
  border: none;
  cursor: default;
  color: #ccc;
}

/* ========================================================================
   PROMPT SECTION
   ======================================================================== */

.bc-section-prompt {
  width: 100%;
  background: var(--bc-bg);
  padding: 48px var(--bc-pad);
  border-top: 1px solid var(--bc-border);
}

.bc-prompt-header {
  margin-bottom: 24px;
}

.bc-prompt-block {
  border: 1px solid var(--bc-border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 860px;
}

.bc-prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bc-surface-alt);
  border-bottom: 1px solid var(--bc-border);
}

.bc-prompt-model {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--bc-whisper);
}

.bc-prompt-copy {
  background: none;
  border: 1px solid var(--bc-border);
  border-radius: 6px;
  padding: 4px 12px;
  font-family: var(--bc-font-mono);
  font-size: 11px;
  color: var(--bc-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.bc-prompt-copy:hover {
  border-color: var(--bc-red);
  color: var(--bc-red);
}

.bc-prompt-copy--copied {
  border-color: var(--bc-keep);
  color: var(--bc-keep);
}

.bc-prompt-body {
  margin: 0;
  padding: 20px 16px;
  font-family: var(--bc-font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: #333;
  background: var(--bc-surface);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* ========================================================================
   METHODOLOGY SECTION
   ======================================================================== */

.bc-section-method {
  width: 100%;
  background: var(--bc-surface);
  padding: 48px var(--bc-pad);
  border-top: 1px solid var(--bc-border);
}

.bc-method-header {
  margin-bottom: 24px;
}

.bc-method-body {
  max-width: 720px;
  line-height: 1.8;
}

.bc-method-body p {
  margin-bottom: 1.25rem;
  font-family: var(--bc-font-body);
  font-size: 14px;
  color: var(--bc-muted);
}

.bc-method-body strong {
  color: var(--bc-text);
  font-weight: 600;
}

.bc-method-body a {
  color: var(--bc-red);
  text-decoration: underline;
  text-decoration-color: rgba(var(--bg-accent-rgb), 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.bc-method-body a:hover {
  text-decoration-color: var(--bc-red);
}

.bc-method-body ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.25rem;
}

.bc-method-body li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--bc-font-body);
  font-size: 14px;
  color: var(--bc-muted);
}

.bc-method-body li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--bc-whisper);
}

/* ========================================================================
   FOOTER
   ======================================================================== */

.bc-footer {
  padding: 2rem var(--bc-pad);
  border-top: 1px solid var(--bc-border);
  background: var(--bc-bg);
}

.bc-footer p {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  color: var(--bc-whisper);
  margin: 0;
}

.bc-footer a {
  color: var(--bc-muted);
  text-decoration: none;
}

.bc-footer a:hover {
  color: var(--bc-red);
}

/* ========================================================================
   RESPONSIVE — Tablet (768px+)
   ======================================================================== */

@media (min-width: 768px) {
  .better-government {
    --bc-pad: clamp(40px, 5vw, 80px);
  }

  /* Nav: centered links */
  .bc-nav {
    justify-content: center;
  }

  /* Hero */
  .bc-hero {
    padding: 64px var(--bc-pad) 48px;
  }

  .bc-hero__heading {
    font-size: clamp(44px, 6vw, 72px);
    margin-bottom: 20px;
  }

  .bc-hero__sub {
    font-size: 15px;
    margin-bottom: 48px;
  }

  /* Pie: larger on tablet */
  .bc-pie-container {
    width: 180px;
    height: 180px;
  }

  .bc-pie-pct {
    font-size: 38px;
  }

  .bc-pie-label {
    font-size: 10px;
  }

  /* Leaves visible on tablet+ */
  .bc-leaf {
    display: block;
  }

  /* Chart: vertical columns on tablet+ */
  /* JS switches to column layout at this breakpoint.
     The chart container becomes a flex-row for columns. */
  .bc-chart--vertical {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    min-height: 0;
    height: 50vh;
    overflow-x: auto;
    padding: 40px 0 30px 0;
    scrollbar-width: none;
    cursor: grab;
  }

  .bc-chart--vertical::-webkit-scrollbar {
    display: none;
  }

  .bc-chart--vertical.grabbing {
    cursor: grabbing;
  }

  /* Chart section */
  .bc-chart-container {
    padding: 64px var(--bc-pad) 40px;
  }

  .bc-chart-header {
    margin-bottom: 32px;
  }

  /* Verdicts */
  .bc-section-verdicts {
    padding: 64px var(--bc-pad);
  }

  .bc-verdicts-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .bc-verdicts-stats {
    gap: 32px;
  }

  .bc-card__title {
    font-size: 14px;
  }

  /* Prompt */
  .bc-section-prompt {
    padding: 64px var(--bc-pad);
  }

  .bc-prompt-body {
    padding: 24px;
    font-size: 12px;
    max-height: 500px;
  }

  /* Methodology */
  .bc-section-method {
    padding: 64px var(--bc-pad);
  }

  .bc-method-header {
    margin-bottom: 32px;
  }

  /* Footer */
  .bc-footer {
    padding: 2.5rem var(--bc-pad);
  }

  .bc-footer p {
    font-size: 12px;
  }
}

/* ========================================================================
   RESPONSIVE — Desktop (1024px+)
   ======================================================================== */

@media (min-width: 1024px) {
  .better-government {
    --bc-pad: clamp(60px, 7vw, 120px);
  }

  /* Hero: side-by-side layout */
  .bc-hero {
    min-height: 85vh;
    padding: 0 var(--bc-pad);
  }

  .bc-hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
  }

  .bc-hero__heading {
    font-size: clamp(56px, 7vw, 96px);
    margin-bottom: 24px;
    max-width: 860px;
  }

  .bc-hero__sub {
    font-size: 16px;
    margin-bottom: 72px;
  }

  .bc-hero__pie-wrap {
    align-self: center;
  }

  /* Pie: full size on desktop */
  .bc-pie-container {
    width: 220px;
    height: 220px;
  }

  .bc-pie-pct {
    font-size: 42px;
  }

  /* Glow blob visible on desktop */
  .bc-hero::after {
    display: block;
  }

  /* Progress bar */
  .bc-progress-wrap {
    max-width: 760px;
  }

  /* Chart: taller on desktop */
  .bc-chart--vertical {
    height: calc(100vh - 280px);
  }

  .bc-chart-container {
    padding: 80px var(--bc-pad) 40px;
  }

  .bc-chart-header {
    margin-bottom: 40px;
  }

  /* Verdicts */
  .bc-section-verdicts {
    padding: 80px var(--bc-pad);
  }

  .bc-verdicts-header {
    margin-bottom: 40px;
  }

  /* Year selector: align right on desktop */
  .bc-year-selector-wrap {
    align-items: flex-end;
  }

  /* Prompt */
  .bc-section-prompt {
    padding: 80px var(--bc-pad);
  }

  .bc-prompt-header {
    margin-bottom: 40px;
  }

  /* Methodology */
  .bc-section-method {
    padding: 80px var(--bc-pad);
  }

  .bc-method-header {
    margin-bottom: 40px;
  }

  /* Footer */
  .bc-footer {
    padding: 3rem var(--bc-pad);
  }

  /* Browse: wider filters on desktop */
  .bc-browse-filters {
    flex-direction: row;
    align-items: flex-end;
  }

  .bc-browse-filter--search {
    flex: 2;
  }

  .bc-browse {
    padding: 80px var(--bc-pad);
  }

  .bc-browse-header {
    margin-bottom: 40px;
  }
}

/* ========================================================================
   Browse — server-rendered search/filter/sort page
   ======================================================================== */

.bc-browse {
  padding: 40px var(--bc-pad);
  max-width: 960px;
  margin: 0 auto;
}

.bc-browse-header {
  margin-bottom: 24px;
}

/* ── Search form ── */

.bc-browse-form {
  margin-bottom: 20px;
}

.bc-browse-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bc-browse-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bc-select {
  appearance: none;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bc-border);
  border-radius: 8px;
  font-family: var(--bc-font-body);
  font-size: 14px;
  color: var(--bc-text);
  background: var(--bc-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 12px;
  padding-right: 32px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bc-select:focus {
  border-color: var(--bc-red);
  box-shadow: 0 0 0 3px rgba(var(--bg-accent-rgb), 0.08);
}

.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--bc-red);
  color: #fff;
  font-family: var(--bc-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.bc-btn:hover {
  background: var(--bg-accent-dark);
}

/* ── Sort links ── */

.bc-sort-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bc-border);
}

.bc-sort-label {
  font-family: var(--bc-font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bc-whisper);
  margin-right: 4px;
}

.bc-sort-link {
  font-family: var(--bc-font-mono);
  font-size: 12px;
  color: var(--bc-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--bc-border);
  transition: border-color 0.15s, color 0.15s;
}

.bc-sort-link:hover {
  border-color: var(--bc-red);
  color: var(--bc-red);
}

/* ── Results ── */

.bc-browse-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Details-based card expansion (no JS) ── */

.bc-card-details {
  width: 100%;
}

.bc-card-details > summary {
  list-style: none;
}

.bc-card-details > summary::-webkit-details-marker {
  display: none;
}

.bc-card-details > .bc-card__body {
  max-height: none;
  overflow: visible;
  padding: 0 16px 16px;
}

.bc-card__meta {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  color: var(--bc-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Browse link on landing page ── */

.bc-browse-link {
  font-family: var(--bc-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--bc-red);
  text-decoration: none;
  transition: opacity 0.15s;
}

.bc-browse-link:hover {
  opacity: 0.7;
}
