/* /find-an-aviation-medical-examiner/ hub + search on phones (< 768 px), owner INBOX #354. Markup: inc/fsf-came-phone.php;
   behaviour: assets/js/fsf-came-phone.js. Gold leads; the only section colour in the copy is "REAL PRICES." (#5aa9ff).
   Desktop unchanged: the new stages are hidden from 768 px up; the legacy hub blocks are hidden below 768 px only on
   pages with body.fsm-on. */

.fsm-stage, .fsm-dim { display: none; }

@media all { /* #425: every width (was max-width: 767px); desktop layout in avi-came-410.css (min-width: 768px) */
	/* ── Legacy hub blocks replaced on phones (the hub H1 stays for search engines and screen readers) ── */
	body.fsm-on .me-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; }
	body.fsm-on .came-list-page, body.fsm-on .came-xl-divider, body.fsm-on .avi-jobs-chips { display: none !important; }

	.fsm-stage { display: block; box-sizing: border-box; padding: 56px 20px 24px; background: #060f1e; text-align: center; font-family: 'DM Sans', sans-serif; }
	.fsm-h2 { margin: 0 0 12px; padding: 0; border: 0; color: #fff; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
	.fsm-h2--big { font-size: min(52px, calc((100vw - 40px) / 6.4)); line-height: .95; }
	.fsm-sub { margin: 18px auto 0; max-width: 360px; color: #94a7be; font-size: 16px; line-height: 1.5; }
	.fsm-sub--sm { margin: 0 auto 24px; font-size: 15px; }
	.fsm-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
	.fsm-quiet { display: inline-flex; align-items: center; min-height: 28px; padding: 0; background: none !important; border: 0 !important; box-shadow: none !important;
		color: #7d93ad !important; font-family: 'DM Sans', sans-serif; font-size: 13px; text-decoration: none !important; cursor: pointer; }
	.fsm-quiet[hidden] { display: none; }
	.fsm-quiet:hover, .fsm-quiet:focus-visible { color: #e8eef5 !important; }
	.fsm-stage a:focus-visible, .fsm-stage button:focus-visible { outline: 2px solid #e8a020; outline-offset: 2px; }
	/* Standard secondary button (#343) */
	.fsm-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px; box-sizing: border-box; padding: 0 16px; margin: 0;
		background: transparent !important; border: 1px solid #2a4266 !important; border-radius: 10px !important; box-shadow: none !important; /* #418: neutral */
		color: #fff !important; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none !important; cursor: pointer;
		transition: border-color .15s; -webkit-tap-highlight-color: transparent; }
	.fsm-btn svg { color: #e8eef5; flex: 0 0 auto; }
	@media (hover: hover) and (pointer: fine) { .fsm-btn:hover { border-color: #7d93ad !important; color: #fff !important; } } /* #418: no gold edge, icon in the label colour */
	.fsm-btn[aria-busy="true"] { opacity: .7; }

	/* ── Stage 1 ── */
	.fsm-s1 { display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - 100px); padding: 40px 20px 56px; }
	.fsm-eyebrow { margin: 0 0 16px; color: #e8a020; font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.5; letter-spacing: .24em; text-transform: uppercase; }
	/* "EVERY EXAMINER." ~ 7.0 em in Bebas: ~64 px max, never wider than the screen */
	.fsm-h1 { margin: 0; color: #fff; font-family: 'Bebas Neue', sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .02em;
		font-size: min(64px, calc((100vw - 40px) / 6.2)); line-height: .95; }
	.fsm-h1 > span { display: block; }
	.fsm-blue { color: #5aa9ff; }
	.fsm-proof { list-style: none; margin: 26px auto 0; padding: 0; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
	.fsm-proof li { position: relative; margin: 0; padding: 0 0 0 16px; color: #7d93ad; font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; }
	.fsm-proof li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: #e8a020; }

	/* ── Stage 2: near me + search + board ── */
	.fsm-search { position: relative; margin: 12px 0 0; text-align: left; }
	.fsm-search-icon { position: absolute; left: 18px; top: 19px; color: #e8eef5; pointer-events: none; } /* #355.3: white magnifier */
	body .fsm-search input.fsm-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-family: 'DM Sans', sans-serif; font-size: 17px; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s;
	}
	body .fsm-search input.fsm-input[type="search"]::placeholder { color: #7d93ad !important; opacity: 1; }
	body .fsm-search input.fsm-input[type="search"]:focus { outline: none; border-color: #e8a020 !important; box-shadow: 0 0 0 3px rgba(232, 160, 32, .18) !important; }
	.fsm-near-msg { margin: 14px 0 0; color: #94a7be; font-size: 14px; }
	.fsm-near-msg[hidden] { display: none; }
	.fsm-board { margin: 20px 0 0; background: #070e1b; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; overflow: hidden; text-align: left; scroll-margin-top: 64px; }
	.fsm-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 8px 10px 8px 16px; box-sizing: border-box; border-bottom: 1px solid #16294a; }
	.fsm-board-t { color: #e8a020; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; min-width: 0; }
	.fsm-switch { display: flex; flex: 0 0 auto; border: 1px solid #2a4266; border-radius: 999px; padding: 2px; }
	.fsm-switch[hidden], .fsm-switch-b[hidden] { display: none; }
	.fsm-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; }
	.fsm-switch-b.is-on { background: #e8a020 !important; color: #060f1e !important; }
	.fsm-rows { list-style: none; margin: 0; padding: 0; perspective: 800px; }
	.fsm-rows li { margin: 0; padding: 0; border-top: 1px solid #16294a; transform-origin: 50% 0; backface-visibility: hidden; }
	.fsm-rows li:first-child { border-top: 0; }
	.fsm-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 12px; column-gap: 10px; align-items: center; min-height: 64px; box-sizing: border-box; padding: 8px 14px; text-decoration: none !important; }
	.fsm-dist { color: #e8a020; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .04em; }
	.fsm-who { display: flex; flex-direction: column; min-width: 0; }
	.fsm-who b { color: #e8eef5; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.fsm-clinic { color: #94a7be; font-weight: 400; }
	.fsm-ok, .fsm-no { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
	.fsm-ok { color: #e8a020; }
	.fsm-no { color: #7d93ad; }
	.fsm-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
	.fsm-price b { color: #e8eef5; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 24px; letter-spacing: .02em; }
	.fsm-price i { margin-top: 2px; color: #7d93ad; font-family: 'JetBrains Mono', monospace; font-size: 9px; font-style: normal; letter-spacing: .14em; text-transform: uppercase; }
	.fsm-price--ask b { color: #7d93ad; font-size: 20px; }
	.fsm-go { color: #7d93ad; font-size: 18px; text-align: right; }
	.fsm-row--city { grid-template-columns: minmax(0, 1fr) 36px auto 12px; min-height: 52px; font-family: 'JetBrains Mono', monospace; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
	.fsm-city { color: #e8eef5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.fsm-prov { color: #7d93ad; }
	.fsm-cn { color: #e8a020; text-align: right; }
	.fsm-empty { padding: 18px 16px; color: #94a7be; font-size: 14px; }
	.fsm-board-foot { display: flex; justify-content: space-between; gap: 12px; padding: 6px 16px 8px; border-top: 1px solid #16294a; }
	.fsm-board-foot:not(:has(:not([hidden]))) { display: none; }

	/* ── Stage 3: feature-card stack ── */
	.fsm-s3 { padding-bottom: 32px; }
	.fsm-stack { display: block; }
	.fsm-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
		height: 200px; /* #358: 200 px (was 248) */ 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(--fsm-c);
		background: linear-gradient(to top, rgba(var(--fsm-rgb), .4) 0%, rgba(var(--fsm-rgb), .1) 40%, rgba(var(--fsm-rgb), 0) 75%), #0a1628; transform-origin: 50% 0; }
	.fsm-card:last-child { margin-bottom: 0; }
	.fsm-icon { display: block; width: 64px; height: 64px; /* #358: 64 px (was 88) */ color: var(--fsm-c); }
	.fsm-card-t { margin: 12px 0 0; color: #e8eef5; font-size: 20px; /* #358: 20 px (was 22) */ font-weight: 600; line-height: 1.2; }
	.fsm-card-d { margin: 6px 0 0; color: #94a7be; font-size: 14px; line-height: 1.45; }
	.fsm-dim { display: block; position: absolute; inset: 0; background: #060f1e; opacity: 0; pointer-events: none; z-index: 2; }

	/* ── Closing ── */
	/* #358: the closing is the stack's room to finish (shorter 200 px cards made the page end before the last card
	   landed): one screen - (header 56 + 2 x 12 px + the 200 px card) - this stage's 32 px bottom padding - the bottom row
	   (~97 px) + 120 px to scroll away = 100svh - 290 px. Content centred in it. */
	.fsm-close { display: flex; flex-direction: column; justify-content: center; align-items: stretch; box-sizing: border-box; min-height: 0; padding: 64px 20px 56px; } /* #359.3: the stack spacer gives the room now */
	.fsm-btn--full { width: 100%; }
	.fsm-note { margin: 12px 0 0; color: #7d93ad; font-size: 13px; line-height: 1.45; }
}

/* #492: the note under "Update clinic info" = two centred lines, 6 px apart, phones + desktop */
.fsm-note { text-align: center; }
.fsm-note .fsm-note-l { display: block; }
.fsm-note .fsm-note-l + .fsm-note-l { margin-top: 6px; }

@media (prefers-reduced-motion: no-preference) { /* #425: every width */
	html.fsm-anim [data-fsm-in] { transition: opacity .9s cubic-bezier(.33, 1, .68, 1), transform .7s cubic-bezier(.33, 1, .68, 1); }
	html.fsm-anim [data-fsm-in]:not(.is-in) { opacity: 0; transform: translateY(30px); }
	/* H87 (speed audit 2026-11-19): the first screen (the LCP text) is never hidden, so it paints in full on the first frame; later stages still play in */
	html.fsm-anim [data-fsm-load] [data-fsm-in]:not(.is-in) { opacity: 1; transform: none; }
	.fsm-rows.is-flip li { animation: fsm-flip .45s cubic-bezier(.33, 1, .68, 1) both; }
	@keyframes fsm-flip { from { transform: rotateX(-88deg); opacity: 0; } to { transform: none; opacity: 1; } }
	.fsm-card { position: sticky; top: calc(var(--fsm-top, 56px) + var(--fsm-k, 0) * 12px); box-shadow: 0 -12px 24px rgba(6, 15, 30, .55); transition: top .25s ease; }
	.fsm-icon * { stroke-dasharray: 1; stroke-dashoffset: 0; }
	/* #359: hidden (not a row of stray round-cap dots) until drawn */
	html.fsm-anim .fsm-card:not(.is-drawn) .fsm-icon * { stroke-dashoffset: 1; opacity: 0; }
	html.fsm-anim .fsm-card.is-drawn .fsm-icon * { transition: stroke-dashoffset 1.4s cubic-bezier(.33, 1, .68, 1), opacity .15s linear; }
}
/* #359.3: the stack's hold: a spacer ELEMENT after the last card (sticky ignores padding), about one card high, so the
   last card lands and holds before the stack scrolls away. Phones with motion only. */
.fsm-stack-hold { display: none; }
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
	.fsm-stack-hold { display: block; height: 200px; pointer-events: none; }
	.fsm-card:nth-last-child(2) { margin-bottom: 0; }
}
