.resource-library-page { background: #f8f7f3; }

.resource-library-page .collection-header { position: sticky; }
.resource-library-page .collection-nav { display: flex; align-items: center; gap: 1.2rem; }
.resource-library-page .collection-nav > a {
  color: var(--pine);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}
.resource-library-page .collection-nav > a:hover,
.resource-library-page .collection-nav > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: .28rem;
}

.resource-library-hero {
  padding: clamp(6.5rem, 12vw, 9rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background: radial-gradient(circle at 82% 18%, rgba(216, 171, 91, .2), transparent 28%), linear-gradient(125deg, #102a23, #183b32 62%, #284a35);
  color: #fff;
}

.resource-library-hero h1 { max-width: 15ch; margin: .45rem 0 1rem; color: #fff; }
.resource-library-hero p:last-child { max-width: 48rem; color: #d9e2d6; font-size: 1.08rem; line-height: 1.75; }
.resource-library-shell { padding-block: clamp(2.5rem, 6vw, 5rem); }

.resource-search-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(180px, .8fr)) auto;
  gap: 1rem;
  align-items: end;
  padding: 1.25rem;
  border: 1px solid rgba(24, 59, 50, .14);
  border-radius: 20px;
  background: #fffdfa;
  box-shadow: 0 18px 40px rgba(8, 42, 34, .08);
}

.resource-search-controls label { display: grid; gap: .45rem; color: #26392d; font-weight: 800; }
.resource-search-controls label span { font-size: .78rem; letter-spacing: .04em; }
.resource-search-controls input,
.resource-search-controls select { min-height: 46px; padding: .72rem .82rem; border: 1px solid rgba(24, 59, 50, .24); border-radius: 10px; background: #fff; color: #1d342b; font: inherit; }
.resource-search-controls .button { min-height: 46px; }
.resource-result-status { margin: 1.4rem 0; color: #4b5d54; font-weight: 750; }

.resource-search-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.resource-search-card { display: grid; align-content: start; gap: .9rem; min-width: 0; padding: 1.35rem; border: 1px solid rgba(24, 59, 50, .14); border-radius: 18px; background: #fffdfa; box-shadow: 0 12px 30px rgba(8, 42, 34, .06); }
.resource-search-card h3 { margin: 0; color: #183b32; font-size: 1.15rem; line-height: 1.28; }
.resource-search-card p { margin: 0; color: #53635a; line-height: 1.62; }
.resource-search-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.resource-search-meta span { padding: .34rem .52rem; border-radius: 999px; background: #edf1e9; color: #334a40; font-size: .72rem; font-weight: 800; }
.resource-search-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: auto; padding-top: .25rem; }
.resource-search-actions .button { min-height: 44px; }
.resource-search-empty { grid-column: 1 / -1; padding: 2rem; border: 1px dashed rgba(24, 59, 50, .28); border-radius: 18px; text-align: center; }
.resource-search-noscript { display: grid; gap: .75rem; margin-top: 1rem; padding: 1.25rem; border-radius: 16px; background: #fffdfa; }

@media (max-width: 980px) {
  .resource-search-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .resource-library-page .collection-header {
    min-height: 88px;
    padding: .45rem .8rem;
    gap: .7rem;
  }
  .resource-library-page .collection-header .brand {
    flex: 0 0 54px;
    gap: 0;
  }
  .resource-library-page .collection-header .brand > span { display: none; }
  .resource-library-page .collection-nav {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .1rem .7rem;
    min-width: 0;
  }
  .resource-library-page .collection-nav > a {
    display: flex;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    font-size: .78rem;
    line-height: 1.2;
  }
  .resource-library-page .collection-nav .collection-back { grid-column: 1 / -1; }
  .resource-search-controls,
  .resource-search-grid { grid-template-columns: 1fr; }
  .resource-search-controls { padding: 1rem; }
}
