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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a; /* dark blue */
  color: #e5e7eb;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.site-header h1 {
  margin: 0 0 0.3rem;
  font-size: 2rem;
}

.site-header p {
  margin: 0 0 0.8rem;
  color: #9ca3af;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #cbd5f5;
}

main {
  padding: 1.5rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.9rem;
  padding: 1.2rem 1.2rem 1.5rem;
  border: 1px solid rgba(75, 85, 99, 0.6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.card-subtitle {
  margin: 0 0 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
}

.card-header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

label {
  color: #9ca3af;
}

select {
  background: #020617;
  color: #e5e7eb;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.25rem 0.8rem;
  font-size: 0.9rem;
}

/* Chart area: give the canvases a fixed height so they don't stretch forever */
.card canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 280px; /* tweak this if you want taller/shorter charts */
}


.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1rem 0 2rem;
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .card {
    padding: 1rem 1rem 1.2rem;
  }

  .site-header h1 {
    font-size: 1.6rem;
  }
}
