/* events-strip.css: the home page events strip when it holds 1, 2 or 3 tiles instead
   of the theme's 4 (some events are only for some households, G8, G9). The tiles are
   removed from the DOM, never hidden, and these rules read the count from the DOM, so
   they work with or without JavaScript. The 4-tile layout is theme.css, unchanged. */

/* Two columns (600 to 999 px): a lone last tile sits centred under the others */
@media (min-width:600px) and (max-width:999px){
  .tiles > .tile:last-child:nth-child(odd){grid-column:1 / -1;border-left:0}
  .tiles > .tile:last-child:nth-child(odd):not(:only-child){margin-inline:auto;max-width:50%;border-top:0}
}

/* Wide: as many equal columns as there are tiles */
@media (min-width:1000px){
  .tiles:has(> .tile:only-child){grid-template-columns:1fr;max-width:420px}
  .tiles:has(> .tile:nth-child(2):last-child){grid-template-columns:repeat(2,1fr);max-width:760px}
  .tiles:has(> .tile:nth-child(3):last-child){grid-template-columns:repeat(3,1fr);max-width:960px}
}
