/* The directory's cards (directory.js): bundles on /b, plugins on /plugins, and the search above them. */
.dir-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-bottom: 1.1rem; }
.dir-bar[hidden] { display: none; }
.dir-bar .count { color: var(--muted); font-size: 0.86rem; }
.search { position: relative; flex: 0 1 22rem; }
.search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--teal); box-shadow: 0 24px 48px -30px rgba(var(--shade), 0.35); }
.card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.card .shot { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--tint) 7%, var(--paper)); overflow: hidden; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.card .shot.none { display: grid; place-items: center; }
.card .shot.none .ic { width: 44px; height: 44px; opacity: 0.75; }
.card .body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; padding: 16px 18px 15px; }
.card .title { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.card .title b { font-weight: 550; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .title .version { margin-left: auto; flex: none; font: 0.74rem "JetBrains Mono", monospace; color: var(--muted); }
.card p { color: var(--muted); font-size: 0.87rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin-top: auto; padding-top: 0.35rem; color: var(--muted); font-size: 0.8rem; }
.card .meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.card .meta svg { width: 13px; height: 13px; }
.card .meta .warn { color: var(--orange); }
/* A lucide icon by name (/icons/lucide/, from lucide-static) or a plugin's own SVG, in its tint, as a mask. */
.ic { width: 18px; height: 18px; flex: none; background: var(--tint); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.card .tile { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: color-mix(in srgb, var(--tint) 13%, transparent); }
.card .tile .ic { width: 18px; height: 18px; }
.dir-empty { grid-column: 1 / -1; padding: 34px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; font-size: 0.95rem; line-height: 1.5; }
.dir-empty a { color: var(--fg); border-bottom: 1px solid var(--line); }
.dir-empty a:hover { border-color: currentColor; }
/* Until the index comes: cards of their size, so nothing moves when it does. */
.card.loading { height: 190px; background: var(--wash); border-color: transparent; animation: dir-pulse 1.6s ease-in-out infinite; }
.cards.bundles .card.loading { height: 340px; }
@keyframes dir-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .card.loading { animation: none; } .card { transition: none; } }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .search { flex-basis: 100%; }
  .card .shot.none { aspect-ratio: 3 / 1; } /* (no picture: a band, not a screen's worth of nothing) */
}
