.skip-link {
  position: absolute;
  left: 12px;
  top: -52px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font: 700 14px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Small phones (iPhone SE 1st gen = 320px): keep header + chart controls inside the viewport */
@media (max-width: 400px) {
  nav .container .nav-brand { min-width: 0; flex-shrink: 1; font-size: 15px; gap: 8px; }
  nav .container .nav-brand .nav-logo { flex-shrink: 0; }
  nav .container .mobile-menu-btn { flex-shrink: 0; }
  .chart-header .chart-controls { flex-wrap: wrap; }
  .chart-controls .chart-btn { flex: 1 1 auto; padding: 8px 10px; }
}
@media (max-width: 350px) {
  nav .container .nav-brand { font-size: 13px; }
}
@media (max-width: 400px) {
  .chart-labels .x-label { white-space: nowrap; }
}
@media (max-width: 360px) {
  .chart-labels .x-label:nth-child(2),
  .chart-labels .x-label:nth-child(4) { display: none; }
}
