.access-team {
	--at-gap: 24px;
	font-family: inherit;
	width: 100%;
	/* Columns follow the width of the container the shortcode sits in, not the
	   screen: 4 / 3 / 2 / 1 columns. */
	container-type: inline-size;
}

/* Filter tabs */
.access-team__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 0 24px;
}

.access-team__tab {
	margin: 5px;
	padding: 8px 16px;
	font: inherit;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
	color: #777;
	background: transparent;
	border: 1px solid #e6e6e6;
	border-radius: 0;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	transition: color 0.2s, background-color 0.2s;
}

.access-team__tab:hover,
.access-team__tab:focus-visible {
	color: #111;
}

.access-team__tab.is-active {
	color: #111;
	background: #eee;
	border-color: #eee;
}

/* Grid */
.access-team__grid {
	--at-cols: 1;
	display: grid;
	grid-template-columns: repeat(var(--at-cols), minmax(0, 1fr));
	gap: var(--at-gap);
}

.access-team__member {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f1f1f1;
}

.access-team__member[hidden] {
	display: none;
}

.access-team__photo,
.access-team__photo img {
	display: block;
	width: 100%;
	height: 100%;
}

.access-team__photo img {
	object-fit: cover;
	margin: 0;
	max-width: none;
}

/* Name/position/email sit over a dark fade; email slides up on hover. */
.access-team__info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -20px;
	padding: 8px 24px 28px;
	text-align: center;
	color: #fff;
	background: linear-gradient(rgba(34, 34, 34, 0), #222);
	transition: transform 0.25s ease;
}

.access-team__member:hover .access-team__info,
.access-team__member:focus-within .access-team__info {
	transform: translateY(-9px);
}

.access-team__name {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
	text-transform: none;
	letter-spacing: normal;
}

.access-team__position {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	color: #fff;
}

.access-team__email {
	display: block;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	overflow-wrap: anywhere;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.access-team__member:hover .access-team__email,
.access-team__member:focus-within .access-team__email {
	opacity: 1;
}

.access-team__email:hover {
	color: #fff;
}

/* Touch devices can't hover: keep the email visible. */
@media (hover: none) {
	.access-team__email {
		opacity: 1;
	}
}

@container (min-width: 600px) {
	.access-team__grid { --at-cols: 2; }
}

@container (min-width: 900px) {
	.access-team__grid { --at-cols: 3; }
}

@container (min-width: 1200px) {
	.access-team__grid { --at-cols: 4; }
}

@media (max-width: 560px) {
	/* Two equal-width tabs per row (5px margin each side) instead of a ragged wrap; an odd last tab spans the row. */
	.access-team__tab {
		flex: 1 1 calc(50% - 10px);
		font-size: 16px;
		padding: 8px 10px;
		text-align: center;
	}
}
