/**
 * styles/resources.css — Resource Library surface (#/resources) (P09-2).
 * The read-only, VERSIONED Documents & Templates mirror. Phone-first (single
 * column ≤560px, no horizontal scroll); tokens only, no raw hex; reuses the frozen
 * .card/.chip/.badge/.btn hooks + the P09-1 .academy-controls/.course-grid layout.
 */

/* Resource Library is a member-facing surface: lift the CTAs to the 44px touch
   bar (download, version-history, download-this-version, publish, chips), the same
   scoped pattern the sibling member surfaces use. Never touches the base .btn. */
.view-resources .btn, .view-resources .chip { min-height: 44px; }

/* ── mirrored · read-only integration badge ─────────────────────────────────*/
.resource-mirror {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.resource-mirror__note { color: var(--muted); font-size: 0.9em; }

/* ── grid slot: a card + its collapsible version panel ──────────────────────*/
.resource-slot { display: grid; gap: var(--sp-2); align-content: start; }

.resource-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.resource-card__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-2);
}
.resource-card__cat { align-self: flex-start; }
.resource-card__title { margin: 0; }
.resource-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25em; margin: 0; }
.resource-card__actions { flex-wrap: wrap; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); }

/* ── version-history panel ──────────────────────────────────────────────────*/
.resource-versions { padding: var(--sp-3); display: grid; gap: var(--sp-3); }
.resource-versions__title {
  margin: 0; font-size: 1em; display: flex; align-items: center; gap: 0.4em;
}
.resource-versions__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.resource-versions__item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3); display: grid; gap: var(--sp-1);
}
.resource-versions__item.is-current { border-color: var(--accent); background: var(--surface-2); }
.resource-versions__row {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2);
}
.resource-versions__meta { color: var(--muted); font-size: 0.85em; }
.resource-versions__note { margin: 0; font-size: 0.92em; line-height: 1.5; }
.resource-versions__dl { justify-self: start; }

/* ── admin publish affordance (role-gated in the view) ──────────────────────*/
.resource-publish {
  display: grid; gap: var(--sp-2);
  padding-top: var(--sp-3); border-top: 1px solid var(--line);
}
.resource-publish__label {
  display: flex; align-items: center; gap: 0.4em; font-weight: 600; font-size: 0.95em;
}
.resource-publish__note { width: 100%; resize: vertical; min-height: 44px; }
.resource-publish .btn { justify-self: start; }
