/* ---- Resources page (/resources) ----
   Heading, a search box with type filter pills, then a grid of cards.
   Search and filtering live in initResources() in main.js. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.res-head { padding: 72px 0 36px; }
.res-head h1 { font-size: clamp(36px, 4.4vw, 64px); margin: 14px 0 16px; max-width: 18ch; }
.res-head .lede { font-size: 18px; color: var(--muted); line-height: 1.5; margin: 0; max-width: 56ch; }

.res-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 36px; }
.res-search {
  flex: 1 1 320px; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px; height: 48px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  color: var(--muted);
}
.res-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.res-search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}

.res-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.res-filter {
  height: 40px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.res-filter:hover { border-color: var(--brand); color: var(--brand); }
.res-filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.res-filter[hidden] { display: none; }

.res-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding-bottom: 96px;
}
.res-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.res-card[hidden] { display: none; }
.res-card img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; background: var(--line); }
.res-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.res-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.res-type {
  font-size: 11px; letter-spacing: .08em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.res-card h2 { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.res-card:hover h2 { color: var(--brand); }
.res-card p { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0; }

.res-empty { text-align: center; color: var(--muted); padding: 40px 0 96px; margin: 0; }

@media (max-width: 640px) {
  .res-head { padding: 44px 0 28px; }
  .res-grid { grid-template-columns: 1fr; }
}
.nav-links a[aria-current="page"] { color: var(--brand); }
