/*!
 * Federal Apostille — Order Portal UX layer (fap-ux.css) v1.0.0
 *
 * Re-skins the v2 order portal as an official records-submission form.
 *
 * Rationale for the visual direction:
 *   - The stock portal uses system-ui + generic SaaS geometry (12px radii,
 *     big soft shadows) while the surrounding site is Source Serif 4 over a
 *     #0A3D62 navy. The portal read as a third-party widget bolted onto the
 *     site, which is exactly the impression a payment form must not give.
 *   - Both Libre Franklin and Source Serif 4 are ALREADY loaded by the theme,
 *     so adopting them costs zero extra requests. Libre Franklin is the same
 *     grotesque lineage as Public Sans (the US Web Design System face), which
 *     is what makes the form read as governmental rather than startup.
 *   - Geometry moves to crisp hairlines and 4px radii; elevation is carried
 *     by borders and a single hairline shadow rather than blur.
 *
 * Everything is scoped to .fapv2-shell / #fapv2-app / .fapux-* so it cannot
 * bleed into the theme.
 */

/* ═══════════════════════════════════════════════════════════════════════
   1. TOKENS
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell {
	/* Brand navy sampled from the site hero (#0A3D62) so the portal and the
	   page it sits on read as one system. */
	--c-primary:   #0a3d62;
	--c-primary-2: #0d4d7c;
	--c-primary-3: #062a45;

	/* Seal gold — used only for rules, focus rings, and the active step.
	   Never for interactive fills (it fails contrast on white). */
	--fx-gold:     #a67c1a;
	--fx-gold-lt:  #f5efe0;

	--c-text:      #16202b;
	--c-text-soft: #4c5a68;
	--c-line:      #d4dbe3;
	--c-line-2:    #97a3b1;
	--c-muted:     #f3f6f9;
	--c-panel:     #ffffff;

	--c-success:   #14683c;
	--c-danger:    #b2201a;
	--c-warn:      #8a5a00;
	--c-focus:     #0a3d62;

	--fx-ink-tint:   #eef3f8;
	--fx-success-bg: #edf6f0;
	--fx-danger-bg:  #fdf1f0;
	--fx-warn-bg:    #fdf7e8;

	--r:    4px;
	--r-lg: 6px;
	--shadow: 0 1px 2px rgba(10, 61, 98, .06);
	--fx-shadow-lift: 0 2px 4px rgba(10, 61, 98, .08), 0 8px 20px rgba(10, 61, 98, .07);

	--font: "Libre Franklin", "Public Sans", "Source Sans 3", -apple-system,
	        BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--fx-font-serif: "Source Serif 4", "Source Serif Pro", Georgia,
	        "Times New Roman", serif;

	font-size: 16px;
	line-height: 1.55;
	color: var(--c-text);
	-webkit-font-smoothing: antialiased;
}

/* The theme sets a serif body face at 17px; reset it inside the form so the
   UI face wins on every control the browser would otherwise style itself. */
.fapv2-shell,
.fapv2-shell input,
.fapv2-shell select,
.fapv2-shell textarea,
.fapv2-shell button {
	font-family: var(--font);
}

.fapv2-shell h2,
.fapv2-shell h3 {
	font-family: var(--fx-font-serif);
	letter-spacing: -.005em;
}

/* Tabular figures everywhere money appears — misaligned digits are the
   fastest way to make a price table look amateur. */
.fapv2-shell .fapv2-sum-row,
.fapv2-shell .fapv2-review__price,
.fapv2-shell .fapv2-explainer__price {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* ═══════════════════════════════════════════════════════════════════════
   2. LAYOUT SHELL
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-grid {
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 24px;
}

.fapv2-shell .fapv2-main {
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow);
	padding: 0 28px 28px;
	/* NB: no overflow:hidden here — it would create a scroll container and
	   kill position:sticky on the step rail below. */
}

@media (max-width: 520px) {
	.fapv2-shell .fapv2-main { padding: 0 16px 22px; border-radius: var(--r); }
}

/* ═══════════════════════════════════════════════════════════════════════
   3. PROGRESS RAIL
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-rail {
	background: transparent;
	border-radius: 0;
	border-bottom: 1px solid var(--c-line);
	padding: 0;
	margin: 0 -28px 24px;
	padding: 0 28px;
	gap: 0;
	position: sticky;
	top: 0;
	z-index: 6;
	backdrop-filter: saturate(180%) blur(6px);
	background: rgba(255, 255, 255, .93);
	border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.fapv2-shell .fapv2-rail__item {
	flex: 1 1 0;
	justify-content: flex-start;
	gap: 9px;
	padding: 13px 8px 11px;
	border-radius: 0;
	border-bottom: 3px solid transparent;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--c-text-soft);
	transition: color .15s, border-color .15s;
}

.fapv2-shell .fapv2-rail__item:hover {
	background: transparent;
	color: var(--c-primary);
	border-bottom-color: var(--c-line-2);
}

.fapv2-shell .fapv2-rail__item.is-done {
	background: transparent;
	color: var(--c-success);
}

.fapv2-shell .fapv2-rail__item.is-current {
	color: var(--c-primary);
	border-bottom-color: var(--fx-gold);
}

.fapv2-shell .fapv2-rail__num {
	width: 24px;
	height: 24px;
	border-radius: 3px;
	background: #fff;
	border: 1.5px solid var(--c-line-2);
	color: var(--c-text-soft);
	font-size: 12px;
	font-weight: 700;
}

.fapv2-shell .fapv2-rail__item.is-current .fapv2-rail__num {
	border-color: var(--c-primary);
	background: var(--c-primary);
	color: #fff;
}

.fapv2-shell .fapv2-rail__item.is-done .fapv2-rail__num {
	background: var(--c-success);
	border-color: var(--c-success);
	color: #fff;
}

/* Completion meter under the rail. */
.fapux-meter {
	margin: -18px -28px 22px;
	padding: 9px 28px 11px;
	border-bottom: 1px solid var(--c-line);
	background: #fff;
	display: flex;
	align-items: center;
	gap: 12px;
}

.fapux-meter__track {
	flex: 1 1 auto;
	height: 5px;
	border-radius: 3px;
	background: var(--c-line);
	overflow: hidden;
}

.fapux-meter__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--c-primary) 0%, #1d6ea8 100%);
	transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.fapux-meter__label {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--c-text-soft);
}

.fapux-meter.is-complete .fapux-meter__fill { background: var(--c-success); }
.fapux-meter.is-complete .fapux-meter__label { color: var(--c-success); }

@media (max-width: 520px) {
	.fapv2-shell .fapv2-rail { margin: 0 -16px 20px; padding: 0 8px; }
	.fapux-meter { margin: -16px -16px 18px; padding: 8px 16px 10px; }
	.fapux-meter__label { font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   4. SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-section + .fapv2-section {
	margin-top: 34px;
	padding-top: 32px;
	border-top: 1px solid var(--c-line);
}

.fapv2-shell .fapv2-step__header {
	align-items: baseline;
	gap: 13px;
	margin: 0 0 6px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--fx-gold);
}

.fapv2-shell .fapv2-step__badge {
	width: 28px;
	height: 28px;
	border-radius: 3px;
	background: var(--c-primary);
	box-shadow: none;
	font-size: 14px;
	font-family: var(--font);
	align-self: center;
}

.fapv2-shell .fapv2-step h2 {
	font-family: var(--fx-font-serif);
	font-size: 25px;
	font-weight: 700;
	color: var(--c-primary);
	line-height: 1.25;
}

.fapv2-shell .fapv2-step__lede {
	margin: 12px 0 20px;
	font-size: 15px;
	color: var(--c-text-soft);
	max-width: 62ch;
}

.fapv2-shell .fapv2-h3 {
	margin: 28px 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--c-text-soft);
	font-family: var(--font);
	padding-bottom: 7px;
	border-bottom: 1px solid var(--c-line);
}

@media (max-width: 520px) {
	.fapv2-shell .fapv2-step h2 { font-size: 21px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   5. FORM CONTROLS
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-field { margin-bottom: 20px; }

.fapv2-shell .fapv2-field label,
.fapv2-shell .fapv2-field legend {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--c-text);
	margin-bottom: 6px;
	letter-spacing: -.005em;
}

.fapv2-shell .fapv2-field input[type="text"],
.fapv2-shell .fapv2-field input[type="email"],
.fapv2-shell .fapv2-field input[type="tel"],
.fapv2-shell .fapv2-field input[type="number"],
.fapv2-shell .fapv2-field input[type="search"],
.fapv2-shell .fapv2-field select,
.fapv2-shell .fapv2-field textarea {
	min-height: 46px;
	padding: 11px 13px;
	font-size: 15.5px;
	color: var(--c-text);
	background: #fff;
	/* USWDS-weight border: a 1px #e5e7eb hairline reads as "decorative box",
	   a 1px #6b7684 reads as "field you are expected to fill in". */
	border: 1px solid #6b7684;
	border-radius: var(--r);
	box-shadow: none;
	transition: border-color .12s, box-shadow .12s;
}

.fapv2-shell .fapv2-field textarea { min-height: 88px; line-height: 1.5; }

.fapv2-shell .fapv2-field input:hover:not(:disabled),
.fapv2-shell .fapv2-field select:hover:not(:disabled),
.fapv2-shell .fapv2-field textarea:hover:not(:disabled) {
	border-color: var(--c-primary);
}

.fapv2-shell .fapv2-field input:focus,
.fapv2-shell .fapv2-field select:focus,
.fapv2-shell .fapv2-field textarea:focus {
	outline: 3px solid var(--fx-gold);
	outline-offset: 0;
	border-color: var(--c-primary);
	box-shadow: none;
}

.fapv2-shell .fapv2-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230a3d62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px 16px;
	padding-right: 38px;
}

.fapv2-shell .fapv2-required { color: var(--c-danger); font-weight: 700; }

.fapv2-shell .fapv2-field__help {
	font-size: 13.5px;
	color: var(--c-text-soft);
	margin-top: 6px;
	line-height: 1.5;
	max-width: 68ch;
}

.fapv2-shell .fapv2-field__note {
	background: var(--fx-warn-bg);
	border: 1px solid #e9d8a6;
	border-left: 4px solid var(--fx-gold);
	border-radius: var(--r);
	padding: 11px 14px;
	font-size: 13.5px;
	color: #5c4407;
	margin-top: 10px;
	line-height: 1.5;
}

.fapv2-shell .fapv2-field__autofill {
	background: var(--fx-ink-tint);
	border: 1px solid var(--c-line);
	border-radius: var(--r);
	padding: 11px 14px;
	margin: 0;
}

/* ── inline validation (added by fap-ux.js) ──────────────────────────── */

.fapv2-shell .fapv2-field input[aria-invalid="true"],
.fapv2-shell .fapv2-field select[aria-invalid="true"],
.fapv2-shell .fapv2-field textarea[aria-invalid="true"] {
	border-color: var(--c-danger);
	border-width: 2px;
	background: var(--fx-danger-bg);
}

.fapux-err {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 7px 0 0;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--c-danger);
	line-height: 1.45;
}

.fapux-err::before {
	content: "!";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--c-danger);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.fapux-ok-tick {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--c-success);
	font-weight: 700;
	pointer-events: none;
	font-size: 15px;
}

.fapux-field-wrap { position: relative; }

/* ═══════════════════════════════════════════════════════════════════════
   6. CHOICE CARDS (jurisdiction, submission method, delivery)
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-radio-group { gap: 12px; }

.fapv2-shell .fapv2-radio-card {
	position: relative;
	border: 1px solid var(--c-line-2);
	border-radius: var(--r-lg);
	padding: 15px 16px 15px 46px;
	background: #fff;
	font-weight: 600;
	font-size: 15.5px;
	color: var(--c-text);
	transition: border-color .12s, box-shadow .12s, background .12s;
	cursor: pointer;
}

/* Draw the radio control ourselves — the stock sheet hides the input
   entirely, which left keyboard users with no visible selection target. */
.fapv2-shell .fapv2-radio-card::before {
	content: "";
	position: absolute;
	left: 16px;
	top: 17px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--c-line-2);
	background: #fff;
	transition: border-color .12s, box-shadow .12s;
}

.fapv2-shell .fapv2-radio-card:hover:not(.is-disabled) {
	border-color: var(--c-primary);
	background: #fbfdff;
}

.fapv2-shell .fapv2-radio-card.is-selected {
	border-color: var(--c-primary);
	border-width: 2px;
	padding: 14px 15px 14px 45px;
	background: #f5f9fd;
	box-shadow: inset 3px 0 0 var(--c-primary);
}

.fapv2-shell .fapv2-radio-card.is-selected::before {
	border-color: var(--c-primary);
	border-width: 6px;
	left: 15px;
	top: 16px;
}

/* Keyboard focus has to be visible even though the input is offscreen. */
.fapv2-shell .fapv2-radio-card:focus-within {
	outline: 3px solid var(--fx-gold);
	outline-offset: 1px;
}

.fapv2-shell .fapv2-radio-card span {
	font-size: 13.8px;
	line-height: 1.5;
	color: var(--c-text-soft);
	margin-top: 5px;
}

.fapv2-shell .fapv2-radio-card.is-disabled {
	opacity: 1;
	background: var(--c-muted);
	border-color: var(--c-line);
	color: #8894a1;
	cursor: not-allowed;
}

.fapv2-shell .fapv2-radio-card.is-disabled span { color: #8894a1; }
.fapv2-shell .fapv2-radio-card.is-disabled::before { border-color: var(--c-line); }

/* Checkboxes */
.fapv2-shell .fapv2-checkbox {
	border: 1px solid var(--c-line-2);
	border-radius: var(--r-lg);
	padding: 13px 15px;
	gap: 12px;
	align-items: flex-start;
	background: #fff;
	transition: border-color .12s, background .12s;
}

.fapv2-shell .fapv2-checkbox:hover { border-color: var(--c-primary); background: #fbfdff; }

.fapv2-shell .fapv2-checkbox input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin-top: 1px;
	accent-color: var(--c-primary);
	flex: 0 0 auto;
}

.fapv2-shell .fapv2-checkbox span { font-size: 14.5px; line-height: 1.5; }
.fapv2-shell .fapv2-checkbox:focus-within { outline: 3px solid var(--fx-gold); outline-offset: 1px; }

/* ═══════════════════════════════════════════════════════════════════════
   7. BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-btn {
	border-radius: var(--r);
	font-weight: 700;
	font-size: 15.5px;
	letter-spacing: .005em;
	padding: 12px 20px;
	min-height: 46px;
	transition: background .12s, border-color .12s, color .12s;
}

.fapv2-shell .fapv2-btn:focus-visible { outline: 3px solid var(--fx-gold); outline-offset: 2px; }

.fapv2-shell .fapv2-btn--primary { background: var(--c-primary); }
.fapv2-shell .fapv2-btn--primary:hover:not([disabled]) { background: var(--c-primary-2); }
.fapv2-shell .fapv2-btn--primary:active:not([disabled]) { background: var(--c-primary-3); }

.fapv2-shell .fapv2-btn--ghost {
	border: 1px solid var(--c-primary);
	color: var(--c-primary);
	background: #fff;
}

.fapv2-shell .fapv2-btn--ghost:hover:not([disabled]) { background: var(--fx-ink-tint); }

.fapv2-shell .fapv2-btn--lg { min-height: 56px; font-size: 17px; padding: 16px 24px; }

.fapv2-shell .fapv2-btn:disabled { opacity: 1; background: #c3ccd6; color: #fff; }
.fapv2-shell .fapv2-btn--ghost:disabled { background: #fff; color: #98a4b0; border-color: var(--c-line); }

.fapv2-shell .fapv2-link {
	font-weight: 600;
	font-size: 13.5px;
	color: var(--c-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fapv2-shell .fapv2-link--danger { color: var(--c-danger); }

/* ═══════════════════════════════════════════════════════════════════════
   8. DOCUMENT CART
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-add-prompt {
	background: var(--fx-ink-tint);
	border: 1px solid var(--c-line);
	border-left: 4px solid var(--c-primary);
	border-radius: var(--r);
	padding: 15px 18px;
	margin: 22px 0 18px;
}

.fapv2-shell .fapv2-add-prompt h3 {
	font-family: var(--font);
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 5px;
	color: var(--c-primary);
}

.fapv2-shell .fapv2-add-prompt p { font-size: 13.8px; color: var(--c-text-soft); margin: 0; }

.fapv2-shell .fapv2-cart {
	border: 1px solid var(--c-line-2);
	border-radius: var(--r-lg);
	background: #fff;
	padding: 0;
	overflow: hidden;
}

.fapv2-shell .fapv2-cart__head {
	background: var(--c-primary);
	color: #fff;
	margin: 0;
	padding: 11px 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
	border: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.fapv2-shell .fapv2-cart__count {
	color: #cfe0ee;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
}

.fapv2-shell .fapv2-cart__empty {
	padding: 26px 18px 4px;
	text-align: center;
	color: var(--c-text-soft);
}

.fapv2-shell .fapv2-cart__empty p { margin: 0; font-size: 14.5px; }

.fapv2-shell .fapv2-cart__list { margin: 0; }

.fapv2-shell .fapv2-cart__row {
	padding: 15px 18px;
	gap: 16px;
	border-bottom: 1px solid var(--c-line);
	align-items: flex-start;
}

.fapv2-shell .fapv2-cart__row:nth-child(even) { background: #fbfcfd; }

.fapv2-shell .fapv2-cart__row-title {
	font-size: 15.5px;
	font-weight: 700;
	color: var(--c-text);
	margin-bottom: 6px;
}

.fapv2-shell .fapv2-chip {
	display: inline-block;
	background: var(--fx-ink-tint);
	border: 1px solid #c3d4e2;
	color: #1c4d70;
	border-radius: 3px;
	padding: 2px 8px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	margin: 0 5px 4px 0;
}

.fapv2-shell .fapv2-cart__row-files { font-size: 13px; margin-top: 3px; }

.fapv2-shell .fapv2-cart [data-action="add-item"] {
	border-radius: 0;
	border-top: 1px solid var(--c-line);
	min-height: 54px;
	font-size: 16px;
}

/* Quick-start chips (injected into the empty cart by fap-ux.js).
   The set is ranked by real order history. The final dashed chip is the
   "my document isn't here" answer: it sits in the same row, is visibly
   open-ended rather than a named document, and opens the full picker. The
   counts ("11 of 39", "all 39") carry the "there is more" message so no
   sentence of instructions is needed. */

.fapux-quick { padding: 14px 18px 20px; }

.fapux-quick__label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 11px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--c-text-soft);
}

.fapux-quick__of {
	flex: 0 0 auto;
	letter-spacing: .04em;
	font-variant-numeric: tabular-nums;
	color: #7d8996;
}

.fapux-quick__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fapux-quick__btn {
	appearance: none;
	border: 1px solid var(--c-line-2);
	background: #fff;
	border-radius: 999px;
	padding: 9px 15px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--c-primary);
	cursor: pointer;
	transition: background .12s, border-color .12s;
}

.fapux-quick__btn:hover { background: var(--fx-ink-tint); border-color: var(--c-primary); }
.fapux-quick__btn:focus-visible { outline: 3px solid var(--fx-gold); outline-offset: 2px; }

/* The open-ended one. Dashed = "this is not a specific document"; the count
   badge shows how much more there is behind it. */
.fapux-quick__btn--all {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border-style: dashed;
	border-color: var(--c-primary);
	background: var(--fx-ink-tint);
	color: var(--c-primary);
}

.fapux-quick__btn--all:hover { background: #e2ecf5; }

.fapux-quick__plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: var(--c-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.fapux-quick__all-count {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--c-primary);
	border-radius: 999px;
	padding: 2px 8px;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
	.fapux-quick { padding: 12px 14px 18px; }
	.fapux-quick__label { font-size: 11px; }
	/* Tighter pills so two short ones can share a row instead of each
	   taking a full line. */
	.fapux-quick__btn { padding: 9px 13px; font-size: 13px; }
	.fapux-quick__list { gap: 7px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   9. INSTANT QUOTE — SIDE PROMPT + POPUP
   The prompt is a quiet question, not a call to action: it must not compete
   with "Add a document", which is the main path.
   ═══════════════════════════════════════════════════════════════════════ */

.fapux-iq-trigger {
	display: block;
	width: 100%;
	text-align: left;
	appearance: none;
	cursor: pointer;
	font: inherit;
	background: #fff;
	border: 1px solid var(--c-line-2);
	border-left: 3px solid var(--fx-gold);
	border-radius: var(--r);
	padding: 13px 16px;
	margin: 0 0 16px;
	transition: background .12s, border-color .12s;
}

.fapux-iq-trigger:hover { background: var(--fx-ink-tint); border-color: var(--c-primary); }
.fapux-iq-trigger:focus-visible { outline: 3px solid var(--fx-gold); outline-offset: 2px; }

.fapux-iq-trigger__q {
	display: block;
	font-family: var(--fx-font-serif);
	font-size: 16px;
	font-weight: 700;
	color: var(--c-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(10, 61, 98, .35);
}

.fapux-iq-trigger__hint {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-text-soft);
}

/* Under the cart on a phone the prompt is a follow-on to "Add a document",
   so it sits tighter and reads a size down. */
@media (max-width: 860px) {
	.fapux-iq-trigger { margin: 14px 0 0; }
	.fapux-iq-trigger__q { font-size: 15.5px; }
}

/* ── popup ────────────────────────────────────────────────────────────── */

.fapux-iq-modal { position: fixed; inset: 0; z-index: 100001; }
.fapux-iq-modal[hidden] { display: none; }

.fapux-iq-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 26, 40, .58);
}

.fapux-iq-modal__panel {
	position: relative;
	z-index: 1;
	width: calc(100% - 40px);
	max-width: 560px;
	margin: 8vh auto 0;
	max-height: 84vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--c-line-2);
	border-radius: var(--r-lg);
	box-shadow: 0 24px 60px rgba(6, 27, 45, .3);
	overflow: hidden;
}

.fapux-iq-modal__head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 20px;
	background: var(--c-primary);
	border-bottom: 3px solid var(--fx-gold);
}

.fapux-iq-modal__head h3 {
	margin: 0;
	font-family: var(--fx-font-serif);
	font-size: 19px;
	font-weight: 700;
	color: #fff;
}

.fapux-iq-modal__close {
	appearance: none;
	background: none;
	border: 0;
	font-size: 26px;
	line-height: 1;
	color: #cfe0ee;
	cursor: pointer;
	border-radius: var(--r);
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.fapux-iq-modal__close:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.fapux-iq-modal__close:focus-visible { outline: 3px solid var(--fx-gold); outline-offset: -3px; }

.fapux-iq-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 18px 20px 22px;
}

/* The card inside the popup already has the popup's own title bar, so drop
   its duplicate heading and its standalone card chrome. */
.fapux-iq-modal .fapv2-iq {
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.fapux-iq-modal .fapv2-iq > h3 { display: none; }

.fapux-iq-modal .fapv2-iq > p {
	margin: 0 0 12px !important;
	font-size: 14.5px !important;
	color: var(--c-text-soft) !important;
}

.fapux-iq-modal .fapv2-iq-text {
	font-size: 16px !important;
	min-height: 96px;
	border: 1px solid #6b7684 !important;
	border-radius: var(--r) !important;
	padding: 11px 13px !important;
	font-family: var(--font);
}

.fapux-iq-modal .fapv2-iq-text:focus {
	outline: 3px solid var(--fx-gold);
	border-color: var(--c-primary) !important;
}

.fapux-iq-modal .fapv2-iq [data-action="instant-quote"] { font-size: 16px; min-height: 50px; }

.fapux-iq-modal .fapv2-iq > label[style] {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	font-size: 14.5px !important;
	border: 1px dashed var(--c-primary) !important;
	border-radius: var(--r) !important;
}

/* Third-party floats outrank the popup; get them out of the way. */
body.fapux-iq-open #scrollUp,
body.fapux-iq-open #facb-bot-widget { display: none !important; }

/* Full-height sheet on a phone or any short viewport, same as the document
   modal — see the note in section 20. */
@media (max-width: 640px), (max-height: 640px) {
	.fapux-iq-modal__panel {
		width: 100%;
		max-width: none;
		margin: 0;
		height: 100vh;
		height: 100dvh;
		max-height: 100dvh;
		border: 0;
		border-radius: 0;
	}
	.fapux-iq-modal__head {
		padding-top: calc(15px + env(safe-area-inset-top, 0px));
	}
	.fapux-iq-modal__body {
		padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
	}
}

/* ═══════════════════════════════════════════════════════════════════════
   10. DESTINATION-COUNTRY COMBOBOX  (search field added by fap-ux.js)
   ═══════════════════════════════════════════════════════════════════════ */

.fapux-cty { position: relative; margin-bottom: 8px; }

.fapux-cty input {
	width: 100%;
	min-height: 46px;
	padding: 11px 13px 11px 38px;
	font-size: 15.5px;
	border: 1px solid #6b7684;
	border-radius: var(--r);
	background: #fff;
	font-family: var(--font);
}

.fapux-cty input:focus { outline: 3px solid var(--fx-gold); border-color: var(--c-primary); }

.fapux-cty::before {
	content: "";
	position: absolute;
	left: 13px;
	top: 15px;
	width: 15px;
	height: 15px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234c5a68' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat center / contain;
	pointer-events: none;
}

.fapux-cty__count {
	font-size: 12.5px;
	color: var(--c-text-soft);
	margin: 5px 0 0;
}

/* Hague status readout under the destination picker. */
.fapux-hague {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border-radius: var(--r);
	padding: 11px 14px;
	margin-top: 10px;
	font-size: 13.5px;
	line-height: 1.5;
}

.fapux-hague--yes { background: var(--fx-success-bg); border: 1px solid #b9dcc7; color: #14532d; }
.fapux-hague--no  { background: var(--fx-warn-bg);    border: 1px solid #e9d8a6; color: #5c4407; }
.fapux-hague strong { display: block; margin-bottom: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   11. MODAL
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-modal { background: rgba(9, 26, 40, .58); }

.fapv2-shell .fapv2-modal__panel {
	border-radius: var(--r-lg);
	box-shadow: 0 24px 60px rgba(6, 27, 45, .3);
	border: 1px solid var(--c-line-2);
	overflow: hidden;
}

.fapv2-shell .fapv2-modal__head {
	background: var(--c-primary);
	color: #fff;
	border-bottom: 3px solid var(--fx-gold);
	padding: 15px 20px;
}

.fapv2-shell .fapv2-modal__head h3 {
	font-family: var(--fx-font-serif);
	font-size: 19px;
	color: #fff;
}

.fapv2-shell .fapv2-modal__close { color: #cfe0ee; }
.fapv2-shell .fapv2-modal__close:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.fapv2-shell .fapv2-modal__body { padding: 22px 24px; }

.fapv2-shell .fapv2-modal__foot {
	border-top: 1px solid var(--c-line);
	background: var(--c-muted);
	padding: 14px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════
   12. UPLOAD DROPZONE
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-dropzone {
	border: 2px dashed var(--c-line-2);
	border-radius: var(--r-lg);
	background: var(--c-muted);
	padding: 26px 18px;
	transition: border-color .12s, background .12s;
}

.fapv2-shell .fapv2-dropzone:hover { border-color: var(--c-primary); background: var(--fx-ink-tint); }
.fapv2-shell .fapv2-dropzone.is-over { border-color: var(--c-primary); background: #e3eefa; }

.fapv2-shell .fapv2-dropzone__label { font-size: 15px !important; color: var(--c-primary); }
.fapv2-shell .fapv2-dropzone__label span { font-size: 13px; margin-top: 6px; }

.fapv2-shell .fapv2-files li {
	border: 1px solid var(--c-line);
	border-radius: var(--r);
	padding: 10px 13px;
	margin-bottom: 7px;
	background: #fff;
	font-size: 13.5px;
}

/* ═══════════════════════════════════════════════════════════════════════
   13. JURISDICTION EXPLAINER
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-explainer-compact summary {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--c-primary);
	padding: 12px 15px;
	border: 1px solid var(--c-line-2);
	border-radius: var(--r);
	background: #fff;
	cursor: pointer;
	list-style: none;
}

.fapv2-shell .fapv2-explainer-compact summary:hover { background: var(--fx-ink-tint); }
.fapv2-shell .fapv2-explainer-compact[open] summary { border-radius: var(--r) var(--r) 0 0; border-bottom: 0; }

.fapv2-shell .fapv2-explainer {
	gap: 0;
	border: 1px solid var(--c-line-2);
	border-radius: 0 0 var(--r) var(--r);
	overflow: hidden;
}

.fapv2-shell .fapv2-explainer__card { border: 0; border-radius: 0; padding: 18px 20px; background: #fff; }
.fapv2-shell .fapv2-explainer__card + .fapv2-explainer__card { border-left: 1px solid var(--c-line); }

@media (max-width: 640px) {
	.fapv2-shell .fapv2-explainer__card + .fapv2-explainer__card {
		border-left: 0;
		border-top: 1px solid var(--c-line);
	}
}

.fapv2-shell .fapv2-explainer__card h3 {
	font-family: var(--fx-font-serif);
	font-size: 18px;
	color: var(--c-primary);
	margin: 0 0 8px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--fx-gold);
}

.fapv2-shell .fapv2-explainer__card ul { font-size: 13.5px; line-height: 1.6; }

.fapv2-shell .fapv2-explainer__price {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--c-line);
	font-size: 15px;
	font-weight: 700;
	color: var(--c-primary);
}

/* ═══════════════════════════════════════════════════════════════════════
   14. REVIEW & PAY
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-review__block {
	border: 1px solid var(--c-line-2);
	border-radius: var(--r-lg);
	padding: 0;
	overflow: hidden;
	background: #fff;
}

.fapv2-shell .fapv2-review__block h3 {
	margin: 0;
	padding: 10px 16px;
	background: var(--c-muted);
	border-bottom: 1px solid var(--c-line);
	font-family: var(--font);
	font-size: 11.5px;
	letter-spacing: .11em;
	color: var(--c-text-soft);
}

.fapv2-shell .fapv2-review__block > :not(h3) { padding-left: 16px; padding-right: 16px; }
.fapv2-shell .fapv2-review__block > p { padding-top: 12px; padding-bottom: 2px; margin: 0; font-size: 14.5px; }
.fapv2-shell .fapv2-review__block > p:last-child { padding-bottom: 14px; }

.fapv2-shell .fapv2-review__items li { padding: 12px 0; }
.fapv2-shell .fapv2-review__items li:first-child { padding-top: 13px; }
.fapv2-shell .fapv2-review__title { font-size: 14.8px; }
.fapv2-shell .fapv2-review__price { font-size: 15px; color: var(--c-primary); }

.fapv2-shell .fapv2-card-host {
	border: 1px solid var(--c-line-2);
	border-radius: var(--r-lg);
	padding: 16px;
	background: #fff;
}

/* Payment assurance strip above the card fields. */
.fapux-pay-assure {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	align-items: center;
	border: 1px solid #b9dcc7;
	background: var(--fx-success-bg);
	border-radius: var(--r);
	padding: 11px 15px;
	margin: 0 0 14px;
	font-size: 13px;
	color: #14532d;
}

.fapux-pay-assure strong { font-weight: 700; }

.fapux-pay-assure__item { display: inline-flex; align-items: center; gap: 7px; }

.fapux-pay-assure__item svg {
	width: 15px; height: 15px; flex: 0 0 auto;
	fill: none; stroke: #14683c; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round;
}

.fapv2-shell .fapv2-missing {
	background: var(--fx-warn-bg);
	border: 1px solid #e9d8a6;
	border-left: 4px solid var(--fx-gold);
	border-radius: var(--r);
	padding: 15px 18px;
	margin-bottom: 14px;
}

.fapv2-shell .fapv2-missing strong { color: #5c4407; font-size: 14.5px; }
.fapv2-shell .fapv2-missing li { font-size: 14px; }
.fapv2-shell .fapv2-missing a { color: var(--c-primary); font-weight: 600; }

/* ── pickup offices ───────────────────────────────────────────────────── */

.fapux-offices {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	border: 1px solid var(--c-line);
	border-radius: var(--r);
	overflow: hidden;
	background: #fff;
}

.fapux-office {
	display: block;
	padding: 11px 14px;
	border-left: 3px solid transparent;
}

.fapux-office + .fapux-office { border-top: 1px solid var(--c-line); }

.fapux-office__name {
	display: flex;
	align-items: baseline;
	gap: 9px;
	flex-wrap: wrap;
	font-size: 14px;
	font-weight: 700;
	color: var(--c-text);
}

.fapux-office__addr {
	display: block;
	margin-top: 2px;
	font-size: 13.2px;
	line-height: 1.45;
	color: var(--c-text-soft);
	font-variant-numeric: tabular-nums;
}

.fapux-office.is-chosen {
	background: #f5f9fd;
	border-left-color: var(--c-primary);
}

.fapux-office.is-chosen .fapux-office__name { color: var(--c-primary); }

.fapux-office__tag {
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #fff;
	background: var(--c-primary);
	border-radius: 3px;
	padding: 2px 7px;
}

/* ── New York routing ─────────────────────────────────────────────────── */

.fapv2-shell .fapv2-callout.fapux-callout--ny {
	border-color: var(--fx-gold);
	border-left: 4px solid var(--fx-gold);
	background: var(--fx-warn-bg);
}

.fapv2-shell .fapux-callout--ny address {
	font-style: normal;
	font-weight: 700;
	color: var(--c-text);
}

.fapux-ny-note {
	margin: 0 0 10px !important;
	font-size: 13.5px;
	line-height: 1.55;
	color: #5c4407;
}

.fapux-ny-note strong { color: #4a3705; }

.fapux-notice--ny { margin: 14px 0 0; }

/* ── legalization chain ───────────────────────────────────────────────── */

.fapux-legnote {
	margin: 6px 0 10px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--c-text-soft);
	padding-left: 10px;
	border-left: 2px solid var(--fx-gold);
}

.fapux-chain {
	border: 1px solid var(--c-line-2);
	border-top: 3px solid var(--fx-gold);
	border-radius: var(--r-lg);
	background: #fff;
	padding: 0 16px 14px;
	margin-top: 18px;
}

.fapux-chain__title {
	margin: 0 -16px 10px;
	padding: 11px 16px;
	border-bottom: 1px solid var(--c-line);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--c-text-soft);
}

.fapux-chain__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }

.fapux-chain__item { display: flex; gap: 10px; padding: 9px 0; }
.fapux-chain__item + .fapux-chain__item { border-top: 1px dashed var(--c-line); }

.fapux-chain__num {
	flex: 0 0 auto;
	width: 21px; height: 21px;
	border-radius: 3px;
	background: var(--fx-gold);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.fapux-chain__body { flex: 1 1 auto; min-width: 0; }
.fapux-chain__body strong { display: block; font-size: 13.5px; color: var(--c-text); }

.fapux-chain__desc {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--c-text-soft);
}

.fapux-chain__foot {
	margin: 10px 0 0;
	padding-top: 9px;
	border-top: 1px solid var(--c-line);
	font-size: 12px;
	line-height: 1.5;
	color: var(--c-text-soft);
}

/* ── charges the summary did not name ─────────────────────────────────── */

.fapv2-shell .fapv2-sum-row.fapux-print-row { /* inherits the stock row styling */ }

.fapux-shipnote {
	margin: 4px 0 8px;
	padding-left: 10px;
	border-left: 2px solid var(--fx-gold);
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--c-text-soft);
}

.fapux-notice--stateship { margin: 14px 0 0; }

/* A save button the guard will refuse should not look ready. */
.fapv2-shell .fapv2-btn.fapux-blocked,
.fapv2-shell .fapv2-btn--primary.fapux-blocked {
	background: #c3ccd6;
	color: #fff;
	cursor: not-allowed;
}

.fapux-soo-hint {
	margin: 0;
	padding: 11px 16px;
	background: var(--fx-warn-bg);
	border-top: 1px solid #e9d8a6;
	color: #5c4407;
	font-size: 13.5px;
	line-height: 1.45;
}

.fapux-soo-hint strong { color: #4a3705; }

/* ── policy disclosures ───────────────────────────────────────────────── */

.fapux-notice {
	border: 1px solid #e9d8a6;
	border-left: 4px solid var(--fx-gold);
	border-radius: var(--r);
	background: var(--fx-warn-bg);
	padding: 13px 16px;
	margin: 0 0 16px;
}

.fapux-notice strong:first-child {
	display: block;
	margin-bottom: 4px;
	font-size: 14.5px;
	font-weight: 700;
	color: #5c4407;
}

.fapux-notice p {
	margin: 0;
	font-size: 13.8px;
	line-height: 1.55;
	color: #5c4407;
}

.fapux-notice p strong { color: #4a3705; font-weight: 700; }

/* The routing note answers a question raised by the delivery choices, so it
   sits with them rather than in the payment block. */
.fapux-notice--routing { margin: 14px 0 0; }

/* Support line under the pay button. */
.fapux-help-line {
	margin: 14px 0 0;
	text-align: center;
	font-size: 13.5px;
	color: var(--c-text-soft);
	line-height: 1.55;
}

.fapux-help-line a { color: var(--c-primary); font-weight: 700; text-decoration: none; }
.fapux-help-line a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════
   15. ORDER SUMMARY SIDEBAR
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-summary__inner {
	border: 1px solid var(--c-line-2);
	border-top: 3px solid var(--c-primary);
	border-radius: var(--r-lg);
	padding: 0 18px 18px;
	background: #fff;
	box-shadow: var(--shadow);
}

.fapv2-shell .fapv2-summary__inner h3 {
	font-family: var(--font);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--c-text-soft);
	margin: 0 -18px 12px;
	padding: 12px 18px;
	border-bottom: 1px solid var(--c-line);
}

.fapv2-shell .fapv2-sum-row {
	font-size: 14px;
	padding: 7px 0;
	border-bottom: 1px dotted var(--c-line);
	color: var(--c-text-soft);
}

.fapv2-shell .fapv2-sum-row span:last-child { color: var(--c-text); font-weight: 600; }

.fapv2-shell .fapv2-sum-row--sub {
	border-top: 1px solid var(--c-line);
	border-bottom: 0;
	margin-top: 6px;
	padding-top: 11px;
	font-weight: 700;
	color: var(--c-text);
}

.fapv2-shell .fapv2-sum-row--total {
	border-top: 2px solid var(--c-primary);
	border-bottom: 0;
	margin-top: 8px;
	padding-top: 12px;
	font-family: var(--fx-font-serif);
	font-size: 21px;
	font-weight: 700;
	color: var(--c-primary);
}

.fapv2-shell .fapv2-sum-row--total span:last-child { font-size: 24px; color: var(--c-primary); }

.fapv2-shell .fapv2-summary__note {
	background: var(--fx-ink-tint);
	border-radius: var(--r);
	padding: 10px 12px;
	font-size: 12.5px;
	margin-top: 14px;
}

.fapv2-shell .fapv2-summary__empty {
	background: var(--c-muted);
	border: 1px dashed var(--c-line-2);
	font-size: 13.5px;
	padding: 14px;
	text-align: center;
}

/* Process map */
.fapv2-shell .fapv2-process-map {
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	background: #fff;
	padding: 0 16px 14px;
	margin-top: 18px;
}

.fapv2-shell .fapv2-process-map__title {
	font-family: var(--font);
	font-size: 11.5px;
	letter-spacing: .12em;
	color: var(--c-text-soft);
	margin: 0 -16px 4px;
	padding: 11px 16px;
	border-bottom: 1px solid var(--c-line);
}

.fapv2-shell .fapv2-process-map__num {
	background: var(--c-primary);
	color: #fff;
	border-radius: 3px;
	font-weight: 700;
}

.fapv2-shell .fapv2-process-map__step { font-size: 13.5px; }

/* ═══════════════════════════════════════════════════════════════════════
   16. MOBILE ORDER BAR  (#fap-mbar — owned by the fa-portal-mobile plugin)
   We do not build a bar of our own. That plugin already pins one on small
   screens and handles the cases that matter: it hides behind the document
   modal, hides again once the submit bar scrolls into view, and measures its
   own height into --fap-mbar-h so the page bottom clears it. All we do is
   bring it into the same visual system as everything above.
   ═══════════════════════════════════════════════════════════════════════ */

#fap-mbar {
	background: rgba(255, 255, 255, .98);
	backdrop-filter: saturate(180%) blur(8px);
	border-top: 1px solid #97a3b1;
	box-shadow: 0 -4px 18px rgba(10, 61, 98, .12);
	font-family: "Libre Franklin", "Public Sans", system-ui, -apple-system, sans-serif;
	padding: 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	gap: 14px;
}

#fap-mbar .fap-mbar__label {
	font-size: 10.5px;
	letter-spacing: .11em;
	color: #4c5a68;
}

#fap-mbar .fap-mbar__amount {
	font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
	font-size: 20px;
	line-height: 1.2;
	font-weight: 700;
	color: #0a3d62;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* The mobile plugin measures the bar into --fap-mbar-h from inside a
   requestAnimationFrame, and falls back to 68px until that lands. Our skin is
   slightly taller than the original, and rAF does not run in a background tab
   — which is exactly where a customer parks this form. Raise the fallback so
   the last control is never trapped under the bar even if the measurement
   never happens. */
body.fap-mbar-on { padding-bottom: var(--fap-mbar-h, 84px); }

#fap-mbar .fap-mbar__meta { font-size: 12px; color: #4c5a68; }

#fap-mbar .fap-mbar__cta {
	background: #0a3d62;
	border-radius: 4px;
	font-size: 15.5px;
	font-weight: 700;
	padding: 13px 20px;
	min-height: 48px;
}

#fap-mbar .fap-mbar__cta:hover { background: #0d4d7c; }
#fap-mbar .fap-mbar__cta:focus-visible { outline: 3px solid #a67c1a; outline-offset: 2px; }

/* The mobile plugin's "here's what's still missing" hint above the modal
   footer, and the field it flashes, in our palette. */
.fapv2-shell ~ .fapv2-modal .fap-hint,
.fap-hint {
	background: var(--fx-warn-bg, #fdf7e8);
	border-top: 1px solid #e9d8a6;
	color: #5c4407;
	font-family: "Libre Franklin", "Public Sans", system-ui, sans-serif;
	font-size: 13.5px;
}

.fap-hint strong { color: #5c4407; font-weight: 700; }

.fapv2-shell .fap-flash input,
.fapv2-shell .fap-flash select,
.fapv2-shell .fap-flash textarea,
.fapv2-shell input.fap-flash,
.fapv2-shell select.fap-flash,
.fapv2-shell textarea.fap-flash {
	border-color: #a67c1a !important;
	box-shadow: 0 0 0 3px rgba(166, 124, 26, .22) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   17. CONFIRMATION
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapv2-confirm {
	border: 1px solid var(--c-line-2);
	border-top: 4px solid var(--c-success);
	border-radius: var(--r-lg);
	padding: 32px 28px;
	background: #fff;
}

.fapv2-shell .fapv2-confirm h2 { font-family: var(--fx-font-serif); color: var(--c-primary); }

.fapv2-shell .fapv2-confirm__num {
	border: 1px solid var(--c-line-2);
	border-radius: var(--r);
	background: var(--c-muted);
	padding: 14px 18px;
}

.fapv2-shell .fapv2-confirm__num strong { color: var(--c-primary); letter-spacing: .04em; }

/* ═══════════════════════════════════════════════════════════════════════
   18. ACCESSIBILITY / MOTION
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
	.fapv2-shell *,
	#fap-mbar,
	.fapux-meter__fill {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

@media (prefers-contrast: more) {
	.fapv2-shell { --c-line: #8a95a1; --c-text-soft: #33404d; }
}

.fapux-sr {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   19. TOUCH TARGETS
   Anything a thumb has to hit gets 44px of height on a touch screen. The
   offenders were all inherited: the cart row's Edit/Remove text buttons were
   52x21, and the support line's phone/email links were ~18px tall.
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 860px) {
	.fapv2-shell .fapv2-cart__row { align-items: center; }

	.fapv2-shell .fapv2-cart__row-actions {
		flex-direction: row;
		gap: 6px;
		flex-shrink: 0;
	}

	/* Below ~520px the two 56px action buttons squeeze the document title
	   into a 56px column and it truncates. Give the title the full row and
	   drop the actions underneath it. */
	@media (max-width: 560px) {
		.fapv2-shell .fapv2-cart__row { flex-wrap: wrap; align-items: flex-start; }
		.fapv2-shell .fapv2-cart__row-main { flex: 1 1 100%; }
		.fapv2-shell .fapv2-cart__row-actions { flex: 0 0 auto; margin-top: 10px; }
	}

	.fapv2-shell .fapv2-cart__row-actions .fapv2-link {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		min-width: 56px;
		padding: 0 10px;
		border: 1px solid var(--c-line-2);
		border-radius: var(--r);
		text-decoration: none;
		background: #fff;
	}

	.fapv2-shell .fapv2-cart__row-actions .fapv2-link--danger { border-color: #e3b7b5; }

	.fapux-help-line a,
	/* The policy links added to the acknowledgement in 1.0.15 sit inside a
	   sentence, so they get a hit area via padding rather than a block box. */
	.fapv2-shell .fapv2-checkbox span a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 2px 0;
	}

	/* The "jump to the section you missed" links. The mobile-UX plugin sizes
	   these to 40px via `.fapv2-shell .fapv2-review a[data-action]` (0,3,1),
	   which outranks any class-only selector we could write, so go up to the
	   id. Excluding the rail matters: its items are the same anchor type and
	   that plugin deliberately gives them 52px. */
	#fapv2-app a[data-action="goto-section"]:not(.fapv2-rail__item) {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 8px 0;
		font-size: 15px;
	}


	.fapux-quick__btn { min-height: 44px; }

	/* Anchor targets inside running text keep their inline flow but still get
	   a comfortable hit area via padding rather than a block box. */
	.fapux-help-line a { padding: 0 2px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   20. SMALL-SCREEN RECONCILIATION
   Every rule above is scoped `.fapv2-shell .x` (0,2,0). That outranks the
   base sheet's `@media … { .x { … } }` rules (0,1,0), so any responsive
   behaviour the base sheet owned has to be restated here at matching
   specificity. Same for the mobile-UX plugin's inline block, which uses
   (0,2,0) — where we collide, we mirror its intent rather than fight it.
   ═══════════════════════════════════════════════════════════════════════ */

/* The two-column shell must still collapse. Without this the sidebar keeps
   its 340px track on a 375px screen and squeezes the form to nothing. */
@media (max-width: 860px) {
	.fapv2-shell .fapv2-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
	.fapv2-shell .fapv2-summary { position: static; max-height: none; }

	/* Moved by fap-ux.js to sit directly above Review & Pay (see the note
	   there). Give it the same separation as a real section. */
	.fapv2-shell .fapv2-summary.fapux-summary-inline {
		margin: 34px 0 0;
		padding-top: 32px;
		border-top: 1px solid var(--c-line);
	}
}

/* Step rail: mirrors the mobile-UX plugin's 4-up stacked treatment so the
   result is the same whichever stylesheet the queue prints last. */
@media (max-width: 520px) {
	.fapv2-shell .fapv2-rail {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 2px;
		position: static;
		backdrop-filter: none;
		border-radius: 0;
	}
	.fapv2-shell .fapv2-rail__item {
		flex-direction: column;
		gap: 4px;
		padding: 9px 2px 7px;
		min-height: 54px;
		justify-content: center;
		border-bottom-width: 3px;
	}
	.fapv2-shell .fapv2-rail__label {
		display: block;
		white-space: normal;
		text-align: center;
		font-size: 10.5px;
		line-height: 1.15;
		font-weight: 700;
		letter-spacing: -.1px;
	}
	.fapv2-shell .fapv2-rail__num { width: 20px; height: 20px; font-size: 11px; }
}

/* Short viewports — a rotated phone, or an SE. The mobile-UX plugin converts
   the modal into a full-height sheet by WIDTH (<=640px), so a landscape phone
   at 844x390 misses it entirely: the panel's 40px margin + a 70vh body + the
   footer add up past the viewport, and the "Add to order" button lands below
   the fold behind a second, easily-missed overlay scrollbar. Gate the same
   treatment on HEIGHT as well. Width is deliberately not set here, so the
   plugin's width rules still govern on a narrow screen. */
@media (max-height: 640px) {
	/* 54px of sticky rail out of a 390px-tall landscape viewport is 14% of the
	   screen spent on navigation. Let it scroll away here. */
	.fapv2-shell .fapv2-rail { position: static; backdrop-filter: none; }

	.fapv2-shell .fapv2-modal,
	.fapv2-modal {
		padding: 0;
		align-items: stretch;
		overflow: hidden;
	}
	.fapv2-modal .fapv2-modal__panel {
		margin: 0 auto;
		height: 100vh;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
		display: flex;
		flex-direction: column;
		box-shadow: none;
	}
	.fapv2-modal .fapv2-modal__head {
		flex: 0 0 auto;
		padding: 12px 20px;
		padding-top: calc(12px + env(safe-area-inset-top, 0px));
	}
	.fapv2-modal .fapv2-modal__body {
		flex: 1 1 auto;
		max-height: none;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}
	.fapv2-modal .fapv2-modal__foot {
		flex: 0 0 auto;
		border-radius: 0;
		padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		box-shadow: 0 -4px 14px rgba(15, 23, 42, .07);
	}
}

/* Modal: the mobile-UX plugin turns the panel into a full-height sheet with
   square corners. Restate the corner + safe-area bits at our specificity. */
@media (max-width: 640px) {
	.fapv2-shell .fapv2-modal__panel { border-radius: 0; }
	.fapv2-shell .fapv2-modal__head {
		padding: 13px 16px;
		padding-top: calc(13px + env(safe-area-inset-top, 0px));
	}
	.fapv2-shell .fapv2-modal__body { padding: 16px; }
	.fapv2-shell .fapv2-modal__foot { padding: 12px 16px; }
}

/* Choice cards get more breathing room once they are full width. */
@media (max-width: 520px) {
	.fapv2-shell .fapv2-radio-card { padding: 14px 14px 14px 44px; }
	.fapv2-shell .fapv2-radio-card.is-selected { padding: 13px 13px 13px 43px; }
	.fapux-quick__btn { font-size: 13px; padding: 9px 13px; }
}

/* ── state of origin: missing-value warning on a cart row (fap-ux.js §11) ─ */

.fapux-row-warn {
	margin: 8px 0 0;
	padding: 8px 11px;
	border-radius: 6px;
	background: var(--fx-danger-bg, #fdf1f0);
	border: 1px solid #f0c4c1;
	color: var(--c-danger, #b2201a);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
}

/* The re-inserted "State of origin" field sits where the wizard's own one
   would have, so it only needs the wizard's field styles — nothing here but
   a hook for future tuning. */
.fapv2-shell .fapux-soo { margin-top: 0; }

/* The stamped state of origin is hidden, not removed, on the academic page
   (fap-ux.js §11) — the warning pass still reads these chips. */
.fapv2-shell .fapv2-chip.fapux-chip-hidden,
.fapux-chip-hidden {
	display: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   21. COMPLETION-ESTIMATE QUALIFIERS + STALE-PRICE WARNING
   ═══════════════════════════════════════════════════════════════════════ */

.fapv2-shell .fapux-eta {
	margin: 6px 0 0;
	padding: 0;
	font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 11.5px;
	line-height: 1.5;
	color: #5a6472;
}

.fapv2-shell .fapux-eta span {
	display: block;
	position: relative;
	padding-left: 13px;
}

.fapv2-shell .fapux-eta span + span { margin-top: 4px; }

.fapv2-shell .fapux-eta span::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #b08328;
}

.fapv2-shell .fapux-stale {
	margin: 0 0 12px;
	padding: 11px 13px;
	border: 1px solid #d9a441;
	border-left-width: 4px;
	border-radius: 6px;
	background: #fdf6e6;
	font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 12.5px;
	line-height: 1.55;
	color: #6b4d10;
}

.fapv2-shell .fapux-stale strong { color: #52390a; }

@media (max-width: 860px) {
	.fapv2-shell .fapux-eta   { font-size: 12px; }
	.fapv2-shell .fapux-stale { font-size: 13px; }
}
