/**
 * People (the Team page, docs/team.md). A grid of person cards: below
 * 640px one column with the portrait beside the text, from 640px two
 * columns with the portrait above it, from 1024px three or four.
 *
 * A card is the style guide's quiet card (Cards: one item in a list):
 * white, a hairline at 60%, 24px of padding, full height in its cell, the
 * border turning red at 40% under a shadow on hover. The cards of a row are
 * equally tall; email, LinkedIn and the CV sit at the foot, under a
 * hairline, so they line up across the row. The CV opens in a dialog
 * (people.js), without the script in the card.
 *
 * The name is the card heading (20px bold); a degree after it is set in
 * body type at 14px in the muted foreground, the Trello card's "PhD
 * without the enormous size of the name". The role follows in the dark
 * red at 14px medium, the position and organization in the muted
 * foreground. Icons are the guide's: mail, linkedin, maximize-2 (opens at
 * full size), x.
 */

.sba-c .sba-c-people-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.sba-c .sba-c-person {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	height: 100%;
	padding: 20px;
	border: 1px solid hsl(220 13% 90% / 0.6);
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
	transition:
		border-color var(--sba-duration-hover) ease,
		box-shadow var(--sba-duration-hover) ease;
}

.sba-c .sba-c-people-standard .sba-c-person:hover {
	border-color: hsl(var(--sba-red-hsl) / 0.4);
	box-shadow: 0 10px 15px -3px hsl(var(--sba-charcoal-hsl) / 0.1);
}

.sba-c .sba-c-person :is(h2, h3, p),
.sba-c .sba-c-person-body > *,
.sba-c .sba-c-person-info > * {
	margin-top: 0;
	margin-bottom: 0;
}

.sba-c .sba-c-person-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-self: stretch;
	min-width: 0;
}

.sba-c .sba-c-person-portrait {
	display: block;
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	border-radius: 9999px;
	background-color: var(--sba-muted);
	object-fit: cover;
}

.sba-c .sba-c-person-portrait-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sba-slate-light);
	font-size: 28px;
}

.sba-c .sba-c-person-name {
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 18px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 24px;
}

.sba-c .sba-c-person-degree {
	color: var(--sba-slate);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	white-space: nowrap;
}

.sba-c .sba-c-person-cross {
	color: var(--sba-slate);
	font-weight: 400;
}

.sba-c .sba-c-person-info > .sba-c-person-role {
	margin-top: 4px;
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.sba-c .sba-c-person-info > .sba-c-person-text {
	margin-top: 4px;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 20px;
}

.sba-c .sba-c-person-text :is(p, li) {
	margin: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.sba-c .sba-c-person-text > * + * {
	margin-top: 4px;
}

/* The foot: the actions in a row under a hairline, pushed to the card's
   bottom edge, at least 16px under the text. */
.sba-c .sba-c-person-body > .sba-c-person-info:not(:last-child) {
	padding-bottom: 16px;
}

.sba-c .sba-c-person-body > .sba-c-person-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px 20px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--sba-border);
}

.sba-c .sba-c-person-action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--sba-charcoal);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-decoration: none;
	list-style: none;
	cursor: pointer;
	transition: color var(--sba-duration-hover) ease;
}

.sba-c .sba-c-person-action::-webkit-details-marker {
	display: none;
}

.sba-c .sba-c-person-action:hover {
	color: var(--sba-red-dark);
}

.sba-c .sba-c-person-action:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

.sba-c .sba-c-person-action .sba-i {
	color: var(--sba-red-dark);
	font-size: 16px;
	line-height: 1;
}

/* Without the script the CV opens in the card, across the foot's width. */
.sba-c .sba-c-person-more[open] {
	flex-basis: 100%;
}

.sba-c .sba-c-person-more-text {
	padding-top: 8px;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 1.6;
}

.sba-c :is(.sba-c-person-more-text, .sba-c-person-dialog-text) :is(p, li) {
	margin: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.sba-c :is(.sba-c-person-more-text, .sba-c-person-dialog-text) > * + * {
	margin-top: 12px;
}

.sba-c :is(.sba-c-person-more-text, .sba-c-person-dialog-text) ul {
	padding-left: 18px;
	list-style: disc;
}

.sba-c :is(.sba-c-person-more-text, .sba-c-person-dialog-text) li + li {
	margin-top: 4px;
}

/* The dialog: white, the card's corners, 640px at most, the head (the
   portrait beside the label, name, role and organization) over the text
   at body size. */
.sba-c-person-dialog {
	width: min(92vw, 640px);
	max-width: none;
	max-height: 88vh;
	padding: 32px 24px 28px;
	overflow-y: auto;
	border: 0;
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
	color: var(--sba-charcoal);
}

.sba-c-person-dialog::backdrop {
	background-color: hsl(var(--sba-charcoal-hsl) / 0.7);
}

.sba-c .sba-c-person-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: var(--sba-charcoal);
	font-size: 20px;
	cursor: pointer;
	transition: background-color var(--sba-duration-hover) ease;
}

.sba-c .sba-c-person-close:hover {
	background-color: var(--sba-muted);
}

.sba-c .sba-c-person-close:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

.sba-c .sba-c-person-dialog-head {
	display: flex;
	align-items: center;
	gap: 20px;
	padding-right: 32px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--sba-border);
}

.sba-c .sba-c-person-dialog-head .sba-c-person-portrait {
	width: 80px;
	height: 80px;
}

.sba-c .sba-c-person-dialog-head .sba-c-person-dialog-label {
	margin-bottom: 4px;
	color: var(--sba-red-dark);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	line-height: 16px;
	text-transform: uppercase;
}

.sba-c .sba-c-person-dialog-head .sba-c-person-name {
	font-size: 22px;
	line-height: 28px;
}

.sba-c .sba-c-person-dialog-text {
	padding-top: 20px;
	color: var(--sba-slate);
	font-size: 16px;
	line-height: 1.625;
}

/* Compact: the honorary members. No card, a 56px portrait beside the
   text at every width. */
.sba-c .sba-c-people-compact {
	gap: 24px;
}

.sba-c .sba-c-people-compact .sba-c-person {
	height: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.sba-c .sba-c-people-compact .sba-c-person-portrait {
	width: 56px;
	height: 56px;
}

.sba-c .sba-c-people-compact .sba-c-person-name {
	font-size: 16px;
	line-height: 22px;
}

.sba-c .sba-c-people-compact .sba-c-person-body > .sba-c-person-info:not(:last-child) {
	padding-bottom: 8px;
}

.sba-c .sba-c-people-compact .sba-c-person-body > .sba-c-person-foot {
	padding-top: 0;
	border-top: 0;
}

.sba-c .sba-c-people-note {
	max-width: 48rem;
	margin-top: 32px;
	font-size: 16px;
	line-height: 1.625;
}

@media (min-width: 640px) {
	.sba-c .sba-c-people-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.sba-c .sba-c-people-standard .sba-c-person {
		flex-direction: column;
		gap: 20px;
		padding: 24px;
	}

	.sba-c .sba-c-people-standard .sba-c-person-portrait {
		width: 96px;
		height: 96px;
	}

	.sba-c .sba-c-people-standard .sba-c-person-name {
		font-size: 20px;
		line-height: 28px;
	}

	.sba-c-person-dialog {
		padding: 40px;
	}
}

@media (min-width: 1024px) {
	.sba-c .sba-c-people-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sba-c .sba-c-people-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.sba-c .sba-c-people-compact {
		gap: 32px 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sba-c .sba-c-person,
	.sba-c .sba-c-person-action {
		transition: none;
	}
}
