/* Shared responsive overrides loaded after page-specific styles. */
:root { --hmpa-blue: #0d47a1; --hmpa-text: #22324f; --hmpa-border: #d9e6f7; }
.hmpa-action { border: 1px solid #b9cfe9; border-radius: 7px; padding: .55rem .85rem; background: #fff; color: var(--hmpa-blue); font: inherit; font-weight: 600; cursor: pointer; }
.hmpa-action:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #80b6f5; outline-offset: 3px; }
.hmpa-status-card { padding: 1rem 1.2rem; border: 1px solid var(--hmpa-border); border-radius: 10px; background: #f3f8ff; color: var(--hmpa-text); line-height: 1.6; }
.hmpa-module-waiting { min-height: 180px; }
.hmpa-module-waiting > :not(h2):not(.module-note):not(.hmpa-module-status) { display: none !important; }
.hmpa-module-status { padding: 1.2rem 0; color: #52647e; line-height: 1.6; }
.compact-module-nav { display: none; }
@media (max-width: 1280px) {
  .compact-module-nav { display: flex; position: sticky; top: 0; z-index: 100; align-items: center; gap: .75rem; padding: .65rem 1rem; border-bottom: 1px solid var(--hmpa-border); background: rgba(255,255,255,.97); color: var(--hmpa-blue); }
  .compact-module-nav label { flex-shrink: 0; font-weight: 600; }
  .compact-module-nav select { min-width: 0; flex: 1; max-width: 450px; padding: .5rem; border: 1px solid #b9cfe9; border-radius: 6px; font: inherit; color: var(--hmpa-text); background: white; }
  .structure-info, .viewer-header { scroll-margin-top: 80px !important; }
  body.viewer-fullscreen .compact-module-nav { display: none; }
}
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .navbar {
    height: auto !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }

  .navbar-container {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0.45rem 0.75rem 0.3rem !important;
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .logo {
    max-width: 100%;
    gap: 0.3rem !important;
  }

  .logo-icon {
    width: 44px !important;
    height: 44px !important;
  }

  .logo .bold {
    font-size: 1.65rem !important;
  }

  .logo .sub-logo {
    max-width: 48vw;
    overflow: hidden;
    font-size: 1.05rem !important;
    line-height: 1 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none !important;
  }

  .menu {
    order: 2;
    flex: 1 0 100% !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 0.1rem 0 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  .menu a {
    flex: 0 0 auto;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 0.62rem !important;
    font-size: 1rem !important;
    white-space: nowrap;
  }

  .hero {
    min-height: calc(100vh - 116px) !important;
    height: auto !important;
    padding: 1rem 0 2rem !important;
    align-items: flex-start !important;
    background-size: cover !important;
  }

  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    padding: 0 0.9rem !important;
  }

  .hero .title {
    margin: 1rem 0 0.75rem !important;
    font-size: clamp(2.1rem, 10.5vw, 3rem) !important;
    line-height: 1.08;
  }

  .hero .subtitle {
    margin-bottom: 1.4rem !important;
    font-size: 1.15rem !important;
  }

  .search-alphafold-style {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.7rem;
  }

  .search-alphafold-style select,
  .search-alphafold-style input {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
  }

  .af-search-button-wrapper {
    width: 100%;
    margin: 0 !important;
  }

  .af-search-button {
    width: 100% !important;
  }

  .example-buttons {
    width: 100%;
    gap: 0.55rem !important;
  }

  .example-button {
    max-width: 100%;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.95rem !important;
    overflow-wrap: anywhere;
  }

  .example-blast {
    width: 100%;
  }

  .stats-grid {
    width: 100%;
    margin-top: 1.25rem !important;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.8rem !important;
  }

  .stat-card {
    width: 100%;
    min-width: 0 !important;
    padding: 1rem !important;
  }

  .extra-info-inline {
    width: 100%;
    max-width: 100% !important;
    margin: 1rem auto !important;
    padding: 0.7rem !important;
    flex-direction: column;
    white-space: normal !important;
  }

  .citation-inline {
    margin: 0.5rem 0 1rem !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
  }

  .browse-container,
  .download-container,
  .help-container,
  .predict-container {
    width: calc(100% - 1.25rem) !important;
    max-width: none !important;
    margin: 0.75rem auto !important;
    padding: 1rem !important;
  }

  .browse-container h1,
  .help-title {
    font-size: 1.65rem !important;
    line-height: 1.2;
  }

  .browse-container > table {
    min-width: 900px;
  }

  .dataTables_wrapper {
    width: 100%;
  }

  .dataTables_wrapper .top,
  .dataTables_wrapper .bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .dataTables_wrapper .dt-buttons,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    width: 100%;
    text-align: left !important;
  }

  #page-jump-container {
    text-align: left !important;
  }

  .modal-content {
    width: calc(100% - 1.5rem) !important;
    margin: 15vh auto 0 !important;
  }

  #search-error {
    top: 118px !important;
    width: calc(100% - 1.5rem);
    padding: 0.75rem !important;
    font-size: 1rem !important;
  }
}
