/* figures-grid.css — shared figure-card grid used by the library home
   (/figures/) and the chassis/system landing pages. Card markup lives in
   _includes/figure-card-grid.njk and the client grid in figures.njk. */

.figs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 1rem;
}
.figs-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border, #e6e6e6);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.figs-tile:hover,
.figs-tile:focus-visible {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border-color: var(--accent, #c4622d);
  outline: none;
  transform: translateY(-1px);
}
.figs-tile__imgwrap { position: relative; display: block; }
.figs-tile__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f0f0f0;
  display: block;
}
.figs-tile__badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: calc(100% - 12px);
}
.figs-badge {
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  letter-spacing: 0.02em;
}
.figs-badge--type { background: rgba(15, 23, 42, 0.6); font-weight: 600; }
.figs-badge--c450 { background: #3f6212; }
.figs-badge--c451 { background: #0a4060; }
.figs-badge--c452 { background: #6d28d9; }
.figs-badge--c453 { background: #b45309; }
.figs-badge--c454 { background: #9d174d; }
.figs-tile__cap {
  padding: 8px 10px 0;
  font-size: 0.82rem;
  color: var(--text-primary, #222);
  line-height: 1.35;
}
.figs-tile__meta {
  padding: 0 10px 10px;
  font-size: 0.72rem;
  color: var(--text-muted, #666);
}
.figs-tile__cap mark {
  background: #fff3bf;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* filter chips (shared by landing pages + library controls) */
.figs-chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.figs-chip-label { color: var(--text-muted, #666); font-size: 0.85rem; margin-right: 4px; font-weight: 600; }
.figs-chip {
  padding: 5px 12px;
  border: 1px solid var(--border, #d6d6d6);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-primary, #222);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.figs-chip:hover { background: #f4f4f4; }
.figs-chip.is-active { background: var(--accent, #0a4060); color: #fff; border-color: var(--accent, #0a4060); }
.figs-chip__n { font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.figs-loadmore-row { text-align: center; margin-top: 24px; }

.xp-related { margin-top: 2rem; }
.xp-related ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.xp-related li { margin: 0.2rem 0; }
