
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
.container {
  padding: 0 24px;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
}
/* ============================================================
   Sunrise MFD — Fund Screener (fund-screener.html)
   ============================================================ */

.screener-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.screener-hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-dark);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(20,184,166,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(20,184,166,0); }
  100% { box-shadow: 0 0 0 0 rgba(20,184,166,0); }
}

/* ============================================================
   Filter bar
   ============================================================ */

.screener-section { padding: 20px 0 100px; }

.filter-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.filter-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-field select,
.filter-field input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-heading);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-field select:focus,
.filter-field input[type="text"]:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.filter-field select:disabled { opacity: 0.55; cursor: wait; }

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-status {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-status .spinner { display: none; }

.filter-status.loading .spinner { display: inline-block; }

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  animation: spin 0.7s linear infinite;
}

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

/* ============================================================
   Sort pills
   ============================================================ */

.sort-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sort-pills-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sort-pill {
  padding: 7px 15px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-pill:hover { border-color: var(--teal); color: var(--teal-dark); }

.sort-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ============================================================
   Results table
   ============================================================ */

.results-meta {
  display: flex;
  align-items: center;
  justify-content: start;
  margin-bottom: 12px;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.results-meta strong { color: var(--text-heading); }

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 4px 16px rgba(11, 37, 69, 0.04);
  -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.screener-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1120px;
  font-size: 13.5px;
}

.screener-table thead th {
  position: sticky;
  top: 0;
  background: var(--navy);
  color: var(--white);
  text-align: left;
  padding: 14px 16px;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  z-index: 5;
  border-bottom: 2px solid var(--navy-dark);
}

.screener-table thead th.th-right {
  text-align: right;
}

.screener-table thead th:hover { background: var(--navy-dark); }

.screener-table thead th.sorted::after {
  content: " ▾";
  font-size: 10px;
  opacity: 0.9;
  color: var(--teal);
}

.screener-table thead th.sorted.asc::after { 
  content: " ▴"; 
  color: var(--teal);
}

.screener-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.screener-table tbody tr:hover { 
  background: #F0FDF4; 
}

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

.screener-table td {
  padding: 13px 16px;
  white-space: nowrap;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.screener-table td.td-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 100px;
  padding: 13px 18px;
}

.scheme-name-cell {
  white-space: normal !important;
  min-width: 360px;
  max-width: 480px;
  word-break: break-word;
  padding: 14px 16px !important;
  text-align: left;
}

.scheme-name {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 13.5px;
  display: block;
  line-height: 1.5;
  margin-bottom: 6px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.scheme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.scheme-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--teal-light);
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: inline-block;
}

.scheme-tag.plan-regular { 
  background: #FFF1E3; 
  color: #A15C00; 
}

.return-cell { 
  font-weight: 600; 
  font-family: var(--font-heading);
  display: inline-block;
}
.return-cell.positive { color: #0D9488; }
.return-cell.negative { color: #E11D48; }
.return-cell.neutral { color: var(--text-muted); font-weight: 400; }

.table-empty,
.table-loading-row td {
  text-align: center;
  padding: 56px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* ============================================================
   Info strip
   ============================================================ */

.screener-disclaimer {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  line-height: 1.6;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .filter-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 16px; }
  .filter-actions { flex-direction: column; align-items: stretch; }
}


.screener-section,
.table-scroll,
.screener-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.table-scroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 520px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .footer-col {
    min-width: 0 !important;
  }
  .newsletter-form {
    flex-direction: column !important;
  }
  .newsletter-form .btn-primary {
    width: 100% !important;
  }
}
