.legal-article {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 2rem;
  color: var(--text);
  font-family: var(--font-ui);
}
#searchInput {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--text);
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
#searchInput:focus { box-shadow: 0 6px 18px rgba(12,138,255,0.08); border-color: var(--primary); }

.tag-filter { display:flex; gap:8px; flex-wrap:wrap; margin:1rem 0 1.5rem 0; }
.tag-filter button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight:600;
}
.tag-filter button.active { background-color: var(--primary); color:#000;}
.tag-filter button:hover { background-color: white; color:#000;}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.article-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display:flex;
  flex-direction:column;
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-image { width:100%; height:160px; object-fit:cover; background:linear-gradient(90deg, rgba(12,138,255,0.08), rgba(33,135,252,0.04)); }
.card-content { padding: 1rem 1.2rem; display:flex; flex-direction:column; gap:8px; }
.card-meta { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); }
.card-tag { background: rgba(12,138,255,0.12); color:var(--primary); padding:4px 8px; border-radius:6px; font-weight:700; font-size:12px; }
.card-title { color:var(--text); font-size:1.05rem; font-weight:800; margin:0; }
.card-button { display:inline-block; margin-top:6px; padding:8px 12px; border-radius:8px; background:var(--primary); color:black; font-weight:700; text-decoration:none; }
.card-button:hover { background-color:white; color:#000; }

.no-results { color: var(--muted); padding: 2rem 0; text-align:center; }

@media (max-width:720px) {
  .legal-article { margin: 2rem 1rem; padding:1rem; }
  .card-image { height:120px; }
}

/* Utility hidden class to avoid inline styles (CSP-safe) */
.hidden { display: none !important; }

/* sentinel for infinite scroll */
#scrollSentinel { height: 1px; width: 100%; }
