/**
 * Script Name: MathMox Shared Site Styles
 * Version: 4.0.11 Stable Donation and Era Heroes Revision
 * Date: 2026-07-11
 * Author: Jeffery L. Paris
 *
 * Copyright (c) 2003-2026 Jeffery L. Paris. All rights reserved.
 * Homepage: https://mathmox.com/
 */

:root {
	--color-bg: #232c42;
	--color-bg-deep: #111827;
	--color-bg-card: #1c2438;
	--color-bg-card-soft: #2c3650;
	--color-bg-control: #151d2e;
	--color-border: #40506f;
	--color-border-accent: #4a90d9;
	--color-text-primary: #ffffff;
	--color-text-secondary: #aeb8cf;
	--color-text-link: #72b8ef;
	--color-accent-orange: #f5821e;
	--color-accent-orange-hover: #d96f15;
	--color-success: #87d68d;
	--color-success-bg: #1f3a26;
	--color-warning: #f5cf66;
	--color-warning-bg: #3a3320;
	--color-danger: #f08b8b;
	--color-danger-bg: #3a2424;
	--shadow-card: 0 1rem 2.5rem rgba(4, 9, 20, 0.25);
	--shell-max-width: 48rem;
	--radius-sm: 0.4rem;
	--radius-md: 0.625rem;
	--radius-lg: 0.8rem;
	--radius-pill: 999px;
	--transition-fast: 180ms ease;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background: var(--color-bg);
	color: var(--color-text-primary);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
}

body.overlay-open {
	overflow: hidden;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
select {
	cursor: pointer;
}

a {
	color: var(--color-text-link);
}

a:hover {
	text-decoration-thickness: 0.13em;
}

img,
svg {
	display: block;
	max-width: 100%;
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

ul,
ol {
	margin-top: 0;
}

[hidden] {
	display: none !important;
}

:focus-visible {
	outline: 0.2rem solid #ffffff;
	outline-offset: 0.18rem;
}

.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;
}

.skip-link {
	position: fixed;
	left: 0.5rem;
	top: -4rem;
	z-index: 500;
	padding: 0.65rem 1rem;
	border-radius: var(--radius-md);
	background: var(--color-accent-orange);
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	transition: top var(--transition-fast);
}

.skip-link:focus {
	top: 0.5rem;
}

.app-shell {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--shell-max-width);
	min-height: 100vh;
	margin: 0 auto;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 4.8rem;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(28, 36, 56, 0.97);
	box-shadow: 0 0.35rem 1.2rem rgba(4, 9, 20, 0.2);
}

.site-logo {
	display: inline-flex;
	flex-direction: column;
	min-width: 0;
	color: #ffffff;
	text-decoration: none;
}

.site-logo-mark {
	display: flex;
	align-items: baseline;
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.site-logo-sigma {
	margin-right: 0.28rem;
	color: var(--color-accent-orange);
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.85rem;
	line-height: 0.8;
}

.site-logo-name-secondary {
	color: var(--color-text-link);
}

.site-logo-tagline {
	margin-top: 0.14rem;
	color: var(--color-text-secondary);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.03em;
}

.header-icons {
	display: flex;
	align-items: center;
	gap: 0.38rem;
}

.icon-button {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 2.55rem;
	height: 2.55rem;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--color-text-secondary);
	transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.icon-button:hover {
	border-color: rgba(114, 184, 239, 0.55);
	background: rgba(114, 184, 239, 0.1);
	color: #ffffff;
}

.icon {
	width: 1.35rem;
	height: 1.35rem;
}

.icon-count {
	position: absolute;
	top: -0.15rem;
	right: -0.15rem;
	display: grid;
	place-items: center;
	min-width: 1.12rem;
	height: 1.12rem;
	padding: 0 0.2rem;
	border: 2px solid var(--color-bg-card);
	border-radius: var(--radius-pill);
	background: var(--color-accent-orange);
	color: #ffffff;
	font-size: 0.64rem;
	font-weight: 800;
	line-height: 1;
}

.nav-overlay {
	position: fixed;
	inset: 0;
	z-index: 190;
	background: rgba(3, 7, 18, 0.7);
	opacity: 0;
	transition: opacity var(--transition-fast);
}

.nav-overlay.is-open {
	opacity: 1;
}

.nav-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 200;
	width: min(22rem, 88vw);
	height: 100vh;
	padding: 1rem;
	border-left: 1px solid var(--color-border);
	background: var(--color-bg-card);
	box-shadow: -1rem 0 3rem rgba(3, 7, 18, 0.4);
	transform: translateX(102%);
	transition: transform var(--transition-fast);
	overflow-y: auto;
}

.nav-drawer.is-open {
	transform: translateX(0);
}

.nav-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--color-border);
}

.nav-drawer-title {
	font-size: 1.2rem;
	font-weight: 800;
}

.nav-drawer-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-drawer-link {
	display: block;
	padding: 0.78rem 0.85rem;
	border-radius: var(--radius-md);
	color: var(--color-text-primary);
	font-weight: 600;
	text-decoration: none;
}

.nav-drawer-link:hover,
.nav-drawer-link.is-current {
	background: var(--color-bg-card-soft);
	color: #ffffff;
}

.nav-drawer-link.is-current {
	box-shadow: inset 0.22rem 0 var(--color-accent-orange);
}

.breadcrumb-bar {
	padding: 0.68rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	background: rgba(17, 24, 39, 0.35);
}

.breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--color-text-secondary);
	font-size: 0.84rem;
}

.breadcrumb-list li + li::before {
	content: '/';
	margin-right: 0.4rem;
	color: #71809e;
}

.breadcrumb-list a {
	color: var(--color-text-link);
}

.breadcrumb-current {
	color: var(--color-text-secondary);
}

.main-content {
	flex: 1;
	padding: 1.25rem 1rem 2rem;
}

.practice-heading {
	margin-bottom: 1rem;
}

.practice-heading h1 {
	margin-bottom: 0.35rem;
	font-size: clamp(1.8rem, 6vw, 2.5rem);
	line-height: 1.12;
}

.practice-heading p:last-child {
	max-width: 43rem;
	margin-bottom: 0;
	color: var(--color-text-secondary);
}

.eyebrow {
	margin-bottom: 0.25rem;
	color: var(--color-accent-orange);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.category-select-wrapper {
	margin-bottom: 1.15rem;
}

.category-select-wrapper label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--color-text-secondary);
	font-size: 0.86rem;
	font-weight: 700;
}

.category-select-wrapper select,
.control-input {
	width: 100%;
	min-height: 3rem;
	padding: 0.65rem 2.8rem 0.65rem 0.85rem;
	border: 1px solid var(--color-border-accent);
	border-radius: var(--radius-md);
	background-color: var(--color-bg-card);
	color: var(--color-text-primary);
}

.category-select-wrapper select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #ffffff 50%), linear-gradient(135deg, #ffffff 50%, transparent 50%);
	background-position: calc(100% - 1.15rem) 1.28rem, calc(100% - 0.85rem) 1.28rem;
	background-repeat: no-repeat;
	background-size: 0.34rem 0.34rem, 0.34rem 0.34rem;
}

.inline-link-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding-left: 1.2rem;
}

.math-card,
.feedback-card,
.empty-state {
	padding: clamp(1rem, 4vw, 1.55rem);
	border: 1px solid var(--color-border-accent);
	border-radius: var(--radius-lg);
	background: var(--color-bg-card);
	box-shadow: var(--shadow-card);
}

.math-card-label {
	margin-bottom: 0.35rem;
	color: var(--color-text-secondary);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.math-problem {
	margin-bottom: 1rem;
	font-size: clamp(1.45rem, 5vw, 2.05rem);
	line-height: 1.28;
	word-break: break-word;
}

.instructions-toggle-wrapper {
	margin-bottom: 0.5rem;
	text-align: right;
}

.instructions-toggle-button,
.text-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-text-link);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.instructions-card {
	margin-bottom: 1rem;
	padding: 0.85rem 1rem;
	border-left: 0.24rem solid var(--color-border-accent);
	border-radius: var(--radius-sm);
	background: var(--color-bg-card-soft);
}

.instructions-card.is-hidden {
	display: none;
}

.instructions-card-title {
	margin-bottom: 0.18rem;
	font-weight: 800;
}

.instructions-card-text {
	margin-bottom: 0;
	color: var(--color-text-secondary);
}

.answer-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 700;
}

.answer-input {
	width: 100%;
	min-height: 3.25rem;
	margin-bottom: 0.8rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-bg-control);
	color: #ffffff;
	font-size: 1.1rem;
}

.answer-input:focus {
	border-color: var(--color-border-accent);
}

.submit-button,
.next-question-button,
.primary-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.65rem 1.2rem;
	border: 1px solid var(--color-accent-orange);
	border-radius: var(--radius-md);
	background: var(--color-accent-orange);
	color: #ffffff;
	font-weight: 800;
	text-decoration: none;
	transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.submit-button {
	width: 100%;
}

.submit-button:hover,
.next-question-button:hover,
.primary-button:hover {
	border-color: var(--color-accent-orange-hover);
	background: var(--color-accent-orange-hover);
	transform: translateY(-1px);
}

.feedback-card {
	border-color: var(--color-border);
}

.feedback-card.feedback-correct {
	border-color: var(--color-success);
	background: var(--color-success-bg);
}

.feedback-card.feedback-almost {
	border-color: var(--color-warning);
	background: var(--color-warning-bg);
}

.feedback-card.feedback-incorrect {
	border-color: var(--color-danger);
	background: var(--color-danger-bg);
}

.feedback-title {
	margin-bottom: 0.25rem;
	font-size: 1.35rem;
	font-weight: 800;
}

.feedback-text {
	font-size: 1.05rem;
}

.feedback-meta {
	margin-bottom: 0.55rem;
	color: var(--color-text-secondary);
}

.feedback-card .next-question-button {
	margin-top: 0.65rem;
}

.empty-state {
	text-align: center;
}

.empty-state .primary-button {
	margin-top: 0.5rem;
}

.sheet {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
}

.sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 7, 18, 0.76);
	opacity: 0;
	transition: opacity var(--transition-fast);
}

.sheet-panel-wide {
	width: min(100%, 52rem);
}

.sheet-panel {
	position: relative;
	z-index: 1;
	width: min(100%, 40rem);
	max-height: min(88vh, 52rem);
	padding: 1rem;
	border: 1px solid var(--color-border);
	border-bottom: 0;
	border-radius: 1rem 1rem 0 0;
	background: var(--color-bg-card);
	box-shadow: 0 -1rem 3rem rgba(3, 7, 18, 0.5);
	transform: translateY(105%);
	transition: transform var(--transition-fast);
	overflow-y: auto;
}

.sheet.is-open .sheet-backdrop {
	opacity: 1;
}

.sheet.is-open .sheet-panel {
	transform: translateY(0);
}

.sheet-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.85rem;
	padding-bottom: 0.7rem;
	border-bottom: 1px solid var(--color-border);
}

.sheet-header h2 {
	margin: 0;
	font-size: 1.25rem;
}

.sheet-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.sheet-action,
.small-button {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.55rem;
	min-height: 2.85rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-bg-card-soft);
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
}

.sheet-action:hover,
.small-button:hover {
	border-color: var(--color-border-accent);
	background: #35415f;
}

.sheet-action .icon,
.small-button .icon {
	width: 1.05rem;
	height: 1.05rem;
}

.sheet-note,
.status-message {
	margin: 0.85rem 0 0;
	color: var(--color-text-secondary);
	font-size: 0.88rem;
}

.sheet-note kbd {
	padding: 0.1rem 0.3rem;
	border: 1px solid var(--color-border);
	border-radius: 0.25rem;
	background: var(--color-bg-control);
	color: #ffffff;
}


.calculator-panel {
	width: min(100%, 25rem);
	max-height: calc(100vh - 1.5rem);
	max-height: calc(100dvh - 1.5rem);
	padding: 0.75rem;
}

.calculator-expression {
	min-height: 1.1rem;
	margin-bottom: 0.2rem;
	color: var(--color-text-secondary);
	font-size: 0.75rem;
	line-height: 1.2;
	text-align: right;
	word-break: break-all;
}

.calculator-display {
	width: 100%;
	min-height: 3rem;
	padding: 0.4rem 0.65rem;
	border: 1px solid var(--color-border-accent);
	border-radius: var(--radius-md);
	background: var(--color-bg-control);
	color: #ffffff;
	font-family: 'Courier New', Courier, monospace;
	font-size: clamp(1.25rem, 4vw, 1.65rem);
	font-weight: 700;
	text-align: right;
}

.calculator-memory {
	min-height: 1.1rem;
	padding: 0.12rem 0.1rem 0.2rem;
	color: var(--color-text-secondary);
	font-size: 0.72rem;
	line-height: 1.2;
	text-align: right;
}

.calculator-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.35rem;
}

.calculator-grid button {
	min-height: 2.35rem;
	padding: 0.25rem;
	border: 1px solid var(--color-border);
	border-radius: 0.55rem;
	background: var(--color-bg-card-soft);
	color: #ffffff;
	font-size: 0.92rem;
	font-weight: 800;
}

.calculator-grid button:hover {
	border-color: var(--color-border-accent);
	background: #35415f;
}

.calculator-grid .operator {
	background: #263f60;
	color: #a8d8ff;
}

.calculator-grid .equals {
	grid-column: span 2;
	border-color: var(--color-accent-orange);
	background: var(--color-accent-orange);
}

.calculator-grid .equals:hover {
	background: var(--color-accent-orange-hover);
}

.calculator-history-wrap {
	margin-top: 0.55rem;
	padding-top: 0.45rem;
	border-top: 1px solid var(--color-border);
}

.calculator-panel .sheet-header {
	margin-bottom: 0.45rem;
	padding-bottom: 0.45rem;
}

.calculator-history-summary {
	cursor: pointer;
	color: var(--color-text-link);
	font-size: 0.82rem;
	font-weight: 800;
}

.calculator-history-wrap[open] .calculator-history-summary {
	margin-bottom: 0.45rem;
}

.calculator-history-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.calculator-history-header h3 {
	margin: 0;
	font-size: 1rem;
}

.calculator-history {
	display: grid;
	gap: 0.3rem;
	max-height: 7rem;
	margin: 0.45rem 0 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
}

.calculator-history button {
	display: grid;
	width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: var(--color-bg-control);
	color: var(--color-text-secondary);
	text-align: right;
}

.calculator-history button:hover {
	border-color: var(--color-border);
}

.calculator-history button strong {
	color: #ffffff;
}

.calculator-history-empty {
	color: var(--color-text-secondary);
	font-size: 0.84rem;
}

.site-footer {
	padding: 1.2rem 1rem 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: var(--color-text-secondary);
	font-size: 0.78rem;
	text-align: center;
}

.site-footer p {
	margin-bottom: 0.2rem;
}

@media (min-width: 42rem) {
	.main-content {
		padding: 1.6rem 1.5rem 2.5rem;
	}

	.site-header,
	.breadcrumb-bar,
	.site-footer {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}

	.sheet {
		align-items: center;
		padding: 1rem;
	}

	.sheet-panel {
		border-bottom: 1px solid var(--color-border);
		border-radius: 1rem;
		transform: translateY(1.25rem) scale(0.98);
		opacity: 0;
		transition: transform var(--transition-fast), opacity var(--transition-fast);
	}

	.sheet.is-open .sheet-panel {
		transform: translateY(0) scale(1);
		opacity: 1;
	}

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

}

@media (max-height: 42rem) and (min-width: 42rem) {
	.calculator-panel {
		width: min(100%, 23rem);
		padding: 0.6rem;
	}

	.calculator-grid {
		gap: 0.28rem;
	}

	.calculator-grid button {
		min-height: 2.05rem;
		font-size: 0.86rem;
	}

	.calculator-display {
		min-height: 2.65rem;
	}
}

@media (max-width: 30rem) {
	.site-logo-tagline {
		display: none;
	}

	.site-header {
		padding-left: 0.7rem;
		padding-right: 0.7rem;
	}

	.header-icons {
		gap: 0.1rem;
	}

	.icon-button {
		width: 2.35rem;
		height: 2.35rem;
	}

	.site-logo-mark {
		font-size: 1.22rem;
	}

	.site-logo-sigma {
		font-size: 1.55rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	body {
		background: #ffffff;
		color: #000000;
	}

	.site-header,
	.breadcrumb-bar,
	.site-footer,
	.category-select-wrapper,
	.instructions-toggle-wrapper,
	.answer-form,
	.sheet,
	.nav-drawer,
	.nav-overlay {
		display: none !important;
	}

	.app-shell,
	.main-content,
	.math-card,
	.feedback-card {
		max-width: none;
		padding: 0;
		border: 0;
		background: #ffffff;
		box-shadow: none;
		color: #000000;
	}
}

.workbook-page {
	--workbook-paper: #fffdf3;
	--workbook-ink: #26324a;
	--workbook-muted: #5b6579;
	--workbook-blue: #2775bd;
	--workbook-orange: #e96f15;
	--workbook-gold: #d7a82f;
	--workbook-green: #2f8b69;
	--workbook-purple: #7652a8;
	--workbook-line: rgba(39, 117, 189, 0.14);
}

.workbook-page .main-content {
	background:
		linear-gradient(90deg, transparent 0, transparent 2.45rem, rgba(226, 84, 84, 0.18) 2.45rem, rgba(226, 84, 84, 0.18) 2.53rem, transparent 2.53rem),
		repeating-linear-gradient(180deg, var(--workbook-paper) 0, var(--workbook-paper) 1.85rem, var(--workbook-line) 1.85rem, var(--workbook-line) 1.92rem);
	color: var(--workbook-ink);
}

.workbook-page .main-content a {
	color: #145f9e;
}

.workbook-page .eyebrow {
	color: #b84f07;
}

.adventure-hero,
.workbook-masthead,
.workbook-section,
.workbook-note,
.evidence-note,
.build-status {
	position: relative;
	border: 1px solid rgba(38, 50, 74, 0.18);
	border-radius: 1rem;
	background: rgba(255, 253, 243, 0.96);
	box-shadow: 0 0.8rem 2rem rgba(15, 23, 42, 0.12);
}

.adventure-hero {
	display: grid;
	gap: 1.2rem;
	margin-bottom: 1.35rem;
	padding: clamp(1.15rem, 4vw, 2rem);
	overflow: hidden;
}

.adventure-hero::before,
.workbook-masthead::before {
	position: absolute;
	top: -0.45rem;
	right: 1.2rem;
	width: 5.3rem;
	height: 1.15rem;
	background: rgba(246, 196, 77, 0.72);
	content: '';
	transform: rotate(2deg);
}

.adventure-hero-copy {
	position: relative;
	z-index: 2;
}

.adventure-hero h1,
.workbook-masthead h1 {
	margin-bottom: 0.5rem;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(2.2rem, 8vw, 3.8rem);
	line-height: 1;
	letter-spacing: -0.035em;
}

.adventure-hero-copy > p:last-of-type,
.workbook-masthead > p:last-child {
	max-width: 43rem;
	margin-bottom: 1.1rem;
	color: var(--workbook-muted);
	font-size: 1.04rem;
}

.workbook-page .primary-button {
	color: #ffffff;
}

.adventure-map {
	position: relative;
	min-height: 18rem;
	border: 0.15rem dashed rgba(38, 50, 74, 0.24);
	border-radius: 50% 42% 48% 45%;
	background:
		radial-gradient(circle at 18% 22%, rgba(39, 117, 189, 0.16) 0 1.6rem, transparent 1.65rem),
		radial-gradient(circle at 76% 30%, rgba(233, 111, 21, 0.16) 0 2rem, transparent 2.05rem),
		radial-gradient(circle at 28% 78%, rgba(47, 139, 105, 0.16) 0 1.7rem, transparent 1.75rem),
		radial-gradient(circle at 78% 76%, rgba(118, 82, 168, 0.16) 0 2rem, transparent 2.05rem),
		linear-gradient(145deg, #f8edbe, #f8f4dc 58%, #e4f2e9);
	overflow: hidden;
}

.map-node {
	position: absolute;
	z-index: 3;
	display: grid;
	place-items: center;
	min-width: 5.1rem;
	min-height: 5.1rem;
	padding: 0.55rem;
	border: 0.18rem solid #ffffff;
	border-radius: 50%;
	box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.2);
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 800;
	text-align: center;
}

.map-node-heroes {
	top: 1.2rem;
	left: 1.1rem;
	background: var(--workbook-blue);
}

.map-node-terms {
	top: 2rem;
	right: 1rem;
	background: var(--workbook-orange);
}

.map-node-arcade {
	bottom: 1.1rem;
	left: 2rem;
	background: var(--workbook-green);
}

.map-node-practice {
	left: 50%;
	bottom: 1.25rem;
	transform: translateX(-50%);
	background: var(--workbook-purple);
}

.map-path {
	position: absolute;
	z-index: 1;
	display: block;
	height: 0.2rem;
	border-top: 0.2rem dotted rgba(38, 50, 74, 0.48);
	transform-origin: left center;
}

.map-path-one {
	top: 5rem;
	left: 5.7rem;
	width: 8.5rem;
	transform: rotate(8deg);
}

.map-path-two {
	top: 7rem;
	left: 7.4rem;
	width: 8rem;
	transform: rotate(72deg);
}

.map-path-three {
	right: 5rem;
	bottom: 5.3rem;
	width: 8rem;
	transform: rotate(172deg);
}

.workbook-section {
	margin-bottom: 1.35rem;
	padding: clamp(1rem, 4vw, 1.55rem);
}

.section-heading {
	margin-bottom: 1rem;
}

.section-heading h2 {
	margin-bottom: 0.35rem;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(1.55rem, 5vw, 2.2rem);
	line-height: 1.15;
}

.section-heading p:last-child {
	margin-bottom: 0;
	color: var(--workbook-muted);
}

.adventure-destination-grid,
.discovery-grid,
.record-grid,
.connection-grid,
.collection-promise-grid {
	display: grid;
	gap: 0.9rem;
}

.adventure-destination,
.discovery-card,
.record-card,
.connection-grid article,
.collection-promise-grid article {
	position: relative;
	border: 1px solid rgba(38, 50, 74, 0.18);
	border-radius: 0.85rem;
	background: rgba(255, 255, 255, 0.86);
	box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.08);
}

.adventure-destination {
	padding: 1rem;
	border-top-width: 0.38rem;
}

.adventure-destination.destination-heroes {
	border-top-color: var(--workbook-blue);
}

.adventure-destination.destination-terms {
	border-top-color: var(--workbook-orange);
}

.adventure-destination.destination-arcade {
	border-top-color: var(--workbook-green);
}

.adventure-card-icon,
.discovery-card-icon,
.record-card-icon,
.connection-icon {
	display: inline-grid;
	place-items: center;
	width: 2.55rem;
	height: 2.55rem;
	border-radius: 0.7rem;
	background: #e5f1fb;
	color: var(--workbook-blue);
}

.adventure-card-icon .icon,
.discovery-card-icon .icon,
.record-card-icon .icon,
.connection-icon .icon,
.workbook-tab .icon {
	width: 1.35rem;
	height: 1.35rem;
}

.adventure-card-eyebrow {
	margin: 0.75rem 0 0.15rem;
	color: var(--workbook-muted);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.adventure-destination h2,
.discovery-card h3,
.record-card h2,
.connection-grid h2,
.collection-promise-grid h2 {
	margin-bottom: 0.35rem;
	line-height: 1.18;
}

.adventure-destination > p:not(.adventure-card-eyebrow),
.discovery-card p,
.record-card > p,
.connection-grid p,
.collection-promise-grid p {
	color: var(--workbook-muted);
}

.workbook-link,
.text-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 800;
}

.workbook-link .icon,
.text-link-arrow .icon {
	width: 1rem;
	height: 1rem;
}

.discovery-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	padding: 0.85rem;
}

.discovery-card h3 {
	font-size: 1rem;
}

.discovery-card p {
	margin-bottom: 0;
	font-size: 0.88rem;
}

.practice-bridge {
	border-style: dashed;
	border-width: 0.16rem;
}

.practice-chip-list,
.tag-link-list,
.destination-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.practice-chip-list a,
.tag-link-list a,
.destination-strip a {
	display: inline-flex;
	align-items: center;
	min-height: 2.45rem;
	padding: 0.45rem 0.72rem;
	border: 1px solid rgba(39, 117, 189, 0.28);
	border-radius: 999px;
	background: #eef6fc;
	font-size: 0.84rem;
	font-weight: 800;
	text-decoration: none;
}

.practice-chip-list a:hover,
.tag-link-list a:hover,
.destination-strip a:hover {
	border-color: var(--workbook-blue);
	background: #dceefa;
}

.workbook-masthead {
	margin-bottom: 1.15rem;
	padding: clamp(1.15rem, 4vw, 2rem);
	overflow: hidden;
}

.workbook-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: -0.25rem 0 1rem;
	padding: 0.42rem 0.7rem;
	border-radius: 0.4rem;
	background: var(--workbook-blue);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.grade-masthead .workbook-tab {
	background: var(--workbook-green);
}

.era-masthead .workbook-tab {
	background: var(--workbook-purple);
}

.profession-masthead .workbook-tab {
	background: var(--workbook-orange);
}

.destination-heroes .workbook-tab {
	background: var(--workbook-blue);
}

.destination-terms .workbook-tab {
	background: var(--workbook-orange);
}

.destination-arcade .workbook-tab {
	background: var(--workbook-green);
}

.record-grid {
	margin-bottom: 1.2rem;
}

.record-card {
	padding: 1rem;
}

.record-card-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.7rem;
}

.record-badge {
	padding: 0.24rem 0.55rem;
	border-radius: 999px;
	background: #f7e5b9;
	color: #714d00;
	font-size: 0.72rem;
	font-weight: 800;
}

.record-meta {
	margin-bottom: 0.35rem;
	color: #8b4b1d !important;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.workbook-note,
.evidence-note,
.build-status {
	margin-bottom: 1.2rem;
	padding: 1rem;
}

.workbook-note {
	border-left: 0.38rem solid var(--workbook-blue);
}

.workbook-note h2,
.evidence-note h2 {
	margin-bottom: 0.3rem;
	font-size: 1.15rem;
}

.workbook-note p,
.evidence-note p,
.build-status {
	color: var(--workbook-muted);
}

.evidence-note {
	border-left: 0.38rem solid var(--workbook-gold);
	background: #fff8d8;
}

.build-status {
	border-style: dashed;
	background: #f5f0ff;
}

.path-tags {
	margin-top: 1rem;
}

.path-tags > strong {
	display: block;
	margin-bottom: 0.45rem;
	font-size: 0.86rem;
}

.connection-grid {
	margin-bottom: 1.2rem;
}

.connection-grid article,
.collection-promise-grid article {
	padding: 1rem;
}

.connection-grid .connection-icon {
	margin-bottom: 0.7rem;
}

.collection-promise-grid {
	margin-bottom: 1.2rem;
}

.collection-promise-grid article:nth-child(1) {
	border-top: 0.3rem solid var(--workbook-blue);
}

.collection-promise-grid article:nth-child(2) {
	border-top: 0.3rem solid var(--workbook-orange);
}

.collection-promise-grid article:nth-child(3) {
	border-top: 0.3rem solid var(--workbook-green);
}

.practice-link-grid {
	display: grid;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.practice-link-grid a {
	display: grid;
	gap: 0.12rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid rgba(39, 117, 189, 0.24);
	border-radius: 0.7rem;
	background: #f4f9fd;
	text-decoration: none;
}

.practice-link-grid a:hover {
	border-color: var(--workbook-blue);
	background: #e8f4fc;
}

.practice-link-grid span {
	color: var(--workbook-muted);
	font-size: 0.82rem;
}

.destination-strip {
	margin-bottom: 1.2rem;
	padding: 1rem;
	border: 1px dashed rgba(38, 50, 74, 0.24);
	border-radius: 0.9rem;
	background: rgba(255, 253, 243, 0.9);
}

.muted-copy {
	color: var(--workbook-muted);
}

@media (min-width: 40rem) {
	.adventure-hero {
		grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 0.95fr);
		align-items: center;
	}

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

	.connection-grid,
	.collection-promise-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.discovery-grid,
	.record-grid,
	.practice-link-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 58rem) {
	.workbook-page .app-shell {
		max-width: 68rem;
	}
}

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

@media print {
	.workbook-page .main-content {
		background: #ffffff;
		color: #000000;
	}

	.adventure-hero,
	.workbook-masthead,
	.workbook-section,
	.workbook-note,
	.evidence-note,
	.build-status,
	.adventure-destination,
	.discovery-card,
	.record-card,
	.connection-grid article,
	.collection-promise-grid article {
		box-shadow: none;
	}
}

.heroes-index-page .app-shell,
.hero-page .app-shell {
	max-width: 72rem;
}

.heroes-masthead {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
		repeating-linear-gradient(0deg, transparent 0, transparent 1.7rem, rgba(39, 117, 189, 0.18) 1.75rem, rgba(39, 117, 189, 0.18) 1.8rem);
}

.heroes-masthead::after {
	position: absolute;
	right: -2rem;
	bottom: -3.4rem;
	width: 9rem;
	height: 9rem;
	border: 0.85rem solid rgba(245, 130, 30, 0.13);
	border-radius: 50%;
	content: '';
}

.hero-index-stats {
	display: inline-flex;
	align-items: baseline;
	gap: 0.55rem;
	margin-top: 0.8rem;
	padding: 0.48rem 0.75rem;
	border: 1px solid rgba(39, 117, 189, 0.26);
	border-radius: 0.75rem;
	background: rgba(232, 244, 252, 0.82);
	color: var(--workbook-ink);
}

.hero-index-stats strong {
	font-size: 1.45rem;
	line-height: 1;
}

.hero-index-stats span {
	font-size: 0.82rem;
	font-weight: 700;
}

.hero-evidence-guide {
	display: grid;
	gap: 0.75rem;
	margin-bottom: 1.2rem;
	padding: 1rem;
	border-left: 0.42rem solid var(--workbook-gold);
	border-radius: 0.8rem;
	background: #fff8d8;
	color: var(--workbook-ink);
	box-shadow: var(--workbook-shadow);
}

.hero-evidence-guide h2,
.hero-evidence-guide p {
	margin-bottom: 0;
}

.hero-browser {
	margin-bottom: 1.2rem;
	padding: 1rem;
	border: 1px solid rgba(39, 117, 189, 0.22);
	border-radius: 0.95rem;
	background: var(--workbook-paper);
	color: var(--workbook-ink);
	box-shadow: var(--workbook-shadow);
}

.hero-filter-grid {
	display: grid;
	gap: 0.72rem;
	margin-bottom: 0.8rem;
}

.hero-filter-grid label {
	display: grid;
	gap: 0.28rem;
	font-size: 0.78rem;
	font-weight: 800;
}

.hero-filter-grid input,
.hero-filter-grid select {
	width: 100%;
	min-height: 2.85rem;
	padding: 0.58rem 0.72rem;
	border: 1px solid rgba(38, 50, 74, 0.28);
	border-radius: 0.58rem;
	background: #ffffff;
	color: var(--workbook-ink);
}

.hero-filter-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	margin-bottom: 0.8rem;
	padding: 0.65rem 0;
	border-bottom: 1px dashed rgba(38, 50, 74, 0.24);
}

.hero-filter-summary p {
	margin: 0;
	font-weight: 800;
}

.hero-alphabet {
	display: flex;
	flex-wrap: wrap;
	gap: 0.38rem;
	margin-bottom: 0.9rem;
}

.hero-alphabet a {
	display: inline-grid;
	place-items: center;
	min-width: 2rem;
	min-height: 2rem;
	border: 1px solid rgba(39, 117, 189, 0.28);
	border-radius: 0.45rem;
	background: #f4f9fd;
	font-size: 0.78rem;
	font-weight: 900;
	text-decoration: none;
}

.hero-card-grid {
	display: grid;
	gap: 0.78rem;
}

.hero-card {
	display: grid;
	grid-template-columns: 3.3rem minmax(0, 1fr);
	gap: 0.82rem;
	padding: 0.9rem;
	border: 1px solid rgba(39, 117, 189, 0.22);
	border-radius: 0.82rem;
	background: #ffffff;
	box-shadow: 0 0.4rem 1rem rgba(38, 50, 74, 0.08);
	scroll-margin-top: 6rem;
}

.hero-card:hover {
	border-color: rgba(39, 117, 189, 0.56);
}

.hero-card-portrait,
.hero-profile-portrait,
.related-hero-mark {
	display: grid;
	place-items: center;
	border-radius: 50%;
	background:
		radial-gradient(circle at 34% 30%, #fff6b8 0 12%, transparent 13%),
		linear-gradient(145deg, #f5821e, #bd4f0c);
	color: #ffffff;
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 900;
	box-shadow: inset 0 0 0 0.22rem rgba(255, 255, 255, 0.28), 0 0.35rem 0.75rem rgba(38, 50, 74, 0.16);
}

.hero-card-portrait {
	width: 3.3rem;
	height: 3.3rem;
	font-size: 1.4rem;
}

.hero-card-topline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.45rem;
	margin-bottom: 0.2rem;
	color: #7a4a20;
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hero-featured-badge {
	padding: 0.12rem 0.42rem;
	border-radius: 999px;
	background: #e8f5e9;
	color: #23622d;
}

.hero-card h2 {
	margin-bottom: 0.12rem;
	font-size: 1.12rem;
}

.hero-card h2 a {
	color: #174d79;
}

.hero-card-region {
	margin-bottom: 0.35rem;
	color: #79532d;
	font-size: 0.78rem;
	font-weight: 800;
}

.hero-card p {
	margin-bottom: 0.5rem;
	color: var(--workbook-muted);
}

.evidence-chip {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 0.25rem 0.52rem;
	border: 1px solid rgba(38, 50, 74, 0.18);
	border-radius: 999px;
	background: #eef4fb;
	color: #294d70;
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.evidence-text-and-inference {
	background: #fff3cd;
	color: #714d00;
}

.evidence-documented-tradition {
	background: #f2eafd;
	color: #5b3882;
}

.hero-empty-state {
	padding: 2rem 1rem;
	border: 1px dashed rgba(38, 50, 74, 0.28);
	border-radius: 0.8rem;
	text-align: center;
}

.hero-empty-state h2 {
	margin-bottom: 0.3rem;
}

.hero-profile {
	color: var(--workbook-ink);
}

.hero-profile-masthead {
	display: grid;
	gap: 1rem;
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid rgba(39, 117, 189, 0.22);
	border-radius: 1rem;
	background:
		linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
		repeating-linear-gradient(0deg, transparent 0, transparent 1.6rem, rgba(39, 117, 189, 0.16) 1.65rem, rgba(39, 117, 189, 0.16) 1.7rem);
	box-shadow: var(--workbook-shadow);
}

.hero-profile-portrait {
	width: 7rem;
	height: 7rem;
	margin: 0 auto;
	font-size: 3rem;
}

.hero-profile-heading h1 {
	margin-bottom: 0.18rem;
	font-size: clamp(2rem, 7vw, 3.6rem);
	line-height: 1.03;
}

.hero-pronunciation {
	margin-bottom: 0.65rem;
	color: #6e4e2e;
	font-size: 0.84rem;
}

.hero-summary {
	font-size: 1.08rem;
	font-weight: 700;
}

.hero-evidence-box {
	margin-top: 0.85rem;
	padding: 0.75rem;
	border-left: 0.35rem solid var(--workbook-gold);
	border-radius: 0.55rem;
	background: #fff8d8;
}

.hero-evidence-box p {
	margin: 0.45rem 0 0;
	color: var(--workbook-muted);
	font-size: 0.84rem;
}

.hero-quick-facts {
	display: grid;
	gap: 0.68rem;
	margin-bottom: 1rem;
}

.hero-quick-facts > div {
	padding: 0.8rem;
	border: 1px solid rgba(38, 50, 74, 0.16);
	border-radius: 0.72rem;
	background: #ffffff;
}

.hero-quick-facts > div > span {
	display: block;
	margin-bottom: 0.36rem;
	color: #8b4b1d;
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.hero-quick-facts p,
.hero-quick-facts .tag-link-list {
	margin-bottom: 0;
}

.hero-content-section,
.hero-why-callout,
.hero-profession-callout,
.hero-connections,
.hero-sources {
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid rgba(38, 50, 74, 0.17);
	border-radius: 0.9rem;
	background: #ffffff;
	box-shadow: 0 0.5rem 1.2rem rgba(38, 50, 74, 0.08);
}

.hero-content-section h2,
.hero-why-callout h2,
.hero-profession-callout h2,
.hero-connections h2,
.hero-sources h2 {
	margin-bottom: 0.6rem;
}

.hero-biography p:last-child,
.hero-content-section > p:last-child {
	margin-bottom: 0;
}

.hero-contribution-grid {
	display: grid;
	gap: 0.7rem;
}

.hero-contribution-grid article {
	padding: 0.82rem;
	border-left: 0.32rem solid var(--workbook-blue);
	border-radius: 0.5rem;
	background: #f4f9fd;
}

.hero-contribution-grid h3 {
	margin-bottom: 0.28rem;
	font-size: 1rem;
}

.hero-contribution-grid p {
	margin: 0;
	color: var(--workbook-muted);
}

.hero-why-callout,
.hero-profession-callout {
	display: grid;
	grid-template-columns: 2.8rem minmax(0, 1fr);
	gap: 0.85rem;
	align-items: start;
}

.hero-why-callout {
	border-left: 0.42rem solid var(--workbook-orange);
	background: #fff4e8;
}

.hero-profession-callout {
	border-left: 0.42rem solid var(--workbook-green);
	background: #eef9ef;
}

.hero-section-icon {
	display: grid;
	place-items: center;
	width: 2.8rem;
	height: 2.8rem;
	border-radius: 0.65rem;
	background: rgba(255, 255, 255, 0.68);
	color: #8b4b1d;
}

.hero-why-callout p:last-child,
.hero-profession-callout p:last-child {
	margin-bottom: 0;
}

.hero-timeline {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-timeline::before {
	position: absolute;
	top: 0.4rem;
	bottom: 0.4rem;
	left: 0.45rem;
	width: 0.16rem;
	background: rgba(39, 117, 189, 0.28);
	content: '';
}

.hero-timeline li {
	position: relative;
	display: grid;
	grid-template-columns: 1rem minmax(0, 1fr);
	gap: 0.7rem;
	padding-bottom: 0.9rem;
}

.hero-timeline li:last-child {
	padding-bottom: 0;
}

.hero-timeline-marker {
	position: relative;
	z-index: 1;
	width: 1rem;
	height: 1rem;
	margin-top: 0.18rem;
	border: 0.2rem solid #ffffff;
	border-radius: 50%;
	background: var(--workbook-blue);
	box-shadow: 0 0 0 0.1rem var(--workbook-blue);
}

.hero-timeline span {
	color: #8b4b1d;
	font-size: 0.72rem;
	font-weight: 900;
	text-transform: uppercase;
}

.hero-timeline h3 {
	margin: 0.08rem 0 0.18rem;
	font-size: 1rem;
}

.hero-timeline p {
	margin: 0;
	color: var(--workbook-muted);
}

.hero-learning-grid {
	display: grid;
	gap: 1rem;
	margin-bottom: 1rem;
}

.hero-key-idea,
.hero-activity {
	padding: 1rem;
	border: 1px solid rgba(38, 50, 74, 0.17);
	border-radius: 0.9rem;
	background: #ffffff;
	box-shadow: 0 0.5rem 1.2rem rgba(38, 50, 74, 0.08);
}

.hero-key-idea {
	border-top: 0.35rem solid var(--workbook-blue);
}

.hero-activity {
	border-top: 0.35rem solid var(--workbook-orange);
}

.hero-example {
	margin-top: 0.8rem;
	padding: 0.75rem;
	border-radius: 0.55rem;
	background: #f4f9fd;
}

.hero-example strong {
	display: block;
	margin-bottom: 0.18rem;
	color: #174d79;
}

.hero-example p {
	margin: 0;
}

.hero-activity ol {
	padding-left: 1.25rem;
}

.hero-activity details {
	margin-top: 0.8rem;
	padding: 0.68rem;
	border: 1px dashed rgba(245, 130, 30, 0.45);
	border-radius: 0.55rem;
	background: #fff8ef;
}

.hero-activity summary {
	cursor: pointer;
	font-weight: 900;
}

.hero-activity details p {
	margin: 0.5rem 0 0;
}

.hero-myth-fact {
	display: grid;
	gap: 0.65rem;
	margin-top: 0.9rem;
}

.hero-myth-fact article {
	padding: 0.78rem;
	border-radius: 0.6rem;
	background: #f5f0ff;
}

.hero-myth-fact article:first-child {
	background: #fff1f1;
}

.hero-myth-fact span {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.hero-myth-fact p {
	margin: 0;
}

.hero-connection-columns {
	display: grid;
	gap: 0.8rem;
	margin-bottom: 1rem;
}

.hero-connection-columns > div {
	padding: 0.8rem;
	border-radius: 0.7rem;
	background: #f8fafc;
}

.hero-connection-columns h3 {
	margin-bottom: 0.5rem;
	font-size: 1rem;
}

.hero-term-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-term-list span,
.hero-term-list a {
	display: inline-flex;
	padding: 0.3rem 0.55rem;
	border: 1px solid rgba(39, 117, 189, 0.22);
	border-radius: 999px;
	background: #eef6fc;
	font-size: 0.76rem;
	font-weight: 800;
}

.related-hero-grid {
	display: grid;
	gap: 0.65rem;
}

.related-hero-card {
	display: grid;
	grid-template-columns: 2.6rem minmax(0, 1fr);
	gap: 0.7rem;
	padding: 0.75rem;
	border: 1px solid rgba(38, 50, 74, 0.15);
	border-radius: 0.68rem;
	background: #ffffff;
}

.related-hero-mark {
	width: 2.6rem;
	height: 2.6rem;
}

.related-hero-card h3 {
	margin-bottom: 0.15rem;
	font-size: 0.96rem;
}

.related-hero-card p {
	margin: 0;
	color: var(--workbook-muted);
	font-size: 0.8rem;
}

.hero-source-list {
	display: grid;
	gap: 0.65rem;
	margin: 0;
	padding-left: 1.2rem;
}

.hero-source-list li {
	padding-left: 0.2rem;
}

.hero-source-list strong,
.hero-source-list span {
	display: block;
}

.hero-source-list span {
	color: #6e4e2e;
	font-size: 0.76rem;
	font-weight: 800;
}

.hero-source-list p {
	margin: 0.2rem 0 0;
	color: var(--workbook-muted);
	font-size: 0.8rem;
}

.hero-review-meta {
	display: grid;
	gap: 0.32rem;
	margin-top: 0.9rem;
	padding-top: 0.8rem;
	border-top: 1px dashed rgba(38, 50, 74, 0.24);
	color: var(--workbook-muted);
	font-size: 0.76rem;
}

@media (min-width: 40rem) {
	.hero-filter-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hero-card-grid,
	.hero-contribution-grid,
	.hero-learning-grid,
	.hero-connection-columns,
	.related-hero-grid,
	.hero-myth-fact {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hero-profile-masthead {
		grid-template-columns: 8rem minmax(0, 1fr);
		align-items: center;
		padding: 1.25rem;
	}

	.hero-profile-portrait {
		width: 8rem;
		height: 8rem;
	}

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

	.related-hero-grid > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 62rem) {
	.hero-filter-grid {
		grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
	}

	.hero-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hero-quick-facts {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.related-hero-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.related-hero-grid > :last-child:nth-child(odd) {
		grid-column: auto;
	}
}

@media print {
	.hero-browser,
	.hero-profile-masthead,
	.hero-content-section,
	.hero-why-callout,
	.hero-profession-callout,
	.hero-key-idea,
	.hero-activity,
	.hero-connections,
	.hero-sources,
	.hero-card {
		box-shadow: none;
	}

	.hero-filter-grid,
	.hero-filter-summary,
	.hero-alphabet {
		display: none;
	}
}

.terms-masthead {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
		repeating-linear-gradient(0deg, transparent 0 27px, rgba(55, 125, 190, 0.12) 27px 28px),
		linear-gradient(135deg, #fff8dd, #e8f8ff);
}

.terms-masthead::after {
	content: "a + b = c";
	position: absolute;
	right: 1rem;
	bottom: 0.4rem;
	color: rgba(39, 117, 189, 0.12);
	font-size: clamp(2rem, 8vw, 5rem);
	font-weight: 900;
	transform: rotate(-5deg);
}

.terms-masthead-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	position: relative;
	z-index: 1;
	margin-top: 1rem;
}

.terms-masthead-stats span {
	display: inline-flex;
	align-items: baseline;
	gap: 0.28rem;
	padding: 0.42rem 0.68rem;
	border: 1px solid rgba(39, 117, 189, 0.2);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.82);
	color: #334a64;
	font-size: 0.78rem;
	font-weight: 800;
}

.term-browser,
.term-profile > section,
.term-profile-masthead,
.term-visual {
	border: 1px solid rgba(38, 50, 74, 0.15);
	border-radius: 0.8rem;
	background: #fffdf7;
	box-shadow: 0 0.7rem 1.8rem rgba(12, 25, 48, 0.12);
}

.term-browser {
	padding: 0.9rem;
}

.term-browser-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.8rem;
}

.term-browser-heading h2,
.term-browser-heading p {
	margin: 0;
}

.term-browser-heading > p {
	color: var(--workbook-muted);
	font-size: 0.8rem;
	font-weight: 800;
}

.term-filter-grid {
	display: grid;
	gap: 0.65rem;
}

.term-filter-grid label {
	display: grid;
	gap: 0.28rem;
}

.term-filter-grid label > span {
	font-size: 0.73rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.term-filter-grid input,
.term-filter-grid select {
	width: 100%;
	min-height: 2.7rem;
	padding: 0.62rem 0.7rem;
	border: 1px solid rgba(38, 50, 74, 0.25);
	border-radius: 0.52rem;
	background: #ffffff;
	color: #26324a;
	font: inherit;
}

.term-filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0.78rem 0;
	font-size: 0.8rem;
	font-weight: 800;
}

.term-alphabet {
	display: grid;
	grid-template-columns: repeat(13, minmax(0, 1fr));
	gap: 0.22rem;
	margin: 0.8rem 0;
}

.term-alphabet a,
.term-alphabet span {
	display: grid;
	place-items: center;
	min-height: 1.85rem;
	border-radius: 0.34rem;
	font-size: 0.7rem;
	font-weight: 900;
}

.term-alphabet a {
	background: #e9f5ff;
	color: #1d5c91;
}

.term-alphabet span {
	background: #f1f3f5;
	color: #a1a9b3;
}

.term-card-grid {
	display: grid;
	gap: 0.72rem;
}

.term-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 0.82rem;
	border: 1px solid rgba(39, 117, 189, 0.19);
	border-radius: 0.72rem;
	background:
		linear-gradient(rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
		repeating-linear-gradient(0deg, transparent 0 23px, rgba(67, 137, 199, 0.12) 23px 24px);
}

.term-card[hidden] {
	display: none;
}

.term-card-heading {
	display: grid;
	grid-template-columns: 2.7rem minmax(0, 1fr) auto;
	gap: 0.65rem;
	align-items: start;
}

.term-card-letter,
.term-profile-mark {
	display: grid;
	place-items: center;
	width: 2.7rem;
	height: 2.7rem;
	border: 3px solid #ffffff;
	border-radius: 0.65rem;
	background: linear-gradient(145deg, #f29a38, #e76f51);
	box-shadow: 0 0.3rem 0.75rem rgba(38, 50, 74, 0.19);
	color: #ffffff;
	font-size: 1.25rem;
	font-weight: 950;
}

.term-card-meta {
	margin: 0 0 0.18rem;
	color: #6e4e2e;
	font-size: 0.69rem;
	font-weight: 900;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

.term-card h2 {
	margin: 0;
	font-size: 1.05rem;
}

.term-card > p {
	flex: 1;
	margin: 0.62rem 0;
	color: var(--workbook-muted);
	font-size: 0.84rem;
}

.term-featured-badge {
	padding: 0.23rem 0.45rem;
	border-radius: 999px;
	background: #fff0b8;
	color: #6f4c00;
	font-size: 0.62rem;
	font-weight: 900;
	text-transform: uppercase;
}

.term-card-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.4rem;
	padding-top: 0.55rem;
	border-top: 1px dashed rgba(38, 50, 74, 0.2);
	color: #56667a;
	font-size: 0.7rem;
	font-weight: 800;
}

.term-empty {
	margin-top: 0.8rem;
}

.term-profile {
	display: grid;
	gap: 0.9rem;
}

.term-profile-masthead {
	display: grid;
	gap: 0.85rem;
	padding: 1rem;
	background:
		linear-gradient(rgba(255, 255, 255, 0.87), rgba(255, 255, 255, 0.87)),
		repeating-linear-gradient(0deg, transparent 0 27px, rgba(55, 125, 190, 0.14) 27px 28px),
		linear-gradient(135deg, #fff7da, #e8f7ff);
}

.term-profile-mark {
	width: 5rem;
	height: 5rem;
	font-size: 2.4rem;
}

.term-profile-masthead h1 {
	margin-bottom: 0.35rem;
}

.term-pronunciation {
	margin: 0 0 0.55rem;
	color: #53667a;
	font-size: 0.82rem;
}

.term-definition-lead {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.65;
}

.term-notation {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.8rem;
}

.term-notation > span:first-child {
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.term-symbol-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.term-symbol-list code {
	padding: 0.3rem 0.5rem;
	border: 1px solid rgba(39, 117, 189, 0.25);
	border-radius: 0.4rem;
	background: #edf7ff;
	color: #1f4f75;
	font-size: 0.88rem;
	font-weight: 800;
}

.term-quick-facts {
	display: grid;
	gap: 0.65rem;
	padding: 0.85rem;
}

.term-quick-facts > div {
	padding: 0.7rem;
	border-radius: 0.62rem;
	background: #f7fafc;
}

.term-quick-facts > div > span {
	display: block;
	margin-bottom: 0.35rem;
	color: #6e4e2e;
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.term-quick-facts p {
	margin: 0;
}

.term-definition-grid,
.term-context-grid,
.term-callout-grid,
.term-relation-grid,
.term-hero-grid {
	display: grid;
	gap: 0.78rem;
}

.term-definition-grid > article,
.term-context-grid > article,
.term-callout-grid > article,
.term-learning-map,
.term-heroes,
.term-practice,
.term-sources,
.term-example,
.term-profession-callout {
	padding: 0.92rem;
}

.term-definition-grid > article:nth-child(1) {
	background: #f0fbf4;
}

.term-definition-grid > article:nth-child(2) {
	background: #eef6ff;
}

.term-context-grid > article:nth-child(1) {
	background: #fff8e7;
}

.term-context-grid > article:nth-child(2) {
	background: #f7efff;
}

.term-profile h2 {
	margin-bottom: 0.45rem;
	font-size: 1.18rem;
}

.term-profile section p:last-child {
	margin-bottom: 0;
}

.term-visual {
	overflow: hidden;
	margin: 0;
}

.term-visual-canvas {
	display: grid;
	place-items: center;
	min-height: 12rem;
	padding: 1rem;
	background: #f8fbff;
}

.term-visual svg {
	width: min(100%, 32rem);
	max-height: 15rem;
	fill: none;
	stroke: #344c69;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.term-visual svg text {
	fill: #344c69;
	stroke: none;
	font-size: 15px;
	font-weight: 800;
}

.term-svg-fill {
	fill: #f29a38;
	stroke: #9b5511;
}

.term-svg-muted {
	fill: #e6edf4;
}

.term-svg-accent {
	stroke: #2775bd;
	stroke-width: 5;
}

.term-svg-fill-none {
	fill: none;
}

.term-svg-area {
	opacity: 0.24;
}

.term-visual figcaption {
	display: grid;
	gap: 0.18rem;
	padding: 0.75rem 0.9rem;
	border-top: 1px dashed rgba(38, 50, 74, 0.2);
}

.term-visual figcaption span {
	color: var(--workbook-muted);
	font-size: 0.82rem;
}

.term-place-value-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(4rem, 1fr));
	width: min(100%, 30rem);
	border: 2px solid #2775bd;
	border-radius: 0.6rem;
	overflow: hidden;
	text-align: center;
}

.term-place-value-grid span,
.term-place-value-grid strong {
	padding: 0.65rem 0.3rem;
	border-right: 1px solid rgba(39, 117, 189, 0.35);
}

.term-place-value-grid span {
	background: #eaf6ff;
	font-size: 0.72rem;
}

.term-place-value-grid strong {
	border-top: 1px solid rgba(39, 117, 189, 0.35);
	font-size: 1.3rem;
}

.term-array-diagram {
	display: grid;
	grid-template-columns: repeat(4, 2.5rem);
	gap: 0.3rem;
}

.term-array-diagram span {
	aspect-ratio: 1;
	border: 2px solid #a85f18;
	border-radius: 0.34rem;
	background: #ffc36c;
}

.term-percent-grid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 0.12rem;
	width: min(100%, 17rem);
}

.term-percent-grid span {
	aspect-ratio: 1;
	border: 1px solid rgba(38, 50, 74, 0.24);
	background: #ffffff;
}

.term-percent-grid .is-filled {
	background: #58aee3;
}

.term-ratio-table {
	width: min(100%, 20rem);
	border-collapse: collapse;
	text-align: center;
}

.term-ratio-table caption {
	margin-bottom: 0.45rem;
	font-weight: 900;
}

.term-ratio-table th,
.term-ratio-table td {
	padding: 0.5rem;
	border: 1px solid rgba(38, 50, 74, 0.25);
}

.term-ratio-table th {
	background: #eaf6ff;
}

.term-rule-diagram {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
}

.term-rule-diagram span {
	padding: 0.75rem 0.9rem;
	border: 2px solid #2775bd;
	border-radius: 0.55rem;
	background: #ffffff;
	font-weight: 900;
}

.term-rule-diagram strong {
	color: #e76f51;
	font-size: 1.5rem;
}

.term-example {
	background: #fff8dc;
}

.term-example-prompt {
	font-size: 1rem;
	font-weight: 800;
}

.term-example ol {
	padding-left: 1.35rem;
}

.term-example-answer {
	padding: 0.7rem;
	border-left: 0.34rem solid #2f9d62;
	border-radius: 0.45rem;
	background: #edf9f2;
}

.term-example-answer p {
	margin: 0.2rem 0 0;
}

.term-real-life {
	background: #eef8ff;
}

.term-mistake {
	background: #fff0f0;
}

.term-tip {
	background: #f0faef;
}

.term-fact {
	background: #f8f0ff;
}

.term-profession-callout {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	gap: 0.75rem;
	background: #eef6ff;
}

.term-profession-callout a {
	font-weight: 900;
}

.term-learning-map,
.term-heroes,
.term-practice,
.term-sources {
	background: #fffdf7;
}

.term-relation-grid > div {
	padding: 0.75rem;
	border-radius: 0.62rem;
	background: #f7fafc;
}

.term-relation-grid h3 {
	margin-bottom: 0.45rem;
	font-size: 0.95rem;
}

.term-relation-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.term-relation-list a {
	display: inline-flex;
	padding: 0.32rem 0.55rem;
	border: 1px solid rgba(39, 117, 189, 0.22);
	border-radius: 999px;
	background: #eef6fc;
	font-size: 0.76rem;
	font-weight: 800;
}

.term-hero-card {
	display: grid;
	grid-template-columns: 2.8rem minmax(0, 1fr);
	gap: 0.7rem;
	padding: 0.75rem;
	border: 1px solid rgba(38, 50, 74, 0.14);
	border-radius: 0.65rem;
	background: #ffffff;
}

.term-hero-card > span {
	display: grid;
	place-items: center;
	width: 2.8rem;
	height: 2.8rem;
	border-radius: 50%;
	background: #f29a38;
	color: #ffffff;
	font-weight: 950;
}

.term-hero-card h3 {
	margin-bottom: 0.2rem;
	font-size: 0.96rem;
}

.term-hero-card p {
	margin: 0;
	color: var(--workbook-muted);
	font-size: 0.79rem;
}

.term-source-list {
	display: grid;
	gap: 0.65rem;
	margin: 0;
	padding-left: 1.2rem;
}

.term-source-list strong,
.term-source-list span {
	display: block;
}

.term-source-list span {
	color: #6e4e2e;
	font-size: 0.76rem;
	font-weight: 800;
}

.term-source-list p {
	margin: 0.2rem 0 0;
	color: var(--workbook-muted);
	font-size: 0.8rem;
}

.term-review-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem 1.2rem;
	margin-top: 0.9rem;
	padding-top: 0.8rem;
	border-top: 1px dashed rgba(38, 50, 74, 0.24);
	color: var(--workbook-muted);
	font-size: 0.76rem;
}

@media (min-width: 40rem) {
	.term-filter-grid,
	.term-card-grid,
	.term-definition-grid,
	.term-context-grid,
	.term-callout-grid,
	.term-hero-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.term-alphabet {
		grid-template-columns: repeat(26, minmax(0, 1fr));
	}

	.term-profile-masthead {
		grid-template-columns: 6rem minmax(0, 1fr);
		align-items: center;
	}

	.term-profile-mark {
		width: 6rem;
		height: 6rem;
	}

	.term-quick-facts,
	.term-relation-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.term-relation-grid > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 62rem) {
	.term-filter-grid {
		grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
	}

	.term-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.term-quick-facts {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.term-relation-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.term-relation-grid > :last-child:nth-child(odd) {
		grid-column: auto;
	}
}

@media print {
	.term-browser,
	.term-profile > section,
	.term-profile-masthead,
	.term-visual,
	.term-card {
		box-shadow: none;
	}

	.term-filter-grid,
	.term-filter-actions,
	.term-alphabet {
		display: none;
	}
}

.term-card-compact {
	padding: 0.62rem;
}

.term-card-compact .term-card-heading {
	grid-template-columns: 2.15rem minmax(0, 1fr) auto;
	gap: 0.52rem;
}

.term-card-compact .term-card-letter {
	width: 2.15rem;
	height: 2.15rem;
	border-width: 2px;
	border-radius: 0.5rem;
	font-size: 0.96rem;
}

.term-card-compact h2 {
	font-size: 0.94rem;
	line-height: 1.2;
}

.term-card-compact .term-card-meta {
	font-size: 0.61rem;
}

.term-card-compact .term-card-footer {
	margin-top: 0.42rem;
	padding-top: 0.42rem;
	font-size: 0.64rem;
}

.term-editorial-note {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border: 2px solid #f4a261;
	border-radius: 0.75rem;
	background: rgba(244, 162, 97, 0.1);
	line-height: 1.55;
}

.term-editorial-note strong {
	color: #ffd29a;
}

.information-page .main-content {
	max-width: 1180px;
}

.information-article {
	max-width: 820px;
	margin: 0 auto 28px;
	padding: clamp(24px, 4vw, 48px);
	border: 1px solid rgba(126, 164, 221, 0.24);
	border-radius: 22px;
	background: linear-gradient(145deg, rgba(27, 38, 59, 0.98), rgba(18, 28, 47, 0.98));
	box-shadow: 0 22px 60px rgba(4, 10, 20, 0.26);
}

.information-article h1 {
	max-width: 760px;
	margin-bottom: 20px;
}

.information-article h2 {
	margin-top: 30px;
}

.information-article p,
.information-article li {
	line-height: 1.75;
}

.information-article ul {
	padding-left: 24px;
}

.site-map-section {
	margin: 0 0 28px;
	padding: clamp(20px, 3vw, 34px);
	border: 1px solid rgba(126, 164, 221, 0.2);
	border-radius: 20px;
	background: rgba(19, 30, 49, 0.94);
}

.site-map-section > h2 {
	margin-top: 0;
}

.site-map-link-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 9px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-map-link-list a {
	display: block;
	padding: 8px 0;
	line-height: 1.35;
}

.site-map-alpha-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 18px;
}

.site-map-alpha-group {
	padding: 18px;
	border: 1px solid rgba(126, 164, 221, 0.16);
	border-radius: 16px;
	background: rgba(11, 21, 38, 0.62);
}

.site-map-alpha-group h3 {
	margin-top: 0;
}

.site-map-alpha-group .site-map-link-list {
	display: block;
}

@media (max-width: 640px) {
	.information-article,
	.site-map-section {
		padding: 20px;
	}

	.site-map-link-list,
	.site-map-alpha-grid {
		grid-template-columns: 1fr;
	}
}

:root {
	--color-text-on-accent: #111827;
}

.skip-link,
.icon-count,
.submit-button,
.next-question-button,
.primary-button,
.calculator-grid .equals {
	color: var(--color-text-on-accent);
}

.form-hint {
	margin: -0.15rem 0 0.45rem;
	color: var(--color-text-secondary);
	font-size: 0.88rem;
}

.privacy-clear-button {
	margin-top: 0.25rem;
}

.privacy-clear-status {
	min-height: 1.5rem;
}

.hero-card,
.term-card,
.site-map-link-list li {
	content-visibility: auto;
	contain-intrinsic-size: auto 9rem;
}

.site-map-link-list li {
	contain-intrinsic-size: auto 2rem;
}

@media (forced-colors: active) {
	:focus-visible {
		outline: 0.2rem solid CanvasText;
	}

	.submit-button,
	.next-question-button,
	.primary-button,
	.calculator-grid .equals {
		border: 2px solid ButtonText;
	}
}

.clipboard-helper {
	position: fixed;
	left: -9999px;
	top: 0;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.breadcrumb-bar {
	border-bottom: 1px solid rgba(128, 177, 224, 0.14);
	background: rgba(12, 21, 36, 0.78);
}

.breadcrumb-list {
	max-width: 100%;
	padding-block: 0.58rem;
}

.main-content > section + section,
.main-content > article + section,
.main-content > section + article {
	margin-top: clamp(1rem, 2.4vw, 1.6rem);
}

.practice-heading {
	padding: clamp(1rem, 3vw, 1.6rem);
	border: 1px solid rgba(111, 174, 228, 0.22);
	border-radius: 1rem;
	background:
		radial-gradient(circle at 100% 0%, rgba(245, 154, 71, 0.1), transparent 18rem),
		linear-gradient(145deg, rgba(29, 44, 70, 0.98), rgba(17, 29, 49, 0.98));
	box-shadow: var(--shadow-card);
}

.practice-heading h1 {
	font-size: clamp(1.8rem, 4vw, 2.55rem);
	letter-spacing: -0.025em;
	line-height: 1.08;
}

.category-select-wrapper {
	padding: 0.85rem;
	border: 1px solid rgba(111, 174, 228, 0.18);
	border-radius: 0.85rem;
	background: rgba(18, 30, 50, 0.84);
}

.math-card,
.feedback-card,
.empty-state {
	border-color: rgba(111, 174, 228, 0.28);
	background:
		radial-gradient(circle at 100% 0%, rgba(70, 132, 196, 0.12), transparent 16rem),
		linear-gradient(145deg, rgba(29, 43, 69, 0.98), rgba(16, 27, 46, 0.98));
}

.math-problem {
	padding: clamp(0.8rem, 2vw, 1.05rem);
	border: 1px solid rgba(130, 188, 236, 0.2);
	border-radius: 0.8rem;
	background: rgba(8, 17, 31, 0.48);
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	line-height: 1.35;
	overflow-wrap: anywhere;
	text-align: center;
	text-wrap: balance;
}

.answer-input {
	border-color: rgba(116, 182, 235, 0.42);
	background: #0d192b;
}

.answer-input:focus {
	box-shadow: 0 0 0 0.2rem rgba(88, 169, 232, 0.18);
}

.submit-button,
.next-question-button,
.primary-button {
	box-shadow: 0 0.55rem 1.25rem rgba(6, 10, 18, 0.22);
}

.information-page .main-content {
	max-width: none;
}

.information-article {
	max-width: 68rem;
	margin-inline: auto;
	border-color: rgba(128, 184, 232, 0.25);
	background:
		radial-gradient(circle at 100% 0%, rgba(69, 136, 202, 0.12), transparent 24rem),
		linear-gradient(145deg, rgba(28, 42, 67, 0.98), rgba(16, 27, 46, 0.98));
}

.information-article h1 {
	max-width: 58rem;
	font-size: clamp(2.15rem, 5vw, 3.8rem);
	letter-spacing: -0.045em;
}

.information-article h2 {
	padding-top: 0.25rem;
	border-top: 1px solid rgba(128, 184, 232, 0.15);
	color: #f1f6ff;
}

.site-map-section {
	border-color: rgba(128, 184, 232, 0.24);
	background: linear-gradient(145deg, rgba(27, 42, 67, 0.96), rgba(16, 28, 47, 0.96));
}

.site-map-alpha-group {
	border-color: rgba(128, 184, 232, 0.18);
	background: rgba(9, 18, 32, 0.48);
}

.site-map-link-list a {
	padding: 0.55rem 0.65rem;
	border-radius: 0.45rem;
}

.site-map-link-list a:hover,
.site-map-link-list a:focus-visible {
	background: rgba(62, 125, 188, 0.18);
	text-decoration: none;
}

.workbook-section,
.hero-content-section,
.hero-sources,
.term-profile > section {
	padding: clamp(1rem, 2.5vw, 1.6rem);
	border-radius: 1rem;
}

.hero-profile,
.term-profile {
	gap: clamp(1rem, 2.5vw, 1.5rem);
}

.hero-content-section p,
.term-profile p,
.information-article p,
.information-article li {
	max-width: 76ch;
}

@media (min-width: 58rem) {
	.practice-page .main-content {
		padding-top: 2rem;
	}

	.answer-form {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.75rem;
		align-items: end;
	}

	.answer-form label,
	.answer-form .form-hint {
		grid-column: 1 / -1;
	}

	.answer-input {
		margin-bottom: 0;
	}

	.submit-button {
		width: auto;
		min-width: 11rem;
	}
}

@media (max-width: 36rem) {
	.practice-heading,
	.math-card,
	.feedback-card,
	.information-article,
	.workbook-section,
	.hero-content-section,
	.term-profile > section {
		border-radius: 0.75rem;
	}

	.information-article {
		padding: 1rem;
	}
}

:root {
	--adventure-cyan: #3ee7dc;
	--adventure-blue: #4da8ff;
	--adventure-purple: #9f7aea;
	--adventure-orange: #ff9748;
	--adventure-pink: #ff6f91;
	--adventure-panel: rgba(22, 39, 67, 0.92);
	--adventure-panel-strong: rgba(13, 26, 47, 0.97);
	--adventure-border: rgba(105, 184, 239, 0.28);
	--adventure-glow: 0 1.15rem 3rem rgba(2, 8, 22, 0.42);
}

body {
	background:
		radial-gradient(circle at 14% 8%, rgba(32, 117, 196, 0.2), transparent 28rem),
		radial-gradient(circle at 88% 18%, rgba(126, 76, 202, 0.16), transparent 32rem),
		linear-gradient(180deg, #0c1730 0, #07111f 42rem, #050c17 100%);
}

.workbook-page .main-content,
.workbook-page .main-content::before,
.workbook-page .main-content::after {
	background: transparent !important;
}

.workbook-page .main-content {
	color: #edf6ff;
}

.workbook-page :is(.workbook-masthead, .workbook-section, .workbook-note, .evidence-note, .build-status, .hero-browser, .hero-evidence-guide, .hero-profile-masthead, .hero-quick-facts, .hero-content-section, .hero-connections, .hero-sources, .term-browser, .term-profile-masthead, .term-quick-facts, .term-learning-map, .term-heroes, .term-practice, .term-sources, .term-editorial-note, .trail-prompt) {
	border-color: var(--adventure-border) !important;
	background: radial-gradient(circle at 100% 0%, rgba(58, 154, 231, 0.12), transparent 18rem), linear-gradient(145deg, #1b2f50, #0e1d33) !important;
	box-shadow: var(--adventure-glow) !important;
	color: #edf6ff !important;
}

.workbook-page :is(.workbook-masthead, .workbook-section, .workbook-note, .evidence-note, .build-status, .hero-browser, .hero-evidence-guide, .hero-profile-masthead, .hero-content-section, .hero-connections, .hero-sources, .term-browser, .term-profile-masthead, .term-learning-map, .term-heroes, .term-practice, .term-sources, .term-editorial-note, .trail-prompt) :is(h1, h2, h3, strong) {
	color: #f7fbff !important;
}

.workbook-page :is(.workbook-masthead, .workbook-section, .hero-profile-masthead, .hero-content-section, .hero-connections, .hero-sources, .term-profile-masthead, .term-learning-map, .term-heroes, .term-practice, .term-sources, .trail-prompt) :is(p, li, dd, span) {
	color: #d3e1ef !important;
}

.workbook-page .term-editorial-note {
	padding: 0.75rem 0.95rem;
	border-left: 0.3rem solid #f0bd55 !important;
	box-shadow: none !important;
	font-size: 0.86rem;
	line-height: 1.45;
}

.workbook-page .term-editorial-note strong {
	color: #ffd78b;
}

.quest-masthead {
	position: relative;
	overflow: hidden;
	padding: clamp(1.2rem, 3vw, 2.2rem) !important;
	border: 1px solid rgba(76, 203, 231, 0.34) !important;
	background:
		linear-gradient(120deg, rgba(8, 26, 58, 0.98), rgba(20, 61, 112, 0.94) 48%, rgba(55, 34, 102, 0.95)) !important;
}

.quest-masthead::after {
	position: absolute;
	right: -5rem;
	bottom: -7rem;
	width: 18rem;
	height: 18rem;
	border: 1.5rem solid rgba(62, 231, 220, 0.08);
	border-radius: 50%;
	content: '';
}

.quest-masthead-grid {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 1.25rem;
	align-items: end;
}

.quest-masthead h1 {
	max-width: 14ch;
	margin-bottom: 0.65rem;
	font-size: clamp(2.55rem, 7vw, 5.4rem);
	line-height: 0.95;
	letter-spacing: -0.055em;
}

.quest-masthead p {
	max-width: 61ch;
	font-size: clamp(1rem, 1.8vw, 1.15rem);
}

.quest-scoreboard {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
}

.quest-scoreboard span {
	display: grid;
	gap: 0.1rem;
	min-width: 0;
	padding: 0.75rem;
	border: 1px solid rgba(126, 215, 246, 0.24);
	border-radius: 0.75rem;
	background: rgba(7, 21, 43, 0.58);
	color: #bcd2e8;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.quest-scoreboard strong {
	color: #ffffff;
	font-size: clamp(1.25rem, 3vw, 1.9rem);
	line-height: 1;
}

.compact-guide {
	display: grid;
	gap: 0.7rem;
	padding: 1rem 1.15rem !important;
	border-left: 0.35rem solid var(--adventure-cyan) !important;
	box-shadow: none !important;
}

.compact-guide h2 {
	margin: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

.adventure-browser {
	padding: clamp(1rem, 2.5vw, 1.65rem) !important;
}

.term-browser-heading,
.browser-heading-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1.5rem;
	align-items: end;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.result-count {
	margin: 0;
	padding: 0.5rem 0.72rem;
	border: 1px solid rgba(62, 231, 220, 0.3);
	border-radius: 999px;
	background: rgba(23, 91, 104, 0.23);
	color: #bafaf5 !important;
	font-size: 0.82rem;
	font-weight: 800;
}

.adventure-filter {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding: clamp(0.85rem, 2vw, 1.15rem);
	border: 1px solid rgba(100, 177, 232, 0.22);
	border-radius: 0.9rem;
	background: rgba(7, 19, 38, 0.58);
}

.adventure-filter label {
	display: grid;
	gap: 0.38rem;
	min-width: 0;
	color: #dcecff;
	font-size: 0.74rem;
	font-weight: 850;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.adventure-filter input,
.adventure-filter select {
	width: 100%;
	min-height: 2.9rem;
	padding: 0.68rem 0.8rem;
	border: 1px solid rgba(96, 179, 238, 0.38) !important;
	border-radius: 0.65rem;
	background: rgba(11, 27, 51, 0.96) !important;
	color: #f6fbff !important;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 650;
	letter-spacing: 0;
	text-transform: none;
}

.adventure-filter input:focus,
.adventure-filter select:focus {
	outline: none;
	border-color: var(--adventure-cyan) !important;
	box-shadow: 0 0 0 0.2rem rgba(62, 231, 220, 0.14);
}

.filter-submit {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: end;
}

.filter-submit .primary-button,
.filter-submit .secondary-button {
	min-height: 2.9rem;
	margin: 0;
}

.term-alphabet,
.hero-alphabet {
	display: flex;
	flex-wrap: wrap;
	gap: 0.38rem;
	margin: 0 0 1.1rem;
	padding: 0;
	border: 0;
	background: transparent;
}

.term-alphabet a,
.term-alphabet span,
.hero-alphabet a,
.hero-alphabet span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	height: 2.2rem;
	padding: 0 0.45rem;
	border: 1px solid rgba(104, 180, 236, 0.24) !important;
	border-radius: 0.55rem;
	background: rgba(19, 40, 69, 0.86) !important;
	color: #bfe6ff !important;
	font-size: 0.76rem;
	font-weight: 900;
	text-decoration: none;
}

.term-alphabet span,
.hero-alphabet span {
	opacity: 0.36;
}

.term-alphabet a:hover,
.term-alphabet a:focus-visible,
.hero-alphabet a:hover,
.hero-alphabet a:focus-visible,
.term-alphabet .is-active,
.hero-alphabet .is-active {
	border-color: var(--adventure-cyan) !important;
	background: linear-gradient(135deg, #18758d, #2455a1) !important;
	color: #ffffff !important;
}

.term-card-grid,
.hero-card-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.9rem;
}

.workbook-page .term-card,
.workbook-page .hero-card {
	position: relative;
	overflow: hidden;
	min-width: 0;
	border: 1px solid rgba(97, 176, 236, 0.24) !important;
	border-radius: 0.95rem;
	background:
		radial-gradient(circle at 100% 0%, rgba(67, 160, 225, 0.13), transparent 11rem),
		linear-gradient(145deg, rgba(29, 51, 86, 0.98), rgba(16, 31, 55, 0.98)) !important;
	box-shadow: 0 0.75rem 1.75rem rgba(2, 8, 20, 0.28) !important;
}

.workbook-page .term-card::before,
.workbook-page .hero-card::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0.22rem;
	background: linear-gradient(90deg, var(--adventure-cyan), var(--adventure-blue), var(--adventure-purple));
	content: '';
}

.workbook-page .term-card:hover,
.workbook-page .hero-card:hover,
.workbook-page .term-card:focus-within,
.workbook-page .hero-card:focus-within {
	border-color: rgba(62, 231, 220, 0.56) !important;
	transform: translateY(-3px);
}

.term-card-compact {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem;
}

.term-card-heading {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 0.7rem;
	align-items: start;
}

.term-card-letter,
.hero-card-portrait {
	box-shadow: 0 0.55rem 1.25rem rgba(1, 8, 21, 0.32);
}

.term-card h2,
.hero-card h2 {
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	line-height: 1.15;
}

.term-card h2 a,
.hero-card h2 a {
	color: #9edcff !important;
}

.term-card-meta {
	color: #ffbd7f !important;
	font-size: 0.66rem;
	line-height: 1.3;
}

.term-card-summary {
	margin: 0;
	color: #bdcce0 !important;
	font-size: 0.86rem;
	line-height: 1.55;
}

.term-card-footer {
	margin-top: auto;
	padding-top: 0.65rem;
	border-top: 1px solid rgba(116, 178, 226, 0.18);
}

.hero-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.9rem;
	padding: 1rem;
}

.hero-card-content {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.hero-card-content > p:not(.hero-card-region) {
	margin-bottom: 0.75rem;
	font-size: 0.87rem;
	line-height: 1.55;
}

.hero-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: auto 0 0.65rem;
}

.hero-card-tags span {
	padding: 0.25rem 0.46rem;
	border: 1px solid rgba(104, 183, 238, 0.2);
	border-radius: 999px;
	background: rgba(53, 112, 165, 0.18);
	color: #bfe6ff;
	font-size: 0.68rem;
	font-weight: 750;
}

.collection-pagination {
	display: grid;
	gap: 0.85rem;
	margin-top: 1.35rem;
	padding: 0.9rem;
	border: 1px solid rgba(94, 179, 234, 0.23);
	border-radius: 0.9rem;
	background: rgba(7, 19, 38, 0.58);
}

.pagination-direction,
.pagination-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	justify-content: center;
}

.pagination-direction {
	justify-content: space-between;
}

.pagination-direction > a,
.pagination-direction > span,
.pagination-pages > a,
.pagination-pages > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.45rem;
	padding: 0.45rem 0.7rem;
	border: 1px solid rgba(104, 183, 238, 0.24);
	border-radius: 0.55rem;
	background: rgba(20, 43, 73, 0.9);
	color: #bfe8ff;
	font-size: 0.8rem;
	font-weight: 850;
	text-decoration: none;
}

.pagination-direction > span,
.pagination-pages > span:not(.is-current) {
	opacity: 0.45;
}

.pagination-pages .is-current,
.collection-pagination a:hover,
.collection-pagination a:focus-visible {
	border-color: var(--adventure-cyan);
	background: linear-gradient(135deg, #177b8c, #2c5eb2);
	color: #ffffff;
}

.pagination-direction strong {
	color: #ffffff;
	font-size: 0.88rem;
}

.collection-empty {
	margin-top: 1rem;
	text-align: center;
}

.trail-prompt {
	display: grid;
	gap: 1rem;
	align-items: center;
	padding: clamp(1rem, 2.6vw, 1.5rem) !important;
	border-left: 0.35rem solid var(--adventure-cyan) !important;
}

.trail-prompt h2 {
	margin: 0.1rem 0 0.35rem;
	font-size: clamp(1.35rem, 3vw, 2rem);
}

.trail-prompt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.workbook-page p.eyebrow, .workbook-page .hero-timeline span { color: #ff9a4a !important; }
.workbook-page :is(.term-definition-grid, .term-context-grid, .term-callout-grid) { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.workbook-page :is(.adventure-destination, .discovery-card, .record-card, .practice-link-grid a, .term-card, .hero-card, .term-quick-facts > div, .hero-quick-facts > div, .term-definition-grid > article, .term-context-grid > article, .term-callout-grid > article, .term-example, .term-profession-callout, .term-relation-grid > div, .term-hero-card, .hero-contribution-grid article, .hero-why-callout, .hero-profession-callout, .hero-key-idea, .hero-activity, .hero-example, .hero-myth-fact article, .hero-connection-columns > div, .related-hero-card, .hero-evidence-box, .term-visual) {
	color: #14213d !important;
}
.workbook-page :is(.adventure-destination, .discovery-card, .record-card, .practice-link-grid a, .term-card, .hero-card, .term-quick-facts > div, .hero-quick-facts > div, .term-definition-grid > article, .term-context-grid > article, .term-callout-grid > article, .term-example, .term-profession-callout, .term-relation-grid > div, .term-hero-card, .hero-contribution-grid article, .hero-why-callout, .hero-profession-callout, .hero-key-idea, .hero-activity, .hero-example, .hero-myth-fact article, .hero-connection-columns > div, .related-hero-card, .hero-evidence-box, .term-visual) :is(h2, h3, p, li, span, strong) { color: inherit !important; }
.workbook-page :is(.adventure-destination, .discovery-card, .record-card, .practice-link-grid a, .term-card, .hero-card, .term-quick-facts > div, .hero-quick-facts > div, .term-definition-grid > article, .term-context-grid > article, .term-callout-grid > article, .term-example, .term-profession-callout, .term-relation-grid > div, .term-hero-card, .hero-contribution-grid article, .hero-why-callout, .hero-profession-callout, .hero-key-idea, .hero-activity, .hero-myth-fact article, .hero-connection-columns > div, .related-hero-card, .term-visual) a { color: #005a88 !important; }

.workbook-page :is(.term-card, .hero-card, .record-card):nth-child(6n+1), .workbook-page .term-definition-grid > article:first-child, .workbook-page .term-real-life, .workbook-page .hero-key-idea { background: #d9ecff !important; border-left: .38rem solid #2467a5 !important; }
.workbook-page :is(.term-card, .hero-card, .record-card):nth-child(6n+2), .workbook-page .term-tip, .workbook-page .hero-profession-callout { background: #dff5e8 !important; border-left: .38rem dashed #227357 !important; }
.workbook-page :is(.term-card, .hero-card, .record-card):nth-child(6n+3), .workbook-page .term-context-grid > article:last-child, .workbook-page .term-fact { background: #e9ddff !important; border-left: .38rem double #6c4ca3 !important; }
.workbook-page :is(.term-card, .hero-card, .record-card):nth-child(6n+4), .workbook-page .term-context-grid > article:first-child, .workbook-page .term-example, .workbook-page .hero-activity, .workbook-page .hero-evidence-box { background: #fff2b8 !important; border-left: .38rem dotted #8a5a00 !important; }
.workbook-page :is(.term-card, .hero-card, .record-card):nth-child(6n+5), .workbook-page .term-mistake, .workbook-page .hero-myth-fact article:first-child { background: #ffdce3 !important; border-left: .38rem double #9c3f57 !important; }
.workbook-page :is(.term-card, .hero-card, .record-card):nth-child(6n+6), .workbook-page .term-profession-callout, .workbook-page .hero-why-callout { background: #ffe1d2 !important; border-left: .38rem solid #9a4c16 !important; }
.workbook-page :is(.term-quick-facts, .hero-quick-facts) > div:nth-child(4n+1), .workbook-page .term-relation-grid > div:nth-child(3n+1), .workbook-page .term-hero-card:nth-child(odd), .workbook-page .related-hero-card:nth-child(odd) { background: #d9ecff !important; }
.workbook-page :is(.term-quick-facts, .hero-quick-facts) > div:nth-child(4n+2), .workbook-page .term-relation-grid > div:nth-child(3n+2), .workbook-page .hero-connection-columns > div:nth-child(odd) { background: #dff5e8 !important; }
.workbook-page :is(.term-quick-facts, .hero-quick-facts) > div:nth-child(4n+3), .workbook-page .term-relation-grid > div:nth-child(3n+3), .workbook-page .term-hero-card:nth-child(even), .workbook-page .related-hero-card:nth-child(even) { background: #e9ddff !important; }
.workbook-page :is(.term-quick-facts, .hero-quick-facts) > div:nth-child(4n+4), .workbook-page .hero-connection-columns > div:nth-child(even) { background: #fff2b8 !important; }
.workbook-page .term-definition-grid > article:last-child, .workbook-page .hero-contribution-grid article:nth-child(odd) { background: #d9ecff !important; }
.workbook-page .hero-contribution-grid article:nth-child(even) { background: #dff5e8 !important; }
.workbook-page .term-example-answer, .workbook-page .hero-example, .workbook-page .hero-activity details, .workbook-page .term-visual { background: #eef3f8 !important; color: #14213d !important; }
.workbook-page .term-practice .practice-link-grid li:nth-child(odd) a, .adventures-page .practice-link-grid li:nth-child(odd) a { background: #d9ecff !important; color: #14213d !important; border-left: .38rem solid #2467a5 !important; }
.workbook-page .term-practice .practice-link-grid li:nth-child(even) a, .adventures-page .practice-link-grid li:nth-child(even) a { background: #dff5e8 !important; color: #14213d !important; border-left: .38rem dashed #227357 !important; }
.workbook-page :is(.term-source-list, .hero-source-list, .term-review-meta, .hero-review-meta) :is(p, span, strong) { color: #d3e1ef !important; }
.workbook-page :is(.term-sources, .hero-sources) a { color: #8edcff !important; }

.adventures-page .adventure-hero { border-color: #396b99 !important; background: linear-gradient(125deg, #102b54, #245f9f 52%, #4a347a) !important; color: #fff !important; }
.adventures-page .adventure-hero :is(h1, p, strong) { color: #fff !important; }
.adventures-page .adventure-map { background: linear-gradient(145deg, #fff2b8, #eef8de 58%, #d9ecff) !important; border-color: #59677a !important; }
.adventures-page .adventure-destination.destination-heroes { background: #d9ecff !important; }
.adventures-page .adventure-destination.destination-terms { background: #ffe1d2 !important; }
.adventures-page .adventure-destination.destination-arcade { background: #dff5e8 !important; }
.adventures-page .discovery-card:nth-child(4n+1) { background: #d9ecff !important; }
.adventures-page .discovery-card:nth-child(4n+2) { background: #dff5e8 !important; }
.adventures-page .discovery-card:nth-child(4n+3) { background: #e9ddff !important; }
.adventures-page .discovery-card:nth-child(4n+4) { background: #fff2b8 !important; }
.information-page .information-article, .practice-page .practice-heading, .practice-page .math-card, .practice-page .feedback-card, .site-map-section { border-color: var(--adventure-border) !important; background: radial-gradient(circle at 100% 0%, rgba(61, 152, 222, 0.12), transparent 17rem), linear-gradient(145deg, rgba(26, 46, 78, 0.98), rgba(13, 28, 50, 0.98)) !important; box-shadow: var(--adventure-glow) !important; }

.primary-button {
	border: 1px solid rgba(255, 184, 105, 0.72);
	background: linear-gradient(135deg, #ffad61, #ef7f2b);
	color: #101725 !important;
	font-weight: 900;
}

.secondary-button {
	border-color: rgba(87, 204, 231, 0.42);
	background: rgba(22, 89, 123, 0.24);
	color: #bfefff !important;
}

.workbook-page a:focus-visible, .workbook-page button:focus-visible, .workbook-page input:focus-visible, .workbook-page select:focus-visible, .workbook-page summary:focus-visible { outline: .2rem solid #ffca3a !important; outline-offset: .16rem; }
.workbook-page ::selection { background: #1d5fa7; color: #fff; }

@media (min-width: 44rem) {
	.adventure-filter {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.adventure-filter .filter-search,
	.adventure-filter .filter-submit {
		grid-column: 1 / -1;
	}

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

	.trail-prompt {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

@media (min-width: 70rem) {
	.quest-masthead-grid {
		grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 0.7fr);
	}

	.compact-guide {
		grid-template-columns: minmax(17rem, 0.7fr) minmax(0, 1fr);
		align-items: center;
	}

	.adventure-filter {
		grid-template-columns: minmax(16rem, 1.4fr) repeat(3, minmax(10rem, 0.75fr));
	}

	.adventure-filter .filter-search,
	.adventure-filter .filter-submit {
		grid-column: auto;
	}

	.adventure-filter .filter-submit {
		grid-column: 1 / -1;
	}

	.term-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hero-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 35rem) {
	.quest-scoreboard {
		grid-template-columns: 1fr;
	}

	.hero-card {
		grid-template-columns: 1fr;
	}

	.hero-card-portrait {
		width: 3.6rem;
		height: 3.6rem;
	}

	.pagination-direction {
		justify-content: center;
	}

	.pagination-direction strong {
		order: -1;
		width: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.workbook-page .term-card,
	.workbook-page .hero-card {
		transition: none;
	}
}

/* MathMox 4.0.4 — Bible Math Heroes collection */
.bible-hero-banner {
	display: grid;
	gap: 1.1rem;
	align-items: center;
	margin: 1.25rem 0;
	padding: clamp(1.15rem, 2.5vw, 1.75rem);
	border: .14rem solid #7a5420;
	border-left: .55rem double #7a5420;
	border-radius: 1rem;
	background: linear-gradient(135deg, #fff2b8, #ffe1d2 58%, #dff5e8);
	color: #14213d;
	box-shadow: 0 .8rem 1.7rem rgba(0, 0, 0, .24);
}

.bible-hero-banner :is(h2, p, strong) {
	color: #14213d !important;
}

.bible-hero-banner h2 {
	margin: .15rem 0 .55rem;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(1.45rem, 3vw, 2.15rem);
	line-height: 1.12;
}

.bible-hero-banner p:last-child {
	margin-bottom: 0;
	max-width: 72ch;
}

.bible-hero-banner .primary-button {
	justify-self: start;
	white-space: nowrap;
}

@media (min-width: 58rem) {
	.bible-hero-banner {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

/* MathMox 4.0.8 — Bible hero historical record panels */
.hero-historical-record {
	margin-bottom: 1rem;
	padding: clamp(1rem, 2.8vw, 1.45rem);
	border: 0.18rem solid #6d5420;
	border-left: 0.55rem solid #8a5a00;
	border-radius: 1rem;
	background: #fff2b8;
	color: #14213d;
	box-shadow: 0 0.65rem 1.35rem rgba(6, 14, 31, 0.2);
}

.hero-historical-record-heading > span {
	display: inline-block;
	margin: 0 0 0.75rem;
	padding: 0.3rem 0.62rem;
	border: 0.12rem solid #59417f;
	border-radius: 999px;
	background: #e9ddff;
	color: #14213d;
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.025em;
}

.hero-historical-record-heading h2 {
	margin-bottom: 0.45rem;
	color: #14213d;
}

.hero-historical-record-heading > p:last-child {
	margin-bottom: 1rem;
	font-size: 1.02rem;
	font-weight: 700;
}

.hero-historical-record-grid {
	display: grid;
	gap: 0.75rem;
}

.hero-historical-record-grid article {
	padding: 0.9rem;
	border: 0.12rem solid #46617d;
	border-left: 0.42rem solid #2467a5;
	border-radius: 0.72rem;
	background: #d9ecff;
	color: #14213d;
}

.hero-historical-record-grid article:nth-child(2) {
	border-color: #3d715d;
	border-left-style: dashed;
	border-left-color: #227357;
	background: #dff5e8;
}

.hero-historical-record-grid article:nth-child(3) {
	border-color: #7c5060;
	border-left-style: double;
	border-left-color: #9c3f57;
	background: #ffdce3;
}

.hero-historical-record-grid h3 {
	margin-bottom: 0.35rem;
	color: #14213d;
	font-size: 1rem;
}

.hero-historical-record-grid p {
	margin: 0;
	color: #14213d;
}

@media (min-width: 48rem) {
	.hero-historical-record-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}


/* MathMox 4.0.11 — donation, callback and era-hero refinements */
.donation-article,
.donation-result-card {
	max-width: 48rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
}

.donation-page .donation-article h1,
.donation-result-page .donation-result-card h1 {
	max-width: 18ch;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.donation-lead,
.donation-result-card > p {
	font-size: clamp(1.05rem, 2vw, 1.2rem);
	line-height: 1.7;
}

.donation-action {
	margin-top: 1.5rem;
	padding: 1.25rem;
	border: 2px solid #ffb15e;
	border-radius: 1rem;
	background: #fff2b8;
	color: #172033;
}

.donation-action p {
	margin: 0.85rem 0 0;
	color: #26344c;
	font-size: 0.95rem;
	line-height: 1.55;
}

.paypal-donate-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.8rem 1.25rem;
	border: 2px solid #142c8e;
	border-radius: 0.8rem;
	background: #ffd140;
	color: #10245f !important;
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 0.55rem 1.2rem rgba(4, 10, 20, 0.22);
}

.paypal-donate-button:hover,
.paypal-donate-button:focus-visible {
	background: #ffbf1f;
	text-decoration: underline;
}

.donation-result-actions,
.era-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.era-hero-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
}

.era-hero-heading > p {
	max-width: 24rem;
	margin: 0;
	color: #c8d7eb;
	font-weight: 700;
}

.era-hero-grid {
	margin-top: 1rem;
}

@media (max-width: 44rem) {
	.era-hero-heading {
		align-items: start;
		flex-direction: column;
	}

	.donation-result-actions > *,
	.era-hero-actions > * {
		width: 100%;
	}
}


/* MathMox 4.0.13 — compact donation page correction */
.donation-page .page-content {
	padding-top: clamp(1rem, 2vw, 1.75rem);
}

.donation-page .donation-article {
	max-width: 42rem;
	margin-inline: auto;
	padding: clamp(1.25rem, 3vw, 2rem);
}

.donation-page .donation-article h1 {
	max-width: none;
	margin-bottom: 1rem;
	font-size: clamp(1.8rem, 3.5vw, 2.6rem);
	line-height: 1.12;
	letter-spacing: -0.025em;
}

.donation-page .donation-lead {
	max-width: 58ch;
	margin: 0;
	font-size: clamp(1rem, 1.7vw, 1.125rem);
	line-height: 1.65;
}

.donation-page .donation-action {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-top: 1.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.donation-page .paypal-donate-button {
	min-height: 3rem;
	padding: 0.8rem 1.35rem;
}
