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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  background: #f0f2f5;
  line-height: 1.6;
}

header {
  background: #1a1a2e;
  color: #fff;
  padding: 1.5rem 2rem;
  text-align: center;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

header .subtitle {
  font-size: 0.9rem;
  color: #a0a0b8;
  margin-top: 0.25rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Hero cards */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
}

.stat-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 200px;
  flex: 1;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #fff;
}

.filter-group input {
  margin-bottom: 0.25rem;
}

/* Detail view */
.detail {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.detail h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.detail-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.detail-stat {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  font-size: 1.3rem;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 0.5rem;
}

/* Table */
.table-section {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-section h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

#embassy-table {
  width: 100%;
  border-collapse: collapse;
}

#embassy-table th,
#embassy-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#embassy-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  cursor: pointer;
  user-select: none;
}

#embassy-table th:hover {
  color: #1a1a2e;
}

#embassy-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}

#embassy-table tbody tr:hover {
  background: #f7f8fa;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .filters {
    flex-direction: column;
  }

  .detail-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .chart-container {
    height: 220px;
  }
}
