.aps-results {
	--aps-accent: #1a3c7a;
	--aps-border: #dadce0;
	--aps-text: #202124;
	--aps-muted: #5f6368;
	--aps-danger: #b3261e;
	color: var(--aps-text);
	font-size: 16px;
	line-height: 1.5;
}

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

.aps-results h2 {
	margin: 0 0 6px;
	font-size: 1.6em;
	line-height: 1.25;
}

.aps-results h3 {
	margin: 0 0 4px;
	font-size: 1em;
	line-height: 1.4;
}

.aps-muted {
	color: var(--aps-muted);
}

.aps-small {
	font-size: 0.875em;
}

/* Block themes cap content at a narrow text column; let the results use up to 1200px. */
.aps-results-full {
	max-width: min(1200px, 100%) !important;
}

/* ---------- Buttons ---------- */

.aps-results .aps-btn {
	display: inline-block;
	padding: 8px 16px;
	margin: 0 6px 6px 0;
	border: 1px solid var(--aps-accent);
	border-radius: 4px;
	background: #fff;
	color: var(--aps-accent);
	font: inherit;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.aps-results .aps-btn:hover,
.aps-results .aps-btn:focus {
	background: #eef2fa;
	color: var(--aps-accent);
}

/* Download buttons are always blue with white text, whatever the theme does to links. */
.aps-results .aps-btn-primary,
.aps-results .aps-btn-primary:visited {
	background: var(--aps-accent) !important;
	border-color: var(--aps-accent) !important;
	color: #fff !important;
	text-decoration: none !important;
}

.aps-results .aps-btn-primary:hover,
.aps-results .aps-btn-primary:focus {
	background: #244c95 !important;
	border-color: #244c95 !important;
	color: #fff !important;
}

.aps-results .aps-btn-danger {
	border-color: var(--aps-danger);
	color: var(--aps-danger);
}

.aps-results .aps-link-danger {
	background: none;
	border: 0;
	padding: 0;
	color: var(--aps-danger);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Login ---------- */

/* Lets password managers see which account a password change is for. */
.aps-results .aps-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	border: 0 !important;
	padding: 0 !important;
}

.aps-login {
	max-width: 400px;
	margin: 24px auto;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--aps-border);
	border-top: 6px solid var(--aps-accent);
	border-radius: 8px;
}

.aps-login p {
	margin: 0 0 14px;
}

.aps-login label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.aps-login input[type="text"],
.aps-login input[type="password"] {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.aps-login input[type="text"]:focus,
.aps-login input[type="password"]:focus {
	outline: 2px solid var(--aps-accent);
	outline-offset: 1px;
	border-color: var(--aps-accent);
}

.aps-login .aps-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: normal;
}

.aps-login .aps-btn {
	width: 100%;
	padding: 11px 16px;
	margin: 0;
}

.aps-login-error {
	padding: 10px 12px;
	border-left: 4px solid var(--aps-danger);
	background: #fcebea;
	color: var(--aps-danger);
}

/* ---------- Results ---------- */

.aps-res-head {
	margin-bottom: 12px;
}

.aps-res-head p {
	margin: 0;
}

.aps-notice {
	padding: 10px 14px;
	border-left: 4px solid #1e8e3e;
	background: #e6f4ea;
}

.aps-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 1px solid var(--aps-border);
	margin: 0 0 18px;
}

.aps-tabs a {
	padding: 9px 16px;
	margin-bottom: -1px;
	border: 1px solid transparent;
	border-radius: 6px 6px 0 0;
	color: var(--aps-muted);
	text-decoration: none;
	font-weight: 600;
}

.aps-tabs a:hover {
	color: var(--aps-accent);
}

.aps-tabs a.is-active {
	border-color: var(--aps-border);
	border-bottom-color: #fff;
	background: #fff;
	color: var(--aps-accent);
}

.aps-topline {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 14px;
}

.aps-stat {
	background: #fff;
	border: 1px solid var(--aps-border);
	border-radius: 6px;
	padding: 10px 18px;
	min-width: 150px;
}

.aps-stat-num {
	display: block;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.2;
	color: var(--aps-accent);
}

.aps-stat-num.aps-stat-small {
	font-size: 1em;
	padding: 8px 0;
}

.aps-summary {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
	gap: 14px;
	margin: 14px 0;
}

.aps-sum-card {
	background: #fff;
	border: 1px solid var(--aps-border);
	border-radius: 6px;
	padding: 14px 18px;
	break-inside: avoid;
}

.aps-sum-card .aps-small {
	margin: 0 0 10px;
}

.aps-results table {
	border-collapse: collapse;
	margin: 0;
}

.aps-bars {
	width: 100%;
	font-size: 0.9em;
}

.aps-bars th,
.aps-bars td {
	border: 0;
	padding: 4px 0;
	vertical-align: middle;
	background: none;
}

.aps-bars th {
	text-align: left;
	font-weight: normal;
	padding-right: 10px;
	width: 45%;
}

.aps-bar-cell {
	width: 40%;
}

.aps-bar {
	display: block;
	height: 14px;
	min-width: 2px;
	background: var(--aps-accent);
	border-radius: 2px;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.aps-bars .aps-num {
	text-align: right;
	white-space: nowrap;
	padding-left: 8px;
	font-variant-numeric: tabular-nums;
}

.aps-table-scroll {
	overflow-x: auto;
	margin: 8px 0;
	border: 1px solid var(--aps-border);
	border-radius: 6px;
	background: #fff;
}

.aps-responses {
	width: 100%;
	font-size: 0.875em;
}

.aps-responses th,
.aps-responses td {
	min-width: 150px;
	max-width: 320px;
	padding: 8px 10px;
	border: 0;
	border-bottom: 1px solid var(--aps-border);
	text-align: left;
	vertical-align: top;
}

.aps-responses th {
	background: #f1f3f8;
	font-weight: 600;
	position: sticky;
	top: 0;
}

.aps-responses th:first-child,
.aps-responses td:first-child {
	min-width: 48px;
}

.aps-responses tbody tr:nth-child(even) td {
	background: #fafbfc;
}

.aps-pagination {
	margin: 12px 0;
}

.aps-pagination .page-numbers {
	display: inline-block;
	padding: 4px 10px;
	margin-right: 4px;
	border: 1px solid var(--aps-border);
	border-radius: 4px;
	text-decoration: none;
}

.aps-pagination .page-numbers.current {
	background: var(--aps-accent);
	border-color: var(--aps-accent);
	color: #fff;
}

.aps-formats > div {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--aps-border);
}

.aps-formats .aps-btn {
	flex: 0 0 150px;
	text-align: center;
	margin: 0;
}

.aps-formats p {
	margin: 0;
}

.aps-danger-zone {
	margin-top: 30px;
	padding: 16px 18px;
	border: 1px solid #f1c6c2;
	border-radius: 6px;
	background: #fdf5f4;
}

.aps-danger-zone p {
	margin: 0 0 10px;
}


/* ---------- Warnings and exclusions ---------- */

a.aps-stat {
	text-decoration: none;
	color: inherit;
}

.aps-stat-warn {
	border-color: #e3b341;
	background: #fff8e1;
}

.aps-stat-warn .aps-stat-num {
	color: #8a5a00;
}

.aps-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 4px 0 12px;
}

.aps-filters a {
	padding: 4px 12px;
	border: 1px solid var(--aps-border);
	border-radius: 999px;
	color: var(--aps-text);
	text-decoration: none;
	font-size: 0.9em;
}

.aps-filters a span {
	color: var(--aps-muted);
}

.aps-filters a.is-active {
	background: var(--aps-accent);
	border-color: var(--aps-accent);
	color: #fff;
}

.aps-filters a.is-active span {
	color: #dfe6f5;
}

.aps-badge {
	display: inline-block;
	margin: 0 4px 4px 0;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 0.85em;
	line-height: 1.6;
	white-space: normal;
}

.aps-badge-ok {
	background: #e6f4ea;
	color: #1e6b34;
}

.aps-badge-off {
	background: #eceff1;
	color: #546e7a;
}

.aps-badge-warn {
	background: #fff3cd;
	color: #7a5200;
}

.aps-responses tr.aps-row-excluded td {
	color: #8a8f94;
	background: #f6f7f8;
}

.aps-responses td.aps-actions-cell {
	min-width: 90px;
	white-space: nowrap;
}

.aps-actions-cell form {
	margin: 0 0 4px;
}

.aps-results .aps-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--aps-accent);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 600px) {
	.aps-formats > div {
		flex-direction: column;
		gap: 8px;
	}

	.aps-formats .aps-btn {
		flex-basis: auto;
	}
}

@media print {
	.aps-no-print {
		display: none !important;
	}

	.aps-summary {
		display: block;
	}

	.aps-sum-card {
		margin-bottom: 12px;
	}

	.aps-table-scroll {
		overflow: visible;
	}
}
