/* Cat House Meow — Article Paywall v2
 * Black + white like cathousemeow.com, one accent (set in Settings).
 * --chm-fade is set by paywall.js to the article's real background.
 */
.chm-paywall {
	--chm-ink: #000;
	--chm-paper: #fff;
	--chm-accent: #ff4f9a;
	--chm-fade: #fff;
	--chm-muted: #6b6b6b;
	--chm-line: 2px;

	position: relative;
	margin: 2.5rem 0 3.5rem;
	color: inherit;
	font-family: inherit;
	line-height: 1.5;
	clear: both;
}
.chm-paywall *,
.chm-paywall *::before,
.chm-paywall *::after { box-sizing: border-box; }

/* Fade over the last lines of the teaser */
.chm-paywall-teaser { position: relative; }
.chm-paywall-fade {
	height: 7rem;
	margin-top: -7rem;
	position: relative;
	pointer-events: none;
	background: linear-gradient(to bottom, transparent, var(--chm-fade) 85%);
}

/* Members Only bar with a cat peeking over it */
.chm-paywall-banner {
	position: relative;
	background: var(--chm-ink);
	color: var(--chm-paper);
	text-align: center;
	padding: 1rem 1rem 1.05rem;
}
.chm-paywall.has-cat .chm-paywall-banner { margin-top: 3.25rem; }
.chm-paywall-banner h2 {
	margin: 0 !important;
	padding: 0 !important;
	color: inherit !important;
	font-family: inherit;
	font-size: clamp(1.15rem, 2.4vw, 1.45rem) !important;
	font-weight: 800;
	letter-spacing: .02em;
	line-height: 1.2;
	border: 0 !important;
	background: none !important;
}
.chm-peek {
	position: absolute;
	left: 50%;
	bottom: calc(100% - 2px);
	width: 96px;
	height: auto;
	transform: translateX(-50%);
	overflow: visible;
}
.chm-peek-head { fill: var(--chm-ink); }
.chm-peek-eye { fill: var(--chm-accent); }
.chm-peek-pupil { fill: var(--chm-ink); }
.chm-peek-nose { fill: var(--chm-accent); }
.chm-peek-eyes {
	transform-box: fill-box;
	transform-origin: center;
	animation: chm-blink 7s infinite 2s;
}
@keyframes chm-blink {
	0%, 96%, 100% { transform: scaleY(1); }
	98% { transform: scaleY(.1); }
}

.chm-paywall-subhead {
	text-align: center;
	max-width: 34em;
	margin: 1.25rem auto 2.75rem;
	font-size: 1.05rem;
}

/* Plans: each card is a cat head */
.chm-paywall-plans {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.75rem 1.25rem;
	max-width: 980px;
	margin: 0 auto;
	align-items: stretch;
}
.chm-paywall-plans.chm-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
.chm-paywall-plans.chm-count-1 { grid-template-columns: minmax(0, 1fr); max-width: 360px; }

.chm-plan {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	text-align: center;
	margin-top: 1.6rem;
	padding: 2rem 1.35rem 1.35rem;
	color: var(--chm-ink);
	--chm-muted: #6b6b6b;
}
/* The face. Drawn on a layer so the ears can tuck in behind it. */
.chm-plan::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--chm-paper);
	border: var(--chm-line) solid var(--chm-ink);
	/* Round, head-like crown; squarer chin */
	border-radius: 48% 48% 22px 22px / 64px 64px 22px 22px;
}
.chm-ear {
	position: absolute;
	z-index: -2;
	top: -24px;
	width: 44px;
	height: 44px;
	overflow: visible;
}
.chm-ear--left { left: 13%; }
.chm-ear--right { right: 13%; }
.chm-ear-outer {
	fill: var(--chm-paper);
	stroke: var(--chm-ink);
	stroke-width: 2;
	stroke-linejoin: round;
}
.chm-ear-inner { fill: var(--chm-accent); opacity: .85; }

.chm-plan h3 {
	margin: 0 0 .5rem !important;
	color: inherit !important;
	font-family: inherit;
	font-size: 1.2rem !important;
	font-weight: 800;
	line-height: 1.2;
}
.chm-price-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
}
.chm-whiskers {
	width: 34px;
	height: 20px;
	flex: none;
}
.chm-whiskers path {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
	stroke-linecap: round;
	opacity: .55;
}
.chm-price {
	margin: 0 !important;
	font-size: 2.1rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.01em;
	font-variant-numeric: tabular-nums;
}
.chm-period {
	margin: .2rem 0 1.1rem !important;
	color: var(--chm-muted);
	font-size: .88rem;
}
.chm-plan ul {
	list-style: none !important;
	margin: 0 0 1.35rem !important;
	padding: 0 !important;
	text-align: left;
	font-size: .92rem;
	line-height: 1.45;
	flex: 1;
}
.chm-plan li {
	position: relative;
	margin: 0 0 .55rem !important;
	padding: 0 0 0 1.6rem !important;
	list-style: none !important;
}
.chm-plan li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .2em;
	width: 1em;
	height: 1em;
	background: var(--chm-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='5' cy='10' rx='2.4' ry='3'/%3E%3Cellipse cx='9.5' cy='5.5' rx='2.4' ry='3.1'/%3E%3Cellipse cx='14.5' cy='5.5' rx='2.4' ry='3.1'/%3E%3Cellipse cx='19' cy='10' rx='2.4' ry='3'/%3E%3Cpath d='M12 11c-3.5 0-7 4.6-7 7.6 0 2 1.6 2.9 3.4 2.9 1.4 0 2.4-.7 3.6-.7s2.2.7 3.6.7c1.8 0 3.4-.9 3.4-2.9 0-3-3.5-7.6-7-7.6z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='5' cy='10' rx='2.4' ry='3'/%3E%3Cellipse cx='9.5' cy='5.5' rx='2.4' ry='3.1'/%3E%3Cellipse cx='14.5' cy='5.5' rx='2.4' ry='3.1'/%3E%3Cellipse cx='19' cy='10' rx='2.4' ry='3'/%3E%3Cpath d='M12 11c-3.5 0-7 4.6-7 7.6 0 2 1.6 2.9 3.4 2.9 1.4 0 2.4-.7 3.6-.7s2.2.7 3.6.7c1.8 0 3.4-.9 3.4-2.9 0-3-3.5-7.6-7-7.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.chm-cta {
	display: block;
	margin-top: auto;
	padding: .8rem 1rem;
	text-align: center;
	background: var(--chm-ink);
	color: var(--chm-paper) !important;
	text-decoration: none !important;
	font-weight: 700;
	border: var(--chm-line) solid var(--chm-ink);
	border-radius: 999px;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chm-cta:hover {
	background: var(--chm-accent);
	border-color: var(--chm-accent);
	color: var(--chm-ink) !important;
}
.chm-cta:focus-visible,
.chm-paywall-login a:focus-visible {
	outline: 3px solid var(--chm-accent);
	outline-offset: 3px;
}

/* Highlighted plan: the black cat */
.chm-plan.is-featured { color: var(--chm-paper); }
.chm-plan.is-featured::before { background: var(--chm-ink); }
.chm-plan.is-featured .chm-ear-outer { fill: var(--chm-ink); }
.chm-plan.is-featured .chm-period { color: rgba(255, 255, 255, .7); }
.chm-plan.is-featured .chm-cta {
	background: var(--chm-accent);
	border-color: var(--chm-accent);
	color: var(--chm-ink) !important;
}
.chm-plan.is-featured .chm-cta:hover {
	background: var(--chm-paper);
	border-color: var(--chm-paper);
}
.chm-badge {
	position: absolute;
	top: -.85rem;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	background: var(--chm-accent);
	color: var(--chm-ink);
	font-size: .78rem;
	font-weight: 800;
	padding: .3rem .8rem;
	border-radius: 999px;
	border: var(--chm-line) solid var(--chm-ink);
}

.chm-paywall-solo { max-width: 320px; margin: 0 auto; }

.chm-paywall-login {
	text-align: center;
	margin: 2rem 0 0;
	font-size: 1rem;
}
.chm-paywall-login a {
	color: inherit !important;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--chm-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.chm-paywall-footnote {
	text-align: center;
	margin: .6rem auto 0;
	max-width: 36em;
	font-size: .82rem;
	color: var(--chm-muted);
}

/* Dark article backgrounds: flip the bar and the cat so they still read */
.chm-paywall.is-dark { --chm-muted: rgba(255, 255, 255, .65); }
.chm-paywall.is-dark .chm-paywall-banner { background: var(--chm-paper); color: var(--chm-ink); }
.chm-paywall.is-dark .chm-peek-head { fill: var(--chm-paper); }
.chm-paywall.is-dark .chm-plan.is-featured::before { border-color: var(--chm-paper); }
.chm-paywall.is-dark .chm-plan.is-featured .chm-ear-outer { stroke: var(--chm-paper); }

@media (max-width: 820px) {
	.chm-paywall-plans,
	.chm-paywall-plans.chm-count-2 {
		grid-template-columns: minmax(0, 1fr);
		max-width: 420px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chm-peek-eyes { animation: none; }
	.chm-cta { transition: none; }
}
