:root {
  --bg-primary: #080808;
  --bg-secondary: #0f0f0f;
  --bg-card: #181818;
  --bg-card-hover: #222222;
  --text-primary: #f0ece8;
  --text-secondary: #908880;
  --text-muted: #686058;
  --accent-primary: #e0453a;
  --accent-primary-dim: #c0352a;
  --accent-secondary: #b89850;
  --accent-data: #3898b0;
  --accent-red: #d03030;
  --accent-green: #58a050;
  --accent-yellow: #d4a030;
  --border-color: #282828;
  --border-light: #383838;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(224,69,58,0.12);
  --overlay-r: 8;
  --overlay-g: 8;
  --overlay-b: 8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  background: var(--bg-primary);
  overflow-x: hidden;
}

a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-secondary); }
img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  padding: 0 64px;
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

.section { padding: 60px 0; }
.section-dark { background: var(--bg-secondary); }
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  border: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 20px; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: 16px; }
h4 { font-size: 1.25rem; margin-bottom: 8px; }

p { margin-bottom: 16px; color: var(--text-secondary); font-size: 1.05rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.text-balance { text-wrap: balance; }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
  border: 1px solid rgba(212,98,61,0.25);
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(212,98,61,0.06);
}

.section-heading {
  max-width: 720px;
}

section:not(.hero) .section-heading p {
  font-size: 1.15rem;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(12,10,9,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
  position: relative;
}

nav .logo {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

nav .logo .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
}

nav .logo small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-data);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-left: -2px;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--accent-primary);
  background: rgba(224,69,58,0.08);
}

.nav-link.active {
  color: var(--accent-primary);
  background: rgba(224,69,58,0.12);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Map CTA ── */
.nav-cta {
  background: var(--accent-primary);
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--accent-primary-dim);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(224,69,58,0.35);
}

.nav-cta.active {
  background: var(--accent-primary-dim);
  box-shadow: 0 4px 20px rgba(224,69,58,0.35);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 900px) {
  nav .container { height: 64px; }

  .nav-center {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(12,10,9,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    gap: 4px;
  }

  .nav-center.open { display: flex; }

  .nav-link {
    padding: 12px 16px;
    font-size: 0.9rem;
    width: 100%;
  }

  .nav-link.active {
    background: rgba(255,255,255,0.06);
  }

  .nav-cta {
    display: none;
  }

  .mobile-toggle { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-primary-dim);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,98,61,0.35);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 22px; font-size: 0.8rem; }
.btn-lg { padding: 18px 40px; font-size: 1rem; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 72px;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--overlay-r, 12), var(--overlay-g, 10), var(--overlay-b, 9), 0.2) 0%,
    rgba(var(--overlay-r, 12), var(--overlay-g, 10), var(--overlay-b, 9), 0.5) 40%,
    var(--bg-primary) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 64px;
}

@media (max-width: 768px) {
  .hero-content { padding: 0 24px; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(212,98,61,0.1);
  border: 1px solid rgba(212,98,61,0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  margin-bottom: 24px;
  background: linear-gradient(135deg, #f5f0eb 0%, var(--accent-primary) 60%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stats row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  max-width: 1000px;
  margin: 60px auto 0;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-color); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; }
}

.stat-card {
  padding: 32px 24px;
  text-align: center;
  background: rgba(255,255,255,0.02);
  border-right: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  transition: all 0.3s;
}

.stats-grid .stat-card:last-child {
  border-right: none;
}

@media (max-width: 768px) {
  .stat-card {
    border: none;
    background: var(--bg-card);
  }
}

.stat-card:hover {
  background: rgba(255,255,255,0.04);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Info cards (3-column) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--bg-card);
  padding: 48px 40px;
  transition: all 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
}

.feature-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Project cards (similar projects) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .project-grid { grid-template-columns: 1fr; }
}

.project-card {
  background: var(--bg-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.project-card:hover {
  background: var(--bg-card-hover);
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-category {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(212,98,61,0.08);
  border: 1px solid rgba(212,98,61,0.15);
  border-radius: 100px;
  font-size: 0.65rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 16px;
  align-self: flex-start;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-data);
  font-weight: 600;
}

/* Page header */
.page-header {
  padding: 100px 0 40px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.page-header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.15rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: rgba(255,255,255,0.02);
}

th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }
td:first-child { color: var(--text-primary); font-weight: 500; }

.grade { font-weight: 700; }
.grade-A, .grade-B { color: var(--accent-green); }
.grade-C { color: var(--accent-yellow); }
.grade-D, .grade-F { color: var(--accent-red); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-red { background: rgba(212,61,61,0.12); color: var(--accent-red); }
.badge-green { background: rgba(106,175,94,0.12); color: var(--accent-green); }

/* Map page */
.map-container {
  width: 100%;
  height: calc(100vh - 72px);
  margin-top: 72px;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.map-filters {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(26,24,22,0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 200px;
}

.map-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(24,24,24,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 16px;
  max-width: 600px;
}

.map-bar select {
  padding: 6px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.map-bar select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.map-bar-count {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.map-bar-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.map-bar-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.map-bar-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Camera list panel */
.map-list {
  position: absolute;
  top: 68px;
  left: 16px;
  bottom: 16px;
  z-index: 10;
  width: 320px;
  background: rgba(24,24,24,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transform: translateX(-340px);
  transition: transform 0.3s ease;
}

.map-list.open {
  transform: translateX(0);
}

.map-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.map-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.map-list-group {
  border-bottom: 1px solid var(--border-color);
}

.map-list-group:last-child {
  border-bottom: none;
}

.map-list-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.map-list-group-header:hover {
  background: rgba(255,255,255,0.03);
}

.map-list-op {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.map-list-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.map-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 28px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.78rem;
}

.map-list-item:hover {
  background: rgba(255,255,255,0.03);
}

.map-list-brand {
  font-size: 0.6rem;
  flex-shrink: 0;
}

.map-list-pname {
  color: var(--text-secondary);
  flex: 1;
}

.map-list-dir {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.map-list-more {
  padding: 6px 16px 6px 28px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.map-filters h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-group { margin-bottom: 14px; }
.filter-group:last-child { margin-bottom: 0; }

.filter-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 500px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

.dashboard-grid .stat-card {
  border: none;
  border-right: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 20px 16px;
}

.dashboard-grid .stat-card:last-child {
  border-right: none;
}

.dashboard-grid .stat-number {
  font-size: 1.6rem;
}

.dashboard-grid .stat-label {
  font-size: 0.65rem;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px 12px;
}

.chart-container h3 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1px;
}

.chart-row.chart-row-wide {
  grid-template-columns: 1fr 1fr;
}

.chart-row canvas {
  max-height: 160px;
  width: 100% !important;
}

.chart-row .chart-container {
  border: none;
  border-radius: 0;
}

.chart-row + .chart-row {
  margin-top: 1px;
}

@media (max-width: 900px) {
  .chart-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .chart-row { grid-template-columns: 1fr; }
}

/* Action page */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 900px) {
  .action-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .action-grid { grid-template-columns: 1fr; }
}

.action-card {
  background: var(--bg-card);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.action-card:hover {
  background: var(--bg-card-hover);
}

.action-card .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(212,98,61,0.12);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 20px;
}

.action-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.action-card p {
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.foia-section {
  margin-top: 80px;
}

.foia-builder {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 800px;
}

.foia-builder label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.foia-builder input,
.foia-builder select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.foia-builder input:focus,
.foia-builder select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.foia-builder textarea {
  width: 100%;
  min-height: 240px;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.7;
  resize: vertical;
  margin: 20px 0;
}

.foia-builder textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Policy page */
.policy-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}

.policy-summary .stat-card {
  border: none;
  border-right: 1px solid var(--border-color);
  background: var(--bg-card);
}

.policy-summary .stat-card:last-child {
  border-right: none;
}

.policy-summary .stat-number {
  font-size: 2.2rem;
}

@media (max-width: 768px) {
  .policy-summary { grid-template-columns: repeat(2, 1fr); }
}

/* About page */
.about-content {
  max-width: 720px;
}

.about-content ul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.about-content ul li {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-content ul li strong {
  color: var(--text-primary);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
  text-align: center;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

footer a { color: var(--text-secondary); }
footer a:hover { color: var(--accent-primary); }

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }


/* Controls panel */
.map-controls {
  position: absolute;
  top: 68px;
  right: 16px;
  z-index: 10;
  width: 240px;
  background: rgba(24,24,24,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  transform: translateX(260px);
  transition: transform 0.3s ease;
}
.map-controls.open { transform: translateX(0); }
.map-controls-section { margin-bottom: 14px; }
.map-controls-section:last-child { margin-bottom: 0; }
.map-ctrl-label { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.map-slider { -webkit-appearance: none; width: 100%; height: 4px; background: var(--border-color); border-radius: 2px; outline: none; margin: 8px 0 4px; }
.map-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--accent-primary); border-radius: 50%; cursor: pointer; border: 2px solid #fff; }
.map-slider::-moz-range-thumb { width: 14px; height: 14px; background: var(--accent-primary); border-radius: 50%; cursor: pointer; border: 2px solid #fff; }
.map-scheme-btn { flex: 1; padding: 5px 8px; font-size: 0.72rem; font-weight: 600; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 5px; color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-family: var(--font-body); }
.map-scheme-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.map-scheme-btn.active { background: rgba(224,69,58,0.15); border-color: var(--accent-primary); color: var(--accent-primary); }

/* MapLibre overrides */
.maplibregl-popup-content-wrapper {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-card) !important;
  padding: 4px !important;
}

.maplibregl-popup-tip {
  display: none;
}

.maplibregl-popup-close-button {
  font-size: 16px !important;
  color: var(--text-muted) !important;
  padding: 4px 8px !important;
}

.maplibregl-ctrl-top-right {
  top: auto !important;
  bottom: 24px !important;
  right: 24px !important;
}

.maplibregl-ctrl-group {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-card) !important;
}

.maplibregl-ctrl button {
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  border: none !important;
}

.maplibregl-ctrl button:hover {
  background-color: var(--bg-card-hover) !important;
}

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.cta-section {
  text-align: center;
  padding: 80px 0;
}

.cta-section p {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.15rem;
}

/* ── Full-width hero stats section ── */
.section-hero-stats {
  width: 100%;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-hero-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.section-hero-stats .stat-card {
  padding: 40px 24px;
  text-align: center;
  background: transparent;
  border-right: 1px solid var(--border-color);
  border-top: none;
  transition: background 0.3s;
}

.section-hero-stats .stat-card:last-child {
  border-right: none;
}

.section-hero-stats .stat-card:hover {
  background: rgba(255,255,255,0.015);
}

.section-hero-stats .stat-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.section-hero-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

@media (max-width: 768px) {
  .section-hero-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-hero-stats .stat-card {
    padding: 28px 16px;
  }
  .section-hero-stats .stat-card:nth-child(2) {
    border-right: none;
  }
  .section-hero-stats .stat-number {
    font-size: 2.5rem;
  }
}

/* ── Theme toggle ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 10px;
  transition: all 0.2s;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ☀ Light theme */
[data-theme="light"] {
  --bg-primary: #f8f6f4;
  --bg-secondary: #eeebe7;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f1ed;
  --text-primary: #1a1612;
  --text-secondary: #5a5248;
  --text-muted: #9a9288;
  --border-color: #e0d8d0;
  --border-light: #d0c8be;
  --overlay-r: 248;
  --overlay-g: 246;
  --overlay-b: 244;
}

[data-theme="light"] #hero-canvas {
  opacity: 0.15;
}

/* ── CRT overlay ── */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.015) 2px,
    rgba(0,0,0,0.015) 4px
  );
}
[data-theme="light"] .crt-overlay {
  display: none;
}

/* ── Hero subhead rotation ── */
.hero-subhead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Hero email capture ── */
.hero-email {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.hero-email-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.hero-email-form {
  display: flex;
  gap: 8px;
}
.hero-email-form input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.hero-email-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.hero-email-form input::placeholder {
  color: var(--text-muted);
}

/* ── Live ticker ── */
.hero-ticker {
  margin-top: 40px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  padding: 10px 0;
}
.ticker-inner {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  gap: 0;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 0 12px;
  font-family: var(--font-body);
}
.ticker-label {
  color: var(--accent-red);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.ticker-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: pulse-dot 2s ease-in-out infinite;
  margin-right: 6px;
}

.ticker-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: pulse-dot 2s ease-in-out infinite;
  margin-right: 6px;
  flex-shrink: 0;
}

.ticker-sep {
  color: var(--border-color);
}

/* ── Comparison bars ── */
.comparison-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 700px;
}
.comparison-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}
.comparison-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
}
.comparison-bar-track {
  height: 32px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.comparison-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: width 1s ease;
  min-width: 60px;
}
.comparison-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Leaderboard ── */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 60px;
  gap: 0;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-card);
  transition: background 0.2s;
}
.leaderboard-row:hover {
  background: var(--bg-card-hover);
}
.leaderboard-rank {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}
.leaderboard-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.leaderboard-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.leaderboard-badge {
  font-size: 0.6rem;
  padding: 2px 8px;
  background: rgba(212,61,61,0.1);
  color: var(--accent-red);
  border-radius: 100px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.leaderboard-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}
.leaderboard-bar {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 4px;
  transition: width 1s ease;
}
.leaderboard-count {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-align: right;
}

/* ── Damning highlight section ── */
.section-highlight {
  position: relative;
  overflow: hidden;
}
.damning-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-primary), var(--accent-red));
  animation: stripe-shift 3s ease-in-out infinite;
}
@keyframes stripe-shift {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ── Testimonials ── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 1000px) {
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}
.testimonial-card {
  background: var(--bg-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.testimonial-quote {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  flex-grow: 1;
  margin-bottom: 16px;
  quotes: "“" "”" "‘" "’";
}
.testimonial-quote::before { content: "“"; color: var(--accent-primary); }
.testimonial-quote::after { content: "”"; color: var(--accent-primary); }
.testimonial-source {
  font-size: 0.78rem;
}
.testimonial-source a {
  color: var(--accent-data);
  font-weight: 500;
}

/* ── Myth cards ── */
.myth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 700px) {
  .myth-grid { grid-template-columns: 1fr; }
}
.myth-card {
  background: var(--bg-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.myth-claim {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-red);
}
.myth-truth {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 12px;
}
.myth-truth strong {
  color: var(--accent-green);
}
.myth-source {
  font-size: 0.72rem;
}
.myth-source a {
  color: var(--text-muted);
}

/* ── Tools grid ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 800px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .tools-grid { grid-template-columns: 1fr; }
}
.tool-card {
  background: var(--bg-card);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  background: var(--bg-card-hover);
}
.tool-card .tool-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  line-height: 1;
}
.tool-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.tool-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Sticky action bar ── */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(12,10,9,0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 12px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.sticky-bar.visible {
  transform: translateY(0);
}
.sticky-bar a {
  color: var(--accent-primary);
  font-weight: 600;
}
[data-theme="light"] .sticky-bar {
  background: rgba(250,248,245,0.95);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.modal p {
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal form input,
.modal form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.modal form input:focus,
.modal form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* ── City status grid ── */
.city-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
.city-status-card {
  background: var(--bg-card);
  padding: 20px;
  transition: background 0.2s;
}
.city-status-card:hover {
  background: var(--bg-card-hover);
}

/* ── Mini operator rows (inside chart containers) ── */
.mini-table {
  font-size: 0.72rem;
}
.mini-op-row {
  display: grid;
  grid-template-columns: 1fr 1fr 30px;
  gap: 6px;
  align-items: center;
  padding: 3px 0;
}
.mini-op-name {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-op-bar-track {
  height: 5px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
}
.mini-op-bar {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
}
.mini-op-count {
  color: var(--accent-primary);
  font-weight: 700;
  text-align: right;
}
.mini-city-list {
  font-size: 0.72rem;
}
.mini-city-row {
  display: grid;
  grid-template-columns: 12px 1fr 24px;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}
.mini-city-name {
  color: var(--text-secondary);
  font-weight: 500;
}
.mini-city-count {
  color: var(--text-muted);
  text-align: right;
  font-weight: 600;
}
