/* =====================================================================
 * Need Assessment Form — scoped styles.
 * Every rule is under #na-form. No bare element / .btn / .row /
 * .form-control selectors (CLAUDE.md §3).
 * Loaded AFTER css/style.css, so equal-specificity rules win on order.
 * ================================================================== */

/* ---- neutralise theme globals, inside our scope only (CLAUDE.md §2.4) ---- */
#na-form .row            { margin-bottom: 0; }
#na-form .form-control   { margin-bottom: 0; }
#na-form img             { border-radius: 0; }

/* ---- scope root + tokens ---- */
#na-form {
	--na-primary: #055999;
	--na-primary-hover: #02477b;
	--na-text: #656565;
	--na-heading: #333333;
	--na-border: #d4d4d4;
	--na-border-strong: #b9b9b9;
	--na-bg-soft: #f7f8fa;
	--na-error: #d92d20;
	--na-error-bg: #fdecea;
	--na-ok: #1e7e34;
	--na-selected: #eef4f9;
	--na-card-border: #e6e9ee;
	--na-input-border: #d0d5dd;
	--na-label: #344054;
	--na-muted: #667085;
	--na-title: #1a2b3c;

	position: relative;
	max-width: 1040px;
	margin: 0 auto 10px;
	color: var(--na-text);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.6;
}

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

#na-form h2,
#na-form h3 {
	color: var(--na-heading);
	font-family: "Open Sans", Arial, sans-serif;
	margin: 0 0 12px;
	line-height: 1.2;
}
#na-form h2 { font-size: 26px; font-weight: 700; }
#na-form h3 { font-size: 18px; font-weight: 600; }
#na-form p  { margin: 0 0 12px; }

/* ---- fatal / no-JS notice ---- */
#na-form .na-fatal {
	background: var(--na-error-bg);
	border: 1px solid #f0b4b0;
	color: #a11;
	padding: 14px 16px;
	border-radius: 4px;
}

/* ---- sidebar rail (mobile: a horizontal bar above the content) ---- */
#na-form .na-rail {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid #ececec;
}
#na-form .na-rail__count {
	font-size: 12.5px;
	font-weight: 700;
	color: #555;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: .04em;
}
#na-form .na-rail__track {
	height: 6px;
	background: #e6e8ec;
	border-radius: 3px;
	overflow: hidden;
}
#na-form .na-rail__bar {
	height: 100%;
	width: 0;
	background: var(--na-primary);
	border-radius: 3px;
	transition: width .25s ease;
}
#na-form .na-rail__current {
	margin-top: 10px;
	font-weight: 700;
	color: var(--na-primary);
	font-size: 15px;
}
#na-form .na-rail__steps { display: none; list-style: none; margin: 22px 0 0; padding: 0; }
#na-form .na-rail__step { margin: 2px 0; }
#na-form .na-rail__hit {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 9px 8px;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	text-align: left;
	border-radius: 6px;
}
#na-form button.na-rail__hit { cursor: pointer; }
#na-form button.na-rail__hit:hover { background: var(--na-bg-soft); }
#na-form .na-rail__hit:focus-visible,
#na-form .na-rail__hit:focus {
	outline: 2px solid var(--na-primary);
	outline-offset: 2px;
}
#na-form .na-rail__marker {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	border: 1px solid var(--na-border-strong);
	background: #fff;
	color: #9a9a9a;
}
#na-form .na-rail__meta { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
#na-form .na-rail__name { font-size: 13.5px; line-height: 1.35; color: #777; }
#na-form .na-rail__state { font-size: 11.5px; color: #9a9a9a; }
#na-form .na-rail__step.is-current .na-rail__marker {
	border: 2px solid var(--na-primary);
	color: var(--na-primary);
}
#na-form .na-rail__step.is-current .na-rail__name { color: var(--na-primary); font-weight: 700; }
#na-form .na-rail__step.is-complete .na-rail__marker {
	background: var(--na-primary);
	border-color: var(--na-primary);
	color: #fff;
}
#na-form .na-rail__step.is-complete .na-rail__name { color: var(--na-heading); }
#na-form .na-rail__step.is-upcoming { opacity: .5; }

/* ---- step panel ---- */
#na-form .na-step { animation: na-fade .2s ease; }
@keyframes na-fade { from { opacity: 0; } to { opacity: 1; } }

/* step header — sits above the first card, never inside one */
#na-form .na-step__title {
	font-size: 22px;
	font-weight: 600;
	color: var(--na-title);
	margin: 0 0 8px;
	line-height: 1.25;
}
#na-form .na-step__intro { color: var(--na-muted); margin: 0 0 20px; }
#na-form .na-step__error {
	background: var(--na-error-bg);
	border: 1px solid #f0b4b0;
	color: #a11;
	padding: 10px 12px;
	border-radius: 4px;
	margin-bottom: 16px;
	font-size: 13px;
}

/* ---- section cards ---- */
#na-form .na-card {
	background: #fff;
	border: 1px solid var(--na-card-border);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}
#na-form .na-card:last-child { margin-bottom: 0; }
#na-form .na-card__title {
	margin: 0 0 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eef1f5;
	font-size: 16px;
	font-weight: 600;
	color: var(--na-title);
	line-height: 1.3;
}
#na-form .na-card__grid {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 20px;
	row-gap: 18px;
}
#na-form .na-card__grid > .na-field { margin-bottom: 0; }
@media (min-width: 768px) {
	#na-form .na-card__grid { grid-template-columns: 1fr 1fr; }
	#na-form .na-card__grid > .na-field--textarea,
	#na-form .na-card__grid > .na-field--repeater,
	#na-form .na-card__grid > .na-field--grid,
	#na-form .na-card__grid > .na-field--radio,
	#na-form .na-card__grid > .na-field--checkbox_group,
	#na-form .na-card__grid > .na-field--checkbox_single { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	#na-form .na-card { padding: 16px; border-radius: 10px; margin-bottom: 16px; }
}

/* ---- generic field ---- */
#na-form [hidden] { display: none !important; }
#na-form .na-field { position: relative; margin-bottom: 18px; }
#na-form .na-field[hidden] { display: none !important; }
#na-form .na-field__tick {
	display: none;
	line-height: 0;
	color: var(--na-ok);
	vertical-align: middle;
}
#na-form .na-label > .na-field__tick { margin-left: 6px; }
#na-form .na-field__tick--corner { position: absolute; top: 0; right: 0; }
#na-form .na-field--done > .na-label > .na-field__tick,
#na-form .na-field--done > .na-field__tick--corner { display: inline-flex; }
#na-form .na-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--na-label);
	margin-bottom: 6px;
}
#na-form .na-req { color: var(--na-error); margin-left: 3px; }
#na-form .na-help { font-size: 12px; color: var(--na-muted); margin: 6px 0 0; }
#na-form .na-field--invalid .na-help { display: none; }

/* ---- inputs ---- */
#na-form .na-input {
	display: block;
	width: 100%;
	height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--na-input-border);
	border-radius: 8px;
	background: #fff;
	color: var(--na-title);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
}
#na-form textarea.na-input { height: auto; min-height: 96px; resize: vertical; }
#na-form select.na-input {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23666' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 34px;
}
#na-form .na-input:focus {
	outline: none;
	border-color: var(--na-primary);
	box-shadow: 0 0 0 3px rgba(5, 89, 153, .12);
}
#na-form .na-country { max-width: 260px; }

/* ---- radio / checkbox choices ---- */
#na-form .na-choices { display: flex; flex-direction: column; gap: 8px; }
#na-form .na-choices--split { display: grid; grid-template-columns: 1fr; gap: 8px; }
#na-form .na-choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-height: 44px;
	padding: 11px 14px;
	border: 1px solid var(--na-border);
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-weight: 400;
	margin: 0;
}
#na-form .na-choice:hover { border-color: var(--na-primary); background: var(--na-bg-soft); }
#na-form .na-choice input { margin: 3px 0 0; flex: 0 0 auto; }
#na-form .na-choice input.na-vh { margin: -1px; }
#na-form .na-choice:focus-within { outline: 2px solid var(--na-primary); outline-offset: 2px; }
#na-form .na-choice--single { font-weight: 400; }
#na-form .na-choice--checked { border-color: var(--na-primary); background: var(--na-selected); }

/* visually-hidden control — kept in the tab order for keyboard + screen readers */
#na-form .na-vh {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
@media (min-width: 768px) {
	#na-form .na-choices--split { grid-template-columns: 1fr 1fr; }
}

/* ---- repeater ---- */
#na-form .na-rep__row {
	position: relative;
	border: 1px solid #eef1f5;
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 12px;
	background: #f9fafb;
}
#na-form .na-rep__row-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}
#na-form .na-rep__num { font-size: 12px; font-weight: 500; color: var(--na-muted); }
#na-form .na-rep__grid {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 16px;
	row-gap: 14px;
}
#na-form .na-rep__grid > .na-field { margin-bottom: 0; }
@media (min-width: 768px) {
	#na-form .na-rep__grid { grid-template-columns: 1fr 1fr; }
}

/* ---- grid control ---- */
#na-form .na-grid__row {
	border: 1px solid var(--na-border);
	border-radius: 4px;
	padding: 12px 14px;
	margin-bottom: 10px;
	background: #fff;
}
#na-form .na-grid__label { font-weight: 600; color: var(--na-heading); margin-bottom: 8px; }
#na-form .na-grid__opts { display: flex; flex-wrap: wrap; gap: 8px; }
#na-form .na-grid__opts .na-choice { min-height: 38px; padding: 7px 12px; }
#na-form .na-grid__remarks { margin-top: 8px; }
@media (min-width: 768px) {
	#na-form .na-grid__row {
		display: grid;
		grid-template-columns: 220px 1fr;
		gap: 6px 18px;
		align-items: start;
	}
	#na-form .na-grid__label { margin-bottom: 0; }
	#na-form .na-grid__remarks { grid-column: 2; }
}

/* ---- honeypot: off-screen, NOT display:none ---- */
#na-form .na-hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---- inline errors ---- */
#na-form .na-error {
	color: var(--na-error);
	font-size: 12px;
	margin: 6px 0 0;
	font-weight: 400;
}
#na-form .na-field--invalid .na-input {
	border-color: var(--na-error);
	box-shadow: 0 0 0 3px rgba(217, 45, 32, .10);
}
#na-form .na-field--invalid .na-choice { border-color: var(--na-error); }

/* ---- review summary ---- */
#na-form .na-review__group {
	border: 1px solid var(--na-border);
	border-radius: 6px;
	margin-bottom: 14px;
	overflow: hidden;
}
#na-form .na-review__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 14px;
	background: var(--na-bg-soft);
	border-bottom: 1px solid var(--na-border);
}
#na-form .na-review__title { font-weight: 700; color: var(--na-heading); }
#na-form .na-edit {
	color: var(--na-primary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}
#na-form .na-edit:hover { color: var(--na-primary-hover); }
#na-form .na-summary__row {
	display: flex;
	gap: 12px;
	padding: 8px 14px;
	border-top: 1px dashed #e4e4e4;
}
#na-form .na-summary__row:first-child { border-top: 0; }
#na-form .na-summary__label { flex: 0 0 42%; color: #666; }
#na-form .na-summary__value { flex: 1 1 auto; color: #222; word-break: break-word; }
#na-form .na-summary__value > div { padding: 1px 0; }

/* ---- buttons ---- */
#na-form .na-btn {
	display: inline-block;
	min-height: 44px;
	padding: 11px 22px;
	border: 1px solid var(--na-primary);
	border-radius: 8px;
	background: var(--na-primary);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
#na-form .na-btn:hover { background: var(--na-primary-hover); border-color: var(--na-primary-hover); }
#na-form .na-btn:disabled { opacity: .5; cursor: not-allowed; }
#na-form .na-btn--ghost { background: #fff; border-color: var(--na-input-border); color: var(--na-label); }
#na-form .na-btn--ghost:hover { background: #f9fafb; border-color: var(--na-input-border); color: var(--na-label); }
#na-form .na-btn--small { min-height: 36px; padding: 7px 14px; font-size: 13px; }

#na-form .na-rep__add {
	margin: 4px 0 0;
	background: #fff;
	border-color: var(--na-primary);
	color: var(--na-primary);
}
#na-form .na-rep__add:hover {
	background: var(--na-bg-soft);
	border-color: var(--na-primary-hover);
	color: var(--na-primary-hover);
}
#na-form .na-rep__remove {
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #b42318;
	font-size: 12px;
	font-weight: 600;
}
#na-form .na-rep__remove:hover { background: none; color: #b42318; text-decoration: underline; }

/* ---- step navigation (right-aligned pair, outside the cards) ---- */
#na-form .na-nav {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 20px;
}
#na-form .na-nav__spacer { display: none; }

/* ---- service select ---- */
#na-form .na-services {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}
#na-form .na-service-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 16px;
	border: 1px solid var(--na-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-weight: 400;
}
#na-form .na-service-card:hover { border-color: var(--na-primary); }
#na-form .na-service-card:focus-within { outline: 2px solid var(--na-primary); outline-offset: 2px; }
#na-form .na-service-card.is-selected {
	border-width: 2px;
	border-color: var(--na-primary);
	background: var(--na-selected);
	padding: 15px;   /* keep the box the same size as the 1px border grows */
}
#na-form .na-service-card__icon { flex: 0 0 auto; margin-top: 1px; line-height: 0; color: var(--na-primary); }
#na-form .na-service-card__body { display: flex; flex-direction: column; gap: 3px; }
#na-form .na-service-card__name { font-weight: 700; color: var(--na-heading); }
#na-form .na-service-card__desc { font-size: 12.5px; color: #8a8a8a; }
#na-form .na-service-card__tick {
	position: absolute;
	top: 8px;
	right: 8px;
	display: none;
	line-height: 0;
	color: var(--na-primary);
}
#na-form .na-service-card.is-selected .na-service-card__tick { display: inline-flex; }

/* ---- small screens ---- */
@media (max-width: 767px) {
	#na-form { font-size: 14px; }
	#na-form h2 { font-size: 22px; }
	#na-form .na-nav { flex-direction: column-reverse; }
	#na-form .na-nav .na-btn { width: 100%; }
	#na-form .na-summary__row { flex-direction: column; gap: 2px; }
	#na-form .na-summary__label { flex-basis: auto; }
}

/* ---- desktop: two-column layout with a sticky rail ---- */
@media (min-width: 992px) {
	#na-form .na-app {
		display: flex;
		align-items: flex-start;
		gap: 36px;
	}
	#na-form .na-rail {
		flex: 0 0 240px;
		width: 240px;
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: 0;
		/* the site header is .navbar-static-top (it scrolls away), so only a
		   small gap is needed — nothing to clear a fixed bar */
		position: -webkit-sticky;
		position: sticky;
		top: 20px;
	}
	#na-form .na-content { flex: 1 1 auto; min-width: 0; }
	#na-form .na-rail__current { display: none; }
	#na-form .na-rail__steps { display: block; }
}

/* ---- reduced motion: no scroll easing, no transitions/anim ---- */
@media (prefers-reduced-motion: reduce) {
	#na-form *,
	#na-form *::before,
	#na-form *::after {
		transition: none !important;
		animation: none !important;
	}
}
