/* Matjari option: the `bento` category style (4.7). Every selector starts with .m-catnav--v-bento (O1).
   Painted from tokens and the current layer alone, so it is whole under every Look and in both forms (4.0.2).

   A mosaic, like a department store's window wall: the first category a cell two by two, the rest
   around it, every name inside its photo on a shade (the link is a photo context, printed by PHP).
   PHP says how many cells there are, because a mosaic with a hole is a defect: n3 is the lead and two
   wide cells, n4 the lead, one wide and two single, n5 the lead and four, n9 the lead and eight on a
   six-column grid from 900 (under 900 it shows the first five). Cells are square under 900 and 4:3
   from it. The cells take the Look's card corners. Shop: the shared pill. */
.m-catnav--v-bento.m-catnav--grid .m-catnav__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--m-sp-2); }
.m-catnav--v-bento.m-catnav--home .m-catnav__item:first-child { grid-column: span 2; grid-row: span 2; }
.m-catnav--v-bento.m-catnav--n3 .m-catnav__item:nth-child(n+2), .m-catnav--v-bento.m-catnav--n4 .m-catnav__item:nth-child(2) { grid-column: span 2; }
.m-catnav--v-bento.m-catnav--n9 .m-catnav__item:nth-child(n+5):not(:last-child) { display: none; }
.m-catnav--v-bento.m-catnav--home .m-catnav__item .m-catnav__link { display: block; block-size: 100%; border-radius: var(--m-r-card); }
.m-catnav--v-bento.m-catnav--home .m-catnav__media { block-size: 100%; }
.m-catnav--v-bento.m-catnav--home .m-catnav__frame { position: relative; inline-size: 100%; block-size: 100%; aspect-ratio: 1 / 1; border-radius: var(--m-r-card); }
.m-catnav--v-bento.m-catnav--home .m-catnav__item:first-child .m-catnav__frame { aspect-ratio: auto; }
.m-catnav--v-bento.m-catnav--n3 .m-catnav__item:nth-child(n+2) .m-catnav__frame, .m-catnav--v-bento.m-catnav--n4 .m-catnav__item:nth-child(2) .m-catnav__frame { aspect-ratio: 2 / 1; }
.m-catnav--v-bento.m-catnav--home .m-catnav__img, .m-catnav--v-bento.m-catnav--home .m-catnav__letter { position: absolute; inset: 0; }
.m-catnav--v-bento.m-catnav--home .m-catnav__letter { background-color: var(--m-scrim); color: var(--m-c-ink-3); font-size: var(--m-fs-h2); }
/* The way to all of them: its four cells stand above the name, clear of a name in two lines. */
.m-catnav--v-bento .m-catnav__item--all svg { margin-block-end: 36%; }
/* The name is chrome.css's two clamped lines (.m-catnav--grid). Its room below is a clear border, not padding: the
   clamped box clips at its padding edge, so a third line never shows under the ellipsis. */
.m-catnav--v-bento.m-catnav--home .m-catnav__name { position: absolute; inset-block-end: 0; inset-inline: 0; z-index: 1; padding: var(--m-sp-6) var(--m-sp-2) 0; border-block-end: var(--m-sp-2) solid transparent; background-image: linear-gradient(to top, rgba(var(--m-scrim-rgb), .72) 40%, rgba(var(--m-scrim-rgb), 0)); border-radius: 0 0 var(--m-r-card) var(--m-r-card); font-weight: var(--m-fw-strong); text-align: start; }
.m-catnav--v-bento.m-catnav--home .m-catnav__item:first-child .m-catnav__name { padding: var(--m-sp-9) var(--m-sp-4) 0; border-block-end-width: var(--m-sp-3); font-family: var(--m-font-subhead); font-size: var(--m-fs-h3); font-weight: var(--m-fw-subhead); line-height: var(--m-lh-heading); }
.m-catnav--v-bento.m-catnav--home .m-catnav__link:focus-visible { outline-color: var(--m-focus); }
@media (min-width: 600px) {
	.m-catnav--v-bento.m-catnav--grid .m-catnav__list { gap: var(--m-sp-3); }
	.m-catnav--v-bento.m-catnav--home .m-catnav__name { font-size: var(--m-fs-ui); }
}
@media (min-width: 900px) {
	.m-catnav--v-bento.m-catnav--grid .m-catnav__list { gap: var(--m-sp-4); }
	.m-catnav--v-bento.m-catnav--grid.m-catnav--n9 .m-catnav__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.m-catnav--v-bento.m-catnav--n9 .m-catnav__item:nth-child(n+5):not(:last-child) { display: block; }
	.m-catnav--v-bento.m-catnav--home .m-catnav__frame { aspect-ratio: 4 / 3; }
	.m-catnav--v-bento.m-catnav--n3 .m-catnav__item:nth-child(n+2) .m-catnav__frame, .m-catnav--v-bento.m-catnav--n4 .m-catnav__item:nth-child(2) .m-catnav__frame { aspect-ratio: 8 / 3; }
}
@media (hover: hover) and (pointer: fine) {
	.m-catnav--v-bento.m-catnav--home .m-catnav__link:hover .m-catnav__name { text-decoration: underline; }
}
/* Where aspect-ratio is missing a cell takes its height from its padding (a wide cell too: a taller row, never a hole); the lead stretches over its rows (section 7). */
@supports not (aspect-ratio: 1 / 1) {
	.m-catnav--v-bento.m-catnav--home .m-catnav__frame { block-size: 0; padding-block-end: 100%; }
	.m-catnav--v-bento.m-catnav--home .m-catnav__item:first-child .m-catnav__frame { block-size: 100%; padding-block-end: 0; }
}
