/**
 * The completion certificate — paper, gold rules, one crimson seal.
 * Prints as A4 landscape with the site chrome out of the way.
 */

.bz-cert {
	margin: 8px 0 0;
}

.bz-cert__sheet {
	position: relative;
	padding: clamp(28px, 5vw, 58px) clamp(22px, 5vw, 64px) clamp(24px, 4vw, 44px);
	background: #fbf5ea;
	background-image:
		radial-gradient(circle at 12% 8%, rgba(192, 138, 46, .10), transparent 42%),
		radial-gradient(circle at 88% 92%, rgba(179, 39, 30, .08), transparent 46%);
	border: 1px solid rgba(23, 18, 12, .22);
	border-radius: 4px;
	box-shadow: 0 26px 60px -34px rgba(23, 18, 12, .6);
	text-align: center;
	color: #17120c;
	overflow: hidden;
}

/* Double gold rule, drawn with one element so it prints reliably. */
.bz-cert__sheet::before {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid rgba(192, 138, 46, .72);
	border-radius: 2px;
	pointer-events: none;
}

.bz-cert__sheet::after {
	content: "";
	position: absolute;
	inset: 18px;
	border: 3px double rgba(192, 138, 46, .38);
	border-radius: 1px;
	pointer-events: none;
}

.bz-cert__corner {
	position: absolute;
	width: 26px;
	height: 26px;
	border: 2px solid rgba(179, 39, 30, .55);
	z-index: 2;
}

.bz-cert__corner--tl { top: 26px; left: 26px; border-right: 0; border-bottom: 0; }
.bz-cert__corner--tr { top: 26px; right: 26px; border-left: 0; border-bottom: 0; }
.bz-cert__corner--bl { bottom: 26px; left: 26px; border-right: 0; border-top: 0; }
.bz-cert__corner--br { bottom: 26px; right: 26px; border-left: 0; border-top: 0; }

.bz-cert__brand {
	margin: 0 0 22px;
	font-family: Anton, Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
	font-weight: 400;
	font-size: clamp(1.1rem, 2.2vw, 1.5rem);
	letter-spacing: .16em;
	text-transform: uppercase;
}

.bz-cert__brand span {
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: #b3271e;
	font-size: .92em;
}

.bz-cert__kind {
	margin: 0 0 26px;
	font-size: .74rem;
	letter-spacing: .42em;
	text-transform: uppercase;
	color: rgba(23, 18, 12, .55);
}

.bz-cert__given {
	margin: 0 0 6px;
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-size: 1.02rem;
	color: rgba(23, 18, 12, .6);
}

.bz-cert__name {
	margin: 0 0 18px;
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(2rem, 5.4vw, 3.6rem);
	line-height: 1.05;
	letter-spacing: -.01em;
}

.bz-cert__text {
	margin: 0 auto 26px;
	max-width: 46ch;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(.96rem, 1.5vw, 1.1rem);
	line-height: 1.62;
	color: rgba(23, 18, 12, .82);
}

.bz-cert__text em {
	font-style: italic;
	color: #17120c;
}

.bz-cert__facts {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 26px;
	margin: 0 0 30px;
	font-size: .76rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(23, 18, 12, .6);
}

.bz-cert__facts b {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-style: normal;
	font-weight: 700;
	font-size: 1.22rem;
	letter-spacing: 0;
	text-transform: none;
	color: #17120c;
}

.bz-cert__foot {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	margin-top: 10px;
	padding-top: 18px;
	border-top: 1px solid rgba(192, 138, 46, .3);
}

.bz-cert__seal {
	color: #b3271e;
	opacity: .92;
	line-height: 0;
}

.bz-cert__sign {
	flex: 1 1 auto;
	text-align: left;
	padding-left: 6px;
}

.bz-cert__sign-line {
	display: block;
	width: min(220px, 60%);
	height: 1px;
	background: rgba(23, 18, 12, .45);
	margin-bottom: 6px;
}

.bz-cert__sign-label {
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-size: .9rem;
	color: rgba(23, 18, 12, .66);
}

.bz-cert__code {
	text-align: right;
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(23, 18, 12, .5);
	line-height: 1.7;
}

.bz-cert__code b {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .84rem;
	letter-spacing: .08em;
	color: #17120c;
}

/* -------------------------------------------------------------------------
   Actions under the sheet
   ------------------------------------------------------------------------- */
.bz-cert__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
}

.bz-cert__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: inherit;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 12px 22px;
	border-radius: 999px;
	border: 1px solid #b3271e;
	background: #b3271e;
	color: #f7efe2;
	text-decoration: none;
	cursor: pointer;
}

.bz-cert__btn:hover { background: #8f1e17; border-color: #8f1e17; }

.bz-cert__btn--ghost {
	background: transparent;
	color: #17120c;
	border-color: rgba(23, 18, 12, .28);
}

.bz-cert__btn--ghost:hover { background: rgba(23, 18, 12, .06); border-color: rgba(23, 18, 12, .5); }

.bz-cert__actions .bz-share {
	flex: 1 1 260px;
	margin: 0;
}

.bz-cert__verify-line {
	margin: 16px 0 0;
	font-size: .8rem;
	color: rgba(23, 18, 12, .55);
}

/* -------------------------------------------------------------------------
   Not finished yet / signed out
   ------------------------------------------------------------------------- */
.bz-cert-pending {
	border: 1px solid rgba(23, 18, 12, .16);
	border-radius: 14px;
	background: #fbf5ea;
	padding: clamp(20px, 4vw, 34px);
}

.bz-cert-pending__kicker {
	margin: 0 0 6px;
	font-size: .68rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #b3271e;
	font-weight: 700;
}

.bz-cert-pending__title {
	margin: 0 0 10px;
	font-size: clamp(1.3rem, 3vw, 1.9rem);
	line-height: 1.16;
	letter-spacing: -.01em;
}

.bz-cert-pending__text {
	margin: 0 0 16px;
	max-width: 58ch;
	color: rgba(23, 18, 12, .72);
	line-height: 1.6;
}

.bz-cert-pending__bar {
	height: 8px;
	border-radius: 999px;
	background: rgba(23, 18, 12, .1);
	overflow: hidden;
	margin: 18px 0 10px;
}

.bz-cert-pending__bar span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #b3271e, #c08a2e);
	border-radius: 999px;
}

.bz-cert-pending__count {
	margin: 0 0 18px;
	font-size: .78rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(23, 18, 12, .55);
}

.bz-cert-pending__label {
	margin: 0 0 8px;
	font-size: .72rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: rgba(23, 18, 12, .5);
}

.bz-cert-pending__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.bz-cert-pending__list li {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	padding: 9px 12px;
	border-radius: 8px;
	background: #fff;
	border: 1px solid rgba(23, 18, 12, .1);
}

.bz-cert-pending__list a {
	color: #17120c;
	font-weight: 600;
	text-decoration: none;
	text-underline-offset: 3px;
}

.bz-cert-pending__list a:hover { text-decoration: underline; }

.bz-cert-pending__list span {
	font-size: .76rem;
	color: rgba(23, 18, 12, .5);
}

.bz-cert-pending__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 18px;
}

.bz-cert-pending__link {
	color: #1e4c58;
	font-size: .86rem;
	text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Verification note
   ------------------------------------------------------------------------- */
.bz-cert-verify {
	border-radius: 12px;
	padding: 14px 16px;
	margin: 0 0 20px;
	border: 1px solid rgba(30, 76, 88, .3);
	background: rgba(30, 76, 88, .06);
}

.bz-cert-verify.is-bad {
	border-color: rgba(179, 39, 30, .34);
	background: rgba(179, 39, 30, .06);
}

.bz-cert-verify__title {
	margin: 0 0 4px;
	font-weight: 700;
	font-size: .9rem;
}

.bz-cert-verify__text {
	margin: 0;
	font-size: .86rem;
	color: rgba(23, 18, 12, .72);
}

/* -------------------------------------------------------------------------
   The nudge on a finished comic page
   ------------------------------------------------------------------------- */
.bz-cert-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 18px 0 0;
	padding: 14px 18px;
	border-radius: 12px;
	border: 1px dashed rgba(192, 138, 46, .6);
	background: rgba(192, 138, 46, .08);
}

.bz-cert-cta__text {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.02rem;
}

.bz-cert-cta__buttons {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.bz-cert-cta__btn--ghost {
	background: transparent;
	color: #17120c;
	border: 1px solid rgba(23, 18, 12, .3);
}

.bz-cert-cta__btn {
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 10px 18px;
	border-radius: 999px;
	background: #17120c;
	color: #f7efe2;
	text-decoration: none;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Print: A4 landscape, only the certificate on the paper
   ------------------------------------------------------------------------- */
@page {
	size: A4 landscape;
	margin: 8mm;
}

@media print {
	body * {
		visibility: hidden !important;
	}

	.bz-cert,
	.bz-cert * {
		visibility: visible !important;
	}

	.bz-cert {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		margin: 0;
	}

	.bz-cert__sheet {
		box-shadow: none;
		border: 1px solid rgba(23, 18, 12, .4);
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.bz-cert__actions,
	.bz-cert__verify-line,
	.bz-share,
	.site-header,
	.site-footer,
	.bz-topbar,
	.entry-header {
		display: none !important;
	}
}

@media (max-width: 640px) {
	.bz-cert__foot {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 14px;
	}

	.bz-cert__sign { text-align: center; padding: 0; }
	.bz-cert__sign-line { margin: 0 auto 6px; }
	.bz-cert__code { text-align: center; }
}

/* Where this reader stands in the queue of people who finished. */
.bz-cert__reader {
	margin: 10px 0 0;
	font-family: var(--bz-cert-ui, system-ui, sans-serif);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bz-cert-muted, #6b6154);
}

.bz-cert__reader::before,
.bz-cert__reader::after {
	content: "·";
	margin: 0 8px;
	opacity: 0.5;
}
