/* ==========================================================================
   ComputerLeap — playful extras on top of theme.json
   Colors, fonts and spacing live in theme.json (editable in Styles).
   ========================================================================== */

:root {
	--c4k-ink: var(--wp--preset--color--ink, #1B1A3A);
	--c4k-line: #E6E4F5;
	--c4k-r-s: var(--wp--custom--radius--s, 14px);
	--c4k-r-m: var(--wp--custom--radius--m, 22px);
	--c4k-r-l: var(--wp--custom--radius--l, 32px);
	--c4k-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::selection { background: var(--wp--preset--color--sunshine); color: var(--c4k-ink); }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--sunshine);
	outline-offset: 3px;
	border-radius: 8px;
}
img { max-width: 100%; height: auto; }

/* Skip link */
.skip-link.screen-reader-text:focus { background: var(--wp--preset--color--sunshine); color: var(--c4k-ink); }

/* ---------- Header ---------- */
.c4k-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: transparent !important;
	border-bottom: 2px solid var(--c4k-line);
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would trap the full-screen mobile menu inside it. */
.c4k-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, .86);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.admin-bar .c4k-header { top: var(--wp-admin--admin-bar--height, 32px); }
.c4k-header .wp-block-navigation-item__content {
	padding: .45em .8em !important;
	border-radius: 999px;
	transition: background .2s, color .2s, transform .2s var(--c4k-bounce);
}
.c4k-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--grape-soft); color: var(--wp--preset--color--grape); transform: translateY(-2px); }
.c4k-header .current-menu-item > .wp-block-navigation-item__content,
.c4k-header .wp-block-navigation-item__content[aria-current="page"] { background: var(--wp--preset--color--grape); color: #fff !important; }
.c4k-header .wp-block-site-title { white-space: nowrap; }

/* Use the slide-in menu on tablets and small laptops too, so the header never wraps. */
@media (min-width: 600px) and (max-width: 1100px) {
	.c4k-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.c4k-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.c4k-header .wp-block-navigation__responsive-container.is-menu-open { position: fixed; inset: 0; }
	.c4k-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
	.c4k-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog { margin-top: 2rem; }
}
@media (max-width: 1100px) {
	.c4k-header .wp-block-site-tagline { display: none; }
}
.c4k-logo img { transition: transform .4s var(--c4k-bounce); }
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--gradient--sky-dream) !important;
	padding: 2rem !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: .4rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.5rem; }
.wp-block-navigation__responsive-container-open {
	background: var(--wp--preset--color--grape-soft);
	border-radius: 14px;
	padding: 8px;
}

/* ---------- Footer ---------- */
.c4k-footer { position: relative; margin-top: 0 !important; }
.c4k-footer::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: -38px;
	height: 40px;
	background: url("../images/wave-top.svg") center / 100% 100% no-repeat;
}
.c4k-footer a { color: inherit; text-decoration: none; }
.c4k-footer a:hover { color: var(--wp--preset--color--sunshine); }
.c4k-footer .wp-block-navigation .wp-block-navigation-item__content { padding: .2em 0; }

/* ---------- Block style: Card / Tile / Sticker ---------- */
.is-style-c4k-card {
	background: #fff;
	border: 2px solid var(--c4k-line);
	border-radius: var(--c4k-r-l);
	box-shadow: var(--wp--preset--shadow--pop);
	padding: var(--wp--preset--spacing--40);
}
.is-style-c4k-tile {
	position: relative;
	border-radius: var(--c4k-r-l);
	border: 3px solid var(--c4k-ink);
	box-shadow: 0 7px 0 var(--c4k-ink);
	padding: var(--wp--preset--spacing--40);
	transition: transform .25s var(--c4k-bounce), box-shadow .25s var(--c4k-bounce);
	background-color: #fff;
}
.is-style-c4k-tile:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 13px 0 var(--c4k-ink); }
.is-style-c4k-tile:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--c4k-ink); }
/* Make the first link inside a tile cover the whole tile */
.is-style-c4k-tile :where(h2, h3, h4) a { text-decoration: none; color: inherit; }
.is-style-c4k-tile :where(h2, h3, h4) a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.is-style-c4k-sticker {
	border-radius: var(--c4k-r-m);
	border: 3px solid var(--c4k-ink);
	box-shadow: 0 5px 0 var(--c4k-ink);
	padding: .6rem 1rem;
	background: #fff;
	transform: rotate(-3deg);
}

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: transform .2s var(--c4k-bounce), box-shadow .2s, background .2s; }
.wp-block-button__link:hover { transform: translateY(-3px); }
.wp-block-button__link:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(27,26,58,.25) !important; }
.is-style-c4k-sunny .wp-block-button__link { background: var(--wp--preset--color--sunshine) !important; color: var(--c4k-ink) !important; box-shadow: 0 5px 0 #C99400; }
.is-style-c4k-sunny .wp-block-button__link:hover { background: #FFD666 !important; }
.is-style-c4k-ghost .wp-block-button__link { background: #fff !important; color: var(--c4k-ink) !important; border: 3px solid var(--c4k-ink); box-shadow: 0 5px 0 var(--c4k-ink); }
.is-style-c4k-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--grape-soft) !important; }

/* ---------- Headings / text ---------- */
.is-style-c4k-squiggle mark,
.is-style-c4k-squiggle em {
	font-style: normal;
	background: none;
	position: relative;
	white-space: nowrap;
}
.is-style-c4k-squiggle mark::after,
.is-style-c4k-squiggle em::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -.12em;
	height: .28em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M0 5q5-5 10 0t10 0 10 0 10 0' fill='none' stroke='%23FFC93C' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 0 / .9em 100%;
	z-index: -1;
}
p.is-style-c4k-pill {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	width: fit-content;
	padding: .35em 1em;
	border-radius: 999px;
	background: #fff;
	border: 2px solid var(--c4k-line);
	font-weight: 800;
	font-size: .85rem;
	letter-spacing: .02em;
	box-shadow: var(--wp--preset--shadow--soft);
}
.has-text-align-center.is-style-c4k-pill { margin-left: auto; margin-right: auto; display: flex; }
p.is-style-c4k-counter {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1;
	margin-bottom: 0;
}
p.is-style-c4k-emoji {
	display: grid;
	place-items: center;
	width: 4.2rem;
	height: 4.2rem;
	font-size: 2.2rem;
	line-height: 1;
	border-radius: 22px;
	background: var(--wp--preset--color--sunshine-soft);
	border: 3px solid var(--c4k-ink);
	box-shadow: 0 4px 0 var(--c4k-ink);
	transform: rotate(-4deg);
	transition: transform .3s var(--c4k-bounce);
}
.has-text-align-center.is-style-c4k-emoji { margin-left: auto; margin-right: auto; }
:where(.is-style-c4k-tile, .is-style-c4k-card):hover .is-style-c4k-emoji { transform: rotate(6deg) scale(1.1); }

/* ---------- Lists ---------- */
ul.is-style-c4k-checks, ul.is-style-c4k-stars { list-style: none; padding-left: 0; }
ul.is-style-c4k-checks li, ul.is-style-c4k-stars li { position: relative; padding-left: 2rem; margin-bottom: .45rem; }
ul.is-style-c4k-checks li::before {
	content: "✓";
	position: absolute; left: 0; top: .15em;
	width: 1.35rem; height: 1.35rem;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--mint);
	color: #fff; font-weight: 900; font-size: .8rem;
}
ul.is-style-c4k-stars li::before { content: "⭐"; position: absolute; left: 0; }

/* ---------- Images ---------- */
.is-style-c4k-float img { animation: c4k-float 5s ease-in-out infinite; }
.is-style-c4k-wiggle img { transition: transform .4s var(--c4k-bounce); }
.is-style-c4k-wiggle:hover img { animation: c4k-wiggle .6s ease-in-out; }

/* ---------- Details / FAQ ---------- */
.wp-block-details { transition: border-color .2s, box-shadow .2s; }
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.15rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	flex: none;
	width: 2rem; height: 2rem;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--grape-soft);
	color: var(--wp--preset--color--grape);
	font-size: 1.4rem;
	transition: transform .3s var(--c4k-bounce), background .2s;
}
.wp-block-details[open] { border-color: var(--wp--preset--color--grape) !important; box-shadow: var(--wp--preset--shadow--soft); }
.wp-block-details[open] summary::after { transform: rotate(45deg); background: var(--wp--preset--color--grape); color: #fff; }
.wp-block-details > :not(summary) { animation: c4k-pop-in .35s var(--c4k-bounce); }

/* ---------- Hero ---------- */
.c4k-hero { position: relative; overflow: hidden; isolation: isolate; }
.c4k-hero::before, .c4k-hero::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	z-index: -1;
	filter: blur(2px);
}
.c4k-hero::before { width: 340px; height: 340px; background: var(--wp--preset--color--sky-soft); top: -120px; left: -120px; }
.c4k-hero::after { width: 220px; height: 220px; background: var(--wp--preset--color--sunshine-soft); bottom: -60px; right: 30%; }
.c4k-hero-art { position: relative; }
.c4k-hero-art .is-style-c4k-sticker { position: absolute; z-index: 2; animation: c4k-float 5s ease-in-out infinite; }
.c4k-hero-art .c4k-pos-tr { top: 6%; right: 0; transform: rotate(5deg); }
.c4k-hero-art .c4k-pos-bl { bottom: 8%; left: 0; }
.c4k-hero-art > .wp-block-group { margin: 0 !important; }

/* ---------- Page header ---------- */
.c4k-page-hero { position: relative; overflow: hidden; }
.c4k-page-hero .c4k-page-hero-emoji { font-size: 4rem; line-height: 1; margin: 0; animation: c4k-float 4s ease-in-out infinite; }

/* ---------- Journey (starter course) ---------- */
.c4k-journey { counter-reset: stop; position: relative; }
.c4k-journey > .wp-block-group { position: relative; }
@media (min-width: 782px) {
	.c4k-journey::before {
		content: "";
		position: absolute;
		left: 6%; right: 6%; top: 3.1rem;
		border-top: 5px dashed var(--wp--preset--color--grape);
		opacity: .25;
		z-index: 0;
	}
	.c4k-journey > .wp-block-group:nth-child(even) { margin-top: 2.5rem; }
}
.c4k-step-num {
	display: grid !important;
	place-items: center;
	width: 2.4rem; height: 2.4rem;
	margin: 0 !important;
	border-radius: 50%;
	background: var(--c4k-ink);
	color: #fff;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	position: absolute !important;
	top: -14px; right: -10px;
	z-index: 2;
}

/* ---------- Lesson & game cards (query loop) ---------- */
.c4k-cards .wp-block-post { display: flex; }
.c4k-cards .wp-block-post > .wp-block-group { width: 100%; height: 100%; }
.c4k-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.c4k-chip {
	display: inline-block;
	padding: .2em .75em;
	border-radius: 999px;
	font-size: .78rem !important;
	font-weight: 800;
	background: var(--wp--preset--color--grape-soft);
	color: var(--wp--preset--color--grape);
	margin: 0 !important;
}
.c4k-chip a { color: inherit; text-decoration: none; position: relative; z-index: 2; }
.c4k-chip.is-time { background: var(--wp--preset--color--sky-soft); color: #0B6FB8; }
.c4k-chip.is-free { background: var(--wp--preset--color--mint-soft); color: #0A7D5B; }
.c4k-done-badge { display: none; }
.c4k-is-done .c4k-done-badge { display: inline-block; }
.c4k-is-done > .wp-block-group { outline: 4px solid var(--wp--preset--color--mint); outline-offset: -2px; }
.c4k-hidden { display: none !important; }

/* ---------- Stats ---------- */
.c4k-stats > * { text-align: center; }
.c4k-stats p:last-child { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; opacity: .85; }

/* ---------- Agenda timeline ---------- */
.c4k-timeline { position: relative; }
.c4k-timeline > .wp-block-group { position: relative; }
.c4k-timeline > .wp-block-group:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 2.05rem; top: 4.4rem; bottom: -1.4rem;
	border-left: 4px dotted var(--wp--preset--color--grape);
	opacity: .35;
}

/* ---------- Mascot float (bottom corner) ---------- */
.c4k-buddy {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 60;
	display: flex;
	align-items: flex-end;
	gap: 10px;
	pointer-events: none;
}
.c4k-buddy > * { pointer-events: auto; }
.c4k-buddy-btn {
	width: 74px; height: 80px;
	border: 0; padding: 0;
	background: none;
	cursor: pointer;
	animation: c4k-float 4.5s ease-in-out infinite;
	filter: drop-shadow(0 8px 10px rgba(27, 26, 58, .25));
}
.c4k-buddy-btn img { width: 100%; height: 100%; }
.c4k-buddy-btn:hover { animation: c4k-wiggle .6s ease-in-out; }
.c4k-buddy-bubble {
	max-width: 250px;
	background: #fff;
	border: 3px solid var(--c4k-ink);
	box-shadow: 0 5px 0 var(--c4k-ink);
	border-radius: 20px 20px 4px 20px;
	padding: .8rem 1rem;
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.4;
	opacity: 0;
	transform: translateY(10px) scale(.9);
	transform-origin: bottom right;
	transition: opacity .25s, transform .35s var(--c4k-bounce);
	pointer-events: none;
}
.c4k-buddy.is-talking .c4k-buddy-bubble { opacity: 1; transform: none; pointer-events: auto; }
.c4k-buddy-bubble button {
	display: inline-block;
	margin-top: .5rem;
	margin-right: .3rem;
	border: 0;
	background: var(--wp--preset--color--grape-soft);
	color: var(--wp--preset--color--grape);
	font: inherit;
	font-size: .8rem;
	padding: .25rem .7rem;
	border-radius: 999px;
	cursor: pointer;
}

/* ---------- Confetti + star toast (used by the learning plugin too) ---------- */
.c4k-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.c4k-confetti i {
	position: absolute;
	top: -20px;
	width: 10px; height: 16px;
	border-radius: 3px;
	animation: c4k-fall linear forwards;
}
.c4k-toast {
	position: fixed;
	left: 50%;
	top: 90px;
	z-index: 10000;
	transform: translate(-50%, -20px) scale(.8);
	opacity: 0;
	background: var(--c4k-ink);
	color: #fff;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: 1.2rem;
	padding: .7rem 1.4rem;
	border-radius: 999px;
	box-shadow: 0 6px 0 var(--wp--preset--color--sunshine);
	transition: opacity .3s, transform .45s var(--c4k-bounce);
}
.c4k-toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- Scroll reveal ---------- */
.c4k-js .c4k-reveal { opacity: 0; transform: translateY(28px); transition: opacity .5s ease, transform .6s var(--c4k-bounce); }
.c4k-js .c4k-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes c4k-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes c4k-wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -8deg; } 50% { rotate: 6deg; } 75% { rotate: -4deg; } }
@keyframes c4k-pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes c4k-fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Motion: page-to-page transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	::view-transition-old(root) { animation: c4k-vt-out .2s ease-in both; }
	::view-transition-new(root) { animation: c4k-vt-in .5s cubic-bezier(.2, .9, .3, 1.15) both; }
}
.c4k-header { view-transition-name: c4k-header; }
@keyframes c4k-vt-out { to { opacity: 0; transform: translateY(-14px) scale(.985); } }
@keyframes c4k-vt-in { from { opacity: 0; transform: translateY(34px) scale(.98); } }

/* ---------- Motion: rainbow reading bar ---------- */
@supports (animation-timeline: scroll()) {
	.c4k-js body::after {
		content: "";
		position: fixed; inset: 0 0 auto 0; height: 5px; z-index: 99990;
		pointer-events: none;
		transform: scaleX(0); transform-origin: 0 50%;
		background: linear-gradient(90deg, var(--wp--preset--color--grape), var(--wp--preset--color--sky), var(--wp--preset--color--mint), var(--wp--preset--color--sunshine), var(--wp--preset--color--coral));
		animation: c4k-progress linear both;
		animation-timeline: scroll(root);
	}
}
@keyframes c4k-progress { to { transform: scaleX(1); } }

/* ---------- Motion: hero entrance ---------- */
.c4k-hero .wp-block-column:first-child > * { animation: c4k-rise .75s var(--c4k-bounce) backwards; }
.c4k-hero .wp-block-column:first-child > :nth-child(2) { animation-delay: .1s; }
.c4k-hero .wp-block-column:first-child > :nth-child(3) { animation-delay: .22s; }
.c4k-hero .wp-block-column:first-child > :nth-child(4) { animation-delay: .34s; }
.c4k-hero .wp-block-column:first-child > :nth-child(n+5) { animation-delay: .46s; }
.c4k-hero-art .wp-block-image:first-child { animation: c4k-zoom-in .9s var(--c4k-bounce) .15s backwards; translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -12px); transition: translate .35s ease-out; }
.c4k-hero-art .is-style-c4k-sticker { animation: c4k-sticker-in .6s var(--c4k-bounce) backwards, c4k-float 5s ease-in-out infinite; }
.c4k-hero-art .c4k-pos-tr { animation-delay: .8s, -1.5s; }
.c4k-hero-art .c4k-pos-bl { animation-delay: 1s, -3s; }
.c4k-hero::before { animation: c4k-drift 13s ease-in-out infinite alternate; translate: calc(var(--px, 0) * 26px) calc(var(--py, 0) * 20px); transition: translate .6s ease-out; }
.c4k-hero::after { animation: c4k-drift 17s ease-in-out infinite alternate-reverse; translate: calc(var(--px, 0) * -34px) calc(var(--py, 0) * -22px); transition: translate .6s ease-out; }
.c4k-hero .wp-block-button:first-child .wp-block-button__link { animation: c4k-cta 2.8s ease-in-out 1.8s infinite; }
.c4k-page-hero .c4k-page-hero-emoji { animation: c4k-drop .8s var(--c4k-bounce) backwards, c4k-float 4s ease-in-out .8s infinite; }
.c4k-page-hero :where(.is-style-c4k-pill, h1, h1 ~ p) { animation: c4k-rise .7s var(--c4k-bounce) .12s backwards; }
.c4k-page-hero h1 { animation-delay: .22s; }
.c4k-page-hero h1 ~ p { animation-delay: .34s; }

/* Highlighted words shimmer, and their squiggle rolls like a wave. */
.is-style-c4k-squiggle mark {
	background: linear-gradient(90deg, #0E7C7B, #E04F38, #2563EB, #0E7C7B) 0 0 / 300% 100%;
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: c4k-shimmer 7s linear infinite;
}
.is-style-c4k-squiggle mark::after, .is-style-c4k-squiggle em::after { animation: c4k-wave 1.6s linear infinite; }

/* The logo leaps when the page opens and when you point at it. */
.c4k-logo img { animation: c4k-leap .9s ease-out .35s backwards; }
.c4k-logo:hover img { transform: none; animation: c4k-leap .8s ease-out; }

/* Buttons: a quick shine on hover. */
.wp-block-button__link { position: relative; overflow: hidden; }
.wp-block-button__link::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
	transform: translateX(-120%);
	pointer-events: none;
}
.wp-block-button__link:hover::after { transform: translateX(120%); transition: transform .65s ease; }

/* Cards, tiles and emoji bubbles pop in one after another as you scroll. */
.c4k-js .c4k-pop { opacity: 0; }
.c4k-js .c4k-pop.is-in { opacity: 1; animation: c4k-pop .7s var(--c4k-bounce) calc(var(--i, 0) * 85ms) backwards; }
.c4k-js .c4k-head { opacity: 0; }
.c4k-js .c4k-head.is-in { opacity: 1; animation: c4k-head .75s cubic-bezier(.2, .8, .2, 1) backwards; }

/* Tiles lean toward the pointer, with a soft glare. */
@media (hover: hover) and (pointer: fine) {
	.c4k-js .is-style-c4k-tile.is-tilt, .c4k-js .c4k-course-card.is-tilt {
		transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.025);
		transition: transform .1s ease-out, box-shadow .2s;
	}
	.c4k-js .is-tilt:not([class*="gradient-background"]) { background-image: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .65), transparent 45%); }
}

/* Sparkles when you press a button or tile. */
.c4k-sparkle { position: fixed; z-index: 99999; pointer-events: none; font-size: 1.1rem; line-height: 1; will-change: transform, opacity; }

@keyframes c4k-rise { from { opacity: 0; transform: translateY(38px) scale(.94); } }
@keyframes c4k-zoom-in { from { opacity: 0; transform: scale(.7) rotate(-6deg); } }
@keyframes c4k-sticker-in { from { opacity: 0; scale: .2; } }
@keyframes c4k-drop { from { opacity: 0; scale: .2; rotate: -50deg; } }
@keyframes c4k-drift { to { transform: translate(60px, 40px) scale(1.25); } }
@keyframes c4k-cta { 0%, 100% { scale: 1; } 50% { scale: 1.05; } }
@keyframes c4k-shimmer { to { background-position: 300% 0; } }
@keyframes c4k-wave { to { background-position: .9em 0; } }
@keyframes c4k-leap { 0%, 100% { transform: none; } 18% { transform: translateY(3px) scale(1.14, .84); } 48% { transform: translateY(-11px) scale(.93, 1.09) rotate(-9deg); } 72% { transform: translateY(2px) scale(1.1, .9); } 86% { transform: translateY(-3px); } }
@keyframes c4k-pop { from { opacity: 0; transform: translateY(46px) scale(.8) rotate(-4deg); } }
@keyframes c4k-head { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } }

/* Donate stays in the header on phones, slimmed down to fit beside the menu button. */
@media (max-width: 440px) {
	.c4k-header .c4k-donate-head .wp-block-button__link { font-size: .85rem !important; padding: .4em .7em .35em !important; }
}

/* Phone menu: language, stars and sound sit above the links. */
.c4k-menu-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; padding: .4rem 0 1rem; margin-bottom: .6rem; border-bottom: 2px dashed var(--c4k-line); }
.c4k-menu-tools .c4k-star-counter { margin: 0; }

/* ---------- Print (checklists, agreements) ---------- */
@media print {
	.c4k-header, .c4k-footer, .c4k-buddy, .wp-block-buttons, .c4k-no-print { display: none !important; }
	.c4k-pop, .c4k-head, .c4k-reveal { opacity: 1 !important; transform: none !important; }
	body { font-size: 12pt; }
}

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.c4k-js .c4k-reveal, .c4k-js .c4k-pop, .c4k-js .c4k-head { opacity: 1; transform: none; }
	.is-style-c4k-squiggle mark { -webkit-text-fill-color: currentColor; background: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.c4k-hero-art .is-style-c4k-sticker { display: none; }
	.c4k-buddy-btn { width: 60px; height: 66px; }
	.c4k-hide-mobile { display: none !important; }
}

/* Emoji bubbles with a background color shouldn't get the default paragraph padding. */
p.is-style-c4k-emoji.has-background { padding: 0; box-sizing: border-box; }
p.c4k-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: var(--wp--preset--font-size--xx-large); line-height: 1; margin: 0; }

/* ---------- Code blocks in lessons (colored by kids.js) ---------- */
.wp-block-code {
	background: #1E1D40;
	color: #EAF7F6;
	border: 3px solid var(--c4k-ink);
	border-radius: 20px;
	box-shadow: 0 6px 0 var(--c4k-ink);
	padding: 1.1rem 1.3rem;
	font-size: .98rem;
	line-height: 1.6;
	overflow-x: auto;
	position: relative;
}
.wp-block-code code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; tab-size: 4; }
.wp-block-code[data-lang]::before {
	content: attr(data-lang);
	position: absolute;
	top: .55rem; right: .8rem;
	font: 800 .7rem var(--wp--preset--font-family--body);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #8F8DB8;
}
.c4k-tok-k { color: #C9A7FF; font-weight: 700; }
.c4k-tok-s { color: #FFD479; }
.c4k-tok-c { color: #7E7CA8; font-style: italic; }
.c4k-tok-n { color: #7CF2C2; }
.c4k-tok-f { color: #7CC7FF; }

/* ---------- Dropdown menus ---------- */
.c4k-header .wp-block-navigation .wp-block-navigation__submenu-container {
	min-width: 240px !important;
	padding: .5rem !important;
	border: 3px solid var(--c4k-ink) !important;
	border-radius: 22px;
	background: #fff !important;
	box-shadow: 0 6px 0 var(--c4k-ink), 0 20px 40px -20px rgba(27, 26, 58, .35);
	margin-top: .4rem;
	gap: .1rem;
}
.c4k-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: .55em .9em !important;
	border-radius: 14px;
	font-size: 1rem;
}
.c4k-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { transform: translateX(4px); }
/* Invisible bridge so the menu doesn't close while the mouse moves down to it. */
.c4k-header .wp-block-navigation-submenu > .wp-block-navigation__submenu-container::before {
	content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important; box-shadow: none; background: transparent !important; padding: 0 0 .5rem 1rem !important; margin: 0;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 1.15rem; }
.c4k-header .wp-block-button__link, .c4k-header .wp-block-navigation-item__label { white-space: nowrap; }

/* Phones: long highlighted headings wrap, and the header stays inside the screen. */
@media (max-width: 600px) {
	.is-style-c4k-squiggle mark { white-space: normal; }
}
@media (max-width: 440px) {
	.c4k-header .wp-block-site-title { font-size: 1rem; }
	.c4k-header .is-nowrap { gap: .3rem; }
	.c4k-header .c4k-lang-btn { padding: .3rem .4rem; }
	.c4k-header .c4k-stars-pill { padding-left: .45rem; padding-right: .45rem; }
	.c4k-header .c4k-star-counter { gap: .1rem; }
}
@media (max-width: 374px) {
	.c4k-header .c4k-sound-toggle { display: none; }
}

/* ---------- Bigger home hero: featured Minecraft and robot coding ---------- */
.c4k-hero-xl { padding-bottom: clamp(3rem, 6vw, 5rem); }
.c4k-hero-xl h1 { font-size: clamp(2.8rem, 6.4vw, 5.8rem); line-height: 1.02; max-width: 16ch; margin-inline: auto; }
.c4k-hero-xl > .wp-block-paragraph:nth-of-type(1) { font-size: clamp(1.15rem, 1.8vw, 1.45rem); max-width: 46ch; margin-inline: auto; }
.c4k-feature { display: flex; flex-direction: column; gap: .6rem; align-items: stretch; }
.c4k-feature-art { margin: 0 0 .4rem !important; width: 100%; }
.c4k-feature-art img { display: block; width: 100%; height: auto; border-radius: 30px; border: 4px solid var(--c4k-ink); box-shadow: 0 10px 0 var(--c4k-ink); background: #fff; transition: transform .45s var(--c4k-bounce), box-shadow .3s; }
.c4k-feature:hover .c4k-feature-art img { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 16px 0 var(--c4k-ink); }
.c4k-feature h3 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
@media (min-width: 782px) {
	.c4k-hero-xl .wp-block-columns { gap: 2rem; }
}

/* Hero feature cards: two equal columns that fill the width, with the underline clear of the text below. */
@media (min-width: 782px) {
	.c4k-hero-xl > .wp-block-columns { max-width: 1120px; margin-inline: auto; }
	.c4k-hero-xl .wp-block-columns > .wp-block-column { flex-basis: 50% !important; min-width: 0; }
	.c4k-hero-xl .c4k-feature-art img { width: 100%; height: auto; max-height: none; }
	.c4k-hero-xl .c4k-feature-art { margin-inline: 0 !important; width: 100%; }
}
.c4k-hero-xl h1 { margin-bottom: 1.6rem; }
.c4k-hero-xl h1 mark::after { bottom: -.14em; }

/* ---------- Community forum ---------- */
.c4k-community-rules { background: var(--wp--preset--color--sky-soft); border: 2px solid var(--c4k-line); border-radius: 22px; padding: 1rem 1.4rem; margin-bottom: 1.5rem; }
.c4k-community-rules h2 { margin-top: 0; font-size: 1.4rem; }
.c4k-community-rules ul { margin: 0; padding-left: 1.2rem; }
.c4k-join { background: #fff; border: 3px solid var(--c4k-ink); border-radius: 24px; padding: 1.2rem 1.4rem; margin: 1rem 0 1.5rem; box-shadow: 0 6px 0 var(--c4k-ink); }
.c4k-topic-row, .c4k-topic, .c4k-reply { background: #fff; border: 2px solid var(--c4k-line); border-radius: 20px; padding: 1rem 1.2rem; margin: 0 0 .8rem; }
.c4k-topic-row h3 { margin: .2rem 0; font-size: 1.2rem; }
.c4k-topic-row h3 a { color: var(--c4k-ink); text-decoration: none; }
.c4k-topic-row h3 a:hover { text-decoration: underline; }
.c4k-meta { font-size: .85rem; color: var(--wp--preset--color--muted, #5B5A7A); margin: .2rem 0; }
.c4k-body { margin: .5rem 0; line-height: 1.6; }
.c4k-report { margin: 0; }
.c4k-report-btn { background: none; border: 0; color: var(--c4k-coral); font-weight: 700; cursor: pointer; padding: .2rem 0; }
.c4k-community .c4k-chip { display: inline-block; margin: 0 0 .3rem; }

/* Phone header: logo on the left, Donate and the menu button on the right (menu at the far edge). */
@media (max-width: 781px) {
	.c4k-header .c4k-header-row { display: grid !important; grid-template-columns: 1fr auto auto; align-items: center; gap: .5rem; }
	.c4k-header .c4k-header-row > .wp-block-group:first-child { justify-self: start; min-width: 0; order: 1; }
	.c4k-header .c4k-header-row > .wp-block-group:last-child { justify-self: end; order: 2; }
	.c4k-header .c4k-header-row > .wp-block-navigation { order: 3; justify-self: end; }
}

/* Name-change banner, above the header on every page. */
.c4k-rename-banner { position: relative; display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .55rem 3rem .55rem 1rem; background: var(--wp--preset--color--grape); color: #fff; text-align: center; font-size: .95rem; }
.c4k-rename-banner p { margin: 0; }
.c4k-rename-banner a { color: #fff; font-weight: 800; text-decoration: underline; }
.c4k-rename-close { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: .2rem .4rem; }

