.arb-runner {
	max-width: 900px;
	margin: 1.5rem auto;
	padding: 1.25rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.arb-progress {
	height: 8px;
	background: #f0f0f0;
	border-radius: 4px;
	margin-bottom: 1.5rem;
	overflow: hidden;
}

.arb-progress-bar {
	height: 100%;
	width: 0;
	background: #2271b1;
	transition: width 0.35s ease;
}

.arb-panel {
	display: none;
	animation: arbFade 0.35s ease;
}

.arb-panel.is-active {
	display: block;
}

@keyframes arbFade {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.arb-stage-title {
	color: #1d2327;
	font-size: 1.35rem;
	margin: 0 0 1rem;
	border-bottom: 2px solid #2271b1;
	padding-bottom: 0.5rem;
}

.arb-field {
	margin-bottom: 1.25rem;
}

.arb-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.arb-input,
.arb-field textarea,
.arb-field select {
	width: 100%;
	max-width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
	color: #1d2327;
	background: #fff;
}

.arb-runner .arb-input,
.arb-runner .arb-field textarea,
.arb-runner .arb-field select,
.arb-runner .arb-item-notes,
#arb-overall-notes,
.arb-action-text {
	color: #1d2327;
	background: #fff;
}

.arb-doc-td-yes {
	background: rgba(70, 180, 80, 0.12);
}

.arb-doc-td-no {
	background: rgba(214, 54, 56, 0.12);
}

.arb-doc-td-na {
	background: transparent;
}

.arb-refs {
	margin-bottom: 1.5rem;
}

.arb-refs-pre {
	white-space: pre-wrap;
	background: #f6f7f7;
	padding: 1rem;
	border-radius: 6px;
	border: 1px solid #dcdcde;
	font-size: 0.85rem;
	line-height: 1.5;
	margin: 0.5rem 0 0;
}

.arb-doc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.arb-doc-table th,
.arb-doc-table td {
	border: 1px solid #c3c4c7;
	padding: 0.5rem 0.65rem;
	text-align: left;
}

.arb-doc-table th {
	background: #f0f0f1;
}

.arb-criterion {
	padding: 1rem 0;
	border-bottom: 1px solid #eee;
}

.arb-crit-text {
	margin: 0 0 0.75rem;
	font-weight: 500;
}

.arb-rag {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.arb-rag-opt {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	color: #fff;
	border: 3px solid transparent;
}

.arb-rag-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.arb-rag-opt.rag-green { background: #46b450; }
.arb-rag-opt.rag-amber { background: #f0b849; color: #1d2327; }
.arb-rag-opt.rag-red { background: #d63638; }
.arb-rag-opt.rag-na { background: #8c8f94; }

.arb-rag-opt.selected {
	border-color: #1d2327;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.arb-rag-action {
	margin-top: 0.5rem;
}

.arb-checklist label {
	display: block;
	margin: 0.35rem 0;
}

.arb-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.arb-radio-opt {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
}

.arb-likert {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
	align-items: center;
}

.arb-likert-opt {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	cursor: pointer;
	font-size: 0.95rem;
}

.arb-slider-wrap {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.arb-slider {
	flex: 1;
	min-width: 120px;
	max-width: 100%;
}

.arb-slider-value {
	min-width: 2rem;
	font-weight: 600;
	color: #2271b1;
}

.arb-checkbox-single {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.arb-swot-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

@media (max-width: 600px) {
	.arb-swot-grid {
		grid-template-columns: 1fr;
	}
}

.arb-swot-cell label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.arb-sig {
	border: 2px dashed #c3c4c7;
	background: #fafafa;
	height: 200px;
	border-radius: 6px;
	position: relative;
	touch-action: none;
}

.arb-sig canvas {
	position: absolute;
	left: 0;
	top: 0;
	width: 100% !important;
	height: 100% !important;
}

.arb-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.5rem;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.arb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, 0.94);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
}

.arb-overlay.is-active {
	display: flex;
}

.arb-overlay-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem 2rem;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	border: 1px solid #e2e4e7;
	max-width: 90vw;
}

.arb-overlay-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #dcdcde;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: arb-spin 0.75s linear infinite;
}

.arb-overlay-status {
	margin: 0;
	font-weight: 600;
	color: #1d2327;
	text-align: center;
}

@keyframes arb-spin {
	to {
		transform: rotate(360deg);
	}
}

.arb-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.arb-modal-inner {
	background: #fff;
	border-radius: 8px;
	padding: 1.25rem;
	max-width: 480px;
	width: 100%;
	max-height: 80vh;
	overflow: auto;
	position: relative;
}

.arb-modal-close {
	position: absolute;
	right: 0.75rem;
	top: 0.5rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	line-height: 1;
	color: #1d2327;
}

#arb-qc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

#arb-qc-list li {
	margin: 0;
	padding: 0;
}

#arb-qc-list button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.6rem 0.75rem;
	margin-bottom: 0.35rem;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95rem;
	color: #1d2327;
}

#arb-qc-list button:hover {
	background: #f0f0f1;
}

.arb-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 1rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #ddd;
	align-items: center;
}

.arb-crumb {
	font-size: 0.85rem;
	padding: 0.4rem 0.7rem;
	border-radius: 4px;
	border: 1px solid #c3c4c7;
	background: #f0f0f1;
	color: #1d2327;
	cursor: pointer;
	max-width: 100%;
	line-height: 1.3;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.arb-crumb:hover {
	background: #e8e8e9;
	border-color: #8c8f94;
	color: #1d2327;
}

.arb-crumb.is-active {
	background: #2271b1;
	color: #fff;
	border-color: #135e96;
}

.arb-draft-banner {
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	font-size: 0.9rem;
}

.arb-draft-list {
	margin: 0.35rem 0 0;
	padding-left: 1.25rem;
}

.arb-draft-modal-inner {
	max-width: 420px;
}

.arb-draft-modal .description {
	font-size: 0.9rem;
	color: #50575e;
	margin: 0.5rem 0;
}

.arb-draft-qr {
	margin: 1rem auto;
	text-align: center;
	min-height: 40px;
}

.arb-draft-qr img {
	display: inline-block;
	vertical-align: top;
}

.arb-draft-link-label {
	margin: 0.75rem 0 0.25rem;
	font-weight: 600;
	font-size: 0.95rem;
}

.arb-draft-link-row {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
	flex-wrap: wrap;
}

.arb-draft-url-input {
	flex: 1;
	min-width: 0;
}

.arb-mydrafts-continue .arb-mydrafts-resume-actions {
	margin: 0 0 0.5rem;
}

.arb-mydrafts-url-wrap {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.4;
	word-break: break-all;
}

.arb-mydrafts-resume-url {
	color: #2271b1;
	text-decoration: underline;
}

.arb-mydrafts-resume-url:hover,
.arb-mydrafts-resume-url:focus {
	color: #135e96;
}

.arb-hub-list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
}

.arb-hub-list li {
	margin-bottom: 0.65rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #eee;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.arb-hub-search input[type="search"] {
	min-width: 200px;
	max-width: 100%;
}

.arb-error {
	color: #b32d2e;
}

.arb-existing-photo img,
.arb-sig-preview img {
	max-width: 100%;
	height: auto;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin: 0.35rem 0;
}

.arb-sig {
	touch-action: none;
}

@media (max-width: 600px) {
	.arb-runner {
		margin: 0.5rem auto;
		padding: 0.75rem;
		max-width: 100%;
		box-sizing: border-box;
	}

	.arb-nav {
		flex-direction: column;
		align-items: stretch;
	}

	.arb-nav .button {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}

	.arb-doc-table,
	.arb-action-plan-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.arb-breadcrumbs {
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 0.5rem;
		-webkit-overflow-scrolling: touch;
	}

	.arb-crumb {
		flex-shrink: 0;
	}
}

/* Repeatable field groups */
.arb-repeater {
	margin-bottom: 1rem;
}
.arb-repeater-card {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 0.75rem;
	background: #fafbfc;
}
.arb-repeater-card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.75rem;
}
.arb-repeater-subfield {
	margin-bottom: 0.65rem;
}
.arb-repeater-subfield .arb-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}
.arb-repeater .arb-existing-photo img {
	max-width: 220px;
	height: auto;
	border-radius: 4px;
	border: 1px solid #dee2e6;
}

.arb-rep-sketch-wrap {
	border: 2px dashed #c3c4c7;
	background: #fff;
	height: 160px;
	border-radius: 6px;
	position: relative;
	touch-action: none;
	margin-top: 0.25rem;
}

.arb-rep-sketch-wrap canvas.arb-rep-sketch {
	position: absolute;
	left: 0;
	top: 0;
	width: 100% !important;
	height: 100% !important;
}

.arb-rep-sketch-clear {
	margin-top: 0.35rem;
}

/* Supporting documents (optional uploads) */
.arb-supporting-docs .arb-supp-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.4rem 0;
}
.arb-supporting-docs .arb-supporting-files {
	margin-top: 0.35rem;
}

/* Mobile / small screens — usable audits on phones */
@media (max-width: 600px) {
	.arb-runner {
		margin: 0.5rem 0.35rem;
		padding: 0.85rem 0.65rem;
		max-width: 100%;
		border-radius: 6px;
	}
	.arb-stage-title {
		font-size: 1.15rem;
		line-height: 1.25;
	}
	.arb-breadcrumbs {
		gap: 0.35rem;
		margin-bottom: 0.75rem;
	}
	.arb-crumb {
		font-size: 0.8rem;
		padding: 0.4rem 0.55rem;
		line-height: 1.2;
		color: #1d2327;
		background: #f0f0f1;
	}
	.arb-crumb.is-active {
		color: #fff;
	}
	.arb-input,
	.arb-file,
	.arb-doc-table input,
	.arb-doc-table select {
		font-size: 16px;
		max-width: 100%;
		box-sizing: border-box;
	}
	.arb-nav {
		flex-direction: column;
		align-items: stretch;
	}
	.arb-nav .button {
		width: 100%;
		min-height: 44px;
		text-align: center;
		justify-content: center;
	}
	.arb-action-plan-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.arb-sig {
		height: 160px;
		min-height: 140px;
	}
	.arb-rag-opt {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}
	.arb-criterion {
		padding: 0.5rem 0;
	}
}

/* Legacy branch: dropdown + path-specific questions */
.arb-branch-block .arb-branch-select {
	max-width: 100%;
}
.arb-branch-block .arb-branch-path {
	margin-top: 0.75em;
	padding-top: 0.75em;
	border-top: 1px solid #e5e5e5;
}
