/* =========================================================================
   CansultHub Compass — self-contained styles.

   These CSS custom properties default to a reasonable ivory/ink/brass
   palette. If your site's theme already defines --ink, --brass-deep,
   --ivory, --paper, --stone-line, --slate-soft, --display, --mono, etc.
   globally, this scoped block will NOT override those — it only sets
   fallback values *inside* .cansulthub-compass-wrap, so you can safely
   delete this :root block and let your theme's own variables take over
   for exact brand-color parity.
   ========================================================================= */

.cansulthub-compass-wrap {
	--ink: #122A31;
	--ink-soft: #46606a;
	--brass-deep: #b08d57;
	--ivory: #FBF9F4;
	--paper: #ffffff;
	--emerald: #1C6D80;
	--stone-line: #e5e0d5;
	--slate-soft: #8a8f92;
	--display: Georgia, 'Times New Roman', serif;
	--mono: 'Courier New', monospace;

	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
}

.cansulthub-compass-wrap * {
	box-sizing: border-box;
}

#compass {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 16px 64px;
	overflow: hidden;
}

.compass-bar {
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--paper);
	border-bottom: 1px solid var(--stone-line);
	padding: 14px 0;
	margin-bottom: 28px;
}

.compass-bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.brand-mark {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}

.compass-needle {
	transform-origin: 20px 20px;
	transition: transform 0.5s ease;
}

.brand-name {
	font-family: var(--display);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.2px;
}
.brand-name em {
	font-style: italic;
	color: var(--brass-deep);
	font-weight: 400;
}

.progress-label {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 1px;
	color: var(--slate-soft);
	text-transform: uppercase;
}

.ambient {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: 0.12;
	pointer-events: none;
	z-index: 0;
}
.ambient.brass { background: var(--brass-deep); }
.ambient.emerald { background: var(--emerald); }

.compass-wrap {
	position: relative;
	z-index: 1;
}

.card-frame {
	background: var(--paper);
	border: 1px solid var(--stone-line);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(18, 42, 49, 0.08);
	overflow: hidden;
}

.card {
	padding: 36px 32px;
	min-height: 320px;
}

.devnote {
	text-align: center;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--slate-soft);
	margin-top: 16px;
	letter-spacing: 0.3px;
}

.eyebrow {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--brass-deep);
	display: block;
	margin-bottom: 10px;
}

.step-title {
	font-family: var(--display);
	font-size: 24px;
	margin: 0 0 8px;
	color: var(--ink);
}

.step-sub {
	color: var(--ink-soft);
	font-size: 14.5px;
	margin-bottom: 26px;
}

.field {
	margin-bottom: 22px;
}

.field-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--ink);
}
.field-label .req {
	color: #b3372c;
	margin-left: 3px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--stone-line);
	border-radius: 8px;
	font-size: 14.5px;
	font-family: inherit;
	color: var(--ink);
	background: var(--paper);
}
.field textarea {
	min-height: 96px;
	resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--brass-deep);
	box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
	border-color: #b3372c;
}
.field .err {
	display: none;
	color: #b3372c;
	font-size: 12.5px;
	margin-top: 6px;
}
.field.invalid .err {
	display: block;
}

.field-note {
	font-size: 12.5px;
	color: var(--slate-soft);
	margin-top: 6px;
}

.phone-row {
	display: flex;
	gap: 8px;
}
.phone-row select {
	flex: 0 0 90px;
}
.phone-row input {
	flex: 1;
}

.pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pill {
	padding: 9px 16px;
	border: 1px solid var(--stone-line);
	border-radius: 999px;
	font-size: 13.5px;
	cursor: pointer;
	transition: all 0.15s ease;
	background: var(--paper);
	color: var(--ink);
}
.pill:hover {
	border-color: var(--brass-deep);
}
.pill.selected {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--ivory);
}
.pill.multi.selected {
	background: var(--brass-deep);
	border-color: var(--brass-deep);
	color: var(--ivory);
}

.consent-box {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: var(--ivory);
	padding: 14px;
	border-radius: 10px;
}
.consent-box input {
	margin-top: 3px;
}
.consent-box p {
	margin: 0;
	font-size: 13.5px;
	color: var(--ink-soft);
}

.compass-nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid var(--stone-line);
	margin-top: 30px;
	padding-top: 22px;
}

.step-counter {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--slate-soft);
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 22px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}
.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.btn-primary {
	background: var(--ink);
	color: var(--ivory);
}
.btn-primary:hover:not(:disabled) {
	background: var(--brass-deep);
}
.btn-ghost {
	background: transparent;
	border-color: var(--stone-line);
	color: var(--ink);
}
.btn-ghost:hover:not(:disabled) {
	border-color: var(--brass-deep);
	color: var(--brass-deep);
}

.confirm {
	text-align: center;
	padding: 20px 10px 8px;
}
.confirm svg {
	width: 56px;
	height: 56px;
	margin-bottom: 18px;
}
.confirm .step-title {
	text-align: center;
}

.summary-block {
	margin-bottom: 26px;
}
.summary-block h4 {
	font-family: var(--display);
	font-size: 15px;
	color: var(--brass-deep);
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--stone-line);
}
.summary-row {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 6px 0;
	font-size: 13.5px;
}
.summary-row .k {
	color: var(--ink-soft);
	flex: 0 0 45%;
}
.summary-row .v {
	color: var(--ink);
	font-weight: 500;
	text-align: right;
	flex: 1;
}

@media (max-width: 600px) {
	.card {
		padding: 26px 18px;
	}
	.step-title {
		font-size: 20px;
	}
	.compass-nav-row {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 14px;
	}
	.compass-nav-row > div {
		justify-content: space-between;
	}
	.summary-row {
		flex-direction: column;
		gap: 2px;
	}
	.summary-row .v {
		text-align: left;
	}
}

/* =========================================================================
   ZimaCore UI polish (beyond WordPress parity). Appended to compass.css by
   tools/cansulthub/port-compass.cjs - edit tools/cansulthub/compass-polish.css, not the output.
   Compass-specific selectors only.
   ========================================================================= */
.cansulthub-compass-wrap { -webkit-font-smoothing: antialiased; }
#compass { padding-bottom: 80px; }

.compass-bar { border-radius: 0 0 14px 14px; margin-bottom: 32px; backdrop-filter: saturate(1.2); }
.progress-label { padding: 5px 12px; border: 1px solid var(--stone-line); border-radius: 999px; background: var(--ivory); color: var(--ink-soft); }

.card-frame { border-radius: 20px; box-shadow: 0 1px 2px rgba(18,42,49,.05), 0 18px 48px rgba(18,42,49,.08); }
.card { position: relative; padding: 48px 52px 40px; min-height: 360px; }
/* Progress rail driven by the wizard's existing --bearing value. */
.card::before {
	content: ""; position: absolute; top: 0; left: 0; height: 4px;
	width: var(--bearing, 4%); max-width: 100%;
	background: linear-gradient(90deg, var(--emerald), var(--brass-deep));
	border-radius: 0 4px 4px 0; transition: width .45s ease;
}
.card > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.card > .confirm { max-width: 560px; }

.eyebrow { font-size: 11.5px; margin-bottom: 14px; }
.step-title { font-size: 30px; line-height: 1.2; margin-bottom: 10px; letter-spacing: -.01em; text-wrap: balance; }
.step-sub { font-size: 16px; line-height: 1.55; margin-bottom: 32px; }

.field { margin-bottom: 26px; }
.field-label { font-size: 14.5px; margin-bottom: 10px; }
.field-label .req { color: #b3372c; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
	min-height: 48px; padding: 12px 14px; font-size: 16px; border-radius: 10px;
	border-color: #d6d0c2; transition: border-color .15s, box-shadow .15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--slate-soft); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
	border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(28,109,128,.18);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { box-shadow: 0 0 0 3px rgba(179,55,44,.10); }
.field .err { font-weight: 500; }
.phone-row select { flex: 0 0 96px; }

.pill-group { gap: 10px; }
.pill {
	min-height: 44px; padding: 10px 18px; font-size: 14.5px; font-family: inherit; line-height: 1.3;
	border-color: #d6d0c2; box-shadow: 0 1px 0 rgba(18,42,49,.04);
}
.pill:hover { border-color: var(--emerald); background: #f4f9fa; }
.pill:focus-visible, .btn:focus-visible, .consent-box input:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.pill.selected, .pill.multi.selected { box-shadow: 0 2px 8px rgba(18,42,49,.18); }
.pill.selected:hover { background: var(--ink); }
.pill.multi.selected:hover { background: var(--brass-deep); }

.consent-box { padding: 16px 18px; border: 1px solid var(--stone-line); }
.consent-box input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--emerald); }
.consent-box p { font-size: 14px; line-height: 1.55; }

.compass-nav-row { margin-top: 36px; padding-top: 24px; }
.btn { min-height: 48px; padding: 12px 26px; font-size: 15px; font-family: inherit; }
.btn-primary { box-shadow: 0 4px 14px rgba(18,42,49,.22); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-ghost:disabled { visibility: hidden; }

.summary-block h4 { font-size: 16px; }
.summary-row { padding: 8px 0; font-size: 14.5px; border-bottom: 1px dashed var(--stone-line); }
.summary-row:last-child { border-bottom: 0; }
.confirm { padding-top: 32px; }

@media (max-width: 900px) { .card { padding: 40px 32px 32px; } }
@media (max-width: 600px) {
	#compass { padding: 0 12px 48px; }
	.compass-bar { margin-bottom: 20px; }
	.brand-name { font-size: 15px; }
	.card { padding: 30px 18px 24px; min-height: 0; }
	.step-title { font-size: 24px; }
	.step-sub { font-size: 15px; margin-bottom: 24px; }
	.pill-group { gap: 8px; }
	.pill { flex: 1 1 auto; text-align: center; }
	.compass-nav-row > div { flex-direction: row-reverse; }
	.compass-nav-row .btn-primary { flex: 1; justify-content: center; }
	.btn-ghost { justify-content: center; }
	.devnote { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .card::before, .btn, .pill { transition: none; } }

/* ---- Accessibility and stability (October 2026) ---- */
/* AA contrast: the gold and the grey text of the wizard were too light on ivory */
.brand-name em, .eyebrow { color: #7a5c24; }
.devnote, .field-note, .progress-label { color: var(--ink-soft); }
/* the card is filled in by script: reserve its height so the footer does not jump (layout shift) */
.card-frame { min-height: min(680px, 90vh); }
.pill:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }

