#weather-status {
  color: #475569;
}

#weather-status[data-state="error"] {
  color: #b91c1c;
}

#weather-status[data-state="warning"] {
  color: #92400e;
}

#monthly-weather-medians {
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

#monthly-weather-medians table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  text-align: right;
}

#monthly-weather-medians caption {
  padding: 16px;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
}

#monthly-weather-medians th,
#monthly-weather-medians td {
  padding: 11px 14px;
  border-top: 1px solid #e2e8f0;
  white-space: nowrap;
}

#monthly-weather-medians thead th {
  color: #334155;
  background: #f1f5f9;
  font-size: 0.9rem;
}

#monthly-weather-medians th:first-child {
  text-align: left;
}

#monthly-weather-medians tbody th {
  color: #334155;
}

#monthly-weather-medians tbody tr:nth-child(even) {
  background: #f8fafc;
}

#weather-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 16px;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
  color: #334155;
}

.chart-control-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f1f5f9;
}

.chart-control-label {
  padding: 0 6px;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

.chart-control-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.chart-control-button:hover {
  background: #e2e8f0;
}

.chart-control-button[aria-pressed="true"] {
  border-color: #075985;
  color: #fff;
  background: #0369a1;
  box-shadow: 0 1px 3px rgb(15 23 42 / 25%);
  font-weight: 700;
}

.chart-control-button[aria-pressed="true"]:hover {
  background: #075985;
}

.chart-control-button:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

.chart-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.weather-export-button {
  border-color: #cbd5e1;
  background: #fff;
}

.weather-export-button:hover {
  background: #e2e8f0;
}

.chart-frame {
  min-width: 0;
  height: 340px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.chart-frame canvas {
  width: 100%;
  height: 100%;
}

.weather-copyright {
  display: flex;
  justify-content: center;
  gap: 16px;
  width: min(100% - 32px, 960px);
  box-sizing: border-box;
  margin: auto auto 0;
  padding: 0 0 28px;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 520px) {
  .chart-frame {
    height: 280px;
    padding: 8px;
  }

  .chart-export-actions {
    margin-left: 0;
  }

  .weather-copyright {
    flex-wrap: wrap;
  }
}
