@media(max-width:1180px) {
  .dashboard-grid {
    grid-template-columns:1fr;
  }
  
  .dashboard-side {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
  }
  
  .mini-panel {
    margin-top:0;
  }
  
  .stats-grid {
    grid-template-columns:repeat(4,1fr);
  }
  
  .hero-art {
    right:80px;
  }
  
  .safer-card {
    display:none;
  }
}

@media(max-width:900px) {
  .app-shell {
    grid-template-columns:1fr;
  }
  
  .sidebar {
    position:fixed;
    left:0;
    top:0;
    width:250px;
    transform:translateX(-105%);
    transition:.22s;
    box-shadow:24px 0 60px rgba(0,0,0,.2);
  }
  
  .sidebar.open {
    transform:translateX(0);
  }
  
  .sidebar-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s ease;
  }

  .sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .mobile-brand {
    display:flex;
  }

  .mobile-menu-btn {
    display: grid;
    place-items: center;
  }
  
  .topbar {
    padding:0 14px;
  }
  
  .top-search-wrap {
    width:auto;
    flex:1;
  }
  
  .top-actions {
    display:none;
  }
  
  .content {
    padding:14px;
  }
  
  .search-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  
  .search-by-field,.query-field {
    grid-column:span 2;
  }
  
  .dashboard-side {
    grid-template-columns:1fr;
  }
  
  .stats-grid {
    grid-template-columns:repeat(4,1fr);
  }
  
  .about-grid {
    grid-template-columns:1fr;
  }
  
  .help-layout {
    grid-template-columns:1fr;
  }
  
  .hero-art {
    right:10px;
    opacity:.45;
  }
  
  .hero-copy {
    max-width:70%;
  }
  
  .list-row {
    grid-template-columns:1fr 1fr auto;
  }
  
  .list-row>*:nth-child(3) {
    display:none;
  }

  .footer {
    left: 0;
    padding: 8px 16px;
  }
}

@media(max-width:680px) {
  .topbar {
    height:58px;
  }
  
  .top-search-wrap {
    display:none;
  }
  
  .content {
    padding:10px;
  }
  
  .hero-card {
    padding:18px;
    min-height:214px;
    align-items:flex-start;
  }
  
  .hero-card h1 {
    font-size:30px;
  }
  
  .hero-copy {
    max-width:100%;
    padding-right:0;
  }
  
  .hero-art {
    right:-25px;
    bottom:0;
    width:245px;
    height:155px;
    opacity:.28;
  }
  
  .hero-badges {
    gap:6px;
  }
  
  .hero-badges span {
    font-size:9px;
  }
  
  .dashboard-grid {
    margin-top:10px;
  }
  
  .search-card {
    padding:14px;
  }
  
  .panel-title-row {
    align-items:center;
  }
  
  .search-grid {
    grid-template-columns:1fr;
  }
  
  .search-by-field,.query-field {
    grid-column:span 1;
  }
  
  .radio-row {
    height:auto;
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    padding:4px 0;
  }
  
  .form-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  
  .stats-grid {
    grid-template-columns:repeat(2,1fr);
  }
  
  .desktop-table-wrap {
    display:none;
  }
  
  .results-cards {
    display:grid!important;
    grid-template-columns:1fr;
  }
  
  .segmented {
    display:none;
  }
  
  .compact-select {
    display:none;
  }
  
  .results-toolbar {
    align-items:flex-start;
  }
  
  .results-footer {
    grid-template-columns:1fr auto;
  }
  
  .results-footer>label {
    display:none;
  }
  
  .page-numbers .page-number:nth-child(n+6) {
    display:none;
  }
  
  .page-heading {
    align-items:flex-start;
  }
  
  .page-heading h1 {
    font-size:24px;
  }
  
  .list-row {
    grid-template-columns:1fr auto;
    padding:14px;
  }
  
  .list-row>*:nth-child(2),.list-row>*:nth-child(3) {
    display:none;
  }
  
  .drawer-actions {
    display:grid;
    grid-template-columns:1fr;
  }
  
  .drawer-actions button {
    width:100%;
  }
  
  .detail-grid-two {
    grid-template-columns:1fr;
  }
  
  .tips-popover {
    left:12px;
    right:12px;
    top:70px;
    width:auto;
  }
  
  .pdf-dialog {
    width:100vw;
    height:100vh;
    max-width:none;
    max-height:none;
    border-radius:0;
  }
  
  .header-logo {
    height: 38px;
    max-height: 40px;
    max-width: 160px;
  }

  .footer {
    left: 0;
    padding: 7px 12px;
  }

  .footer-logo {
    height: 20px;
    max-width: 95px;
  }

  .footer-brand-wrap {
    gap: 8px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 9.5px;
  }
}

@media(max-width:680px) {
  .results-cards.hidden {
    display:grid!important;
  }
}
