/* Rust template compatibility styles; the shared Material sheet owns the
   buttons, cards, fields, theme tokens, and common utility classes. */
.rust-app {
	min-height: 100vh;
	background: var(--md-sys-color-background);
	color: var(--md-sys-color-on-background);
}

.rust-app .site-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	padding: 0.75rem clamp(1rem, 4vw, 2rem);
	border-bottom: 1px solid var(--md-sys-color-outline-variant);
	background: var(--md-sys-color-surface-container-low);
}

.rust-app .brand {
	flex: 0 0 auto;
	color: var(--md-sys-color-primary);
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
}

.rust-app .site-header nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	margin-left: auto;
}

.rust-app :where(.site-header nav) a {
	display: inline-flex;
	min-height: 2.5rem;
	align-items: center;
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	color: var(--md-sys-color-on-surface-variant);
	text-decoration: none;
}

.rust-app :where(.site-header nav) a:hover,
.rust-app :where(.site-header nav) a:focus-visible {
	background: color-mix(in srgb, var(--md-sys-color-primary) 9%, transparent);
	color: var(--md-sys-color-on-surface);
}

.rust-app :where(.site-header nav) a[aria-current="page"] {
	background: var(--md-sys-color-secondary-container);
	color: var(--md-sys-color-on-secondary-container);
}

.rust-app .site-header nav form {
	margin: 0;
}

.rust-app :where(.site-header nav) button:not(.btn) {
	min-height: 2.25rem;
	padding: 0.4rem 0.85rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--md-sys-color-on-surface-variant);
	cursor: pointer;
	font: inherit;
}

.rust-app :where(.site-header nav) button:not(.btn):hover {
	background: color-mix(in srgb, var(--md-sys-color-primary) 9%, transparent);
	color: var(--md-sys-color-on-surface);
}

.rust-app .page-content {
	width: calc(100% - 2rem);
	margin: clamp(1.25rem, 4vw, 2.5rem) auto;
}

.rust-app .page-content:not(.max-w-md):not(.max-w-2xl):not(.max-w-4xl) {
	max-width: 72rem;
}

.rust-app .page-content > h1 {
	margin: 0 0 1rem;
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
}

.rust-app .page-content h2,
.rust-app .page-content h3 {
	font-family: var(--font-display);
	line-height: 1.25;
}

.rust-app .page-content > section {
	margin-block: 1.5rem;
	padding: clamp(1rem, 3vw, 1.5rem);
	border: 1px solid var(--md-sys-color-outline-variant);
	border-radius: var(--md-sys-shape-large);
	background: var(--md-sys-color-surface-container-low);
}

.rust-app .page-content > section h2 {
	margin: 0 0 1rem;
	font-size: 1.25rem;
}

.rust-app .page-content form:not([class]) {
	display: grid;
	align-items: end;
	gap: 0.75rem;
	margin-block: 0.75rem;
}

.rust-app .filter-form label,
.rust-app .page-content form:not([class]) > label {
	display: grid;
	gap: 0.375rem;
	color: var(--md-sys-color-on-surface-variant);
	font-weight: 600;
}

.rust-app .page-content form:not([class]) > label:has(input[type="checkbox"]) {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.rust-app .page-content input:where(:not([type="hidden"])),
.rust-app .page-content textarea,
.rust-app .page-content select {
	width: 100%;
	max-width: 100%;
	min-height: 2.75rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--md-sys-color-outline);
	border-radius: var(--md-sys-shape-small);
	background: var(--md-sys-color-surface-container-highest);
	color: var(--md-sys-color-on-surface);
	font: inherit;
}

.rust-app .page-content input[type="checkbox"] {
	width: 1.125rem;
	min-height: auto;
	height: 1.125rem;
	flex: 0 0 auto;
	padding: 0;
	accent-color: var(--md-sys-color-primary);
}

.rust-app .page-content textarea {
	min-height: 7rem;
	resize: vertical;
}

.rust-app .page-content input[type="file"] {
	padding: 0.375rem;
}

.rust-app :where(.page-content) input[type="file"]::file-selector-button {
	margin-right: 0.75rem;
	padding: 0.4rem 0.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--md-sys-color-secondary-container);
	color: var(--md-sys-color-on-secondary-container);
	cursor: pointer;
	font: inherit;
}

.rust-app .page-content button:not(.btn),
.rust-app .pagination a {
	display: inline-flex;
	min-height: 2.5rem;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: 999px;
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
	cursor: pointer;
	font: 600 0.9rem / 1.25 var(--font-display);
	text-decoration: none;
}

.rust-app .page-content button:not(.btn):hover,
.rust-app .pagination a:hover {
	box-shadow: var(--md-sys-elevation-1);
}

.rust-app .page-content form:not([class]) > button:not(.btn) {
	justify-self: start;
}

.rust-app .link {
	color: var(--md-sys-color-primary);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.rust-app .notice,
.rust-app .error {
	margin-block: 1rem;
	padding: 0.875rem 1rem;
	border: 1px solid var(--md-sys-color-outline-variant);
	border-radius: var(--md-sys-shape-medium);
}

.rust-app .notice {
	border-color: color-mix(
		in srgb,
		var(--color-success) 35%,
		var(--md-sys-color-outline-variant)
	);
	background: color-mix(
		in srgb,
		var(--color-success) 10%,
		var(--md-sys-color-surface-container-low)
	);
}

.rust-app .page-content > section.notice {
	border-color: color-mix(
		in srgb,
		var(--color-success) 35%,
		var(--md-sys-color-outline-variant)
	);
	background: color-mix(
		in srgb,
		var(--color-success) 10%,
		var(--md-sys-color-surface-container-low)
	);
}

.rust-app .error {
	border-color: var(--md-sys-color-error);
	background: var(--md-sys-color-error-container);
	color: var(--md-sys-color-on-error-container);
}

.rust-app .filter-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	align-items: end;
	gap: 1rem;
	margin-block: 1rem 1.5rem;
	padding: 1rem;
	border: 1px solid var(--md-sys-color-outline-variant);
	border-radius: var(--md-sys-shape-large);
	background: var(--md-sys-color-surface-container-low);
}

.rust-app .filter-form button {
	justify-self: start;
}

.rust-app .table-wrap,
.rust-app .page-content section:has(> table) {
	max-width: 100%;
	overflow-x: auto;
	border: 1px solid var(--md-sys-color-outline-variant);
	border-radius: var(--md-sys-shape-medium);
}

.rust-app .page-content table {
	width: 100%;
	min-width: 38rem;
	border-collapse: collapse;
	background: var(--md-sys-color-surface-container-low);
	text-align: left;
}

.rust-app .page-content th,
.rust-app .page-content td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--md-sys-color-outline-variant);
	vertical-align: middle;
	overflow-wrap: anywhere;
}

.rust-app .page-content th {
	background: var(--md-sys-color-surface-container);
	color: var(--md-sys-color-on-surface);
	font-size: 0.875rem;
	font-weight: 650;
}

.rust-app .page-content tbody tr:last-child td {
	border-bottom: 0;
}

.rust-app .page-content tbody tr:nth-child(even) {
	background: color-mix(
		in srgb,
		var(--md-sys-color-surface-container) 42%,
		transparent
	);
}

.rust-app .page-content td form:not([class]) {
	min-width: 10rem;
	gap: 0.5rem;
}

.rust-app .pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-block: 1.5rem;
}

.rust-app .pagination a {
	background: var(--md-sys-color-secondary-container);
	color: var(--md-sys-color-on-secondary-container);
}

.rust-app :where(.site-header nav) a:focus-visible,
.rust-app .pagination a:focus-visible,
.rust-app .page-content button:focus-visible {
	outline: 0;
	box-shadow: var(--md-focus-ring);
}

.rust-app .page-content dl {
	align-items: start;
}

.rust-app .page-content dt {
	color: var(--md-sys-color-on-surface-variant);
	font-size: 0.875rem;
}

.rust-app .page-content dd {
	margin: 0.125rem 0 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.rust-app .prose,
.rust-app .prose.max-w-none {
	max-width: 78ch;
	line-height: 1.7;
}

.rust-app .prose :is(p, ul, ol, pre, blockquote, table) {
	max-width: 100%;
}

.rust-app .prose a {
	color: var(--md-sys-color-primary);
}

.rust-app .prose blockquote {
	border-left-color: var(--md-sys-color-outline);
}

.rust-app .prose :is(code, pre) {
	background: var(--md-sys-color-surface-container);
}

.rust-app .prose pre {
	max-width: 100%;
	color: var(--md-sys-color-on-surface);
}

.rust-app .card > a {
	display: block;
	overflow: hidden;
}

.rust-app .card > a > img {
	display: block;
	width: 100%;
	height: 12rem;
	object-fit: cover;
}

/* Missing utility classes used in Rust templates. Existing utilities and
   components continue to come from material.css. */
.rust-app .h-48 {
	height: 12rem;
}

.rust-app .max-w-6xl {
	max-width: 72rem;
}

.rust-app .mb-5 {
	margin-bottom: 1.25rem;
}

.rust-app .my-4 {
	margin-block: 1rem;
}

.rust-app .my-5 {
	margin-block: 1.25rem;
}

.rust-app .my-6 {
	margin-block: 1.5rem;
}

.rust-app .pt-6 {
	padding-top: 1.5rem;
}

.rust-app .self-end {
	align-self: flex-end;
}

.rust-app .file-input-bordered {
	box-shadow: inset 0 0 0 1px var(--md-sys-color-outline);
}

@media (min-width: 640px) {
	.rust-app .sm\:grid-cols-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.rust-app .md\:grid-cols-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rust-app .md\:p-8 {
		padding: 2rem;
	}

	.rust-app .md\:p-10 {
		padding: 2.5rem;
	}
}

@media (min-width: 1024px) {
	.rust-app .lg\:grid-cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.rust-app .site-header nav {
		width: 100%;
		margin-left: 0;
	}

	.rust-app :where(.site-header nav) a {
		min-height: 2.25rem;
		padding-inline: 0.6rem;
	}

	.rust-app .pagination {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rust-app *,
	.rust-app *::before,
	.rust-app *::after {
		transition-duration: 0.01ms !important;
	}
}
