/* /pilot-salaries/ on phones (< 768 px), owner INBOX #357 B; the hub / guide closing box on every width (#357.6 /
   #360.4). Markup: inc/avi-pay-phone.php; behaviour: assets/js/avi-pay-phone.js. Gold leads; "PAY COMPARE?" in blue. */

/* ── Closing box (desktop + phones) ── */
.avi-pay-close { box-sizing: border-box; max-width: 720px; margin: 40px auto 56px; padding: 40px 24px; text-align: center; font-family: 'DM Sans', sans-serif; }
.avi-pay-close-h { margin: 0; color: #fff; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.avi-pay-close-p { margin: 14px auto 0; max-width: 460px; color: #94a7be; font-size: 16px; line-height: 1.5; }
.avi-pay-close-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 260px; height: 48px; margin: 24px 0 0; padding: 0 20px; box-sizing: border-box;
	border: 1px solid #2a4266; border-radius: 10px; background: transparent; color: #fff !important; font-size: 15px; font-weight: 600; text-decoration: none !important; /* #418: neutral */
	transition: border-color .15s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .avi-pay-close-btn:hover { border-color: #7d93ad; } } /* #418 */
.avi-pay-close-btn:focus-visible { outline: 2px solid #e8a020; outline-offset: 2px; }
.avi-pay-guide-link { margin: 32px 0 0; text-align: center; font-family: 'DM Sans', sans-serif; font-size: 13px; }
.avi-pay-guide-link a { color: #7d93ad; text-decoration: none; }
.avi-pay-guide-link a:hover { color: #e8eef5; }

.fsp { display: none; }

@media (max-width: 767px) {
	/* the hub's desktop sections give way to the phone stages (the guide page keeps its content) */
	body.avi-pay-landing:not(.avi-pay-guide) .avi-jobs-chips { display: none !important; }
	/* #366.12: the hub's sections give way to the phone stages, but its H1 ("Pilot Salary in Canada 2026") stays in the
	   page, visually hidden (not display:none), so the page keeps one H1 for screen readers and search engines. */
	body.avi-pay-landing:not(.avi-pay-guide) .avi-pay-landing-shell > :not(.avi-pay-landing-hero) { display: none !important; }
	body.avi-pay-landing:not(.avi-pay-guide) .avi-pay-landing-shell { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
	body.avi-pay-landing:not(.avi-pay-guide) .avi-pay-landing-hero { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
		overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
	.fsp { display: block; font-family: 'DM Sans', sans-serif; }
	/* the stack's room to scroll away after its hold (one screen - the settled stack - the bottom row) */
	.avi-pay-close { width: auto; margin: 0; padding: 56px 20px 40px; background: #060f1e; display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(100svh - 300px); box-sizing: border-box; }
	.avi-pay-close-h { font-size: min(44px, calc((100vw - 40px) / 8.6)); }
	.avi-pay-close-p { font-size: 15px; }
	.avi-pay-close-btn { display: flex; width: 100%; min-width: 0; }

	/* Stage 1: the pay video, pinned */
	.fsp-s1 { position: relative; z-index: 0; }
	.fsp-frame { position: relative; height: calc(100svh - 56px); overflow: hidden; background: #060f1e; transform-origin: 50% 0; }
	/* 2026-11-03 (owner INBOX #381.1): contain, not cover: the video's own text is never cropped at the sides; navy behind it. */
	.fsp-poster, .fsp-poster img, .fsp-v { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #060f1e; }
	.fsp-v { opacity: 0; transition: opacity .4s ease; }
	.fsp-s1.is-playing .fsp-v { opacity: 1; }
	.fsp-dim { position: absolute; inset: 0; background: #060f1e; opacity: 0; pointer-events: none; }
	.fsp-money { position: absolute; left: 20px; right: 20px; bottom: 56px; margin: 0; color: #fff; text-align: center; font-family: 'Bebas Neue', sans-serif; font-weight: 400;
		font-size: min(64px, calc((100vw - 40px) / 6.4)); line-height: .95; letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 2px 24px rgba(6, 15, 30, .6); transition: opacity .4s ease, transform .4s ease; }
	.fsp-money.is-out { opacity: 0; transform: translateY(-16px); }

	/* Shared */
	.fsp-stage { position: relative; z-index: 2; display: block; box-sizing: border-box; padding: 56px 20px 24px; background: #060f1e; text-align: center; }
	.fsp-h1 { margin: 0; color: #fff; font-family: 'Bebas Neue', sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: min(58px, calc((100vw - 40px) / 7)); line-height: .95; }
	.fsp-h1 > span { display: block; }
	.fsp-blue { color: #5aa9ff; }
	.fsp-h2 { margin: 0 0 12px; color: #fff; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
	.fsp-h2 > span { display: block; }
	.fsp-sub { margin: 16px auto 0; max-width: 360px; color: #94a7be; font-size: 16px; line-height: 1.5; }
	.fsp-sub--sm { margin: 0 auto 22px; font-size: 15px; }
	.fsp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
	.fsp-quiet { display: inline-flex; align-items: center; min-height: 28px; color: #7d93ad !important; font-size: 13px; text-decoration: none !important; }
	.fsp-quiet:hover { color: #e8eef5 !important; }
	.fsp a:focus-visible, .fsp button:focus-visible { outline: 2px solid #e8a020; outline-offset: 2px; }

	/* Stage 2: statement + search (its own screen: background slides over the video) */
	.fsp-s2 { display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - 56px); padding: 90px 20px 56px;
		background: linear-gradient(180deg, rgba(6, 15, 30, 0) 0, #060f1e 90px); }
	.fsp-search { position: relative; margin: 26px 0 0; text-align: left; }
	.fsp-search-icon { position: absolute; left: 18px; top: 19px; color: #e8eef5; pointer-events: none; }
	body .fsp-search input.fsp-input[type="search"] { display: block; width: 100%; height: 58px; margin: 0; box-sizing: border-box; padding: 0 16px 0 50px !important;
		background: #0c1a30 !important; border: 1px solid #2a4266 !important; border-radius: 12px !important; box-shadow: none !important; color: #fff !important; font-size: 17px; -webkit-appearance: none; appearance: none; }
	body .fsp-search input.fsp-input[type="search"]::placeholder { color: #7d93ad !important; opacity: 1; }
	body .fsp-search input.fsp-input[type="search"]:focus { outline: none; border-color: #e8a020 !important; box-shadow: 0 0 0 3px rgba(232, 160, 32, .18) !important; }
	.fsp-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; overflow: hidden; background: #0f1e38; border: 1px solid #1f3354; border-radius: 12px; }
	.fsp-suggest[hidden] { display: none; }
	.fsp-sg { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-top: 1px solid #1f3354; color: #e8eef5 !important; font-size: 15px; font-weight: 600; text-decoration: none !important; }
	.fsp-sg:first-child { border-top: 0; }
	.fsp-sg.is-act, .fsp-sg:hover { background: #13274a; }

	/* Stage 3: board */
	.fsp-board { background: #070e1b; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; overflow: hidden; text-align: left; }
	.fsp-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid #16294a; }
	.fsp-board-t { color: #e8a020; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
	.fsp-switch { display: flex; flex: 0 0 auto; border: 1px solid #2a4266; border-radius: 999px; padding: 2px; }
	.fsp-switch-b { min-height: 40px; padding: 0 10px; margin: 0; border: 0 !important; border-radius: 999px !important; background: transparent !important; box-shadow: none !important;
		color: #7d93ad !important; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
	.fsp-switch-b.is-on { background: #e8a020 !important; color: #060f1e !important; }
	.fsp-rows { list-style: none; margin: 0; padding: 0; perspective: 800px; }
	.fsp-rows[hidden] { display: none; }
	.fsp-rows li { margin: 0; padding: 0; border-top: 1px solid #16294a; transform-origin: 50% 0; backface-visibility: hidden; }
	.fsp-rows li:first-child { border-top: 0; }
	.fsp-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 12px; column-gap: 10px; align-items: center; min-height: 52px; padding: 0 14px; text-decoration: none !important; }
	.fsp-code { color: #e8a020; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .06em; }
	.fsp-name { color: #e8eef5; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.fsp-pay { color: #e8eef5; font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: .02em; }
	.fsp-go { color: #7d93ad; font-size: 18px; text-align: right; }
	.fsp-board-foot { display: flex; justify-content: space-between; padding: 6px 16px 8px; border-top: 1px solid #16294a; }

	/* Stage 4: two offers */
	.fsp-offer { padding: 16px 16px 18px; background: #0c1a30; border: 1px solid rgba(255, 255, 255, .07); border-radius: 18px; text-align: left; }
	.fsp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
	.fsp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
	.fsp-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
	.fsp-chip--a { color: #e8a020; border: 1px solid rgba(232, 160, 32, .5); }
	.fsp-chip--a::before { background: #e8a020; }
	.fsp-chip--b { color: #5aa9ff; border: 1px solid rgba(90, 169, 255, .5); }
	.fsp-chip--b::before { background: #5aa9ff; }
	.fsp-chart { display: block; width: 100%; height: auto; }
	.fsp-grid { stroke: #16294a; stroke-width: 1; }
	.fsp-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
	.fsp-line--a { stroke: #e8a020; }
	.fsp-line--b { stroke: #5aa9ff; }
	.fsp-ax { fill: #7d93ad; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .1em; }
	.fsp-gap { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #16294a; }
	.fsp-gap span { color: #7d93ad; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
	.fsp-gap b { color: #e8eef5; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 36px; line-height: 1; }
	.fsp-primary { display: flex; align-items: center; justify-content: center; height: 48px; margin: 18px 0 0; border-radius: 10px; background: #e8a020; color: #060f1e !important;
		font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: .12em; text-decoration: none !important; }

	/* Stage 5: stack (#358 sizes, #359 hold + draw) */
	.fsp-s5 { padding-bottom: 0; }
	.fsp-stack { display: block; }
	.fsp-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
		height: 200px; box-sizing: border-box; margin: 0 0 12px; padding: 20px; border-radius: 18px; overflow: hidden; text-decoration: none !important;
		border: 1px solid rgba(255, 255, 255, .07); color: var(--fsp-c);
		background: linear-gradient(to top, rgba(var(--fsp-rgb), .4) 0%, rgba(var(--fsp-rgb), .1) 40%, rgba(var(--fsp-rgb), 0) 75%), #0a1628; transform-origin: 50% 0; }
	.fsp-icon { display: block; width: 64px; height: 64px; color: var(--fsp-c); }
	.fsp-card-t { margin: 12px 0 0; color: #e8eef5; font-size: 20px; font-weight: 600; line-height: 1.2; }
	.fsp-card-d { margin: 6px 0 0; color: #94a7be; font-size: 14px; line-height: 1.45; }
	.fsp-cdim { display: block; position: absolute; inset: 0; background: #060f1e; opacity: 0; pointer-events: none; z-index: 2; }
	.fsp-stack-hold { display: none; }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
	html.fsp-anim .fsp [data-fsp-in], html.fsp-anim .avi-pay-close [data-fsp-in] { transition: opacity .9s cubic-bezier(.33, 1, .68, 1), transform .7s cubic-bezier(.33, 1, .68, 1); }
	html.fsp-anim .fsp [data-fsp-in]:not(.is-in), html.fsp-anim .avi-pay-close [data-fsp-in]:not(.is-in) { opacity: 0; transform: translateY(30px); }
	.fsp-s1 { position: sticky; top: var(--fsp-top, 56px); }
	.fsp-rows.is-flip li { animation: fsp-flip .45s cubic-bezier(.33, 1, .68, 1) both; }
	@keyframes fsp-flip { from { transform: rotateX(-88deg); opacity: 0; } to { transform: none; opacity: 1; } }
	.fsp-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
	html.fsp-anim .fsp-offer:not(.is-drawn) .fsp-line { stroke-dashoffset: 1; }
	html.fsp-anim .fsp-offer.is-drawn .fsp-line { transition: stroke-dashoffset 1.6s cubic-bezier(.33, 1, .68, 1); }
	html.fsp-anim .fsp-offer.is-drawn .fsp-line--b { transition-delay: .2s; }
	.fsp-card { position: sticky; top: calc(var(--fsp-top, 56px) + var(--fsp-k, 0) * 12px); box-shadow: 0 -12px 24px rgba(6, 15, 30, .55); }
	.fsp-card:nth-last-child(2) { margin-bottom: 0; }
	.fsp-stack-hold { display: block; height: 264px; pointer-events: none; } /* #357.5: the last card lands and holds */
	.fsp-icon * { stroke-dasharray: 1; stroke-dashoffset: 0; }
	html.fsp-anim .fsp-card:not(.is-drawn) .fsp-icon * { stroke-dashoffset: 1; opacity: 0; }
	html.fsp-anim .fsp-card.is-drawn .fsp-icon * { transition: stroke-dashoffset 1.4s cubic-bezier(.33, 1, .68, 1), opacity .15s linear; }
}
