  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
    background: #f9f9f9;
    color: #111827;
    line-height: 1.6;
  }

  .leg-search-shell {
    max-width: 1100px;
    margin: 32px auto 48px;
    padding: 0 12px;
  }

  /* Page header (like analytics) */
  .leg-search-header {
    margin-bottom: 20px;
  }

  .leg-search-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
  }

  .leg-search-subtitle {
    font-size: 14px;
    color: #6b7280;
  }

  /* Card container (visual cousin of analytics-card) */
  .leg-search-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    padding: 20px 22px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
  }

  .leg-search-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
  }

  .leg-search-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
  }

  .leg-search-card-meta {
    font-size: 13px;
    color: #6b7280;
  }

  /* Filters row */
  .leg-search-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px 16px;
    margin-bottom: 4px;
  }

  .leg-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 4px;
  }

.leg-filter-group input,
.leg-filter-group select {
    width: 100%;
    padding: 8px 10px;
    height: 36px;              
    line-height: 18px;         
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    appearance: none;          
    -webkit-appearance: none;  
    -moz-appearance: none;     
    transition: border .16s ease, box-shadow .16s ease, background .16s ease;
}


  .leg-filter-group input:focus,
  .leg-filter-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
    outline: none;
    background: #f9fafb;
  }

  .leg-search-fineprint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
  }

  /* Results table wrapper */
  .leg-search-table-wrapper {
    margin-top: 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #ffffff;
  }

  table.leg-search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }

  .leg-search-table thead {
    background: #f3f4f6;
  }

  .leg-search-table th,
  .leg-search-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
  }

  .leg-search-table th {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
  }

  .leg-search-table tbody tr:nth-child(even) {
    background: #f9fafb;
  }

  .leg-search-table tbody tr {
    cursor: pointer;
    transition: background 0.12s ease;
  }

  .leg-search-table tbody tr:hover {
    background: #eef2ff;
  }

  /* Party + chamber color accents */
  td[data-party="Democratic"] {
    color: #1d4ed8;
    font-weight: 600;
  }

  td[data-party="Republican"] {
    color: #b91c1c;
    font-weight: 600;
  }

  td[data-party="Independent"] {
    color: #374151;
    font-weight: 600;
  }

  td[data-chamber="Senate"] {
    color: #0f766e;
    font-weight: 600;
  }

  td[data-chamber="House"] {
    color: #7c2d12;
    font-weight: 600;
  }

  /* Pagination – pill style */
  .custom-pagination {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .page-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 32px;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  }

  .page-btn:hover {
    background: #e8ecf5;       
    color: #1c335f;           
    border-color: #cdd4e0;     
}


  .page-btn.active {
    background: #1c335f;
    color: #ffffff;
    border-color: #1c335f;
    font-weight: 600;
    pointer-events: none;
}


  .leg-search-filters.law-layout {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }



  /* Responsive adjustments */
  @media (max-width: 900px) {
    .leg-search-filters {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
	.leg-search-filters.law-layout {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 640px) {
    .leg-search-shell {
      margin-top: 24px;
    }

    .leg-search-filters {
      grid-template-columns: 1fr;
    }
	
    .leg-search-filters.law-layout {
      grid-template-columns: 1fr;
    }
	  
    .leg-search-card {
      padding: 18px;
    }

    .leg-search-title {
      font-size: 22px;
    }
  }
  .leg-filter-group select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M5.25 7.5L10 12.25L14.75 7.5H5.25Z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;   /* room for arrow */
  }
