.directory-section {
  --directory-blue: #175695;
  --directory-edge: #dce6ee;
  background: #f8f9f6;
  color: var(--brand-ink);
}
.directory-section .directory-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  grid-auto-rows: 1fr;
  gap: 22px;
}
.directory-section [hidden] { display: none; }
.resource-link {
  display: flex; flex-direction: column; height: 100%; min-width: 0;
  overflow: hidden; border: 1px solid #d9e0dd; border-radius: 8px;
  background: white; color: var(--brand-ink); text-decoration: none; cursor: pointer;

  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.resource-link:focus-visible { outline: 3px solid var(--directory-blue); outline-offset: 3px; }
@media (hover:hover) {
  .resource-link:hover { transform: translateY(-2px); border-color: #99bbdf; box-shadow: 0 5px 16px #28456312; }
}
.resource-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resource-logo { display: grid; place-items: center; height: 100px; padding: 16px; background: white; font-weight: 700; }
.resource-logo img { display: block; width: auto; height: 52px; max-width: min(150px,100%); object-fit: contain; }
.resource-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 12px; background: var(--brand-platform-card); border-top: 1px solid #e9ede9; }
.resource-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.resource-tag {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: -9px; padding: 3px 10px 3px 7px; border-radius: 20px;
  background: #edf2fa; color: #203754; font-size: 12px; font-weight: 550; line-height: 18px;
}
.resource-tag svg { display: block; flex: none; }
.resource-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
.resource-summary h2 { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.resource-metric small { display: block; color: var(--brand-muted); font-size: 12px; line-height: 1.5; }

.resource-metric { border-left: 1px solid var(--brand-line); padding-left: 10px; text-align: right; white-space: nowrap; }
.resource-metric strong { display: block; color: var(--directory-blue); font-size: 24px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.resource-metric .unavailable { font-size: 16px; }
.resource-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 12px 0 18px; font-size: 14px; line-height: 1.65; color: #506578; }
.resource-foot { margin-top: auto; padding-top: 13px; border-top: 1px solid #e7edf2; font-size: 13px; color: var(--brand-muted); }
.resource-foot span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid #c1d6ea;
  border-radius: 8px;
  background: #edf5fc;
  color: var(--directory-blue);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}
.resource-link:focus-visible .resource-foot span:last-child {
  background: var(--directory-blue);
  border-color: var(--directory-blue);
  color: white;
}
@media (hover:hover) {
  .resource-link:hover .resource-foot span:last-child {
    background: var(--directory-blue);
    border-color: var(--directory-blue);
    color: white;
  }
}
.platform-atlas a.atlas-platform { display: inline-flex; align-items: center; justify-content: center; }
@container (max-width:1130px) { .directory-section .directory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@container (max-width:640px) { .directory-section .directory-grid { grid-template-columns: 1fr; } }
@container (min-width:761px) and (max-width:900px) {
  .catalog-layout { display: block; }
  .filter-sidebar { display: none; position: static; max-height: none; }
  .filter-sidebar.is-open { display: block; padding: 20px; margin-bottom: 20px; background: white; }
  .mobile-filter-toggle, .mobile-filter-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 16px; margin-bottom: 16px; border: 1px solid var(--directory-edge); border-radius: 8px; background: white; }
}
@media (prefers-reduced-motion: reduce) {
  .resource-link { transition: none; }
  .resource-link:hover { transform: none; }
}
