/* v339 TL — the catalogue as one grid across the content width (additive to teacher-library.v335.css).
   Phones: one card per row, natural order. Tablets: two across. Desktop (≥1100px): three across.
   Each card: direction label, course title, short description, then chips and «Open course» at the bottom,
   so buttons line up across a row. Text keeps a readable measure; buttons keep their own width. */
.tl-catalog{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;margin:2rem 0 0;padding:0;list-style:none}
.tl-card{display:flex;min-width:0}
.tl-card>article{display:flex;flex-direction:column;gap:.55rem;width:100%;padding:1.2rem 1.25rem 1.25rem;border:1px solid var(--tl-line);border-radius:18px;background:var(--tl-card)}
.tl-card__dir{margin:0;font-family:var(--font-mono,monospace);font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--tl-teal)}
.tl-card__title{font-family:var(--font-display);font-weight:500;font-size:clamp(1.3rem,2.2vw,1.5rem);line-height:1.15;margin:0;text-wrap:balance}
.tl-card__text{margin:0;color:var(--tl-muted);line-height:1.55;max-width:60ch}
.tl-card__foot{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem;margin-top:auto;padding-top:.6rem}
.tl-card__foot .btn{min-height:44px}
@media (min-width:700px){.tl-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* tablets: an odd last card takes the whole row, so no half-empty row is left */
@media (min-width:700px) and (max-width:1099px){.tl-catalog>.tl-card:last-child:nth-child(odd){grid-column:1/-1}}
@media (min-width:1100px){.tl-catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* two directions only (before the Contraindications catalogue entry is published): two wide cards, no empty third column */
@media (min-width:1100px){.tl-catalog[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.tl-catalog[data-count="1"]{grid-template-columns:minmax(0,1fr)}}
@media (max-width:420px){.tl-card__foot{align-items:stretch}.tl-card__foot .btn{width:100%;justify-content:center}}
