.navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fffbf4;
	backdrop-filter: blur(10px);
	border-bottom: 0;
	box-shadow: none;
}

body.dark .navbar {
	background: #fffbf4;
	border-bottom: 0;
	box-shadow: none;
}

.nav-inner {
	width: 100%;
	max-width: calc(var(--layout-max-width) + (var(--layout-gutter) * 2));
	margin: 0 auto;
	padding: 4px var(--layout-gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s2);
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: 32px;
	min-width: 0;
}

.logo-inline {
	display: flex;
	align-items: baseline;
	gap: 0;
}

.logo-inline .rigby,
.logo-inline .maths {
	margin: 0;
	font-size: 43px;
	letter-spacing: -0.5px;
	line-height: 1;
	color: #000000;
}

.logo-inline .rigby {
	font-weight: 500;
}

.logo-inline .maths {
	font-weight: 300;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.nav-link {
	--squircle-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 14px;
	color: rgba(36, 23, 10, 0.74);
	font-size: 14px;
	font-weight: 600;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
	background: rgba(214, 166, 58, 0.1);
	color: var(--brand-ink);
	transform: translateY(-1px);
	box-shadow: 0 10px 18px rgba(17, 17, 17, 0.05);
}

.nav-link.is-active {
	background: rgba(214, 166, 58, 0.18);
	color: var(--brand-ink);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nav-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: var(--s2);
}

.nav-btn {
	--squircle-radius: var(--squircle-xs);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 6px 14px;
	border: 1px solid rgba(36, 23, 10, 0.12);
	background: rgba(255, 248, 233, 0.72);
	color: var(--brand-ink);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nav-grid-toggle {
	background: rgba(255, 248, 233, 0.92);
}

.nav-grid-toggle[aria-pressed="true"] {
	background: rgba(214, 166, 58, 0.18);
	border-color: rgba(214, 166, 58, 0.32);
}

.nav-btn:last-child,
.nav-sign-in {
	background: var(--brand-gold);
	color: var(--brand-ink);
	border-color: transparent;
	box-shadow: none;
}

.nav-auth {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
}

.nav-quick-join {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
}

.nav-login-panel {
	--squircle-radius: var(--squircle-md);
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(320px, calc(100vw - 32px));
	padding: 18px;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(17, 17, 17, 0.08);
	box-shadow: 0 26px 60px rgba(60, 66, 87, 0.18);
	z-index: 120;
}

.nav-class-code-panel {
	--squircle-radius: var(--squircle-md);
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(260px, calc(100vw - 32px));
	padding: 18px;
	border-radius: var(--squircle-md);
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(17, 17, 17, 0.08);
	box-shadow: 0 26px 60px rgba(60, 66, 87, 0.18);
	z-index: 120;
}

.nav-class-code-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nav-account-menu {
	--squircle-radius: var(--squircle-md);
	display: none;
	position: absolute;
	top: calc(100% - (var(--squircle-xs) * 2));
	right: 0;
	width: 100%;
	padding: calc(var(--squircle-xs) * 2) 0 0;
	border-radius: 0 0 var(--squircle-xs) var(--squircle-xs);
	background: transparent;
	animation: navAccountDrop 0.16s ease;
	transform-origin: top center;
	z-index: 120;
	pointer-events: none;
}

@keyframes navAccountDrop {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.nav-account-menu-inner {
	display: flex;
	flex-direction: column;
	padding: 0;
	border-radius: 0 0 var(--squircle-xs) var(--squircle-xs);
	background: #ffffff;
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-top: 0;
	box-shadow: 0 26px 60px rgba(60, 66, 87, 0.18);
	pointer-events: auto;
}

.nav-auth[data-auth-state="authenticated"]:hover .nav-account-menu {
	display: block !important;
}

.nav-account-menu-item {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	min-height: 42px;
	padding: 0 14px;
	border: 0;
	border-radius: 0 0 var(--squircle-xs) var(--squircle-xs);
	background: transparent;
	color: var(--text);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.nav-account-menu-item:hover,
.nav-account-menu-item:focus-visible {
	background: rgba(214, 166, 58, 0.08);
}

.nav-login-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nav-login-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--brand-ink);
}

.nav-login-input {
	min-height: 44px;
	padding: 12px 14px;
	font-size: 15px;
}

.nav-login-remember {
	margin-top: 2px;
	font-size: 14px;
}

.nav-login-submit {
	min-height: 46px;
	margin-top: 4px;
	font-size: 18px;
}

.nav-login-account-link {
	font-size: 14px;
	font-weight: 600;
	color: var(--brand-gold-deep);
	text-align: center;
}

.nav-login-status {
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--text-secondary);
}

.nav-login-status[data-state="error"] {
	color: #bb3e1e;
}

body.dark .nav-btn {
	color: #fff7e7;
	background: rgba(255, 245, 220, 0.1);
	border-color: rgba(255, 240, 214, 0.12);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark .nav-btn:last-child,
body.dark .nav-sign-in {
	background: #f2c85c;
	color: var(--brand-ink);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.45),
		0 10px 22px rgba(242, 200, 92, 0.26);
}

body.dark .nav-login-panel {
	background: rgba(24, 24, 24, 0.98);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

body.dark .nav-class-code-panel {
	background: rgba(24, 24, 24, 0.98);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

body.dark .nav-account-menu {
	background: transparent;
}

body.dark .nav-account-menu-inner {
	background: rgba(24, 24, 24, 0.98);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

body.dark .nav-account-menu-item {
	background: transparent;
	color: #fff4db;
}

body.dark .nav-login-label {
	color: #fff4db;
}

body.dark .nav-login-status {
	color: #d7d0c3;
}

body.dark .nav-login-status[data-state="error"] {
	color: #ff9c74;
}

body.dark .nav-login-account-link {
	color: var(--brand-gold-soft);
}

body.dark .nav-link {
	color: rgba(36, 23, 10, 0.74);
}

body.dark .nav-link:hover,
body.dark .nav-link:focus-visible,
body.dark .nav-link.is-active {
	color: var(--brand-ink);
}

.hero {
	position: relative;
	width: min(100%, 1040px);
	margin-inline: auto;
	display: block;
	min-height: auto;
	padding: clamp(28px, 5vw, 56px) 0 clamp(8px, 2vw, 20px);
	background: transparent;
}

.hero-copy,
.section-heading,
.animal-copy {
	display: flex;
	flex-direction: column;
	gap: var(--s2);
}

.hero-copy {
	position: relative;
	z-index: 1;
	max-width: 720px;
	justify-content: flex-start;
	margin: 0 auto;
	align-items: center;
	text-align: center;
}

.hero h1 {
	margin: 0;
	font-size: clamp(52px, 8vw, 92px);
	line-height: 0.92;
	letter-spacing: -0.05em;
	max-width: 9ch;
	color: #111111;
}

.hero-highlight {
	color: var(--brand-rose);
}

.hero-text {
	max-width: 42ch;
	font-size: 20px;
	color: #3f3f3f;
}

body.dark .hero h1 {
	color: #ffffff;
}

body.dark .hero-highlight {
	color: var(--brand-rose);
}

body.dark .hero-text,
body.dark .hero-points li,
body.dark .hero-stage-text,
body.dark .hero-stage-note {
	color: #d0d0d0;
}

body.dark .hero-stage-title {
	color: #ffffff;
}

.hero-points {
	display: none;
}

.hero-points li {
	position: relative;
	padding-left: 22px;
	color: #3f3f3f;
	font-size: 17px;
	line-height: 1.45;
}

.hero-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--brand-gold), var(--accent-strong));
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s2);
	margin-top: var(--s2);
	justify-content: center;
}

.hero-actions .button.primary {
	background: var(--brand-berry);
	color: #ffffff;
}

.hero-anchor {
	position: absolute;
	width: 1px;
	height: 1px;
}

.anchor-bunny {
	left: -102%;
	bottom: -12%;
}

.anchor-fox {
	left: -134%;
	top: 4%;
}

.anchor-koala {
	right: -18%;
	top: 6%;
}

.anchor-panda {
	right: -14%;
	bottom: -4%;
}

.animal-section {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin-top: -280px;
	padding-top: 280px;
}

.section-heading {
	max-width: 640px;
}

.animal-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
	align-items: start;
}

.animal-card {
	--squircle-radius: var(--squircle-md);
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 320px;
	padding: 22px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 247, 247, 0.95));
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 26px 60px rgba(60, 66, 87, 0.12);
	overflow: visible;
	opacity: 1;
	z-index: 2;
	transition: box-shadow 0.3s ease;
}

body.dark .animal-card {
	background: linear-gradient(180deg, rgba(34, 34, 34, 0.92), rgba(22, 22, 22, 0.98));
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

.animal-card:hover {
	box-shadow: 0 34px 72px rgba(60, 66, 87, 0.16);
}

body.dark .animal-card:hover {
	box-shadow: 0 34px 72px rgba(0, 0, 0, 0.34);
}

.animal-media {
	--squircle-radius: 26px;
	display: grid;
	place-items: center;
	flex: 1;
	min-height: 190px;
	padding: 18px;
	overflow: visible;
	background:
		radial-gradient(circle at top, rgba(255, 189, 115, 0.28), transparent 35%),
		linear-gradient(180deg, rgba(17, 17, 17, 0.02), rgba(17, 17, 17, 0.06));
}

body.dark .animal-media {
	background:
		radial-gradient(circle at top, rgba(255, 189, 115, 0.14), transparent 35%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
}

.animal-sprite {
	display: block;
	width: var(--sprite-display-width, 170px);
	height: var(--sprite-display-height, 180px);
	max-width: min(100%, 170px);
	max-height: 180px;
	background-repeat: no-repeat;
	image-rendering: auto;
	filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.14));
	will-change: transform;
	transform-origin: center bottom;
	transform:
		translate3d(
			calc(var(--travel-x, 0px) * var(--journey-progress, 1)),
			calc(var(--travel-y, 0px) * var(--journey-progress, 1)),
			0
		)
		rotate(calc(var(--travel-rotate, 0deg) * var(--journey-progress, 1)))
		scaleX(var(--sprite-flip, 1))
		scale(calc(1 + (var(--travel-scale, 0) * var(--journey-progress, 1))));
	position: relative;
	z-index: 3;
}

.animal-card.is-flipped .animal-sprite {
	--sprite-flip: -1;
}

.auth-shell {
	--squircle-radius: var(--squircle-lg);
	position: relative;
	width: min(100%, 1120px);
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 28px;
	padding: 28px;
	background:
		radial-gradient(circle at top left, rgba(255, 200, 109, 0.24), transparent 28%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 245, 239, 0.98));
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 28px 70px rgba(60, 66, 87, 0.14);
}

body.dark .auth-shell {
	background:
		radial-gradient(circle at top left, rgba(255, 200, 109, 0.12), transparent 28%),
		linear-gradient(180deg, rgba(27, 27, 27, 0.96), rgba(18, 18, 18, 0.98));
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.auth-panel,
.auth-form-card,
.auth-input,
.auth-alt-button {
	--squircle-radius: var(--squircle-md);
}

.auth-panel,
.auth-form-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 28px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(17, 17, 17, 0.06);
}

body.dark .auth-panel,
body.dark .auth-form-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
}

.auth-panel {
	justify-content: space-between;
	min-height: 100%;
}

.auth-kicker {
	display: inline-flex;
	align-self: flex-start;
	padding: 10px 14px;
	background: rgba(214, 166, 58, 0.16);
	color: var(--brand-gold-deep);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

body.dark .auth-kicker {
	color: var(--brand-gold-soft);
	background: rgba(214, 166, 58, 0.12);
}

.auth-title {
	margin: 0;
	font-size: clamp(42px, 6vw, 72px);
	line-height: 0.96;
	letter-spacing: -0.05em;
	max-width: 9ch;
	color: var(--heading);
}

.auth-panel .body {
	max-width: 34ch;
}

.auth-points {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.auth-points li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	color: var(--text-secondary);
}

.auth-points li::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: var(--brand-gold);
	box-shadow: 0 0 0 5px rgba(214, 166, 58, 0.16);
	flex: 0 0 auto;
}

.auth-form-card {
	justify-content: center;
}

.auth-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.auth-fieldset {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border: 0;
	margin: 0;
	padding: 0;
}

.auth-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.auth-label {
	font-size: 15px;
	font-weight: 600;
	color: var(--text);
}

.auth-link {
	font-size: 14px;
	font-weight: 600;
	color: var(--brand-gold-deep);
}

body.dark .auth-link {
	color: var(--brand-gold-soft);
}

.auth-input {
	width: 100%;
	min-height: 58px;
	padding: 0 18px;
	border: 1px solid rgba(17, 17, 17, 0.08);
	background: rgba(255, 255, 255, 0.84);
	color: var(--text);
	font: inherit;
}

.auth-input::placeholder {
	color: var(--text-muted);
}

body.dark .auth-input {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
}

.auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.auth-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	color: var(--text-secondary);
}

.auth-checkbox input {
	accent-color: var(--brand-gold);
}

.auth-submit {
	width: 100%;
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--text-muted);
	font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(17, 17, 17, 0.08);
}

body.dark .auth-divider::before,
body.dark .auth-divider::after {
	background: rgba(255, 255, 255, 0.08);
}

.auth-alt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 0 18px;
	border: 1px solid rgba(17, 17, 17, 0.08);
	background: transparent;
	color: var(--text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

body.dark .auth-alt-button {
	border-color: rgba(255, 255, 255, 0.08);
}

.auth-alt-button.is-active {
	border-color: rgba(216, 106, 22, 0.38);
	background: rgba(216, 106, 22, 0.08);
	color: var(--brand-ink);
}

body.dark .auth-alt-button.is-active {
	background: rgba(216, 106, 22, 0.18);
	color: #fff4db;
}

.account-shell {
	width: var(--layout-track-width);
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--grid-gap);
	margin: 0 auto;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.dark .account-shell {
	background: transparent;
	border: 0;
	box-shadow: none;
}

.dashboard-sidebar,
.account-panel,
.account-card {
	--squircle-radius: var(--squircle-md);
}

.dashboard-sidebar,
.account-panel {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px;
	background: #ffffff;
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 24px 50px rgba(60, 66, 87, 0.08);
}

body.dark .dashboard-sidebar,
body.dark .account-panel {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}

.dashboard-sidebar {
	grid-column: span 3;
	align-self: start;
	position: sticky;
	top: 90px;
	justify-content: flex-start;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.dark .dashboard-sidebar {
	background: transparent;
}

.account-panel {
	grid-column: span 9;
	min-width: 0;
	border-radius: var(--squircle-md);
}

.dashboard-sidebar-card {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px;
	border-radius: var(--squircle-md);
	background:
		linear-gradient(180deg, rgba(244, 249, 251, 0.98), rgba(236, 245, 247, 0.94));
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 24px 50px rgba(60, 66, 87, 0.08);
}

body.dark .dashboard-sidebar-card {
	background:
		linear-gradient(180deg, rgba(30, 35, 39, 0.98), rgba(22, 26, 30, 0.96));
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}

.dashboard-sidebar-block {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dashboard-brand {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.dashboard-brand-mark {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background: linear-gradient(180deg, #f2c85c, #ddb44d);
	color: var(--brand-ink);
	font-family: var(--font-sans);
	font-size: 28px;
	font-weight: 700;
	box-shadow: 0 14px 24px rgba(242, 200, 92, 0.24);
	text-transform: uppercase;
}

.dashboard-brand-name {
	margin: 0;
	font-size: 34px;
	line-height: 0.96;
}

.dashboard-brand-email {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.3;
	color: var(--text-secondary);
}

.dashboard-nav,
.dashboard-settings-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dashboard-nav-link,
.dashboard-mini-link {
	--squircle-radius: var(--squircle-md);
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	min-height: 46px;
	padding: 0 16px;
	border-radius: var(--squircle-md);
	border: 1px solid rgba(17, 17, 17, 0.06);
	background: rgba(255, 255, 255, 0.56);
	color: var(--text);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.dark .dashboard-nav-link,
body.dark .dashboard-mini-link {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	color: #fff4db;
}

.dashboard-nav-link:hover,
.dashboard-mini-link:hover,
.dashboard-nav-link:focus-visible,
.dashboard-mini-link:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 12px 22px rgba(17, 17, 17, 0.06);
}

.dashboard-nav-link.is-active {
	background: linear-gradient(180deg, rgba(242, 200, 92, 0.22), rgba(242, 200, 92, 0.12));
	color: var(--brand-ink);
	border-color: rgba(221, 180, 77, 0.2);
}

.dashboard-mini-link-strong {
	background: rgba(214, 166, 58, 0.16);
	color: var(--brand-ink);
}

.dashboard-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
}

.dashboard-topbar-copy {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dashboard-topbar-copy .section-title {
	margin: 0;
	font-size: clamp(34px, 4vw, 52px);
	line-height: 0.96;
}

.dashboard-topbar-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.dashboard-user-pill {
	--squircle-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 0 16px;
	background: rgba(17, 17, 17, 0.04);
	color: var(--text);
	font-size: 14px;
	font-weight: 600;
}

.dashboard-user-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #7ed9b8;
	box-shadow: 0 0 0 4px rgba(126, 217, 184, 0.16);
}

.dashboard-section {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.dashboard-view-stack {
	display: flex;
	flex-direction: column;
	min-height: 640px;
}

.dashboard-view {
	display: none;
	min-width: 0;
	min-height: 100%;
}

.dashboard-view.is-active {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-height: 640px;
}

.dashboard-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.dashboard-heading .section-title {
	font-size: clamp(26px, 3vw, 40px);
}

.dashboard-main-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.85fr);
	gap: 20px;
}

.dashboard-primary-panel,
.dashboard-side-panel {
	--squircle-radius: var(--squircle-md);
	padding: 22px;
	background: rgba(247, 251, 252, 0.8);
	border: 1px solid rgba(17, 17, 17, 0.05);
}

body.dark .dashboard-primary-panel,
body.dark .dashboard-side-panel {
	background: rgba(255, 255, 255, 0.03);
	border-color: rgba(255, 255, 255, 0.06);
}

.dashboard-inline-link {
	color: var(--brand-gold-deep);
	font-size: 14px;
	font-weight: 700;
}

body.dark .dashboard-inline-link {
	color: var(--brand-gold-soft);
}

.account-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.account-grid-overview {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	border-radius: var(--squircle-md);
	background: linear-gradient(180deg, rgba(241, 249, 251, 0.96), rgba(250, 253, 253, 0.98));
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 14px 28px rgba(60, 66, 87, 0.05);
}

body.dark .account-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.school-overview-card,
.school-action-card {
	gap: 16px;
}

.school-summary-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.school-inline-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.school-action-list {
	display: grid;
	gap: 12px;
}

.school-action-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 16px;
	border-radius: var(--squircle-md);
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(17, 17, 17, 0.06);
}

.school-action-item.is-static {
	align-items: center;
}

.school-action-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
}

.school-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.school-pending-invites {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 4px;
}

body.dark .school-action-item {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
}

.account-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	word-break: break-word;
}

.account-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.class-builder-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.task-builder-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.task-type-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.task-list {
	display: grid;
	gap: 14px;
}

.task-card {
	--squircle-radius: var(--squircle-md);
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	border-radius: var(--squircle-md);
	background: rgba(248, 252, 252, 0.96);
	border: 1px solid rgba(17, 17, 17, 0.05);
	box-shadow: 0 12px 28px rgba(60, 66, 87, 0.06);
}

body.dark .task-card {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.task-card-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.results-list,
.attempt-question-list {
	display: grid;
	gap: 14px;
}

.result-attempt-card,
.attempt-question-card {
	--squircle-radius: var(--squircle-md);
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	border-radius: var(--squircle-md);
	border: 1px solid rgba(17, 17, 17, 0.06);
	background: rgba(248, 252, 252, 0.96);
	color: var(--text);
	font: inherit;
	text-align: left;
}

.result-attempt-card {
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.result-attempt-card:hover,
.result-attempt-card:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(60, 66, 87, 0.08);
	border-color: rgba(214, 166, 58, 0.28);
}

.result-attempt-card.is-active {
	border-color: rgba(214, 166, 58, 0.32);
	background: rgba(255, 249, 235, 0.98);
}

.results-summary-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.results-summary-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px;
	border-radius: var(--squircle-md);
	background: rgba(17, 17, 17, 0.035);
}

.results-detail {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.results-detail-summary {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.result-json-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

.result-json-card,
.result-event-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	border-radius: var(--squircle-md);
	border: 1px solid rgba(17, 17, 17, 0.06);
	background: rgba(255, 255, 255, 0.72);
}

.result-json-pre {
	margin: 0;
	padding: 12px;
	border-radius: var(--squircle-md);
	background: rgba(17, 17, 17, 0.045);
	color: color-mix(in srgb, var(--text) 88%, black 12%);
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}

.result-event-section {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.result-event-list {
	display: grid;
	gap: 12px;
}

.results-task-attempts {
	display: grid;
	gap: 18px;
}

.task-attempt-group {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 18px;
	border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.task-attempt-group:first-child {
	padding-top: 0;
	border-top: 0;
}

.attempt-visual-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border-radius: var(--squircle-md);
	border: 1px solid rgba(17, 17, 17, 0.06);
	background: rgba(255, 252, 245, 0.76);
}

.attempt-crossword-board {
	display: grid;
	grid-template-columns: repeat(var(--crossword-cols), minmax(0, 44px));
	grid-template-rows: repeat(var(--crossword-rows), minmax(0, 44px));
	justify-content: start;
	gap: 0;
	width: fit-content;
}

.attempt-crossword-cell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 2px solid #151515;
	background: #fffdf8;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	color: #111111;
	box-sizing: border-box;
}

.attempt-crossword-cell.is-empty {
	border-color: transparent;
	background: transparent;
}

.attempt-crossword-cell.is-operator {
	background: #ffffff;
}

.attempt-crossword-cell.is-value {
	background: rgba(224, 183, 79, 0.18);
}

.attempt-crossword-cell.is-answer.is-correct {
	background: rgba(92, 181, 92, 0.2);
}

.attempt-crossword-cell.is-answer.is-incorrect {
	background: rgba(215, 69, 110, 0.18);
}

.attempt-crossword-cell.is-answer.is-unanswered {
	background: rgba(17, 17, 17, 0.05);
}

.attempt-question-card.is-correct {
	border-color: rgba(62, 152, 77, 0.24);
}

.attempt-question-card.is-incorrect {
	border-color: rgba(215, 69, 110, 0.24);
}

body.dark .result-attempt-card,
body.dark .attempt-question-card {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	color: #fff4db;
}

body.dark .result-json-card,
body.dark .result-event-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
}

body.dark .task-attempt-group {
	border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark .attempt-visual-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
}

body.dark .result-json-pre {
	background: rgba(0, 0, 0, 0.24);
	color: #fff4db;
}

body.dark .attempt-crossword-cell {
	border-color: rgba(255, 255, 255, 0.84);
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
}

body.dark .attempt-crossword-cell.is-empty {
	border-color: transparent;
	background: transparent;
}

body.dark .attempt-crossword-cell.is-value {
	background: rgba(224, 183, 79, 0.18);
}

body.dark .attempt-crossword-cell.is-answer.is-correct {
	background: rgba(92, 181, 92, 0.2);
}

body.dark .attempt-crossword-cell.is-answer.is-incorrect {
	background: rgba(215, 69, 110, 0.18);
}

body.dark .attempt-crossword-cell.is-answer.is-unanswered {
	background: rgba(255, 255, 255, 0.08);
}

body.dark .result-attempt-card.is-active {
	background: rgba(214, 166, 58, 0.12);
	border-color: rgba(214, 166, 58, 0.32);
}

body.dark .results-summary-item {
	background: rgba(255, 255, 255, 0.05);
}

.class-roster-input {
	min-height: 220px;
	padding: 16px 18px;
	resize: vertical;
}

.class-list {
	display: grid;
	gap: 18px;
}

.student-accordion-list {
	display: grid;
	gap: 12px;
}

.student-accordion-item {
	display: grid;
	gap: 12px;
}

.student-accordion-toggle {
	--squircle-radius: var(--squircle-md);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 20px 22px;
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-radius: var(--squircle-md);
	background: #ffffff;
	box-shadow: 0 14px 30px rgba(60, 66, 87, 0.06);
	color: var(--text);
	font: inherit;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.student-accordion-toggle:hover,
.student-accordion-toggle:focus-visible,
.student-accordion-item.is-open .student-accordion-toggle {
	border-color: rgba(214, 166, 58, 0.28);
	background: rgba(255, 248, 233, 0.72);
	box-shadow: 0 18px 34px rgba(60, 66, 87, 0.08);
	transform: translateY(-1px);
}

.student-accordion-name {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.student-accordion-class {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.1;
	color: rgba(36, 23, 10, 0.68);
	text-align: right;
}

.student-accordion-panel .student-dashboard-card {
	background: rgba(248, 252, 252, 0.98);
}

body.dark .student-accordion-toggle {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
	color: #f7f6f2;
}

body.dark .student-accordion-toggle:hover,
body.dark .student-accordion-toggle:focus-visible,
body.dark .student-accordion-item.is-open .student-accordion-toggle {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(214, 166, 58, 0.32);
}

body.dark .student-accordion-class {
	color: rgba(247, 246, 242, 0.72);
}

.class-card {
	--squircle-radius: var(--squircle-md);
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px;
	border-radius: var(--squircle-md);
	background: #ffffff;
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 14px 30px rgba(60, 66, 87, 0.06);
}

body.dark .class-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.class-summary-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.class-summary-card {
	--squircle-radius: var(--squircle-md);
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	border-radius: var(--squircle-md);
	background: rgba(241, 249, 251, 0.96);
	border: 1px solid rgba(17, 17, 17, 0.05);
}

body.dark .class-summary-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
}

.class-card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.class-code-chip {
	--squircle-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 16px;
	background: rgba(214, 166, 58, 0.14);
	color: var(--brand-ink);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

body.dark .class-code-chip {
	background: rgba(214, 166, 58, 0.2);
	color: #fff4db;
}

.student-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.student-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.student-dashboard-card {
	--squircle-radius: var(--squircle-md);
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
	border-radius: var(--squircle-md);
	background: rgba(248, 252, 252, 0.96);
	border: 1px solid rgba(17, 17, 17, 0.05);
	box-shadow: 0 12px 28px rgba(60, 66, 87, 0.06);
}

body.dark .student-dashboard-card {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.student-dashboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.student-dashboard-header .label {
	font-size: 20px;
}

.student-task-title {
	min-height: 3em;
}

.student-status-pill {
	--squircle-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 0 12px;
	background: rgba(214, 166, 58, 0.14);
	color: var(--brand-ink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

body.dark .student-status-pill {
	background: rgba(214, 166, 58, 0.2);
	color: #fff4db;
}

.student-stat-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.student-stat-value {
	margin: 6px 0 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--text);
}

.student-chip {
	--squircle-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 14px;
	background: rgba(17, 17, 17, 0.05);
	color: var(--text);
	font-size: 14px;
	font-weight: 600;
}

body.dark .student-chip {
	background: rgba(255, 255, 255, 0.08);
	color: #fff4db;
}

.student-chip-muted {
	color: var(--text-secondary);
}

.account-inline-link {
	color: var(--brand-gold-deep);
	font-weight: 600;
}

body.dark .account-inline-link {
	color: var(--brand-gold-soft);
}

.account-status[data-state="error"] {
	color: #bb3e1e;
}

body.dark .account-status[data-state="error"] {
	color: #ff9c74;
}

.join-landing {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 980px);
	margin: 0 auto;
	padding: 32px var(--layout-gutter);
}

.join-entry-stage,
.join-roster-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.join-entry-stage[hidden],
.join-roster-stage[hidden] {
	display: none !important;
}

.join-page.is-roster-loaded .join-landing {
	padding-top: 56px;
	padding-bottom: 56px;
	align-items: flex-start;
}

.join-simple-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	width: 100%;
}

.join-teacher-line {
	margin: 0;
	min-height: 1.3em;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--text-secondary);
}

.join-simple-title {
	margin: 0;
	font-size: clamp(52px, 8vw, 92px);
	line-height: 0.92;
	letter-spacing: -0.05em;
	text-align: center;
	color: var(--heading);
}

.join-simple-code {
	width: min(100%, 360px);
	min-height: 104px;
	padding: 0 24px;
	border: 2px solid rgba(17, 17, 17, 0.08);
	border-radius: var(--squircle-md);
	background: rgba(255, 255, 255, 0.92);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: clamp(34px, 6vw, 54px);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.18em;
	text-align: center;
	text-transform: uppercase;
	box-shadow: 0 24px 44px rgba(60, 66, 87, 0.08);
}

.join-simple-code:focus {
	outline: none;
	border-color: rgba(216, 106, 22, 0.3);
	box-shadow:
		0 0 0 6px rgba(224, 183, 79, 0.14),
		0 24px 44px rgba(60, 66, 87, 0.12);
}

.join-simple-status {
	margin: 0;
	min-height: 1.4em;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--text-secondary);
	text-align: center;
}

.join-simple-status[data-state="error"] {
	color: #bb3e1e;
}

.join-roster-stage {
	position: relative;
	gap: 28px;
	max-width: 720px;
	margin: 0 auto;
}

.join-roster-welcome {
	margin: 0;
	font-size: clamp(52px, 8vw, 92px);
	line-height: 0.92;
	letter-spacing: -0.05em;
	text-align: center;
	color: var(--heading);
}

.join-roster-secondary {
	margin: -10px 0 0;
	max-width: 32ch;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	color: var(--text-secondary);
}

.join-confirm-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(255, 251, 244, 0.82);
	backdrop-filter: blur(8px);
}

.join-confirm-overlay[hidden] {
	display: none !important;
}

.join-confirm-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	width: min(100%, 420px);
	padding: 28px;
	border-radius: var(--squircle-md);
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(17, 17, 17, 0.08);
	box-shadow: 0 26px 60px rgba(60, 66, 87, 0.18);
}

.join-confirm-copy {
	margin: 0;
	font-weight: 700;
	line-height: 0.98;
	letter-spacing: -0.04em;
	text-align: center;
	color: var(--heading);
}

.join-confirm-lead {
	display: inline-block;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -0.03em;
	color: var(--heading);
	transition: opacity 0.28s ease;
}

.join-confirm-name {
	display: inline-block;
	font-size: clamp(34px, 5vw, 54px);
	color: #5b9fe8;
	transition: color 0.28s ease;
}

.join-confirm-actions {
	position: relative;
	width: min(100%, 260px);
	height: 48px;
}

.join-confirm-actions .button {
	position: absolute;
	top: 0;
	min-width: 108px;
	transition:
		left 0.42s ease,
		right 0.42s ease,
		transform 0.42s ease,
		opacity 0.24s ease,
		width 0.24s ease,
		padding 0.24s ease,
		margin 0.24s ease,
		border-width 0.24s ease;
}

.join-confirm-actions [data-join-confirm-no] {
	left: 0;
}

.join-confirm-actions [data-join-confirm-yes] {
	right: 0;
}

.join-confirm-card.is-confirmed .join-confirm-name {
	color: #5cb55c;
}

.join-confirm-card.is-confirmed .join-confirm-lead {
	opacity: 0;
}

.join-confirm-card.is-accepting [data-join-confirm-no],
.join-confirm-card.is-rejecting [data-join-confirm-yes] {
	opacity: 0;
	transform: scale(0.92);
	pointer-events: none;
	width: 0;
	min-width: 0;
	padding-left: 0;
	padding-right: 0;
	margin: 0;
	border-width: 0;
	overflow: hidden;
}

.join-confirm-card.is-accepting [data-join-confirm-yes] {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
}

.join-confirm-card.is-rejecting [data-join-confirm-no] {
	left: 50%;
	transform: translateX(-50%);
}

.join-confirm-yes {
	background: #5cb55c;
	color: #ffffff;
	border-color: transparent;
}

.join-confirm-yes-label {
	display: inline-block;
	transition:
		opacity 0.16s ease,
		transform 0.16s ease,
		filter 0.16s ease;
}

.join-confirm-yes.is-label-morph .join-confirm-yes-label {
	opacity: 0;
	transform: scale(0.88);
	filter: blur(6px);
}

.join-confirm-yes:hover,
.join-confirm-yes:focus-visible {
	background: #4aa64a;
}

.join-confirm-actions [data-join-confirm-no] {
	border: 1px solid #111111;
	background: #ffffff;
	color: #111111;
}

.join-confirm-actions [data-join-confirm-no]:hover,
.join-confirm-actions [data-join-confirm-no]:focus-visible {
	background: rgba(215, 69, 110, 0.14);
	border-color: rgba(215, 69, 110, 0.6);
	color: #111111;
}

body.dark .join-confirm-overlay {
	background: rgba(12, 12, 12, 0.58);
}

body.dark .join-confirm-card {
	background: rgba(24, 24, 24, 0.96);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

body.dark .join-confirm-copy {
	color: #fff4db;
}

.dashboard-secondary-input {
	min-height: 108px;
	padding: 16px 18px;
	resize: vertical;
	font-weight: 400;
	line-height: 1.45;
}

.join-roster-title {
	margin: 0;
	font-size: clamp(42px, 6vw, 72px);
	line-height: 0.96;
	letter-spacing: -0.05em;
}

.join-roster-copy {
	margin: 0;
	font-size: 18px;
	line-height: 1.4;
	color: var(--text-secondary);
}

body.dark .join-simple-code {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	box-shadow: 0 24px 44px rgba(0, 0, 0, 0.18);
}

body.dark .join-simple-code:focus {
	border-color: rgba(224, 183, 79, 0.38);
	box-shadow:
		0 0 0 6px rgba(224, 183, 79, 0.14),
		0 24px 44px rgba(0, 0, 0, 0.24);
}

body.dark .join-simple-status[data-state="error"] {
	color: #ff9c74;
}

.student-roster {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.student-name-button {
	--squircle-radius: var(--squircle-md);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 74px;
	padding: 16px 18px;
	border: 1px solid rgba(17, 17, 17, 0.08);
	background: rgba(255, 255, 255, 0.84);
	color: var(--text);
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.student-name-button:hover,
.student-name-button:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 18px 34px rgba(60, 66, 87, 0.12);
	border-color: rgba(216, 106, 22, 0.28);
}

body.dark .student-name-button {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	color: #fff4db;
}

body.dark .student-name-button:hover,
body.dark .student-name-button:focus-visible {
	box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.question-set-shell {
	min-height: calc(100vh - 180px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.question-set-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	width: 100%;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.question-single {
	--question-font-size: clamp(52px, 8vw, 92px);
	--question-line-height: 0.92;
	--question-letter-spacing: -0.05em;
	position: relative;
	display: flex;
	align-items: center;
	width: var(--layout-track-width);
	max-width: var(--layout-track-width);
	margin: 0 auto;
	padding: 18px 0;
	border-radius: var(--squircle-lg);
	transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.question-side {
	flex: 0 0 50%;
	display: flex;
	align-items: center;
}

.question-side-left {
	justify-content: flex-end;
	padding-right: clamp(44px, 6vw, 88px);
}

.question-side-right {
	justify-content: flex-start;
	padding-left: clamp(44px, 6vw, 88px);
}

.question-single.is-correct {
	background: rgba(92, 181, 92, 0.18);
	box-shadow: 0 0 0 6px rgba(92, 181, 92, 0.1);
}

.question-single.is-incorrect {
	background: rgba(215, 69, 110, 0.18);
	box-shadow: 0 0 0 6px rgba(215, 69, 110, 0.1);
}

.question-prompt {
	margin: 0;
	font-size: var(--question-font-size);
	line-height: var(--question-line-height);
	letter-spacing: var(--question-letter-spacing);
	color: #111111;
	text-align: right;
}

.question-equals {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: inline-block;
	pointer-events: none;
	font-size: var(--question-font-size);
	line-height: var(--question-line-height);
	letter-spacing: var(--question-letter-spacing);
	font-weight: 700;
	color: #111111;
}

.question-inline-answer {
	display: inline-flex;
	align-items: center;
}

.question-inline-input {
	width: clamp(140px, 18vw, 220px);
	min-height: clamp(88px, 14vw, 132px);
	padding: 0 24px;
	border: 2px solid rgba(17, 17, 17, 0.1);
	background: rgba(255, 255, 255, 0.92);
	font-size: clamp(40px, 7vw, 84px);
	font-weight: 700;
	text-align: center;
	box-shadow: 0 24px 44px rgba(60, 66, 87, 0.08);
}

.question-inline-input:focus {
	outline: none;
	border-color: rgba(216, 106, 22, 0.3);
	box-shadow:
		0 0 0 6px rgba(224, 183, 79, 0.14),
		0 24px 44px rgba(60, 66, 87, 0.12);
}

.question-set-page.is-complete .question-inline-input {
	display: none;
}

.question-complete {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
}

.question-crossword {
	display: flex;
	flex-direction: column;
	gap: 28px;
	width: min(100%, 760px);
	margin: 0 auto;
	padding: clamp(24px, 4vw, 40px);
	border: 0;
	background: transparent;
	box-shadow: none;
}

.question-crossword-title {
	margin: 0;
	font-size: clamp(40px, 6vw, 68px);
	line-height: 0.96;
	letter-spacing: -0.05em;
	text-align: center;
	color: var(--heading);
}

.question-crossword-board {
	display: grid;
	grid-template-columns: repeat(var(--crossword-cols), minmax(0, var(--crossword-cell-size, 78px)));
	grid-template-rows: repeat(var(--crossword-rows), minmax(0, var(--crossword-cell-size, 78px)));
	justify-content: center;
	gap: 0;
	width: fit-content;
	margin: 0 auto;
}

.question-crossword-cell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--crossword-cell-size, 78px);
	height: var(--crossword-cell-size, 78px);
	border: 2px solid #151515;
	background: #fffdf8;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 700;
	line-height: 1;
	color: #111111;
	box-sizing: border-box;
}

.question-crossword-cell.is-empty {
	border-color: transparent;
	background: transparent;
}

.question-crossword-cell.is-operator {
	background: #ffffff;
}

.question-crossword-cell.is-value {
	background: rgba(224, 183, 79, 0.16);
}

.question-crossword-blank {
	padding: 0;
}

.question-crossword-input {
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 700;
	line-height: 1;
	text-align: center;
	color: #111111;
}

.question-crossword-input:focus {
	outline: none;
	background: rgba(224, 183, 79, 0.18);
}

.question-crossword-note {
	margin: 0;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--text-secondary);
}

body.dark .question-prompt {
	color: #ffffff;
}

body.dark .question-equals {
	color: #ffffff;
}

body.dark .question-inline-input {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	box-shadow: 0 24px 44px rgba(0, 0, 0, 0.18);
}

body.dark .question-inline-input:focus {
	border-color: rgba(224, 183, 79, 0.38);
	box-shadow:
		0 0 0 6px rgba(224, 183, 79, 0.14),
		0 24px 44px rgba(0, 0, 0, 0.24);
}

body.dark .question-crossword {
	background: transparent;
	box-shadow: none;
}

body.dark .question-crossword-title,
body.dark .question-crossword-note {
	color: #fff4db;
}

body.dark .question-crossword-cell {
	border-color: rgba(255, 255, 255, 0.84);
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
}

body.dark .question-crossword-cell.is-empty {
	border-color: transparent;
	background: transparent;
}

body.dark .question-crossword-cell.is-operator {
	background: rgba(255, 255, 255, 0.03);
}

body.dark .question-crossword-cell.is-value {
	background: rgba(224, 183, 79, 0.18);
}

body.dark .question-crossword-input {
	background: transparent;
	color: #ffffff;
}

body.dark .question-crossword-input:focus {
	background: rgba(224, 183, 79, 0.18);
}

.test-section {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.app-section {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.app-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.app-card,
.app-thumbnail,
.app-store-link {
	--squircle-radius: var(--squircle-md);
}

.app-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	height: 100%;
	padding: 24px;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 20px 48px rgba(60, 66, 87, 0.1);
	cursor: pointer;
	transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

body.dark .app-card {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.app-card:focus-visible {
	outline: 3px solid rgba(216, 106, 22, 0.35);
	outline-offset: 4px;
}

.app-card:hover,
.app-card:focus-visible {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 28px 60px rgba(60, 66, 87, 0.16);
}

body.dark .app-card:hover,
body.dark .app-card:focus-visible {
	box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

.app-thumbnail {
	display: grid;
	place-items: center;
	padding: 18px;
	min-height: 220px;
	background:
		radial-gradient(circle at top, rgba(255, 189, 115, 0.24), transparent 45%),
		linear-gradient(180deg, rgba(17, 17, 17, 0.02), rgba(17, 17, 17, 0.06));
}

body.dark .app-thumbnail {
	background:
		radial-gradient(circle at top, rgba(255, 189, 115, 0.14), transparent 45%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
}

.app-thumbnail img {
	display: block;
	width: min(100%, 240px);
	height: auto;
	border-radius: 22%;
	box-shadow:
		0 20px 28px rgba(0, 0, 0, 0.18),
		0 0 0 1px rgba(17, 17, 17, 0.05);
	filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.14));
	transition:
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.32s ease,
		filter 0.32s ease;
	transition-delay: 0s;
	transform-origin: center center;
}

.app-card:hover .app-thumbnail img,
.app-card:focus-within .app-thumbnail img {
	transform: translateY(-5px) scale(1.05);
	box-shadow:
		0 28px 36px rgba(0, 0, 0, 0.22),
		0 0 0 1px rgba(17, 17, 17, 0.05);
	filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.16));
	transition-delay: 0.08s;
}

body.dark .app-thumbnail img {
	box-shadow:
		0 20px 28px rgba(0, 0, 0, 0.28),
		0 0 0 1px rgba(255, 255, 255, 0.08);
}

.app-copy {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 14px;
	align-items: flex-start;
}

.app-store-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	align-self: center;
}

.app-store-badge {
	display: block;
	width: 160px;
	height: auto;
}

.app-coming-soon {
	margin: 4px auto 0;
	padding: 10px 18px;
	border-radius: 999px;
	background: rgba(214, 166, 58, 0.14);
	color: var(--brand-ink);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

body.dark .app-coming-soon {
	background: rgba(214, 166, 58, 0.2);
	color: #fff4db;
}

.test-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.test-tile,
.test-band,
.test-chip {
	--squircle-radius: var(--squircle-md);
}

.test-tile,
.test-band {
	padding: 28px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(17, 17, 17, 0.06);
	box-shadow: 0 20px 48px rgba(60, 66, 87, 0.1);
}

body.dark .test-tile,
body.dark .test-band {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.test-band {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 24px;
	align-items: center;
}

.test-copy {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.test-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-content: flex-start;
}

.test-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 18px;
	background: rgba(214, 166, 58, 0.14);
	color: var(--brand-ink);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

body.dark .test-chip {
	background: rgba(214, 166, 58, 0.2);
	color: #fff4db;
}

@media (prefers-reduced-motion: reduce) {
	.animal-sprite {
		transform: none;
	}
}

@media (max-width: 600px) {
	.nav-inner {
		padding-inline: var(--s2);
		flex-direction: column;
		align-items: flex-start;
	}

	.nav-brand {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.nav-links {
		width: 100%;
	}

	.logo-inline .rigby,
	.logo-inline .maths {
		font-size: 28px;
	}

	.nav-actions {
		width: 100%;
		justify-content: flex-start;
	}

	.nav-auth {
		flex: 1 1 140px;
	}

	.nav-btn {
		flex: 1 1 140px;
	}

	.nav-login-panel {
		left: 0;
		right: auto;
		width: min(100%, 320px);
	}

	.hero {
		padding: 28px;
	}

	.auth-shell {
		grid-template-columns: 1fr;
		padding: 18px;
	}

	.account-shell {
		grid-template-columns: 1fr;
		padding: 0;
	}

	.join-shell {
		grid-template-columns: 1fr;
		padding: 18px;
	}

	.question-single {
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		margin-left: 0;
	}

	.question-crossword {
		width: 100%;
		padding: 22px 18px;
	}

	.question-crossword-board {
		--crossword-cell-size: min(16vw, 64px);
	}

	.question-side {
		flex: 0 0 auto;
		width: 100%;
		justify-content: center;
		padding-inline: 0;
	}

	.question-equals {
		position: static;
		transform: none;
	}

	.dashboard-sidebar {
		position: static;
	}

	.dashboard-topbar,
	.dashboard-main-grid {
		display: flex;
		flex-direction: column;
	}

	.dashboard-topbar {
		align-items: flex-start;
	}

	.dashboard-topbar-side {
		align-items: flex-start;
	}

	.hero h1 {
		max-width: none;
	}

	.hero-anchor {
		display: none;
	}

	.animal-grid {
		grid-template-columns: 1fr;
	}

	.account-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.student-roster {
		grid-template-columns: 1fr;
	}

	.class-summary-grid,
	.student-dashboard-grid,
	.student-stat-row {
		grid-template-columns: 1fr;
	}

	.student-accordion-toggle {
		grid-template-columns: 1fr;
	}

	.student-accordion-class {
		text-align: left;
	}

	.animal-section {
		margin-top: 0;
		padding-top: 0;
	}

	.animal-card {
		transform: none;
	}

	.auth-panel,
	.auth-form-card {
		padding: 22px;
	}

	.test-grid,
	.test-band,
	.app-grid {
		grid-template-columns: 1fr;
	}

	.task-builder-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 900px) {
	.question-single {
		flex-direction: column;
		padding-top: 0;
	}

	.question-crossword-title {
		font-size: clamp(34px, 9vw, 52px);
	}

	.question-crossword-board {
		--crossword-cell-size: min(17vw, 58px);
	}

	.hero {
		flex-direction: column;
		min-height: auto;
	}

	.animal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.app-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.auth-shell {
		grid-template-columns: 1fr;
	}

	.test-grid,
	.test-band,
	.app-grid {
		grid-template-columns: 1fr;
	}

	.animal-section {
		margin-top: 0;
		padding-top: 0;
	}

	.animal-card {
		transform: none;
	}

	.animal-sprite {
		transform: none;
	}
}
