/* FNC Civic Prototype — navy/slate government aesthetic */
:root {
  --navy-950: #0b1220;
  --navy-900: #0f1b2d;
  --navy-800: #1a2b45;
  --navy-700: #243b5a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --success: #0f766e;
  --warning: #b45309;
  --danger: #b91c1c;
  --banner: #7c2d12;
  --banner-bg: #fff7ed;
  --sample: #9a3412;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 27, 45, 0.12), 0 1px 2px rgba(15, 27, 45, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 27, 45, 0.12);
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy-900);
  background: var(--slate-50);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.25;
  margin: 0 0 0.5rem;
}
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }

/* Prototype banner */
.prototype-banner {
  background: var(--banner);
  color: #fff7ed;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  text-transform: uppercase;
}
.prototype-banner span { opacity: 0.95; }

/* Header / nav */
.site-header {
  background: var(--navy-900);
  color: var(--white);
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { text-decoration: none; opacity: 0.95; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--navy-700));
  border: 2px solid rgba(255,255,255,0.35);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.brand-text strong { display: block; font-size: 1.05rem; font-family: var(--font-display); }
.brand-text small { display: block; font-size: 0.72rem; color: #cbd5e1; font-weight: 400; }
.nav-auth { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-main {
  background: var(--navy-800);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-main-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.nav-main a {
  color: #e2e8f0;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}
.nav-main a:hover, .nav-main a.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-bottom-color: #93c5fd;
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--white); color: var(--navy-800); border-color: var(--slate-200); }
.btn-secondary:hover { background: var(--slate-100); color: var(--navy-900); }
.btn-ghost { background: transparent; color: #e2e8f0; border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Layout */
main { flex: 1; }
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.85rem; }
.lede { color: var(--slate-600); font-size: 1.05rem; max-width: 46rem; }
.sample-badge {
  display: inline-block;
  background: #ffedd5;
  color: var(--sample);
  border: 1px solid #fdba74;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.35rem;
}
.public-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.35rem;
}
.tier-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--slate-200);
  color: var(--navy-800);
}
.tier-pill.member { background: #dbeafe; color: #1e40af; }
.tier-pill.registered,
.tier-pill.validated { background: #ccfbf1; color: #115e59; }
.tier-pill.admin { background: #fef3c7; color: #92400e; }
.tier-pill.visitor { background: var(--slate-200); color: var(--slate-700); }
.mono-warn { color: #9a3412; font-size: 0.85em; }
.cell-wrap { max-width: 14rem; white-space: normal; word-break: break-word; }
.container.wide { max-width: 1200px; }
.profile-dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.35rem 1rem; margin: 0.75rem 0; }
.profile-dl dt { color: var(--slate-500, #64748b); font-weight: 600; font-size: 0.85rem; }
.profile-dl dd { margin: 0; }
.check-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
table code { font-size: 0.8rem; }

/* Cards / grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}
.card h3 { font-size: 1.1rem; }
.card p { color: var(--slate-600); font-size: 0.95rem; }
.card-link { transition: box-shadow 0.15s, border-color 0.15s; }
.card-link:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.hero {
  background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
  color: #e2e8f0;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
}
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 0.75rem; }
.hero p { color: #cbd5e1; max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.25rem; }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.75rem 0 1rem;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 0.4rem;
}
.section-title h2 { font-size: 1.35rem; margin: 0; }

/* Forms */
.form-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  max-width: 520px;
}
.form-card.wide { max-width: 720px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--navy-800);
  margin-bottom: 0.3rem;
}
input, select, textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: var(--navy-900);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #93c5fd;
  border-color: var(--accent);
}
.form-actions { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.form-hint { font-size: 0.85rem; color: var(--slate-500); margin-top: 0.25rem; }
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert-success { background: #f0fdfa; border-color: #99f6e4; color: #115e59; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.7rem 0.85rem; text-align: left; border-bottom: 1px solid var(--slate-200); }
th { background: var(--slate-100); color: var(--navy-800); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }

/* Avatar placeholder */
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #94a3b8, #475569);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
}
.avatar.lg { width: 110px; height: 110px; font-size: 1.8rem; }
.avatar.sm { width: 40px; height: 40px; font-size: 0.85rem; border-width: 2px; }
img.avatar,
.avatar.photo {
  display: block;
  object-fit: cover;
  object-position: center top;
  padding: 0;
  background: var(--slate-200);
  color: transparent;
}
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; flex-shrink: 0; max-width: 140px; }
.photo-credit { font-size: 0.7rem; line-height: 1.3; text-align: center; margin: 0; max-width: 130px; }
.sources-list { font-size: 0.8rem; }
.sources-list ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.sources-list a { word-break: break-all; }
.profile-row { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.party-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* Map */
.us-map-wrap {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.us-map-wrap svg { width: 100%; height: auto; display: block; }
.us-map-wrap path, .us-map-wrap .state {
  fill: #cbd5e1;
  stroke: #fff;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.15s;
}
.us-map-wrap .state.available { fill: #64748b; }
.us-map-wrap .state.active, .us-map-wrap path.active { fill: #1d4ed8; }
.us-map-wrap .state:hover, .us-map-wrap path:hover { fill: #93c5fd; }
.county-filter-wrap {
  margin: 0 0 1rem;
  max-width: 28rem;
}
.county-filter {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.county-filter:focus {
  outline: 2px solid #93c5fd;
  border-color: #60a5fa;
}
.county-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
  max-height: min(70vh, 42rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space:nowrap;
  border: 0;
}
.county-chip {
  display: block;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 650;
  color: var(--navy-800);
  text-decoration: none;
}
.county-chip:hover { border-color: #93c5fd; background: #eff6ff; text-decoration: none; }
.county-chip.muted { opacity: 0.55; cursor: default; font-weight: 500; font-size: 0.85rem; }

/* Issue poll / board */
.poll-options { display: flex; flex-direction: column; gap: 0.55rem; }
.poll-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.poll-option:hover { border-color: #93c5fd; }
.poll-bar-wrap { flex: 1; }
.poll-bar {
  height: 8px;
  background: var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.poll-bar > span { display: block; height: 100%; background: var(--accent); }
.thread-post {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: #fff;
  margin-bottom: 0.65rem;
}
.thread-meta { font-size: 0.8rem; color: var(--slate-500); margin-bottom: 0.35rem; }
.video-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-700));
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #cbd5e1;
  font-weight: 650;
  border: 1px solid var(--navy-900);
}
.credit-meter {
  background: var(--slate-100);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}
.credit-meter > span { display: block; height: 100%; background: var(--success); }

/* Steps (Tier 3) */
.steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.step {
  flex: 1;
  min-width: 120px;
  padding: 0.65rem;
  background: var(--slate-100);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--slate-600);
  border: 1px solid transparent;
}
.step.active { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.step.done { background: #ccfbf1; color: #115e59; }

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: #94a3b8;
  padding: 1.75rem 1.25rem;
  font-size: 0.88rem;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.footer-note { max-width: 36rem; }

/* Utilities */
.muted { color: var(--slate-500); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.75rem; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.75rem; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { align-items: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 800px) {
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.55rem; }
  .nav-main a { padding: 0.6rem 0.65rem; font-size: 0.85rem; }
}
