:root {
	color-scheme: dark;
	--bg: oklch(16% 0.035 259);
	--surface: oklch(23% 0.045 258);
	--line: oklch(39% 0.045 259);
	--ink: oklch(96% 0.01 258);
	--muted: oklch(76% 0.028 259);
	--gold: oklch(80% 0.16 78);
	--error: oklch(80% 0.11 24);
	--good: oklch(81% 0.105 165);
	font-family:
		system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	line-height: 1.5;
}
button,
input {
	font: inherit;
}
button,
a,
input {
	touch-action: manipulation;
}
button {
	cursor: pointer;
}
button:disabled {
	cursor: wait;
	opacity: 0.45;
}
button,
a,
input {
	outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
	outline: 3px solid var(--gold);
}
a {
	color: inherit;
}
button {
	min-height: 44px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: transparent;
	color: var(--ink);
	padding: 10px 14px;
	font-weight: 650;
}
button:hover:not(:disabled) {
	background: var(--surface);
}
button:active:not(:disabled) {
	transform: translateY(1px);
}
[hidden] {
	/* biome-ignore lint/complexity/noImportantStyles: HTML hidden must override layout display rules. */
	display: none !important;
}
h1 span {
	color: var(--gold);
}
footer p {
	margin: 8px 0;
}
.skip-link {
	position: fixed;
	top: -90px;
	left: 16px;
	background: var(--gold);
	color: var(--bg);
	padding: 12px;
	z-index: 10;
}
.skip-link:focus {
	top: 12px;
}
.layout {
	width: min(1056px, 100%);
	margin: auto;
	padding: 24px 16px 40px;
}
.brand {
	display: none;
	text-decoration: none;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	font-weight: 800;
}
.brand span {
	display: block;
	color: var(--muted);
	letter-spacing: 0;
	font-size: 0.875rem;
	font-weight: 500;
	margin-top: 4px;
}
.intro {
	margin-bottom: 24px;
}
.intro-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-direction: row-reverse;
}
.eyebrow {
	font-size: 0.6875rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	color: var(--gold);
	margin: 0;
}
h1 {
	font-size: 2.5rem;
	line-height: 0.95;
	letter-spacing: -0.055em;
	margin: 0;
	font-weight: 850;
}
h1 br {
	display: none;
}
.lead {
	display: none;
}
.intro-help {
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--muted);
	max-width: 60ch;
	margin: 12px 0 0;
}
.paper-note {
	display: none;
}
main {
	min-width: 0;
}
.form-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.8125rem;
	font-weight: 700;
}
.form-header p {
	margin: 0;
}
.form-header > span {
	color: var(--muted);
	font-size: 0.6875rem;
	letter-spacing: 0.025em;
	white-space: nowrap;
}
.progress-track {
	height: 4px;
	background: var(--surface);
	margin: 12px 0 16px;
	border-radius: 2px;
	overflow: hidden;
}
#progress-fill {
	height: 100%;
	width: 0;
	background: var(--gold);
	transition: width 0.2s ease-out;
}
.office-list {
	display: grid;
	gap: 10px;
}
.office {
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: 8px;
	padding: 12px;
}
.office[data-highlight="true"] {
	border-color: var(--gold);
}
.office[data-error="true"] {
	border-color: var(--error);
}
.office-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}
.office-label {
	font-size: 0.75rem;
	font-weight: 750;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}
.office-order {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	margin-right: 6px;
}
.clear-field {
	font-size: 0.75rem;
	font-weight: 500;
	border: 0;
	min-height: 44px;
	padding: 4px 8px;
	margin: -10px -6px -8px 0;
	color: var(--muted);
}
.office-main {
	display: grid;
	grid-template-columns: 156px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	min-height: 62px;
}
.number-input {
	width: 100%;
	height: 52px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--ink);
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	font-weight: 800;
	font-size: 1.75rem;
	letter-spacing: 0.15em;
	padding: 6px 8px;
	line-height: 1;
	caret-color: var(--gold);
	font-variant-numeric: tabular-nums;
}
.number-input::placeholder {
	color: oklch(54% 0.03 259);
	font-size: 1.5rem;
	letter-spacing: 0.19em;
}
.number-input[aria-invalid="true"] {
	border-color: var(--error);
}
.candidate {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.candidate-photo {
	width: 44px;
	height: 52px;
	object-fit: cover;
	object-position: center 25%;
	border-radius: 4px;
	flex-shrink: 0;
	background: var(--bg);
}
.candidate-name {
	display: block;
	font-size: 0.75rem;
	font-weight: 750;
	line-height: 1.4;
	overflow-wrap: anywhere;
}
.candidate-party {
	display: block;
	color: var(--muted);
	font-size: 0.6875rem;
	line-height: 1.4;
	margin-top: 2px;
}
.candidate-empty {
	color: var(--muted);
	font-size: 0.75rem;
}
.office-message {
	color: var(--muted);
	font-size: 0.75rem;
	margin: 6px 0 0;
	line-height: 1.45;
}
.office-message.error {
	color: var(--error);
}
.judicial-warning {
	color: var(--gold);
	font-size: 0.6875rem;
	line-height: 1.4;
	margin: 6px 0 0;
}
.field-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}
.field-actions button {
	font-size: 0.75rem;
	padding: 5px 10px;
	min-height: 44px;
}
.field-actions .search-toggle {
	border: 0;
	padding-left: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: var(--gold);
}
.blank-toggle[aria-pressed="true"] {
	border-color: var(--gold);
	color: var(--gold);
}
.search-area {
	border-top: 1px solid var(--line);
	margin-top: 8px;
	padding-top: 12px;
}
.search-area label {
	display: block;
	font-size: 0.8125rem;
	margin-bottom: 6px;
}
.search-input {
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--ink);
	border-radius: 4px;
	padding: 10px 12px;
	font-size: 1rem;
}
.search-summary {
	font-size: 0.75rem;
	color: var(--muted);
	margin: 8px 0;
}
.search-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 4px;
	max-height: 300px;
	overflow-y: auto;
}
.search-result {
	width: 100%;
	display: flex;
	gap: 10px;
	align-items: center;
	text-align: left;
	min-height: 68px;
	border: 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	padding: 8px 4px;
}
.search-result .candidate-photo {
	width: 36px;
	height: 42px;
}
.search-number {
	margin-left: auto;
	color: var(--gold);
	font-family: ui-monospace, monospace;
	font-weight: 800;
	font-size: 1rem;
	white-space: nowrap;
}
.actions {
	margin-top: 24px;
}
.appearance {
	border: 0;
	padding: 0;
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 0.8125rem;
}
.appearance legend {
	float: left;
	margin-right: 16px;
	color: var(--muted);
}
.appearance label {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	cursor: pointer;
}
.appearance input {
	accent-color: var(--gold);
	width: 18px;
	height: 18px;
}
.primary-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.primary,
.secondary {
	font-size: 0.875rem;
	min-height: 52px;
}
.primary {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--bg);
}
.primary:hover:not(:disabled) {
	background: oklch(86% 0.14 78);
}
.secondary {
	border-color: var(--muted);
}
.share-button {
	width: 100%;
	margin-top: 10px;
	font-size: 0.875rem;
	min-height: 48px;
}
.action-status {
	font-size: 0.75rem;
	color: var(--muted);
	margin: 12px 0;
	min-height: 20px;
}
.action-status.error {
	color: var(--error);
}
.image-preview {
	margin: 12px 0;
	font-size: 0.875rem;
}
.image-preview summary {
	min-height: 44px;
	padding: 12px 0;
	cursor: pointer;
}
.image-preview p {
	color: var(--muted);
}
.image-preview img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: 8px;
}
.utility-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.utility-actions button {
	font-size: 0.75rem;
	color: var(--muted);
	border: 0;
	padding: 6px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.how-to {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}
.how-to h2 {
	font-size: 1.25rem;
	margin: 0 0 8px;
}
.how-to p {
	font-size: 0.875rem;
	line-height: 1.6;
	max-width: 65ch;
	color: var(--muted);
	margin: 8px 0;
}
.how-to .privacy {
	font-size: 0.75rem;
}
footer {
	margin-top: 28px;
	font-size: 0.6875rem;
	color: var(--muted);
	line-height: 1.6;
}
.campaign-identification {
	margin-top: 16px;
	max-width: 70ch;
}
.load-error {
	border: 1px solid var(--error);
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 20px;
}
.load-error h2 {
	font-size: 1.125rem;
	margin: 0 0 8px;
}
.load-error p {
	font-size: 0.875rem;
}
.paper-copy {
	display: none;
}
@media (min-width: 760px) {
	.layout {
		display: grid;
		grid-template-columns: 250px minmax(0, 1fr);
		gap: 64px;
		padding: 56px 32px;
	}
	.intro {
		position: sticky;
		top: 40px;
		align-self: start;
		margin: 0;
	}
	.brand {
		display: block;
		margin-bottom: 80px;
	}
	.intro-title {
		display: block;
	}
	.eyebrow {
		margin-bottom: 16px;
	}
	h1 {
		font-size: 4rem;
	}
	h1 br {
		display: block;
	}
	.lead {
		display: block;
		font-size: 1.25rem;
		line-height: 1.45;
		margin: 24px 0 0;
		font-weight: 650;
	}
	.intro-help {
		margin-top: 16px;
		font-size: 0.875rem;
	}
	.paper-note {
		display: flex;
		gap: 12px;
		margin-top: 40px;
		color: var(--muted);
		font-size: 0.8125rem;
		line-height: 1.6;
	}
	.paper-note span {
		color: var(--gold);
		font-size: 1.5rem;
	}
	.paper-note p {
		margin: 0;
	}
	.paper-note strong {
		display: block;
		color: var(--ink);
	}
	.office {
		padding: 16px 20px;
	}
	.office-main {
		grid-template-columns: 176px minmax(0, 1fr);
		gap: 20px;
	}
	.candidate-photo {
		width: 48px;
		height: 58px;
	}
	.candidate-name {
		font-size: 0.875rem;
	}
	.candidate-party {
		font-size: 0.75rem;
	}
	.office-label {
		font-size: 0.8125rem;
	}
	.number-input {
		font-size: 2rem;
		height: 58px;
	}
	.office-list {
		gap: 12px;
	}
	.form-header {
		font-size: 0.875rem;
	}
}
@media (max-width: 359px) {
	.layout {
		padding-left: 12px;
		padding-right: 12px;
	}
	.intro-title {
		display: block;
	}
	.eyebrow {
		margin-bottom: 8px;
	}
	.office-main {
		grid-template-columns: 138px minmax(0, 1fr);
		gap: 8px;
	}
	.number-input {
		font-size: 1.5rem;
	}
	.candidate-photo {
		width: 32px;
		height: 42px;
	}
	.candidate-name {
		font-size: 0.6875rem;
	}
	.appearance {
		gap: 10px;
	}
	.appearance legend {
		margin-right: 8px;
	}
	.primary,
	.secondary {
		font-size: 0.8125rem;
		padding-left: 8px;
		padding-right: 8px;
	}
}
@media (prefers-reduced-motion: reduce) {
	#progress-fill {
		transition: none;
	}
	button:active:not(:disabled) {
		transform: none;
	}
}
@media print {
	@page {
		size: A5 portrait;
		margin: 12mm;
	}
	html,
	body {
		background: oklch(99% 0.005 258);
		color: oklch(18% 0.01 258);
		color-scheme: light;
	}
	.layout,
	.skip-link,
	noscript {
		display: none;
	}
	.paper-copy {
		display: block;
		font-family: Arial, sans-serif;
	}
	.paper-copy h1 {
		font-size: 22pt;
		line-height: 1.15;
		margin: 0 0 4mm;
		letter-spacing: 0;
	}
	.paper-copy > p {
		font-size: 9pt;
		margin: 2mm 0 4mm;
	}
	.paper-row {
		border-bottom: 1px solid oklch(70% 0.005 258);
		padding: 3mm 0;
		break-inside: avoid;
		display: grid;
		grid-template-columns: 1fr 26mm;
		gap: 4mm;
	}
	.paper-row h2 {
		font-size: 10pt;
		margin: 0 0 1mm;
	}
	.paper-row strong {
		font:
			700 19pt ui-monospace,
			monospace;
		letter-spacing: 2pt;
	}
	.paper-row p {
		font-size: 8pt;
		margin: 1mm 0;
	}
	.paper-row img {
		width: 15mm;
		height: 18mm;
		object-fit: cover;
		justify-self: end;
		filter: grayscale(1);
	}
	.paper-footer {
		margin-top: 4mm;
		font-size: 8pt;
		line-height: 1.4;
	}
	.paper-footer p {
		font-size: 8pt;
		margin: 2mm 0;
	}
}
