@media (max-width: 960px) {
  .layout {
    padding: 0 var(--layout-pad-x, 1.25rem) 2rem;
    max-width: var(--layout-max, 1280px);
    margin-inline: auto;
  }

  .main {
    padding-right: 0;
    max-width: none;
  }

  .navbar__nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-end;
    padding-top: 0.25rem;
  }

  .navbar__spacer {
    display: none;
  }

  .navbar__menu-btn {
    display: inline-flex;
  }

  /* Drawer below fixed header; overlay + drawer above content; navbar stays on top (z-index). */
  .sidebar {
    position: fixed;
    top: var(--site-header-height);
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    min-width: 0;
    max-width: min(320px, 88vw);
    max-height: none;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1040;
    transform: translateX(-105%);
    transition: transform 0.2s ease, top 0.25s ease;
    border-radius: 0;
    border-right: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
  }

  body.nav-header-hidden .sidebar {
    top: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    .sidebar {
      transition: transform 0.2s ease;
    }
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .blog-card {
    grid-template-columns: 1fr;
  }

  .blog-card__media img {
    min-height: 200px;
  }

  .blog-card--compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .article-meta span::before {
    display: none;
  }
}
