@layer components {
  /* Shared category header for the per-category review surfaces (the admin
     check-team review detail and the checker per-category review): CODE — Name,
     a photo count, and an optional per-category download-ZIP link. */
  .review-category__header {
    display: flex;
    align-items: baseline;
    gap: var(--s3);
    margin-bottom: var(--s3);
  }

  .review-category__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink-800);
  }

  .review-category__count {
    font-size: 13px;
    color: var(--ink-400);
    font-family: var(--font-mono);
  }

  /* Push the download-ZIP button to the trailing edge of the header row. */
  .review-category__header .btn {
    margin-left: auto;
  }

  /* ── Filter tabs ──
     Shared by the admin check-team review detail and the checker per-category
     review. */
  .review-tabs {
    display: flex;
    align-items: center;
    gap: var(--s1);
    border-bottom: 1px solid var(--ink-200);
    margin-bottom: var(--s4);
  }
  .review-tab {
    padding: var(--s2) var(--s3);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-500, var(--ink-400));
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .review-tab:hover { color: var(--ink-800); }
  .review-tab.is-active {
    color: var(--forest-700);
    border-bottom-color: var(--forest-700);
  }
  .review-tabs .table-count { margin-left: auto; }

  /* ── Review card grid ──
     The anonymized photo grid shared by the admin check-team review detail and
     the checker per-category review. */
  .review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--s4);
  }

  .review-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-md);
    overflow: hidden;
  }

  /* A whole card that is itself a link (the checker grid opens the reviewer). */
  .review-card--link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s;
  }
  .review-card--link:hover {
    border-color: var(--forest-700);
  }

  .review-card__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--ink-100);
  }
  .review-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .review-card__img.is-empty { background: var(--ink-100); }

  /* The checker's Doubt/Rejected verdict, overlaid on the thumbnail. */
  .review-card__thumb .badge {
    position: absolute;
    top: var(--s2);
    left: var(--s2);
  }

  .review-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    padding: var(--s3) var(--s4);
    flex: 1;
  }

  .review-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
  }
  .review-card__id {
    font-weight: 600;
    color: var(--ink-800);
    text-decoration: none;
  }
  .review-card__id:hover { color: var(--forest-700); }

  .review-card__title {
    margin: 0;
    font-size: 14px;
    color: var(--ink-700);
  }

  .review-card__files {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s2);
    margin-top: auto;
    padding-top: var(--s2);
  }
  .review-card__files-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-400);
  }
}
