:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: #f5f6fb;
  color: #1f2430;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.hero {
  background: linear-gradient(120deg, #2f7cf6, #6bc6ff);
  color: #fff;
  padding: 72px 0 48px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin: 0 0 12px;
}

.hero .subtitle {
  font-size: 1.1rem;
  margin: 0;
  max-width: 600px;
  opacity: 0.9;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0;
  gap: 16px;
}

.controls label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.select {
  border-radius: 8px;
  border: 1px solid #d1d6e0;
  padding: 10px 14px;
  font-size: 1rem;
  min-width: 220px;
  background-color: #fff;
  color: inherit;
}

.status {
  font-size: 0.95rem;
  color: #555d6f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.chart-card {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(31, 36, 48, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.chart-card:focus-visible {
  outline: 3px solid #2f7cf6;
  outline-offset: 4px;
}

.chart-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: #eef1f6;
}

.chart-card figcaption {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-card .route {
  font-weight: 600;
  font-size: 1rem;
}

.chart-card .date {
  font-size: 0.9rem;
  color: #6a7387;
}

.empty {
  font-size: 1rem;
  color: #6a7387;
}

.footer {
  padding: 24px 0 40px;
  color: #6a7387;
  background-color: #f5f6fb;
  border-top: 1px solid #e0e4ed;
}

.chart-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 28, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 24px;
  z-index: 1000;
}

.chart-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.chart-modal__backdrop {
  position: absolute;
  inset: 0;
}

.chart-modal__content {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 94vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 60px rgba(15, 18, 28, 0.35);
}

.chart-modal__image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  background: #f0f2f7;
  border-radius: 12px;
}

.chart-modal__caption {
  font-weight: 600;
  color: #1f2430;
}

.chart-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: #fff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 18, 28, 0.2);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-card img {
    height: auto;
  }
}
