/* ============================================================================
   The tile that fills a short last row of a three across card grid.
   Its own file because two page bases need it: site_base.html (the course
   catalogue, subject pages, self-paced list) and public_base.html (About,
   Team, Services, the blog and the digest page). One copy, so they cannot
   drift. Markup: applications/_grid_fill_tile.html.
   ========================================================================= */
/* ─── The tile that fills a short last row of .dais-course-grid ────────────
   11 November 2026. Shared by the catalogue, the subject pages and the
   self-paced list. Hidden by default; each layout shows it only when its own
   last row is short, spanning what that row leaves. */
.grid-fill {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}
/* The tile's photograph is offered as WebP first, so the img is wrapped in a
   picture. These two rules keep the rule below applying to the img rather than
   to the wrapper, and stop each source becoming a box of its own. The same pair
   is in site.css, which explains them; they are repeated here because the
   catalogue and the subject pages load this file and not that one, and the
   first measurement after the wrapping showed exactly that: picture computed
   to block here and the photograph stopped being the flex item. */
picture { display: contents; }
picture > source { display: none; }

/* Basis 0, not auto, as .enrol-fill img on the home page: with auto the basis
   became the photograph's own height when the file arrived, and the tile grew
   as the page was read (two of seven tiles on /courses/ at 1400px, 19 November
   2026, by 15 and 37 pixels). With 0 the row decides, before and after the load,
   and the width and height attributes on the img no longer decide its size. */
.grid-fill img { display: block; width: 100%; flex: 1 1 0; min-height: 8rem; max-height: 15rem; object-fit: cover; }
.grid-fill-text { padding: 1.1rem 1.25rem 1.25rem; }
.grid-fill-title { margin: 0 0 0.35rem; font-size: 1.0625rem; font-weight: 800; color: var(--text-primary); }
.grid-fill-body { margin: 0 0 0.9rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-primary); }
.grid-fill-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.grid-fill-ai {
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  min-height: 44px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
.grid-fill-ai:hover { background: var(--accent-hover); color: var(--on-accent); }
.grid-fill-ai:focus-visible, .grid-fill-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.grid-fill-link { font-size: 0.9375rem; font-weight: 700; color: var(--accent); }
@media (min-width: 901px) {
  .grid-fill-3-1 { display: flex; grid-column: span 1; }
  .grid-fill-3-2 { display: flex; grid-column: span 2; }
}
@media (min-width: 581px) and (max-width: 900px) {
  .grid-fill-2-1 { display: flex; grid-column: span 1; }
}

