/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1023px) {
  .detail-body {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 20px;
    --nav-height: 56px;
  }

  .hero {
    padding-top: 64px;
    padding-bottom: 40px;
  }
  .hero-title {
    font-size: 28px;
  }
  .hero-subtitle {
    font-size: 15px;
    margin-top: 12px;
  }
  .hero-actions {
    margin-top: 24px;
    gap: 10px;
  }
  .hero::before {
    width: 300px;
    height: 300px;
  }
  .hero::after {
    width: 250px;
    height: 250px;
  }
  .section {
    padding: 28px 0;
  }
  .section-compact {
    padding: 24px 0;
  }
  .section-header {
    margin-bottom: 16px;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 32px 0;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-item {
    padding: 16px 12px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Detail page compact */
  .detail-header {
    padding-top: 24px;
    padding-bottom: 20px;
    padding-inline: 16px;
  }
  .detail-title {
    font-size: 24px;
  }
  .detail-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
  }
  .detail-icon {
    width: 52px;
    height: 52px;
  }
  .detail-slogan {
    font-size: 14px;
    line-height: 1.55;
  }
  .detail-badges {
    gap: 5px;
    margin-top: 10px;
  }
  .detail-badges .badge {
    padding: 3px 8px;
    font-size: 11px;
  }
  .detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
    gap: 8px;
  }
  .detail-actions .btn {
    width: 100%;
    min-height: 36px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 13px;
  }
  .detail-body {
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 24px;
  }
  .detail-section {
    margin-bottom: 20px;
  }
  .detail-section-title {
    font-size: 17px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .detail-prose {
    font-size: 14px;
    line-height: 1.7;
  }

  /* Feature tags compact on mobile */
  .feature-tags {
    gap: 5px;
  }
  .feature-tag {
    padding: 3px 10px;
    font-size: 12px;
  }

  /* Screenshot carousel mobile */
  .screenshot-slide {
    flex: 0 0 80%;
  }

  /* Footer compact */
  .footer {
    padding: 28px 0;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .footer-brand {
    margin-bottom: 6px;
  }
  .footer-col-title {
    margin-bottom: 8px;
  }
  .footer-links {
    justify-content: center;
  }
  .footer-project-links {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 8px 22px;
  }
  .footer-project-links li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .footer-community-links {
    flex-direction: row;
    gap: 8px 18px;
    flex-wrap: wrap;
  }
  .footer-links a:hover {
    padding-inline-start: 0;
  }
  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 16px;
    text-align: center;
  }
  .footer-policy-links,
  .footer-legal {
    justify-content: center;
  }

  /* Nav */
  .nav-links {
    display: none;
  }
  .nav-mobile-toggle {
    display: flex;
  }
  .page-title {
    font-size: 24px;
  }
  .filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }
  .search-input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .filter-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .filter-group-label {
    margin: 0;
    font-size: 10px;
  }
  .select-control {
    width: 100%;
    min-width: 0;
  }
  .select-trigger {
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 12px;
  }
  .select-menu {
    top: calc(100% + 5px);
    padding: 5px;
    max-height: min(260px, calc(100vh - 180px));
  }
  .select-search {
    min-height: 30px;
    font-size: 12px;
  }
  .select-option {
    min-height: 32px;
    padding: 6px 8px 6px 10px;
    font-size: 12px;
  }

  /* Install guide compact */
  .install-item {
    padding: 8px 12px;
    font-size: 12px;
  }
  .install-item strong {
    font-size: 11px;
  }

  /* Download table scroll */
  .download-table {
    font-size: 12px;
  }
  .download-table th,
  .download-table td {
    padding: 8px 10px;
  }

  /* Sidebar compact metadata */
  .detail-meta-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
    gap: 6px;
    border-radius: var(--radius-md);
  }
  .detail-meta-item {
    padding: 7px 8px;
  }
  .detail-meta-label {
    font-size: 10px;
  }
  .detail-meta-value {
    font-size: 12px;
  }
  .detail-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
  }
  .detail-link-btn {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
  }

  /* Trust note */
  .trust-note {
    padding: 12px 14px;
    font-size: 13px;
    margin-top: 12px;
  }

  /* Changelog */
  .changelog-list {
    gap: 6px;
  }
  .changelog-summary {
    min-height: 38px;
    padding: 7px 10px;
    grid-template-columns: minmax(76px, auto) 1fr auto;
    gap: 8px;
  }
  .changelog-version {
    font-size: 13px;
    padding-left: 14px;
  }
  .changelog-date {
    font-size: 11px;
  }
  .changelog-count {
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
  }
  .changelog-changes {
    padding: 0 10px 10px 28px;
    font-size: 12px;
    line-height: 1.55;
  }

  .about-header {
    gap: 16px;
    margin: 22px 0 18px;
  }
  .about-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
  .about-name {
    font-size: 22px;
  }
  .about-bio {
    font-size: 14px;
    line-height: 1.6;
  }
  .focus-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    padding: 14px;
  }
}
