/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0b1426;
  --navy-2:  #111d35;
  --navy-3:  #1a2d4f;
  --amber:   #f0a500;
  --amber-2: #ffc840;
  --text:    #e8eaf0;
  --text-2:  #9aa3b8;
  --text-3:  #6b748a;
  --card-bg: #131f36;
  --card-border: rgba(255,255,255,0.07);
  --radius:  10px;
  --radius-lg: 16px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--nav-h);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   TOP NAV
   ============================================= */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(11, 20, 38, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
  z-index: 1000;
}

.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-dot {
  width: 8px; height: 8px;
  background: var(--amber);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--amber);
}

.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.3px;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--text-3);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 400;
  display: none;
}

@media (min-width: 600px) { .brand-tag { display: inline; } }

.topnav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

@media (max-width: 600px) { .topnav-links { display: none; } }

.nav-link {
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: all var(--transition);
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.nav-link.active { color: var(--amber); background: rgba(240,165,0,0.1); }

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: background var(--transition);
}

.hamburger:hover span { background: var(--text); }

@media (max-width: 600px) { .hamburger { display: flex; } }

/* =============================================
   DRAWER (mobile nav)
   ============================================= */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  opacity: 0;
  transition: opacity var(--transition);
}

.drawer-overlay.active { display: block; opacity: 1; }

.drawer {
  position: fixed;
  top: 0; right: -280px;
  width: 260px;
  height: 100vh;
  background: var(--navy-2);
  border-left: 1px solid var(--card-border);
  z-index: 1100;
  padding: 24px 0;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer.open { right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--card-border);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
}

.drawer-close:hover { color: var(--text); background: rgba(255,255,255,0.07); }

.drawer-list { list-style: none; padding: 12px 0; }

.drawer-list li { margin: 4px 12px; }

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.drawer-link:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.drawer-link.active { background: rgba(240,165,0,0.1); color: var(--amber); }

/* =============================================
   HERO (index page)
   ============================================= */
.hero {
  position: relative;
  padding: 72px 28px 60px;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240,165,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,165,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(240,165,0,0.06), transparent);
  pointer-events: none;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(240,165,0,0.1);
  border: 1px solid rgba(240,165,0,0.2);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: fit-content;
  margin: 0 auto;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 32px;
  gap: 4px;
}

.stat strong {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber);
}

.stat span {
  font-size: 0.78rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--card-border);
}

/* =============================================
   MAIN CONTAINER (index)
   ============================================= */
.main-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

/* CONTROLS BAR */
.controls-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.search-input::placeholder { color: var(--text-3); }

.search-input:focus {
  border-color: rgba(240,165,0,0.4);
  box-shadow: 0 0 0 3px rgba(240,165,0,0.08);
}

.state-select {
  padding: 11px 36px 11px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236b748a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.state-select:focus { border-color: rgba(240,165,0,0.4); }

.state-select option { background: var(--navy-2); }

/* STATE GRID */
.state-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.state-grid li { opacity: 0; animation: fadeUp 0.4s forwards; }
.state-grid li:nth-child(1)  { animation-delay: 0.02s; }
.state-grid li:nth-child(2)  { animation-delay: 0.04s; }
.state-grid li:nth-child(3)  { animation-delay: 0.06s; }
.state-grid li:nth-child(4)  { animation-delay: 0.08s; }
.state-grid li:nth-child(5)  { animation-delay: 0.10s; }
.state-grid li:nth-child(6)  { animation-delay: 0.12s; }
.state-grid li:nth-child(7)  { animation-delay: 0.14s; }
.state-grid li:nth-child(8)  { animation-delay: 0.16s; }
.state-grid li:nth-child(9)  { animation-delay: 0.18s; }
.state-grid li:nth-child(10) { animation-delay: 0.20s; }
.state-grid li:nth-child(11) { animation-delay: 0.22s; }
.state-grid li:nth-child(12) { animation-delay: 0.24s; }
.state-grid li:nth-child(n+13) { animation-delay: 0.26s; }

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

.state-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition);
  group: true;
}

.state-grid a:hover {
  background: var(--navy-3);
  border-color: rgba(240,165,0,0.3);
  color: var(--amber-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.state-arrow {
  color: var(--text-3);
  font-size: 1rem;
  transition: all var(--transition);
  margin-left: 8px;
}

.state-grid a:hover .state-arrow {
  color: var(--amber);
  transform: translateX(3px);
}

.no-results {
  text-align: center;
  color: var(--text-3);
  font-size: 0.95rem;
  padding: 48px;
  grid-column: 1 / -1;
}

/* =============================================
   STATE PAGE HERO
   ============================================= */
.state-hero {
  border-bottom: 1px solid var(--card-border);
  padding: 48px 28px 36px;
  background: linear-gradient(180deg, rgba(240,165,0,0.03), transparent);
}

.state-hero-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
  width: fit-content;
}

.back-btn:hover { color: var(--amber); }

.state-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.state-subtitle {
  font-size: 0.9rem;
  color: var(--text-3);
}

/* =============================================
   INCIDENT LIST (state page)
   ============================================= */
.state-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.empty-state {
  text-align: center;
  color: var(--text-3);
  font-size: 0.95rem;
  padding: 60px 24px;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-lg);
  margin-top: 12px;
}

.incident-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* INCIDENT CARD */
.incident-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  opacity: 0;
  animation: fadeUp 0.35s forwards;
}

.incident-card:hover { border-color: rgba(240,165,0,0.2); }

.incident-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  user-select: none;
}

.incident-header-left { flex: 1; min-width: 0; }

.incident-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  transition: color var(--transition);
}

.incident-header:hover .incident-title { color: var(--amber-2); }

.incident-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  font-weight: 400;
}

.incident-toggle {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-top: 2px;
}

.incident-toggle svg {
  width: 12px; height: 12px;
  color: var(--text-3);
  transition: transform var(--transition), color var(--transition);
}

.incident-card.open .incident-toggle {
  background: rgba(240,165,0,0.12);
  border-color: rgba(240,165,0,0.3);
}

.incident-card.open .incident-toggle svg {
  transform: rotate(180deg);
  color: var(--amber);
}

/* DROPDOWN */
.incident-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}

.dropdown-inner {
  padding: 0 22px 22px;
  border-top: 1px solid var(--card-border);
}

.dropdown-text {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-top: 16px;
  white-space: pre-line;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 20px;
  background: rgba(240,165,0,0.1);
  border: 1px solid rgba(240,165,0,0.25);
  border-radius: 8px;
  color: var(--amber);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.read-more-btn:hover {
  background: rgba(240,165,0,0.18);
  border-color: var(--amber);
  transform: translateX(2px);
}

/* =============================================
   OVERALL PAGE
   ============================================= */
.overall-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.overall-img-wrap {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
}

.overall-img {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.overall-img-caption {
  padding: 16px 24px;
  font-size: 0.82rem;
  color: var(--text-3);
  border-top: 1px solid var(--card-border);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 28px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* =============================================
   CENTRAL GOV BUTTON (hero)
   ============================================= */
.central-gov-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 13px 28px;
  background: rgba(240,165,0,0.1);
  border: 1px solid rgba(240,165,0,0.3);
  border-radius: 10px;
  color: var(--amber);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  letter-spacing: 0.2px;
}

.central-gov-btn:hover {
  background: rgba(240,165,0,0.18);
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,165,0,0.15);
}

/* =============================================
   TAB BAR (state page)
   ============================================= */
.tab-bar {
  background: var(--navy-2);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
}

.tab-bar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 4px;
}

.tab-btn {
  padding: 14px 22px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-2); }

.tab-btn.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* =============================================
   INCIDENT META ROW
   ============================================= */
.incident-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* TYPE BADGE */
.type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  border: 1px solid;
}

.type-legislation         { color: #60a5fa; border-color: rgba(96,165,250,0.3);  background: rgba(96,165,250,0.08); }
.type-law-enforcement     { color: #f87171; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }
.type-electoral-regulation{ color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.08); }
.type-judicial-action     { color: #34d399; border-color: rgba(52,211,153,0.3);  background: rgba(52,211,153,0.08); }
.type-policy              { color: #fbbf24; border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.08); }
.type-policy-framework    { color: #fbbf24; border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.08); }
.type-policy-debate       { color: #e879f9; border-color: rgba(232,121,249,0.3); background: rgba(232,121,249,0.08); }
.type-policy-review       { color: #e879f9; border-color: rgba(232,121,249,0.3); background: rgba(232,121,249,0.08); }
.type-awareness-campaign  { color: #4ade80; border-color: rgba(74,222,128,0.3);  background: rgba(74,222,128,0.08); }
.type-industry-response   { color: #38bdf8; border-color: rgba(56,189,248,0.3);  background: rgba(56,189,248,0.08); }
.type-platform-action     { color: #38bdf8; border-color: rgba(56,189,248,0.3);  background: rgba(56,189,248,0.08); }
.type-surveillance        { color: #fb923c; border-color: rgba(251,146,60,0.3);  background: rgba(251,146,60,0.08); }
.type-surveillance---rights-concern { color: #fb923c; border-color: rgba(251,146,60,0.3); background: rgba(251,146,60,0.08); }
.type-institutional-response { color: #4ade80; border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); }
.type-political-accountability { color: #f472b6; border-color: rgba(244,114,182,0.3); background: rgba(244,114,182,0.08); }
.type-media---platform-response { color: #38bdf8; border-color: rgba(56,189,248,0.3); background: rgba(56,189,248,0.08); }
.type-regulatory-advisory  { color: #fbbf24; border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.08); }
.type-regulatory-directive { color: #fbbf24; border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.08); }
.type-law-enforcement-infrastructure { color: #f87171; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }

/* =============================================
   RESPONSIVE ADDITIONS
   ============================================= */
@media (max-width: 640px) {
  .tab-btn { padding: 12px 14px; font-size: 0.85rem; }
  .central-gov-btn { font-size: 0.82rem; padding: 11px 18px; }
}

@media (max-width: 640px) {
  .hero { padding: 48px 20px 44px; }
  .hero-stats { flex-direction: column; }
  .stat-divider { width: 80px; height: 1px; }
  .stat { padding: 14px 24px; }
  .main-container { padding: 28px 18px 60px; }
  .controls-bar { flex-direction: column; }
  .state-select { width: 100%; }
  .state-grid { grid-template-columns: 1fr; }
  .state-hero { padding: 32px 18px 24px; }
  .state-main { padding: 24px 18px 60px; }
}
