/* Enhanced Hero Section */
.hero {
  background: #f8fafc;
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin: 2rem auto;
  max-width: 1400px;
}

.hero-text {
  color: #334155;
  margin-bottom: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-text strong {
  font-size: 1.3em;
  display: block;
  margin-bottom: 1rem;
  color: #1e293b;
}

.hero-text p {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #334155;
}

.hero-text a {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.hero-text a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

.check-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.check-list li {
  background: white;
  padding: 1rem 1.5rem 1rem 3rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #10b981;
  font-weight: bold;
  font-size: 1.2rem;
  background: #d1fae5;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.check-list li:hover {
  background: white;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.check-list li:hover::before {
  background: #667eea;
  color: white;
}

/* Fix for hero text background */
.hero-text {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 12px;
}

/* Enhanced Stats Section */
.numbers-section {
  margin-top: 3rem;
}

.numbers-box-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.number-box {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.number-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--box-color-1), var(--box-color-2));
}

.number-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.number-box.blue1 {
  --box-color-1: #667eea;
  --box-color-2: #764ba2;
}

.number-box.green1 {
  --box-color-1: #06b6d4;
  --box-color-2: #3b82f6;
}

.number-box.blue2 {
  --box-color-1: #8b5cf6;
  --box-color-2: #ec4899;
}

.number-box.green2 {
  --box-color-1: #10b981;
  --box-color-2: #059669;
}

.number-box.black {
  --box-color-1: #667eea;
  --box-color-2: #764ba2;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto;
}

.number-box.black::before {
  display: none;
}

.number-box.black .icon-area {
  display: none;
}

.number-box.black .number-area {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-area {
  height: 60px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--box-color-1);
}

.number-box.blue1 .icon-area::before { content: "📊"; }
.number-box.green1 .icon-area::before { content: "🧬"; }
.number-box.blue2 .icon-area::before { content: "🔬"; }
.number-box.green2 .icon-area::before { content: "📈"; }

.number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--box-color-1), var(--box-color-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.num-desc {
  display: block;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.number-box.black .number-area {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-box.black .button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.875rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.number-box.black .button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Enhanced Workflow Section */
.section.max-width {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

.front-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.front-image:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

/* Enhanced Content Panels */
.text {
  background: #f8fafc;
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  line-height: 1.8;
}

.text p {
  margin-bottom: 1.2rem;
  color: #334155;
}

.text a {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.text a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

/* Logo Section Enhancement */
.all-logos-area {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-radius: 20px;
}

.all-logos-area .flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.logo {
  transition: all 0.3s ease;
  filter: grayscale(0.3);
}

.logo:hover {
  transform: scale(1.1);
  filter: grayscale(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-text strong {
    font-size: 1.1em;
  }
  
  .check-list {
    grid-template-columns: 1fr;
  }
  
  .numbers-box-area {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .number-box {
    padding: 1.5rem 1rem;
  }
  
  .number {
    font-size: 2rem;
  }
  
  .section h2 {
    font-size: 2rem;
  }
  
  .all-logos-area .flex {
    gap: 2rem;
  }
}

/* Animation for stats on page load */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.number-box {
  animation: countUp 0.6s ease-out forwards;
}

.number-box:nth-child(1) { animation-delay: 0.1s; }
.number-box:nth-child(2) { animation-delay: 0.2s; }
.number-box:nth-child(3) { animation-delay: 0.3s; }
.number-box:nth-child(4) { animation-delay: 0.4s; }
.number-box:nth-child(5) { animation-delay: 0.5s; }

/* Browse Page - Modern Filter Section */
.content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.selections {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.selections > p:first-of-type {
  font-size: 1.1rem;
  color: #475569;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.selections > p:first-of-type b {
  color: #1e293b;
  font-size: 1.15rem;
}

/* Filter Grid Layout */
.selections form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.selections form > p {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Filter Labels */
.selections form > p::before {
  content: attr(data-label);
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  text-transform: capitalize;
}

/* Modern Select Dropdowns */
.selections select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  color: #334155;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
  height: auto;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Multi-select styling */
.select2-container--default .select2-selection--multiple {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--multiple:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Placeholder for multi-select */
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
  color: #94a3b8 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  position: relative !important;
  display: inline-block !important;
}

/* Ensure placeholder is visible when empty */
.select2-container--default.select2-container--focus .select2-selection--multiple .select2-selection__placeholder {
  display: inline-block !important;
}

.select2-container--default .select2-selection--multiple.select2-selection--clearable .select2-selection__placeholder {
  display: inline-block !important;
}

/* Hide placeholder when items are selected */
.select2-container--default .select2-selection--multiple .select2-selection__rendered li.select2-selection__choice ~ .select2-search--inline .select2-selection__placeholder {
  display: none !important;
}

/* Search field in multi-select */
.select2-container--default .select2-selection--multiple .select2-search--inline {
  margin: 0;
  display: inline-block;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  margin: 0;
  padding: 0;
  min-width: 150px;
  font-size: 1rem;
  line-height: 1.5;
  height: auto;
  border: none;
  outline: none;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
  color: #94a3b8;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Selected items (tags) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 6px;
  color: white;
  padding: 0.375rem 0.75rem;
  margin: 0.125rem 0.25rem 0.125rem 0;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: white;
  margin-right: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  opacity: 1;
  color: white;
  background: none;
}

.select2-container--default .select2-selection--single:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #334155;
  line-height: 1.5;
  padding: 0;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 0.75rem;
  top: 0;
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #667eea transparent transparent transparent;
  border-width: 6px 6px 0 6px;
  margin-top: 0;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent #667eea transparent;
  border-width: 0 6px 6px 6px;
}

/* Select2 Dropdown */
.select2-dropdown {
  border: 2px solid #667eea;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.select2-container--default .select2-search--dropdown {
  padding: 0.75rem;
  background: #f8fafc;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #667eea;
}

.select2-container--default .select2-results__option {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background: #ede9fe;
  color: #667eea;
  font-weight: 600;
}

.select2-results__option {
  word-wrap: break-word;
  white-space: normal;
}

/* Select2 Clear Button */
.select2-container--default .select2-selection--single .select2-selection__clear {
  color: #94a3b8;
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1;
  margin-right: 1.75rem;
  margin-top: 0;
  transition: color 0.2s ease;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: #667eea;
}

/* Active filter styling */
.select2-container--default .select2-selection--single.select2-selection--active-filter {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* Loading state */
.select2-container--default .select2-results__option--loading {
  padding: 0.75rem 1rem;
  color: #94a3b8;
}

/* No results */
.select2-container--default .select2-results__option.select2-results__message {
  padding: 1rem;
  text-align: center;
  color: #64748b;
  font-style: italic;
}

/* Select2 responsive */
@media (max-width: 768px) {
  .select2-container--default .select2-selection--single {
    padding: 0.625rem 0.875rem;
  }

  .select2-dropdown {
    font-size: 0.9rem;
  }
}

/* Reset Button Area */
.reset-area {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.button.gray {
  background: #64748b;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.button.gray:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

/* Download Button */
.content > p > .button {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.content > p > .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Table Area */
.table-area {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
  border: 1px solid #e2e8f0;
}

.table-area > p {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.table-area > p a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.table-area > p a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

/* Showing Records Info */
.showing {
  background: #f1f5f9;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  color: #475569;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: inline-block;
  border-left: 4px solid #667eea;
}

/* Modern Table Styles */
.browse-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  font-size: 0.95rem;
  border: none;
  overflow: hidden;
  border-radius: 12px;
}

.browse-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border: none;
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  transition: all 0.2s ease;
}

.browse-table th:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.browse-table th:first-child {
  border-top-left-radius: 12px;
}

.browse-table th:last-child {
  border-top-right-radius: 12px;
}

.browse-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-table tr:hover td {
  background: #f8fafc;
}

.browse-table tr:last-child td {
  border-bottom: none;
}

.browse-table tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.browse-table tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* Download Links in Table */
.browse-table td a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: #ede9fe;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.2s ease;
}

.browse-table td a:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Table Navigation */
.table-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.table-nav a {
  padding: 0.75rem 1.5rem;
  background: white;
  color: #667eea;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  border: 2px solid #667eea;
  transition: all 0.3s ease;
}

.table-nav a:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.table-nav a.prev::before {
  content: "← ";
}

.table-nav a.next::after {
  content: " →";
}

/* Note */
.note {
  color: #64748b;
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #cbd5e1;
}

/* Tooltip */
.tooltip-wrapper {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
}

.ttip {
  background: #1e293b;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  max-width: 300px;
  word-wrap: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: absolute;
}

/* Responsive Design */
@media (max-width: 768px) {
  .selections {
    padding: 1.5rem;
  }

  .selections form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .table-area {
    padding: 1rem;
    overflow-x: auto;
  }

  .browse-table {
    font-size: 0.85rem;
  }

  .browse-table th,
  .browse-table td {
    padding: 0.75rem 0.5rem;
  }

  .table-nav {
    flex-direction: column;
  }

  .table-nav a {
    width: 100%;
    text-align: center;
  }
}

/* Loading State */
.selections select:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Active Filter Indicator */
.selections select[value]:not([value=""]):not([value="All"]) {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* Sort Indicator for Table Headers */
.browse-table th.sorttable_sorted::after,
.browse-table th.sorttable_sorted_reverse::after {
  content: "";
  display: inline-block;
  margin-left: 0.5rem;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.browse-table th.sorttable_sorted::after {
  border-top: 5px solid white;
}

.browse-table th.sorttable_sorted_reverse::after {
  border-bottom: 5px solid white;
}

/* Filter Badge Count */
.selections form > p {
  position: relative;
}

.selections select option {
  padding: 0.5rem;
}

/* Smooth Transitions */
* {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}


/* === Two-column layout === */
.browse-layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:20px;
  align-items:start;
}

@media (max-width: 1100px){
  .browse-layout{ grid-template-columns: 1fr; }
}

/* === Facet cards === */
.facet{
  border:1px solid #e3e7ef;
  border-radius:12px;
  padding:10px;
  margin:12px 0;
  background:#fff;
}

.facet-head{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  background:transparent;
  border:0;
  padding:6px 4px;
  cursor:pointer;
  font:inherit;
}

.facet-title{ font-weight:700; }
.facet-actions{ display:flex; align-items:center; gap:10px; }
.facet-clear{ text-decoration:none; }
.facet-chevron{
  opacity:.6;
  display:inline-block;
  transition:transform .15s ease;
}

/* Collapsing */
.facet-body{ margin-top:8px; }
.facet[data-open="0"] .facet-body{ display:none; }
.facet[data-open="0"] .facet-chevron{ transform:rotate(-90deg); }
.facet[data-open="1"] .facet-chevron{ transform:rotate(0deg); }

/* Search row */
.facet-search{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 10px 0;
}
.facet-search input{
  flex:1;
  min-width:0;
  padding:8px 10px;
  border:1px solid #cfd6e4;
  border-radius:8px;
  box-sizing:border-box;
}
.facet-q-clear{
  display:inline-flex;
  width:26px;
  height:26px;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  text-decoration:none;
  opacity:.7;
}
.facet-q-clear:hover{ opacity:1; }

/* Values list */
.facet-values{
  max-height:260px;
  overflow:auto;
  padding-right:6px;
}
.facet-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:4px 0;
}
.facet-left{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
  min-width:0;
}
.facet-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.facet-count{
  opacity:.7;
  font-variant-numeric: tabular-nums;
}
.facet-note{
  margin-top:8px;
  font-size: 0.9em;
  opacity:.8;
}

/* Results panel tweaks */
.results-panel .table-area{ margin-top:0; }

/* Make facet header button look like plain header (avoid inherited button styles) */
.facet-head{
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  color: inherit !important;
  text-align: left;
}

/* Force visible title text (override any global button color) */
.facet-head .facet-title{
  color: #222 !important;
}

/* If your theme makes buttons uppercase/letter-spaced, undo it */
.facet-head{
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 600;
}

/* Contain wide tables */
.results-panel{
  min-width: 0;          /* critical for CSS grid */
}

.table-area{
  overflow-x: auto;
  max-width: 100%;
}

/* Prevent table from stretching layout */
#browse-table{
  width: max-content;    /* table fits its content */
  max-width: 100%;
  border-collapse: collapse;
}

/*
#browse-table th,
#browse-table td{
  max-width: 260px;      /* tune per your taste */
  white-space: normal;
  /*word-break: break-word;*/
}
*/

#browse-table td.numeric,
#browse-table th.numeric{
  white-space: nowrap;
}

#browse-table a.dl-btn{
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  display: inline-block; /* helps keep it stable */
}


/* Keep the cell itself normal */
#browse-table td.col-desc{
  max-width: 820px;   /* tune */
  vertical-align: top;
}

/* Clamp the inner wrapper */
#browse-table td.col-desc .clamp2{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;      /* 1 or 2 lines */
  overflow: hidden;

  white-space: normal;
  word-break: break-word;
}

#browse-table td{ vertical-align: top; }

/* Optional: show full text on hover via tooltip */
#browse-table td.col-desc{
  position: relative;
}
#browse-table td.col-desc:hover{
  overflow: visible;
  z-index: 5;
}

.expandable{
  cursor: pointer;
}

.expandable.open{
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}

/* collapsed (clamped) */
#browse-table .expandable{
  cursor: pointer;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;   /* adjust */
  overflow: hidden;

  white-space: normal;
  word-break: break-word;
}

/* expanded */
#browse-table .expandable.open{
  display: block !important;        /* critical */
  -webkit-line-clamp: initial !important;
  -webkit-box-orient: initial !important;

  overflow: visible !important;
  max-height: none !important;
}

/* Base (collapsed) */
#browse-table .expandable{
  cursor: pointer;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  position: relative;
}

/* Expanded: overlay-style */
#browse-table .expandable.open{
  display: block !important;

  position: absolute;          /* key change */
  left: 0;
  top: 0;

  width: min(800px, 80vw);     /* wider than column */
  max-height: 300px;           /* prevents giant overlays */
  overflow: auto;

  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);

  z-index: 100;
}

#browse-table td{
  position: relative;
}


/* vertical facets */
/*
.selections{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:16px;
  align-items:start;
} 
*/

#browse-table {
  table-layout: auto;
  width: 100%;
}

#browse-table th:nth-child(3),
#browse-table td.overlaps-cell {
  min-width: 220px;
  white-space: nowrap;
  vertical-align: top;
}

#browse-table td.overlaps-cell .overlaps-link,
#browse-table td.overlaps-cell .overlaps-badge {
  display: inline-block;
  vertical-align: middle;
}

#browse-table td.overlaps-cell .dl-btn {
  display: inline-block;
  margin-top: 4px;
}

/* Keep the overlap count and BED link on one line */
#browse-table td.overlaps-cell .overlaps-link,
#browse-table td.overlaps-cell .overlaps-badge {
  display: inline-block;
  white-space: nowrap;
}

/* Optional: small spacing between count and BED */
#browse-table td.overlaps-cell .overlaps-badge {
  margin-left: 6px;
}

.select-cell {
  width: 36px;
  text-align: center;
  vertical-align: top;
}

.bulk-browser-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

#browse-table .th-select,
#browse-table .select-cell {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  text-align: center;
  padding-left: 0px;
  padding-right: 0px;
  vertical-align: top;
}

#browse-table th:nth-child(2){
  /*width: 15% !important;*/
  width: 22% !important;
  /*max-width: 80px;*/
  max-width: 120px;
  white-space: nowrap;
  vertical-align: top;
}
#browse-table th:nth-child(1){
  width: 3%;
  max-width: 80px;
  white-space: nowrap;
  vertical-align: top;
}

/*#browse-table th:nth-child(3){*/
#browse-table th.col-desc,
#browse-table td.col-desc{
  /*width: 70%;*/
  width: 50%;
  max-width: 800px;
  white-space: nowrap;
  vertical-align: top;
}

#browse-table th.actions-cell,
#browse-table td.actions-cell{
  width: 17%;
  max-width: 110px !important;
  white-space: nowrap;
  vertical-align: top;
}


/* front page search */

.filer2-search-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 16px;
  text-align: center;
}

.filer2-search-card {
  width: 100%;
  max-width: 960px;
  padding: 32px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.filer2-search-card h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
}

.filer2-search-subtitle {
  margin: 0 0 24px;
  color: #555;
  font-size: 1.05rem;
}

.filer2-search-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
}

#filer2-search-input {
  flex: 1;
  min-width: 280px;
  padding: 14px 16px;
  font-size: 1.1rem;
  border: 1px solid #bbb;
  border-radius: 8px;
}

#filer2-genome-build {
  padding: 0 12px;
  font-size: 1rem;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #fff;
}

.filer2-search-row button[type="submit"] {
  padding: 0 24px;
  font-size: 1.05rem;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  background: #2b6cb0;
  color: #fff;
  cursor: pointer;
}

.filer2-search-row button[type="submit"]:hover {
  background: #1f4f82;
}

.filer2-examples {
  margin-top: 16px;
  font-size: 0.95rem;
  color: #555;
}

.filer2-example {
  margin: 4px;
  padding: 4px 9px;
  border: 1px solid #cbd5e0;
  border-radius: 999px;
  background: #f7fafc;
  color: #2b6cb0;
  cursor: pointer;
  font-size: 0.9rem;
}

.filer2-example:hover {
  background: #edf2f7;
  text-decoration: underline;
}

.filer2-advanced {
  margin-top: 14px;
}

.filer2-advanced a {
  color: #2b6cb0;
  font-weight: 600;
  text-decoration: none;
}

.filer2-advanced a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .filer2-search-row {
    flex-direction: column;
  }

  #filer2-search-input,
  #filer2-genome-build,
  .filer2-search-row button[type="submit"] {
    width: 100%;
    min-height: 46px;
  }
}

.filer2-search-status {
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2b6cb0;
}

.filer2-search-status::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid #cbd5e0;
  border-top-color: #2b6cb0;
  border-radius: 50%;
  vertical-align: -2px;
  animation: filer2-spin 0.8s linear infinite;
}

@keyframes filer2-spin {
  to {
    transform: rotate(360deg);
  }
}

.filer2-search-row button[disabled],
#filer2-search-input[disabled],
#filer2-genome-build[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.hero > .filer2-search-hero {
  grid-column: 1 / -1;
  width: 100%;
}

.filer2-search-hero {
  width: 100%;
  max-width: none;
}

.filer2-search-card {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* styling for overlap heatmap */
.heatmap-panel {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #ffffff;
}

.heatmap-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.heatmap-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

#heatmap-subtitle {
  color: #666;
  font-size: 0.95rem;
}

#overlap-heatmap {
  overflow-x: auto;
}

.filer2-heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 0.9rem;
}

.filer2-heatmap-table th {
  padding: 8px;
  text-align: center;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.filer2-heatmap-table thead th {
  background: #1f2933;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  border-radius: 0;
}

.filer2-heatmap-table tbody th {
  text-align: right;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.filer2-heatmap-table td {
  min-width: 64px;
  height: 38px;
  padding: 6px;
  text-align: center;
  border-radius: 6px;
  font-weight: 600;
}

.filer2-heatmap-table td.zero {
  color: transparent;
}

.filer2-heatmap-table td.nonzero {
  color: #0f172a;
}

.section-help {
  max-width:     90ch;
  margin:        var(--space-2) 0 var(--space-4);
  padding:       var(--space-3) var(--space-4);
  font-size:     var(--text-sm);
  line-height:   var(--leading-loose);
  color:         var(--color-text-secondary);
  background:    var(--color-bg-subtle);
  border-left:   3px solid var(--color-border);
  border-radius: var(--radius-sm);
}


/* frontpage data collection etc cards*/
.filer2-card-browser {
  max-width: 1200px;
  margin: 32px auto 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.filer2-card-section {
  padding: 24px;
  border: 1px solid #d9e2ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.filer2-card-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.filer2-card-section-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.filer2-card-section-header a {
  color: #2b6cb0;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.filer2-card-section-header a:hover {
  text-decoration: underline;
}

.filer2-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.filer2-facet-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid #cbd5e0;
  border-radius: 14px;
  background: #f8fafc;
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.filer2-facet-card:hover {
  transform: translateY(-2px);
  border-color: #2b6cb0;
  box-shadow: 0 8px 22px rgba(43, 108, 176, 0.16);
}

.filer2-facet-card-label {
  font-size: 1rem;
  font-weight: 800;
  color: #1f2933;
}

.filer2-facet-card-count {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2b6cb0;
}

@media (min-width: 980px) {
  .filer2-card-browser {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .filer2-card-section-header {
    flex-direction: column;
  }
}

.filer2-page-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
}

.filer2-page-loading[hidden] {
  display: none;
}

.filer2-page-loading-box {
  min-width: 260px;
  max-width: 90vw;
  padding: 24px 28px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  text-align: center;
  font-weight: 700;
  color: #1f2933;
}

.filer2-page-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid #cbd5e0;
  border-top-color: #2b6cb0;
  border-radius: 50%;
  animation: filer2-page-spin 0.8s linear infinite;
}

@keyframes filer2-page-spin {
  to {
    transform: rotate(360deg);
  }
}

/* frontpage sys.cat x genomic.feature coverage heatmap */

.filer2-coverage-panel {
  margin: 48px auto;
  max-width: 1200px;
  padding: 28px;
  border: 1px solid #d9e2ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.filer2-coverage-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.filer2-coverage-header h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.filer2-coverage-header p {
  margin: 0;
  color: #555;
}

.filer2-coverage-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.filer2-coverage-controls label {
  font-weight: 600;
  color: #333;
}

.filer2-coverage-controls select {
  padding: 8px 12px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #fff;
}

.coverage-summary-text {
  margin: 12px 0;
  color: #555;
  font-weight: 600;
}

.filer2-coverage-heatmap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.filer2-coverage-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 0.88rem;
}

.filer2-coverage-table th {
  padding: 8px;
  white-space: nowrap;
}

.filer2-coverage-table thead th {
  background: #1f2933;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
}

.filer2-coverage-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
}

.filer2-coverage-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  color: #222;
  text-align: right;
  font-weight: 700;
  max-width: 240px;
}

.filer2-coverage-table td {
  min-width: 72px;
  height: 40px;
  padding: 6px;
  text-align: center;
  border-radius: 6px;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #d8dee9;
}

.filer2-coverage-table td.zero {
  background: #f7fafc;
  color: transparent;
}

.filer2-coverage-table td.nonzero {
  cursor: pointer;
}

.filer2-coverage-table td.nonzero:hover {
  outline: 2px solid #1f4f82;
  outline-offset: -2px;
}

.filer2-coverage-actions {
  margin-top: 18px;
  text-align: center;
}

.filer2-coverage-actions a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #2b6cb0;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.filer2-coverage-actions a:hover {
  background: #1f4f82;
}

@media (max-width: 760px) {
  .filer2-coverage-header {
    flex-direction: column;
  }

  .filer2-coverage-panel {
    padding: 18px;
  }
}
