/* Grade math games landings share the theme's fonts, shell, and color tokens. */
body.mrg-grade-games-landing #primary {
	position: relative;
	isolation: isolate;
	background:
		radial-gradient(ellipse 38rem 28rem at 8% 12%, #ffe5f2 0%, transparent 72%),
		radial-gradient(ellipse 42rem 30rem at 91% 14%, #e9d9ff 0%, transparent 72%),
		radial-gradient(ellipse 40rem 30rem at 11% 58%, #dff9ee 0%, transparent 72%),
		radial-gradient(ellipse 38rem 28rem at 89% 48%, #e4f3ff 0%, transparent 72%),
		radial-gradient(ellipse 40rem 26rem at 88% 82%, #fff0c9 0%, transparent 72%),
		linear-gradient(165deg, #fbf7ff 0%, #f3f7ff 34%, #f6fffb 58%, #fffaf0 82%, #fff 100%);
}
.mrg-g3-sky {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}
.mrg-g3-sky__star {
	position: absolute;
	color: #7c3aed;
	font-size: 11px;
	line-height: 1;
	text-shadow: 0 0 4px #fff, 0 0 9px currentColor, 0 0 18px currentColor;
	opacity: .8;
	animation: mrg-g3-star-twinkle 5s ease-in-out infinite alternate;
}
.mrg-g3-sky__star:nth-child(5n + 2) { color: #d9479a; animation-duration: 6.3s; animation-delay: -2.1s; }
.mrg-g3-sky__star:nth-child(5n + 3) { color: #168f78; animation-duration: 4.4s; animation-delay: -3.4s; }
.mrg-g3-sky__star:nth-child(5n + 4) { color: #287bc5; animation-duration: 6.8s; animation-delay: -1.5s; }
.mrg-g3-sky__star:nth-child(5n) { color: #b67a08; animation-duration: 4.8s; animation-delay: -4s; }
.mrg-g3-sky__star:nth-child(3n) { font-size: 13px; }
.mrg-g3-sky__star:nth-child(4n) { font-size: 9px; }
.mrg-g3-sky__star:nth-child(1) { left: 5%; top: 3%; }
.mrg-g3-sky__star:nth-child(2) { left: 29%; top: 7%; }
.mrg-g3-sky__star:nth-child(3) { left: 94%; top: 12%; }
.mrg-g3-sky__star:nth-child(4) { left: 76%; top: 18%; }
.mrg-g3-sky__star:nth-child(5) { left: 2%; top: 21%; }
.mrg-g3-sky__star:nth-child(6) { left: 52%; top: 26%; }
.mrg-g3-sky__star:nth-child(7) { left: 97%; top: 29%; }
.mrg-g3-sky__star:nth-child(8) { left: 21%; top: 32%; }
.mrg-g3-sky__star:nth-child(9) { left: 4%; top: 35%; }
.mrg-g3-sky__star:nth-child(10) { left: 40%; top: 39%; }
.mrg-g3-sky__star:nth-child(11) { left: 83%; top: 43%; }
.mrg-g3-sky__star:nth-child(12) { left: 96%; top: 47%; }
.mrg-g3-sky__star:nth-child(13) { left: 2%; top: 51%; }
.mrg-g3-sky__star:nth-child(14) { left: 67%; top: 55%; }
.mrg-g3-sky__star:nth-child(15) { left: 91%; top: 59%; }
.mrg-g3-sky__star:nth-child(16) { left: 25%; top: 63%; }
.mrg-g3-sky__star:nth-child(17) { left: 3%; top: 67%; }
.mrg-g3-sky__star:nth-child(18) { left: 44%; top: 71%; }
.mrg-g3-sky__star:nth-child(19) { left: 78%; top: 75%; }
.mrg-g3-sky__star:nth-child(20) { left: 96%; top: 79%; }
.mrg-g3-sky__star:nth-child(21) { left: 2%; top: 83%; }
.mrg-g3-sky__star:nth-child(22) { left: 61%; top: 87%; }
.mrg-g3-sky__star:nth-child(23) { left: 96%; top: 91%; }
.mrg-g3-sky__star:nth-child(24) { left: 30%; top: 95%; }
.mrg-g3-sky__star:nth-child(25) { left: 52%; top: 4%; }
.mrg-g3-sky__star:nth-child(26) { left: 94%; top: 19%; }
.mrg-g3-sky__star:nth-child(27) { left: 3%; top: 39%; }
.mrg-g3-sky__star:nth-child(28) { left: 97%; top: 56%; }
.mrg-g3-sky__star:nth-child(29) { left: 4%; top: 76%; }
.mrg-g3-sky__star:nth-child(30) { left: 97%; top: 94%; }
@keyframes mrg-g3-star-twinkle {
	from { opacity: .5; }
	to { opacity: .96; }
}
.mrg-g3 {
	--mrg-g3-padding: 24px;
	--mrg-g3-ease: cubic-bezier(.22, 1, .36, 1);
	position: relative;
	z-index: 1;
	max-width: 1248px;
	margin-inline: auto;
	padding: 52px var(--mrg-g3-padding) 56px;
	color: var(--mrg-color-text);
}
.mrg-g3-hero {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	align-items: center;
	gap: clamp(24px, 4vw, 64px);
	padding-block: 12px 52px;
}
.mrg-g3-hero__copy { min-width: 0; }
.mrg-g3-eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	color: #6b36c7;
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .035em;
}
.mrg-g3 h1 {
	margin: 0 0 24px;
	font-size: clamp(2.5rem, 4.4vw, 4rem);
	line-height: 1.12;
	letter-spacing: -.035em;
}
.mrg-g3 h1 span { display: block; color: var(--mrg-color-primary); text-shadow: 0 4px 24px #a874ff24; }
.mrg-g3-intro { max-width: 30em; font-size: clamp(1.125rem, 1.65vw, 1.375rem); font-weight: 700; line-height: 1.55; }
.mrg-g3-description { max-width: 36em; margin-bottom: 28px; color: #575268; }
.mrg-g3 .mrg-g3-cta {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-height: 56px;
	max-width: 100%;
	padding: 16px 24px;
	border: 2px solid transparent;
	border-radius: 16px;
	background: var(--mrg-color-primary);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 5px 0 #50239b;
	transition: transform 150ms var(--mrg-g3-ease);
}
.mrg-g3 a:focus-visible, .mrg-g3 button:focus-visible { outline: 3px solid #174ea6; outline-offset: 5px; }
.mrg-g3-login { margin: 20px 0 0; font-size: .875rem; color: #575268; }
.mrg-g3-login a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mrg-g3-party {
	position: relative;
	isolation: isolate;
	min-width: 0;
	padding: var(--mrg-g3-padding);
	border: 2px solid #cdb5ff;
	border-radius: 32px;
	background: radial-gradient(ellipse at 12% 28%, #992b995c, transparent 60%), radial-gradient(ellipse at 90% 78%, #22b9b74f, transparent 54%), #341665;
	color: #fff7ff;
	box-shadow: 0 8px 0 #e3d6f7, 0 18px 46px #a357de26;
}
.mrg-g3-party__heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 800; }
.mrg-g3-party__stars { flex-shrink: 0; color: #ffe574; letter-spacing: 4px; font-size: 1.125rem; }
.mrg-g3-party__crew { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 10px; padding-block: 32px 24px; }
.mrg-g3 .mrg-g3-shape {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 0;
	padding: var(--mrg-g3-padding);
	border: 1px solid #ffffff26;
	border-radius: 22px;
	background: #ffffff0a;
	color: #fff7ff;
	font: inherit;
	text-align: center;
	cursor: pointer;
	transition: transform 180ms var(--mrg-g3-ease);
	touch-action: manipulation;
}
.mrg-g3 .mrg-g3-shape:disabled { cursor: default; opacity: 1; }
.mrg-g3-shape:disabled .mrg-g3-shape__label { visibility: hidden; }
.mrg-g3-shape__figure { display: block; width: 100%; aspect-ratio: 1; transform-origin: center; }
.mrg-g3-shape__figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.mrg-g3-shape__label { font-size: .875rem; line-height: 1.5; font-weight: 700; }
.mrg-g3 .mrg-g3-shape:focus-visible { outline-color: #ffe574; background: #ffffff1c; }
.mrg-g3-party__hint { margin: 0; text-align: center; font-size: .875rem; font-weight: 700; color: #ffe574; }
.mrg-g3-party__hint[hidden] { display: none; }
.mrg-g3-party__status { min-height: 3em; margin: 12px 0 0; text-align: center; color: #eee0ff; font-size: .8125rem; line-height: 1.5; }
.mrg-g3-confetti { position: absolute; inset: 8px; z-index: 2; overflow: clip; border-radius: 26px; pointer-events: none; }
.mrg-g3-confetti__piece { position: absolute; top: 0; left: 0; width: 8px; height: 12px; background: #ffe574; border-radius: 2px; opacity: 0; }
.mrg-g3-confetti__piece:nth-child(3n + 2) { background: #ff89d5; }
.mrg-g3-confetti__piece:nth-child(3n) { background: #77f2d0; border-radius: 50%; }
.mrg-g3-previews { padding-block: 24px 48px; }
.mrg-g3-section-heading { max-width: 720px; margin-bottom: 28px; }
.mrg-g3-section-heading .mrg-g3-eyebrow { margin-bottom: 10px; }
.mrg-g3 h2 { margin-bottom: 12px; font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.25; letter-spacing: -.02em; }
.mrg-g3-section-heading > p:last-child { margin: 0; color: #575268; }
.mrg-g3-game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mrg-g3-game { min-width: 0; padding: var(--mrg-g3-padding); background: #fffcff; border: 1px solid #dfcef7; border-radius: 24px; box-shadow: 0 8px 24px #7c3aed0c; }
.mrg-g3-game:nth-child(2) { border-color: #b8e9d8; background: #fbfffd; }
.mrg-g3-game:nth-child(3) { border-color: #f1deb0; background: #fffef9; }
.mrg-g3-game__art { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: #f2edfc; }
.mrg-g3-game:nth-child(2) .mrg-g3-game__art { background: #e7f8f2; }
.mrg-g3-game:nth-child(3) .mrg-g3-game__art { background: #fff5da; }
.mrg-g3-game__art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mrg-g3-game__fallback { font-size: 4rem; padding: 24px; }
.mrg-g3-game__copy { padding-top: 20px; }
.mrg-g3-game__topic { margin-bottom: 8px; color: #6b36c7; font-size: .8125rem; font-weight: 700; overflow-wrap: anywhere; }
.mrg-g3-game h3 { margin: 0; font-size: 1.125rem; line-height: 1.5; overflow-wrap: anywhere; }
.mrg-g3-finish { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 32px; border: 1px solid #dfc8fb; border-radius: 24px; background: radial-gradient(ellipse at 100% 0, #ffd9ed, transparent 65%), #ede5fc; box-shadow: 0 10px 40px #a86bea15; }
.mrg-g3-finish > div { max-width: 590px; }
.mrg-g3-finish p { margin: 0; color: #575268; }
.mrg-g3-finish .mrg-g3-cta { flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
	.mrg-g3 .mrg-g3-cta:hover { transform: translateY(-2px); background: var(--mrg-color-primary-hover); color: #fff; text-decoration: none; box-shadow: 0 6px 0 #50239b, 0 8px 28px #c456ef52; }
	.mrg-g3 .mrg-g3-shape:hover:not(:disabled) { transform: translateY(-3px); background: #ffffff18; }
}
.mrg-g3 .mrg-g3-cta:active { transform: translateY(3px); background: #5b21b6; box-shadow: 0 2px 0 #50239b; }
.mrg-g3 .mrg-g3-shape:active:not(:disabled) { transform: translateY(2px) scale(.97); background: #ffffff24; }
@media (max-width: 1024px) {
	.mrg-g3-sky__star:nth-child(5), .mrg-g3-sky__star:nth-child(13) { left: 96%; }
	.mrg-g3 { --mrg-g3-padding: 18px; padding-top: 36px; }
	.mrg-g3-game-grid { gap: 18px; }
	.mrg-g3-finish { align-items: flex-start; flex-direction: column; padding: 24px; gap: 24px; }
}
@media (max-width: 767px) {
	.mrg-g3-sky__star:nth-child(3n) { display: none; }
	.mrg-g3-sky__star:nth-child(25) { left: 96%; }
	.mrg-g3-sky .mrg-g3-sky__star { font-size: 9px; }
	.mrg-g3-sky .mrg-g3-sky__star:nth-child(4n) { font-size: 11px; }
	body.mrg-grade-games-landing #primary {
		background:
			radial-gradient(ellipse 20rem 24rem at 88% 11%, #f4e9ff 0%, transparent 72%),
			radial-gradient(ellipse 20rem 23rem at 9% 54%, #eafbf3 0%, transparent 72%),
			linear-gradient(165deg, #fcf9ff 0%, #f7faff 34%, #f9fffc 58%, #fffcf5 84%, #fff 100%);
	}
	.mrg-g3 { --mrg-g3-padding: 16px; padding-block: 28px 36px; }
	.mrg-g3-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 0 20px; }
	.mrg-g3-hero__copy { text-align: center; }
	.mrg-g3-hero__copy .mrg-g3-eyebrow { justify-content: center; }
	.mrg-g3-intro, .mrg-g3-description { margin-inline: auto; }
	.mrg-g3-party { width: 100%; max-width: 500px; margin-inline: auto; border-radius: 26px; }
	.mrg-g3-game-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.mrg-g3-game { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1fr); align-items: center; gap: 16px; border-radius: 20px; }
	.mrg-g3-game__copy { padding-top: 0; }
	.mrg-g3-previews { padding-block: 20px 32px; }
	.mrg-g3-finish { padding: 24px 16px; text-align: center; align-items: center; }
	.mrg-g3 .mrg-g3-cta { padding-inline: 16px; }
}
@media (max-width: 479px) {
	.mrg-g3-party__crew { gap: 8px; padding-block: 20px; }
}
@media (max-width: 374px) {
	.mrg-g3 h1 { font-size: 2.25rem; }
	.mrg-g3-eyebrow { font-size: .8125rem; }
	.mrg-g3-game { grid-template-columns: minmax(0, 1fr); }
	.mrg-g3 .mrg-g3-cta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.mrg-g3-sky__star { animation: none; opacity: .8; }
	.mrg-g3 .mrg-g3-cta, .mrg-g3 .mrg-g3-shape { transition: none; }
	.mrg-g3 .mrg-g3-cta:hover, .mrg-g3 .mrg-g3-cta:active, .mrg-g3 .mrg-g3-shape:hover:not(:disabled), .mrg-g3 .mrg-g3-shape:active:not(:disabled) { transform: none; }
}
