/* StaffV2 — module-specific styles. Radius, shadow, 1:1 photo, dark plate,
   track overflow and pager all come from tokens/utilities. */

/* ESCAPE HATCH (Contract §C) */

.stf.v2 {

	/* From 700px up the track stays inside .mn_wd so only whole cards are visible
	   (no half-cut card at the edge). Phones keep the bleed as a scroll cue. */
	@media screen and (width >= 700px) {

		&.s-active .grd.off-scr {
			margin-inline: 0;

			&::before,
			&::after {
				display: none;
			}
		}

	}

	/* Below 1280px the layout is just the .flx.f_clm.gp_sp source order:
	   header, card track, pager, button. Design 13605:19071 puts the pager and
	   button up on the header row with the track spanning beneath, so desktop is
	   a two-row area template over the same DOM. */
	@media screen and (width >= 1280px) {

		.stf-v2-lyt {
			display: grid;
			grid-template-columns: 1fr auto auto;
			grid-template-areas:
				"header nav  button"
				"list   list list";
			align-items: center;
			/* Design: 24px between pager and button. No exact token at this step
			   (--grd-sp is 32px, --grd-sp-sml 16px), so derive it. Row gap stays gp_sp. */
			column-gap: calc(var(--grd-sp) * 0.75);
		}

		/* No blanket `> * { margin: 0 }` reset here: .off-scr bleeds the track past
		   the .mn_wd box with a negative margin-inline, and a reset at this
		   specificity would out-specify it and kill the off-edge card. */
		.stf-v2-hdr {
			grid-area: header;
		}

		.stf-v2-nav {
			grid-area: nav;
		}

		.stf-v2-btn {
			grid-area: button;
		}

		.stf-v2-lst {
			grid-area: list;
		}

		/* Four cards fill the .mn_wd box exactly; the rest scroll in whole. */
		.grd.off-scr {
			--itm-w: calc((clamp(var(--mn_min), var(--mn-w), var(--mn_max)) / 4) - (var(--grd-sp-dyn) * 0.75));
		}

	}

}
