html,
body,
.app-shell,
.app-main,
.page-stack,
.home-page,
.detail-hero,
.panel,
.cards,
.project-card,
.component-card,
.source-card,
.map-layout,
.map-layout > *,
.timeline-item,
.timeline-item > *,
.methodology-layout,
.methodology-layout > * {
  min-width: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

:where(.project-card, .component-card, .source-card, .panel, .detail-hero) {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .search {
    min-height: 44px;
    height: 44px;
  }

  .filter-grid select,
  .reset,
  .primary-button,
  .button-primary,
  .button-secondary,
  .icon-button,
  .home-link,
  .back-link,
  .detail-nav a,
  .source-card > a,
  .detail-actions a,
  .detail-actions button,
  [data-map-component] {
    min-height: 44px;
  }

  .filters input,
  .filters select {
    font-size: 16px;
  }

  .detail-nav {
    max-width: 100%;
    overflow: hidden;
  }

  .detail-nav a {
    padding-block: 8px;
    line-height: 1.35;
  }

  .panel table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .leaflet-popup-content-wrapper {
    max-width: calc(100vw - 36px);
  }

  .leaflet-popup-content {
    max-width: calc(100vw - 72px);
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .sort-field {
    grid-column: auto;
  }

  .detail-actions,
  .save-actions {
    min-width: 0;
  }

  .detail-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-copy,
  .source-copy dl,
  .source-copy dl div {
    min-width: 0;
  }

  .source-copy dd,
  .source-copy h3 {
    overflow-wrap: anywhere;
  }
}
