/* XGene 270/271: mobile hero. Phones only (600 px and narrower); desktop and tablet unchanged.
   271 (owner, 2 Nov 2026): panel sits right below the headline; motion made clearly visible; no empty dark box while loading. */
.xg270-bar { display: none; }

@media (max-width: 600px) {
	/* Panel right after the headline, from the first paint (server-rendered markup, no jump). */
	.x270-hg { display: flex !important; flex-direction: column; }
	.x270-hg > :not(.x251-slot) { display: contents !important; }
	.x270-hg > :not(.x251-slot) > * { order: 1; }
	.x270-hg > :not(.x251-slot) > h1 ~ *,
	.x270-hg > :not(.x251-slot) > :has(h1) ~ * { order: 3; }
	/* 273 (owner, 2 Nov 2026): the main message (the lead sentence right after the headline) stays above the panel. */
	.x270-hg > :not(.x251-slot) > h1 + p,
	.x270-hg > :not(.x251-slot) > :has(h1) + p { order: 1; }
	.x251-slot { order: 2; margin: 6px 0 22px !important; }

	/* Compact panel. */
	.x251-slot .x251 { padding: 12px 12px 10px !important; }
	.x251-slot .x251 .x251-tick,
	.x251-slot .x251 .x251-f { display: none !important; }
	.x251-slot .x251 .x251-h { margin-bottom: 6px !important; }
	.x251-slot .x251 .x251-viz { height: 196px !important; min-height: 0 !important; }

	/* No empty dark box: a light, gently shimmering panel until the diagram is drawn. */
	.x251-slot .x251:not(.x251--ready) {
		background: linear-gradient(110deg, #f4f7fb 30%, #e9eff7 45%, #f4f7fb 60%) 0 0 / 220% 100% !important;
		border-color: var(--xg-line, #dde2e8) !important; color: var(--xg-navy, #0f2a4a) !important;
		animation: x271-shimmer 1.4s linear infinite;
	}
	.x251-slot .x251:not(.x251--ready) * { color: inherit !important; }

	/* Bottom action bar. */
	.xg270-has-bar .xg270-bar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 990;
		display: flex; gap: 8px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .96);
		border-top: 1px solid var(--xg-line, #dde2e8);
		box-shadow: 0 -8px 24px -16px rgba(15, 42, 74, .35);
	}
	.xg270-bar a {
		display: flex; align-items: center; justify-content: center; min-height: 46px;
		border-radius: 10px; font: 800 15px/1.2 Inter, system-ui, sans-serif; text-align: center; text-decoration: none;
	}
	.xg270-bar__primary { flex: 1 1 auto; padding: 0 12px; background: var(--xg-coral, #f47a3c); color: #091f38; }
	.xg270-bar__book { flex: 0 0 auto; padding: 0 16px; border: 1.5px solid #c9d6e6; background: #fff; color: #0a2d84; }
	.xg270-bar a:focus-visible { outline: 3px solid #0a2d84; outline-offset: 2px; }
	/* 273: keep readable text after a tap (iOS keeps the site-wide hover colour, teal on coral). */
	.xg270-bar a.xg270-bar__primary:is(:hover, :active, :focus, :visited) { color: #091f38 !important; }
	.xg270-bar a.xg270-bar__book:is(:hover, :active, :focus, :visited) { color: #0a2d84 !important; }
	.xg270-has-bar body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
	.xg270-has-bar .xg-navigator-trigger { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}

/* Visible motion on phones: highlighted routes flow continuously. */
@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
	.x251-svg path[filter^="url"] {
		stroke-dasharray: 9 7 !important;
		animation: x271-flow .8s linear infinite !important;
	}
}
@keyframes x271-flow { to { stroke-dashoffset: -16; } }
@keyframes x271-shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) {
	.x251-slot .x251:not(.x251--ready) { animation: none; }
	/* 273: calm motion for Reduce Motion users (all screen sizes): the highlighted route glows softly; nothing travels. */
	.x251-svg path[filter^="url"] { animation: x273-glow 2.4s ease-in-out infinite; }
}
@keyframes x273-glow { 50% { stroke-opacity: .45; } }
