/* ==========================================================================
   Political prisoner card
   Every size inside the card is in cqw (percent of the card's width), so the
   card looks identical as a small grid tile, a large single view, and a
   printed 4x6 card.
   ========================================================================== */

.pp-card {
	--pp-bg: #5ba762;
	--pp-ink: #262626;
	--pp-rule: rgba(0, 0, 0, .78);
	--pp-fit: 1;
	--pp-name-fit: 1;
	container-type: inline-size;
	position: relative;
	aspect-ratio: 2 / 3;
	width: 100%;
	background: var(--pp-bg);
	color: var(--pp-ink);
	overflow: hidden;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
	font-family: "PT Sans", "Helvetica Neue", Arial, sans-serif;
}

.pp-card--green  { --pp-bg: #5ba762; }
.pp-card--red    { --pp-bg: #e0624a; }
.pp-card--yellow { --pp-bg: #e4c24f; }
.pp-card--black  { --pp-bg: #2f3132; --pp-ink: #f4efe4; --pp-rule: rgba(244, 239, 228, .7); }

.pp-card__inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	padding: 7cqw 8.5cqw 5.5cqw;
}

.pp-card__name {
	margin: 0 0 3.4cqw;
	font-family: "Chakra Petch", "Montserrat", sans-serif;
	font-weight: 600;
	font-size: calc(9.6cqw * var(--pp-name-fit));
	line-height: .98;
	letter-spacing: -.01em;
	text-transform: none;
	color: var(--pp-ink);
}

.pp-card__alt {
	font-size: .52em;
	font-weight: 500;
	white-space: nowrap;
}

.pp-card__top {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4.2cqw;
	align-items: start;
}

.pp-card__facts {
	font-size: 2.35cqw;
	line-height: 1.32;
}

.pp-card__fact {
	margin: 0;
	padding: 1cqw 0 1.1cqw;
	border-bottom: .3cqw solid var(--pp-rule);
}

.pp-card__fact b,
.pp-card__address b,
.pp-card__update b {
	font-family: "Montserrat", sans-serif;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .02em;
	font-size: 1.06em;
	margin-right: .5em;
}

.pp-card__address,
.pp-card__update {
	padding-top: 1.4cqw;
}

.pp-card__address b,
.pp-card__update b {
	display: block;
}

.pp-card__lines {
	display: block;
}

.pp-card__address small {
	display: block;
	margin-top: 1cqw;
	font-size: .92em;
	line-height: 1.3;
}

.pp-card__update {
	margin-top: 1.4cqw;
	padding: 1.6cqw 2cqw;
	background: rgba(0, 0, 0, .1);
}

.pp-card__photo {
	margin: 0;
	aspect-ratio: 1 / 0.96;
	background: rgba(0, 0, 0, .14);
	overflow: hidden;
}

.pp-card__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 25%;
}

.pp-card__nophoto {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-family: "Chakra Petch", sans-serif;
	font-weight: 700;
	font-size: 14cqw;
	color: rgba(0, 0, 0, .25);
}

.pp-card--black .pp-card__nophoto { color: rgba(255, 255, 255, .25); }

.pp-card__bio {
	flex: 1 1 auto;
	min-height: 0;
	margin-top: 4.4cqw;
	columns: 2;
	column-gap: 4.4cqw;
	column-fill: auto;
	font-size: calc(2.62cqw * var(--pp-fit));
	line-height: 1.42;
	overflow: hidden;
}

.pp-card__bio p {
	margin: 0 0 .8em;
}

.pp-card__foot {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 3cqw;
	margin-top: 2.5cqw;
}

.pp-card__brand {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 1.7cqw;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .75;
	max-width: 36cqw;
}

.pp-card__cta {
	display: flex;
	align-items: flex-end;
	gap: 2.4cqw;
}

.pp-card__cta-text {
	font-family: "Montserrat", sans-serif;
	font-weight: 800;
	font-size: 2.2cqw;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: .03em;
	align-self: center;
}

.pp-card__arrow {
	width: 9cqw;
	height: 1.6cqw;
	align-self: center;
	color: var(--pp-ink);
}

.pp-card__qr {
	display: block;
	width: 15cqw;
	height: 15cqw;
	color: var(--pp-ink);
}

.pp-card__qr svg {
	display: block;
	width: 100%;
	height: 100%;
}

.pp-card__stamp {
	position: absolute;
	top: 25%;
	left: 69%;
	transform: translate(-50%, -50%) rotate(-18deg);
	padding: .5cqw 2.4cqw .8cqw;
	border: .8cqw solid currentColor;
	font-family: "Chakra Petch", sans-serif;
	font-weight: 700;
	font-size: 8.4cqw;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .02em;
	white-space: nowrap;
	color: #1d1d1d;
	opacity: .86;
	pointer-events: none;
	/* Worn, inked look */
	-webkit-mask-image: repeating-linear-gradient(-35deg, #000 0 3px, rgba(0, 0, 0, .78) 3px 5px);
	mask-image: repeating-linear-gradient(-35deg, #000 0 3px, rgba(0, 0, 0, .78) 3px 5px);
}

.pp-card--ancestor .pp-card__stamp {
	font-size: 6.4cqw;
}

.pp-card--black .pp-card__stamp {
	color: #f4efe4;
}

.pp-card [hidden] {
	display: none !important;
}

/* Grid tile: the whole card opens the single card view. */
.pp-card__open {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.pp-card--ctx-grid {
	box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 28px -14px rgba(0, 0, 0, .55);
	transition: transform .18s ease, box-shadow .18s ease;
}

.pp-card--ctx-grid:hover,
.pp-card--ctx-grid:focus-within {
	transform: translateY(-4px) rotate(-.4deg);
	box-shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 22px 40px -16px rgba(0, 0, 0, .6);
}

.pp-card--ctx-grid .pp-card__open:focus-visible {
	outline: 4px solid #fff;
	outline-offset: -8px;
}

/* ==========================================================================
   Printing
   Default page: one 4x6 card per page (use 4x6 cardstock, or let the printer
   scale to fit). With ?sheet=letter: two cards side by side on US Letter.
   ========================================================================== */

@page {
	size: 4in 6in;
	margin: 0;
}

@page cf-letter {
	size: letter landscape;
	margin: .4in;
}

@media print {
	html,
	body {
		background: #fff !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.cf-print-mode .cf-site-header,
	.cf-print-mode .cf-site-footer,
	.cf-print-mode .cf-print-toolbar,
	.cf-print-mode .cf-print-intro,
	#wpadminbar {
		display: none !important;
	}

	.cf-print-sheet {
		display: block !important;
		background: #fff !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	.cf-print-sheet .pp-card {
		width: 4in !important;
		height: 6in !important;
		aspect-ratio: auto;
		box-shadow: none !important;
		transform: none !important;
		break-inside: avoid;
		page-break-inside: avoid;
		break-after: page;
		page-break-after: always;
		margin: 0 !important;
	}

	.cf-print-sheet .pp-card:last-child {
		break-after: auto;
		page-break-after: auto;
	}

	.cf-sheet-letter .cf-print-sheet {
		page: cf-letter;
		display: grid !important;
		grid-template-columns: 4in 4in;
		justify-content: center;
		column-gap: .5in;
		row-gap: 0;
	}

	.cf-sheet-letter .cf-print-sheet .pp-card {
		break-after: auto;
		page-break-after: auto;
	}

	.cf-sheet-letter .cf-print-sheet .pp-card:nth-child(2n) {
		break-after: page;
		page-break-after: always;
	}
}
