/**
 * Spurwing Journey Builder — frontend stylesheet.
 *
 * Every rule is scoped under .spw-jb. No bare element selectors, no global
 * custom properties: the tokens below live on .spw-jb only. Heading and
 * body typography are inherited from the theme; only size, weight and
 * spacing are set here. The olive accent is a Journey-Builder-scoped
 * variable with the brand value as its fallback:
 *   --spw-jb-accent: var(--spw-jb-accent-override, #5f6238)
 * A theme may set --spw-jb-accent-override on .spw-jb to retint it.
 *
 * Composition: editorial rather than application-like. Warm off-white
 * ground, charcoal type, thin neutral rules, olive only for emphasis and
 * the primary action. No gradients, shadows, pills or icons.
 */

.spw-jb {
	--spw-jb-accent: var(--spw-jb-accent-override, #5f6238);
	--spw-jb-accent-strong: #4c4f2c;
	--spw-jb-accent-soft: rgba(95, 98, 56, 0.16);
	--spw-jb-accent-tint: rgba(95, 98, 56, 0.06);
	--spw-jb-text: #1f1f1b;
	--spw-jb-muted: #62605a;
	--spw-jb-faint: #6f6c63; /* 5.2:1 on white, 4.8:1 on paper — quiet, never faint */
	--spw-jb-surface: #ffffff;
	--spw-jb-surface-alt: #f7f5ef;
	--spw-jb-stone: #ebe7dc;
	--spw-jb-border: #d8d3c8;
	--spw-jb-border-strong: #8f8b80; /* rings and connectors ≥ 3:1 */
	--spw-jb-error: #9b3b2e;
	--spw-jb-radius: 2px;
	--spw-jb-gap: clamp(40px, 6vw, 88px);
	--spw-jb-section-gap: clamp(36px, 4.5vw, 56px);
	--spw-jb-transition: 160ms ease;
	--spw-jb-eyebrow-size: 0.72rem;
	--spw-jb-eyebrow-tracking: 0.16em;

	box-sizing: border-box;
	max-width: 1160px;
	margin: 0 auto;
	padding: clamp(8px, 2vw, 24px) 0 clamp(32px, 5vw, 72px);
	color: var(--spw-jb-text);
	font-family: inherit;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.spw-jb *,
.spw-jb *::before,
.spw-jb *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------- shared type */

.spw-jb__eyebrow {
	margin: 0 0 14px;
	font-size: var(--spw-jb-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-accent);
}

.spw-jb__eyebrow--quiet {
	color: var(--spw-jb-muted);
}

.spw-jb__eyebrow-action {
	margin-left: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

/* ---------------------------------------------------------------- intro */

.spw-jb__intro {
	max-width: 620px;
	margin-bottom: clamp(32px, 4vw, 52px);
}

.spw-jb__heading {
	margin: 0 0 14px;
	font-size: clamp(1.9rem, 3.4vw, 2.6rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.spw-jb__lede {
	margin: 0;
	max-width: 30em;
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
	line-height: 1.5;
	color: var(--spw-jb-muted);
}

/* ---------------------------------------------------------------- progress line */

.spw-jb__progress-slot:empty {
	display: none;
}

.spw-jb__progress {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	margin: 0 0 clamp(28px, 3.5vw, 44px);
	padding: 0 0 16px;
	list-style: none;
	border-bottom: 1px solid var(--spw-jb-border);
	font-size: var(--spw-jb-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-faint);
}

.spw-jb__progress-step {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	white-space: nowrap;
	transition: color var(--spw-jb-transition);
}

.spw-jb__progress-step + .spw-jb__progress-step::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 1px;
	margin: 0 14px;
	background: var(--spw-jb-border-strong);
}

.spw-jb__progress-step--done {
	color: var(--spw-jb-accent);
}

.spw-jb__progress-step--current {
	color: var(--spw-jb-text);
}

.spw-jb__progress-step--current .spw-jb__progress-text {
	padding-bottom: 3px;
	border-bottom: 1.5px solid var(--spw-jb-accent);
}

/* ---------------------------------------------------------------- layout */

.spw-jb__layout {
	display: grid;
	grid-template-columns: minmax(0, 65fr) minmax(280px, 35fr);
	gap: var(--spw-jb-gap);
	align-items: start;
}

@media (max-width: 899px) {
	.spw-jb__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
}

.spw-jb__form {
	min-width: 0;
	margin: 0;
}

/* ---------------------------------------------------------------- sections */

.spw-jb__section {
	position: relative;
	margin: 0 0 var(--spw-jb-section-gap);
	padding: 0 0 var(--spw-jb-section-gap);
	border: 0;
	border-bottom: 1px solid var(--spw-jb-border);
	min-width: 0;
}

.spw-jb__section:last-of-type {
	border-bottom: 0;
	padding-bottom: 0;
}

.spw-jb__question {
	display: block;
	width: 100%;
	margin: 0 0 clamp(22px, 3vw, 30px);
	padding: 0;
	line-height: 1.2;
}

.spw-jb__question:focus {
	outline: none;
}

.spw-jb__question:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 8px;
}

.spw-jb__section-eyebrow {
	display: block;
	margin: 0 0 12px;
	font-size: var(--spw-jb-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-accent);
}

.spw-jb__question-text {
	display: block;
	font-size: clamp(1.55rem, 2.6vw, 2.05rem);
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: -0.015em;
}

.spw-jb__section-body {
	min-width: 0;
}

/* Sub-questions inside the route builder */

.spw-jb__q {
	margin: 0 0 32px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.spw-jb__q-label {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	font-size: 1.08rem;
	font-weight: 500;
	line-height: 1.35;
}

.spw-jb__q-label:focus {
	outline: none;
}

.spw-jb__q-label:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 6px;
}

.spw-jb__route-note {
	margin: 0 0 20px;
	color: var(--spw-jb-muted);
}

/* Completed stage: a line in the client's travel file, not a form summary */

.spw-jb--enhanced .spw-jb__section--done {
	margin-bottom: 0;
	padding: 18px 0;
}

.spw-jb--enhanced .spw-jb__section--done .spw-jb__section-body,
.spw-jb--enhanced .spw-jb__section--done > .spw-jb__help {
	display: none;
}

.spw-jb--enhanced .spw-jb__section--done .spw-jb__question {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.spw-jb--enhanced .spw-jb__section--done + .spw-jb__section:not(.spw-jb__section--done) {
	margin-top: clamp(28px, 4vw, 44px);
}

.spw-jb__answered {
	display: grid;
	grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 6px 24px;
	margin: 0;
}

.spw-jb__answered-label {
	font-size: var(--spw-jb-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-muted);
}

.spw-jb__answered-text {
	min-width: 0;
	font-size: 1.05rem;
	line-height: 1.4;
}

@media (max-width: 599px) {
	.spw-jb__answered {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.spw-jb__answered-label {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------- fields */

.spw-jb__field {
	margin: 0 0 22px;
	min-width: 0;
}

.spw-jb__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 24px;
}

.spw-jb__row--wrap {
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.spw-jb__label {
	display: block;
	margin: 0 0 8px;
	font-size: 0.92rem;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.spw-jb__optional {
	font-weight: 400;
	color: var(--spw-jb-muted);
}

.spw-jb__input,
.spw-jb__select,
.spw-jb__textarea {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 16px;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--spw-jb-text);
	background: var(--spw-jb-surface);
	border: 1px solid var(--spw-jb-border-strong);
	border-radius: var(--spw-jb-radius);
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color var(--spw-jb-transition), box-shadow var(--spw-jb-transition);
}

.spw-jb__select {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%232b2a26' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.spw-jb__select--short,
.spw-jb__input--short {
	max-width: 220px;
}

.spw-jb__textarea {
	min-height: 120px;
	resize: vertical;
}

.spw-jb__input:hover,
.spw-jb__select:hover,
.spw-jb__textarea:hover {
	border-color: var(--spw-jb-text);
}

.spw-jb__input:focus,
.spw-jb__select:focus,
.spw-jb__textarea:focus {
	outline: none;
	border-color: var(--spw-jb-accent);
	box-shadow: 0 0 0 3px var(--spw-jb-accent-soft);
}

.spw-jb__input:focus-visible,
.spw-jb__select:focus-visible,
.spw-jb__textarea:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 2px;
}

.spw-jb__input[aria-invalid="true"],
.spw-jb__select[aria-invalid="true"],
.spw-jb__textarea[aria-invalid="true"] {
	border-color: var(--spw-jb-error);
}

/* ---------------------------------------------------------------- option rows */

.spw-jb__options {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--spw-jb-border);
}

.spw-jb__option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 58px;
	margin: 0;
	padding: 15px 12px 15px 14px;
	border-bottom: 1px solid var(--spw-jb-border);
	font-size: 1.04rem;
	line-height: 1.35;
	cursor: pointer;
	transition: color var(--spw-jb-transition), background-color var(--spw-jb-transition);
}

.spw-jb__option:hover {
	background: var(--spw-jb-accent-tint);
}

.spw-jb__option-label {
	flex: 1 1 auto;
	min-width: 0;
}

/* Native inputs kept for semantics; drawn by hand so they belong to the system. */

.spw-jb__option input,
.spw-jb__check input {
	flex: 0 0 auto;
	position: relative;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid var(--spw-jb-border-strong);
	border-radius: 50%;
	background: var(--spw-jb-surface);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color var(--spw-jb-transition), background-color var(--spw-jb-transition);
}

.spw-jb__option input[type="checkbox"],
.spw-jb__check input[type="checkbox"] {
	border-radius: var(--spw-jb-radius);
}

.spw-jb__option input::before,
.spw-jb__check input::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	transform: scale(0);
	transition: transform var(--spw-jb-transition);
}

.spw-jb__option input[type="radio"]::before,
.spw-jb__check input[type="radio"]::before {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--spw-jb-accent);
}

.spw-jb__option input[type="checkbox"]::before,
.spw-jb__check input[type="checkbox"]::before {
	top: -2px;
	width: 5px;
	height: 9px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: scale(0) rotate(45deg);
}

.spw-jb__option:hover input,
.spw-jb__check:hover input {
	border-color: var(--spw-jb-accent);
}

.spw-jb__option input:checked,
.spw-jb__check input:checked {
	border-color: var(--spw-jb-accent);
}

.spw-jb__option input[type="checkbox"]:checked,
.spw-jb__check input[type="checkbox"]:checked {
	background: var(--spw-jb-accent);
}

.spw-jb__option input[type="radio"]:checked::before,
.spw-jb__check input[type="radio"]:checked::before {
	transform: scale(1);
}

.spw-jb__option input[type="checkbox"]:checked::before,
.spw-jb__check input[type="checkbox"]:checked::before {
	transform: scale(1) rotate(45deg);
}

.spw-jb__option input:focus-visible,
.spw-jb__check input:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 3px;
}

.spw-jb__option:has(input:checked) {
	color: var(--spw-jb-accent);
	font-weight: 500;
}

.spw-jb__option:has(input:checked)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	bottom: 12px;
	width: 2px;
	background: var(--spw-jb-accent);
}

.spw-jb__option:has(input[aria-invalid="true"]) {
	color: var(--spw-jb-error);
}

/* Inline variant (the two date modes) */

.spw-jb__options--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0 32px;
	margin-bottom: 14px;
	border-top: 0;
}

.spw-jb__options--inline .spw-jb__option {
	min-height: 0;
	padding: 10px 0;
	border-bottom: 0;
}

.spw-jb__options--inline .spw-jb__option:hover {
	background: transparent;
}

.spw-jb__options--inline .spw-jb__option:has(input:checked)::before {
	display: none;
}

/* Stand-alone checkboxes (flexible dates, consent) */

.spw-jb__check {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 8px 0 22px;
	font-size: 0.98rem;
	line-height: 1.5;
	cursor: pointer;
}

.spw-jb__check input {
	margin-top: 3px;
}

.spw-jb__consent {
	margin-top: 6px;
	padding-top: 22px;
	border-top: 1px solid var(--spw-jb-border);
}

.spw-jb__privacy {
	margin-left: 6px;
	color: var(--spw-jb-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- buttons */

.spw-jb__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
	margin-top: 10px;
}

.spw-jb__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 28px;
	margin: 0;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1;
	color: var(--spw-jb-text);
	background: transparent;
	border: 1px solid var(--spw-jb-border-strong);
	border-radius: var(--spw-jb-radius);
	cursor: pointer;
	text-decoration: none;
	transition: background-color var(--spw-jb-transition), border-color var(--spw-jb-transition), color var(--spw-jb-transition);
}

.spw-jb__btn:hover {
	border-color: var(--spw-jb-text);
}

.spw-jb__btn:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 3px;
}

.spw-jb__btn--primary {
	color: #fff;
	background: var(--spw-jb-accent);
	border-color: var(--spw-jb-accent);
}

.spw-jb__btn--primary:hover {
	color: #fff;
	background: var(--spw-jb-accent-strong);
	border-color: var(--spw-jb-accent-strong);
}

.spw-jb__btn--secondary {
	color: var(--spw-jb-text);
	border-color: var(--spw-jb-border-strong);
}

.spw-jb__btn--ghost {
	padding-left: 0;
	padding-right: 0;
	border-color: transparent;
	color: var(--spw-jb-accent);
	text-decoration: underline;
	text-underline-offset: 5px;
	text-decoration-thickness: 1px;
}

.spw-jb__btn--ghost:hover {
	border-color: transparent;
	color: var(--spw-jb-text);
}

.spw-jb__btn:disabled {
	opacity: 0.55;
	cursor: default;
}

.spw-jb__btn--small {
	min-height: 32px;
	padding: 0 8px;
	font-size: 0.72rem;
}

/* ---------------------------------------------------------------- errors / banner */

.spw-jb__error {
	margin: 10px 0 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--spw-jb-error);
}

.spw-jb__banner {
	margin: 0 0 32px;
	padding: 18px 22px;
	border-top: 1px solid var(--spw-jb-border);
	border-bottom: 1px solid var(--spw-jb-border);
	border-left: 2px solid var(--spw-jb-error);
	background: var(--spw-jb-surface-alt);
	font-size: 0.96rem;
	line-height: 1.5;
}

.spw-jb__banner p {
	margin: 0;
}

.spw-jb__banner ul {
	margin: 10px 0 0;
	padding-left: 18px;
}

.spw-jb__banner li {
	margin: 4px 0;
}

.spw-jb__banner a {
	color: inherit;
	text-underline-offset: 3px;
}

.spw-jb__hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.spw-jb__live,
.spw-jb__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- itinerary summary */

.spw-jb__summary {
	position: sticky;
	top: 40px;
	min-width: 0;
}

.spw-jb__summary-details {
	padding-left: clamp(24px, 3vw, 40px);
	border-left: 1px solid var(--spw-jb-border);
}

.spw-jb__summary-toggle {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 24px;
	padding: 0 0 14px;
	border-bottom: 1px solid var(--spw-jb-border);
	list-style: none;
	cursor: default;
}

.spw-jb__summary-toggle::-webkit-details-marker {
	display: none;
}

.spw-jb__summary-toggle:focus {
	outline: none;
}

.spw-jb__summary-toggle:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 6px;
}

.spw-jb__summary-title,
.spw-jb__summary-count {
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
}

.spw-jb__summary-title {
	color: var(--spw-jb-text);
}

.spw-jb__summary-count {
	color: var(--spw-jb-muted);
	white-space: nowrap;
}

.spw-jb__summary-empty {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--spw-jb-muted);
}

.spw-jb__timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.spw-jb__timeline-item {
	position: relative;
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 0 8px;
	margin: 0;
	padding: 0 0 32px;
}

.spw-jb__timeline-item:focus {
	outline: none;
}

.spw-jb__timeline-item:focus-visible {
	outline: 2px solid var(--spw-jb-accent);
	outline-offset: 6px;
}

.spw-jb__timeline-index {
	padding-top: 3px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1;
	color: var(--spw-jb-accent);
	font-variant-numeric: tabular-nums;
}

.spw-jb__timeline-item:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 20px;
	bottom: 8px;
	width: 1px;
	background: var(--spw-jb-border-strong);
}

.spw-jb__timeline-body {
	min-width: 0;
}

.spw-jb__timeline-title {
	display: block;
	margin-bottom: 5px;
	font-size: 0.86rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.35;
}

.spw-jb__timeline-sub {
	display: block;
	font-size: 0.94rem;
	line-height: 1.45;
	color: var(--spw-jb-muted);
}

.spw-jb__timeline-nights {
	display: block;
	margin-top: 7px;
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.4;
}

.spw-jb__timeline-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 16px;
	margin-top: 8px;
}

.spw-jb__timeline-actions .spw-jb__btn {
	min-height: 26px;
	padding: 0;
	border: 0;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	color: var(--spw-jb-muted);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
	background: transparent;
}

.spw-jb__timeline-actions .spw-jb__btn:hover {
	color: var(--spw-jb-accent);
}

.spw-jb__timeline-actions .spw-jb__btn:disabled {
	text-decoration: none;
	opacity: 0.35;
}

.spw-jb__summary-total {
	margin: 4px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--spw-jb-border-strong);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-text);
}

.spw-jb__summary-meta {
	margin: 26px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--spw-jb-border);
	font-size: 0.94rem;
}

.spw-jb__summary-meta dt {
	margin: 14px 0 0;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-muted);
}

.spw-jb__summary-meta dt:first-child {
	margin-top: 0;
}

.spw-jb__summary-meta dd {
	margin: 3px 0 0;
	line-height: 1.45;
}

@media (max-width: 899px) {
	.spw-jb__summary {
		position: static;
		order: -1;
	}

	.spw-jb__summary-details {
		padding: 16px 20px;
		border: 1px solid var(--spw-jb-border);
		border-radius: var(--spw-jb-radius);
		background: var(--spw-jb-surface-alt);
	}

	.spw-jb__summary-toggle {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: 0;
		cursor: pointer;
	}

	.spw-jb__summary-details[open] .spw-jb__summary-toggle {
		margin-bottom: 20px;
		padding-bottom: 14px;
		border-bottom: 1px solid var(--spw-jb-border);
	}

	.spw-jb__summary-toggle::after {
		content: "";
		flex: 0 0 auto;
		width: 8px;
		height: 8px;
		margin-left: auto;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: rotate(45deg) translateY(-2px);
		transition: transform var(--spw-jb-transition);
	}

	.spw-jb__summary-details[open] .spw-jb__summary-toggle::after {
		transform: rotate(225deg) translateY(-2px);
	}

	.spw-jb__timeline-item {
		padding-bottom: 22px;
	}

	.spw-jb__timeline-actions .spw-jb__btn,
	.spw-jb__btn--small {
		min-height: 44px;
	}
}

/* ---------------------------------------------------------------- confirmation */

.spw-jb__confirmation {
	display: grid;
	grid-template-columns: minmax(0, 65fr) minmax(280px, 35fr);
	gap: var(--spw-jb-gap);
	align-items: start;
	padding-top: 8px;
}

.spw-jb__confirmation:focus {
	outline: none;
}

.spw-jb__confirmation-main {
	max-width: 620px;
	min-width: 0;
}

.spw-jb__confirmation-heading {
	margin: 0 0 16px;
	font-size: clamp(1.7rem, 3vw, 2.4rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.spw-jb__confirmation-text {
	margin: 0 0 30px;
	max-width: 32em;
	font-size: 1.08rem;
	line-height: 1.55;
	color: var(--spw-jb-muted);
}

.spw-jb__confirmation-ref {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 320px;
	margin: 0 0 34px;
	padding: 20px 0;
	border-top: 1px solid var(--spw-jb-text);
	border-bottom: 1px solid var(--spw-jb-border);
}

.spw-jb__confirmation-ref-label {
	font-size: var(--spw-jb-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-muted);
}

.spw-jb__confirmation-ref-value {
	font-size: 1.35rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--spw-jb-accent);
	font-variant-numeric: tabular-nums;
}

.spw-jb__confirmation-actions {
	margin-top: 0;
}

.spw-jb__confirmation-summary {
	min-width: 0;
	padding-left: clamp(24px, 3vw, 40px);
	border-left: 1px solid var(--spw-jb-border);
}

.spw-jb__confirmation-summary .spw-jb__summary-title {
	display: block;
	margin: 0 0 22px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--spw-jb-border);
}

.spw-jb__confirmation-summary .spw-jb__timeline-item {
	padding-bottom: 22px;
}

@media (max-width: 899px) {
	.spw-jb__confirmation {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.spw-jb__confirmation-summary {
		padding: 20px;
		border: 1px solid var(--spw-jb-border);
		border-radius: var(--spw-jb-radius);
		background: var(--spw-jb-surface-alt);
	}
}

/* ---------------------------------------------------------------- motion */

.spw-jb--enhanced .spw-jb__section,
.spw-jb--enhanced .spw-jb__q--new,
.spw-jb--enhanced .spw-jb__route-note,
.spw-jb--enhanced .spw-jb__eyebrow,
.spw-jb--enhanced .spw-jb__confirmation {
	animation: spw-jb-fade 220ms ease both;
}

@keyframes spw-jb-fade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spw-jb *,
	.spw-jb *::before,
	.spw-jb *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------------------------------------------------------------- 1.1.0 */

/* Help lines under a question: quiet, one sentence, never a tooltip */
.spw-jb__help {
	max-width: 36em;
	margin: -10px 0 20px;
	font-size: 0.96rem;
	line-height: 1.5;
	color: var(--spw-jb-muted);
}

.spw-jb__q .spw-jb__help {
	margin: -4px 0 14px;
}

/* Destination context ("19 stays · 4 experiences") on the chooser */
.spw-jb__option-context {
	display: block;
	margin-top: 2px;
	font-size: 0.8rem;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: var(--spw-jb-faint);
}

/* "Based on what you've told us" — suggestions after the advisory questions */
.spw-jb__suggestions {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--spw-jb-border);
}

.spw-jb__suggestion {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 58px;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid var(--spw-jb-border);
}

.spw-jb__suggestion-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 1.04rem;
	line-height: 1.35;
}

.spw-jb__suggestion .spw-jb__btn {
	flex: 0 0 auto;
}

.spw-jb__route-hint {
	margin: -8px 0 20px;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--spw-jb-muted);
}

/* Free-text field after an option list ("I already have a property in mind") */
.spw-jb__field--after {
	margin-top: 22px;
}

.spw-jb__inline-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

/* Review: "Your South African journey so far" — while it is open, it is the recap */
.spw-jb--reviewing .spw-jb__section--done {
	display: none;
}

.spw-jb__review {
	margin: 0 0 28px;
	border-top: 1px solid var(--spw-jb-border);
}

.spw-jb__review dt {
	margin: 18px 0 0;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-muted);
}

.spw-jb__review dd {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	margin: 4px 0 0;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--spw-jb-border);
	line-height: 1.5;
}

.spw-jb__review-value {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 1.06rem;
	line-height: 1.5;
	color: var(--spw-jb-text);
}

/* the route is the brief's first line: a touch larger and set in the medium weight */
.spw-jb__review dd:first-of-type .spw-jb__review-value {
	font-size: clamp(1.15rem, 1.5vw, 1.3rem);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.005em;
}

.spw-jb__review dt:first-of-type {
	margin-top: 22px;
}

.spw-jb__review dd:first-of-type {
	padding-bottom: 22px;
	border-bottom-color: var(--spw-jb-border-strong);
}

.spw-jb__review dd .spw-jb__btn {
	flex: 0 0 auto;
}

.spw-jb__review-open-title {
	margin: 0 0 10px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--spw-jb-muted);
}

.spw-jb__review-open {
	margin: 0 0 30px;
	padding: 0 0 0 18px;
	border-left: 2px solid var(--spw-jb-accent-soft);
	list-style: none;
	font-size: 0.98rem;
	line-height: 1.55;
	color: var(--spw-jb-text);
}

.spw-jb__review-open li {
	margin: 0 0 6px;
}

.spw-jb__review-close {
	max-width: 30em;
	margin: 0 0 8px;
	font-size: clamp(1.15rem, 1.6vw, 1.3rem);
	line-height: 1.45;
	font-style: italic;
}

/* Submitted journey on the confirmation: read-only timeline */
.spw-jb__timeline--static .spw-jb__timeline-item {
	padding-bottom: 14px;
}

@media (max-width: 599px) {
	.spw-jb__review dd {
		flex-wrap: wrap;
	}

	.spw-jb__suggestion {
		flex-wrap: wrap;
	}
}
@media (max-width: 599px) {
	/* six stages on a phone: tighter connectors so the line reads in two rows, not three */
	.spw-jb__progress-step + .spw-jb__progress-step::before {
		width: 10px;
		margin: 0 8px;
	}

	.spw-jb__summary-title {
		white-space: nowrap;
	}

	.spw-jb__summary-count {
		white-space: normal;
		text-align: right;
	}
}

/* ---------------------------------------------------------------- 1.1.1 polish */

/* Compact progress line (phones): "STEP 2 OF 6 · TRAVELLERS" over a hairline that fills as the journey advances */
.spw-jb__progress-compact {
	display: none;
	position: relative;
	margin: 0 0 28px;
	padding: 0 0 14px;
	font-size: var(--spw-jb-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--spw-jb-eyebrow-tracking);
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--spw-jb-text);
}

.spw-jb__progress-compact-step {
	color: var(--spw-jb-muted);
}

.spw-jb__progress-compact-sep {
	color: var(--spw-jb-muted);
}

.spw-jb__progress-compact-label {
	color: var(--spw-jb-accent);
}

.spw-jb__progress-compact::before,
.spw-jb__progress-compact::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 1px;
	background: var(--spw-jb-border);
	width: 100%;
}

.spw-jb__progress-compact::after {
	width: var(--spw-jb-progress, 0%);
	background: var(--spw-jb-accent);
}

@media (max-width: 599px) {
	.spw-jb__progress {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		border: 0;
	}

	.spw-jb__progress-compact {
		display: block;
	}

	/* rhythm: summary accordion → progress → question */
	.spw-jb__summary-details {
		margin-bottom: 26px;
	}

	.spw-jb__question {
		margin-bottom: 20px;
	}

	.spw-jb__option {
		min-height: 56px;
		padding: 14px 10px 14px 12px;
		font-size: 1rem;
	}

	.spw-jb__help {
		font-size: 0.94rem;
	}

	.spw-jb__actions {
		margin-top: 26px;
	}

	.spw-jb__section:last-of-type {
		padding-bottom: 8px;
	}
}
@media (max-width: 599px) {
	/* the compact progress line already says "Step n · Stage" — the section eyebrow would repeat it */
	.spw-jb--enhanced .spw-jb__section-eyebrow {
		display: none;
	}
}

/* the route line gets the full width; its Edit sits underneath rather than squeezing the route */
.spw-jb__review dd:first-of-type {
	flex-wrap: wrap;
}

.spw-jb__review dd:first-of-type .spw-jb__review-value {
	flex-basis: 100%;
}

@media (max-width: 599px) {
	/* the hosting chapter already gives 52 px above the footer */
	.spw-jb {
		padding-bottom: 8px;
	}
}

/* ---------------------------------------------------------------- 1.2.0 screens */

/* A joined section sits on the same screen as the one before it: closer, quieter heading, no step eyebrow */
.spw-jb--enhanced .spw-jb__section--joined:not(.spw-jb__section--done) {
	margin-top: calc(-1 * var(--spw-jb-section-gap) + 36px);
	padding-top: 0;
}

.spw-jb--enhanced .spw-jb__section:not(.spw-jb__section--done):has(+ .spw-jb__section--joined:not(.spw-jb__section--done)) {
	border-bottom: 0;
	padding-bottom: 0;
}

.spw-jb--enhanced .spw-jb__section--joined:not(.spw-jb__section--done) .spw-jb__section-eyebrow {
	display: none;
}

.spw-jb--enhanced .spw-jb__section--joined:not(.spw-jb__section--done) .spw-jb__question-text {
	font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}

.spw-jb--enhanced .spw-jb__section--joined:not(.spw-jb__section--done) .spw-jb__question {
	margin-bottom: 18px;
}

/* Yes / No gate before a detail list */
.spw-jb__gate {
	margin-bottom: 18px;
}

/* "I already have a property in mind" — a quiet reveal */
.spw-jb__reveal {
	margin-top: 18px;
}

/* the hidden attribute always wins over layout display values (grid rows, flex lists) */
.spw-jb [hidden] {
	display: none !important;
}
