/*
 * Fossils Near You: stage, masthead, results panel, timeline.
 *
 * Dark space theme: near-black navy, a turquoise accent, an amber second note,
 * a display serif (Fraunces, display=optional so a late font never shifts the
 * layout) over the system sans. The theme is stripped from these pages, so there
 * is no specificity contest; everything is still scoped under .fny-body or a
 * .fny- class so nothing leaks if a stylesheet is ever shared.
 *
 * Layout contract (CONTRACT.md, "Server-rendered DOM"): main.fny-stage is
 * exactly one viewport tall (100svh). Desktop puts a ~400px glass panel on the
 * left and the timeline along the bottom. Under 900px the globe takes the top
 * 52svh, the panel becomes a bottom sheet and the timeline docks on top of it.
 * Every box that moves is sized from CSS variables, so nothing reflows when the
 * globe, the font or an ad adhesion bar arrives (CLS ~0).
 *
 * --fny-adh is set by js/fny-track.js to the height of Mediavine's adhesion bar
 * once it exists, so the timeline and the sheet ride above it.
 */

:root {
	--fny-bg: #050a1a;
	--fny-bg2: #0a1330;
	--fny-ink: #e8eefc;
	--fny-dim: #9fb0d0;
	--fny-faint: #6f82a8;
	--fny-accent: #3de0c4;
	--fny-accent-ink: #04201b;
	--fny-amber: #ffb454;
	--fny-glass: rgba(9, 17, 40, 0.68);
	--fny-glass-strong: rgba(9, 17, 40, 0.86);
	--fny-line: rgba(160, 190, 255, 0.16);
	--fny-radius: 18px;
	--fny-mast-h: 56px;
	--fny-tl-h: 68px;
	--fny-serif: Fraunces, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
	--fny-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--fny-g0: #ff8a50;
	--fny-g1: #2ec4d6;
	--fny-g2: #b794f6;
	--fny-g3: #f4d35e;
	--fny-g4: #5eb1ff;
	--fny-g5: #b5e048;
	--fny-g6: #ff8fb1;
	--fny-g7: #4fd18b;
	--fny-g8: #9aa5b8;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--fny-bg);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.fny-body {
	margin: 0;
	background: var(--fny-bg);
	color: var(--fny-ink);
	font: 16px/1.5 var(--fny-sans);
	-webkit-font-smoothing: antialiased;
}

body.fny-body a {
	color: var(--fny-accent);
}

body.fny-body :focus-visible {
	outline: 2px solid var(--fny-accent);
	outline-offset: 2px;
}

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

/* ---------------------------------------------------------------- masthead */

.fny-mast {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	height: var(--fny-mast-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 20px;
	background: linear-gradient(to bottom, rgba(5, 10, 26, 0.85), rgba(5, 10, 26, 0));
	pointer-events: none;
}

.fny-mast > * {
	pointer-events: auto;
}

.fny-logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.fny-logo img {
	width: 140px;
	height: auto;
	display: block;
}

.fny-mast-nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

body.fny-body .fny-nav-link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 12px;
	border-radius: 999px;
	color: var(--fny-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	list-style: none;
	cursor: pointer;
	transition: background 0.2s;
}

.fny-nav-link::-webkit-details-marker {
	display: none;
}

body.fny-body .fny-nav-link:hover,
.fny-menu[open] > .fny-nav-link {
	background: rgba(255, 255, 255, 0.1);
}

.fny-menu {
	position: relative;
}

.fny-menu > summary::after {
	content: '';
	margin-left: 8px;
	border: 4px solid transparent;
	border-top-color: currentColor;
	border-bottom: 0;
}

.fny-menu-list {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 50;
	min-width: 230px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--fny-glass-strong);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border: 1px solid var(--fny-line);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

body.fny-body .fny-menu-list a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--fny-ink);
	font-size: 0.9rem;
	text-decoration: none;
}

body.fny-body .fny-menu-list a:hover {
	background: rgba(61, 224, 196, 0.14);
}

/* ------------------------------------------------------------------- stage */

.fny-stage {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 540px;
	overflow: hidden;
	background: var(--fny-bg);
	isolation: isolate;
}

.fny-sky {
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.8), transparent 60%),
		radial-gradient(1px 1px at 28% 72%, rgba(255, 255, 255, 0.6), transparent 60%),
		radial-gradient(1.4px 1.4px at 44% 12%, rgba(255, 255, 255, 0.7), transparent 60%),
		radial-gradient(1px 1px at 63% 83%, rgba(255, 255, 255, 0.55), transparent 60%),
		radial-gradient(1.2px 1.2px at 78% 24%, rgba(255, 255, 255, 0.75), transparent 60%),
		radial-gradient(1px 1px at 91% 61%, rgba(255, 255, 255, 0.6), transparent 60%),
		radial-gradient(1px 1px at 5% 54%, rgba(255, 255, 255, 0.5), transparent 60%),
		radial-gradient(1200px 760px at 68% 42%, #112a60 0, #0a1840 42%, var(--fny-bg) 78%);
	transition: opacity 0.9s ease;
}

/* A planet-shaped glow stands in for the globe until WebGL is up. */
.fny-sky::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 66%;
	width: min(62vh, 52vw);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background:
		radial-gradient(circle at 34% 30%, rgba(61, 224, 196, 0.5), rgba(23, 92, 138, 0.55) 38%, rgba(8, 24, 64, 0.95) 72%);
	box-shadow: 0 0 120px 12px rgba(61, 224, 196, 0.18), inset -30px -20px 80px rgba(0, 0, 0, 0.55);
}

.fny-stage.is-ready .fny-sky {
	opacity: 0;
}

.fny-globe {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	display: block;
	opacity: 0;
	transition: opacity 0.9s ease;
	touch-action: none;
	cursor: grab;
}

.fny-globe:active {
	cursor: grabbing;
}

.fny-stage.is-ready .fny-globe {
	opacity: 1;
}

.fny-fallback {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.92;
}

.fny-noscript {
	position: absolute;
	z-index: 2;
	left: 24px;
	top: 70px;
	margin: 0;
	max-width: 280px;
	color: var(--fny-dim);
	font-size: 0.85rem;
}

/* ------------------------------------------------------------------- panel */

.fny-panel {
	position: absolute;
	z-index: 20;
	left: 20px;
	top: calc(var(--fny-mast-h) + 12px);
	bottom: calc(20px + var(--fny-adh, 0px));
	width: 400px;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, rgba(14, 25, 56, 0.74), rgba(7, 13, 32, 0.8));
	-webkit-backdrop-filter: blur(20px) saturate(1.3);
	backdrop-filter: blur(20px) saturate(1.3);
	border: 1px solid var(--fny-line);
	border-radius: var(--fny-radius);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

.fny-grip {
	display: none;
}

.fny-panel-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px 20px 28px;
	scrollbar-width: thin;
	scrollbar-color: rgba(160, 190, 255, 0.3) transparent;
}

.fny-kicker {
	margin: 0 0 6px;
	color: var(--fny-accent);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.fny-h1 {
	margin: 0 0 10px;
	color: #fff;
	font: 700 clamp(1.55rem, 2.4vw, 2.05rem) / 1.12 var(--fny-serif);
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.fny-answer {
	margin: 0 0 16px;
	color: var(--fny-ink);
	font-size: 1.02rem;
	line-height: 1.5;
}

/* The headline: the honesty-rule sentence (strong = a link into the timeline). */
.fny-headline {
	margin: -4px 0 16px;
	padding: 10px 14px;
	color: #dcfbf4;
	font: 600 1.02rem / 1.4 var(--fny-serif);
	background: linear-gradient(90deg, rgba(61, 224, 196, 0.15), rgba(61, 224, 196, 0.02));
	border-left: 2px solid var(--fny-accent);
	border-radius: 3px 12px 12px 3px;
}

.fny-headline[data-ma] {
	cursor: pointer;
	transition: background 0.25s;
}

.fny-headline[data-ma]:hover {
	background: linear-gradient(90deg, rgba(61, 224, 196, 0.24), rgba(61, 224, 196, 0.04));
}

.fny-headline.is-in {
	animation: fny-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

/* Play CTA + share: need JavaScript; the row is reserved from first paint (html.fny-js is set in the head). */
.fny-actions {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	margin: 0 0 14px;
}

html.fny-js .fny-actions {
	display: flex;
}

.fny-cta {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 40px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 14px 0 12px;
	color: #eafffb;
	font: 600 0.88rem var(--fny-sans);
	white-space: nowrap;
	background: linear-gradient(rgba(10, 22, 48, 0.92), rgba(10, 22, 48, 0.92)) padding-box,
		linear-gradient(120deg, rgba(61, 224, 196, 0.9), rgba(255, 180, 84, 0.7)) border-box;
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.25s;
}

.fny-cta span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.fny-cta svg {
	flex: 0 0 auto;
	color: var(--fny-accent);
}

.fny-cta:hover {
	box-shadow: 0 0 0 4px rgba(61, 224, 196, 0.12), 0 8px 24px rgba(61, 224, 196, 0.18);
}

.fny-cta:active {
	transform: scale(0.98);
}

.fny-cta.is-pulse::after {
	content: '';
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	pointer-events: none;
	animation: fny-pulse 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1 both;
}

@keyframes fny-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(61, 224, 196, 0.55);
	}

	100% {
		box-shadow: 0 0 0 14px rgba(61, 224, 196, 0);
	}
}

.fny-share {
	display: flex;
	flex: 0 0 auto;
	gap: 6px;
}

.fny-share-btn {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	padding: 0;
	color: var(--fny-ink);
	font: 600 0.7rem var(--fny-sans);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--fny-line);
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.fny-share-btn[hidden] {
	display: none;
}

.fny-share-btn:hover {
	color: #fff;
	background: rgba(61, 224, 196, 0.16);
	border-color: rgba(61, 224, 196, 0.5);
}

.fny-share-btn:active {
	transform: scale(0.94);
}

.fny-share-btn[aria-busy='true'] {
	opacity: 0.55;
	cursor: progress;
}

/* Group filter above the cards. */
.fny-tabs {
	display: flex;
	gap: 6px;
	margin: 0 -20px 10px;
	padding: 0 20px 2px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-mask: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
	mask: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}

.fny-tabs::-webkit-scrollbar {
	display: none;
}

.fny-tab {
	flex: 0 0 auto;
	height: 30px;
	padding: 0 12px;
	color: var(--fny-dim);
	font: 600 0.78rem var(--fny-sans);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--fny-line);
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.fny-tab:hover {
	color: #fff;
	border-color: rgba(160, 190, 255, 0.4);
}

.fny-tab[aria-pressed='true'] {
	color: var(--fny-accent-ink);
	background: var(--fny-accent);
	border-color: var(--fny-accent);
}

/* The way down to the article. */
body.fny-body .fny-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 24px 0 0;
	padding: 12px 14px;
	color: var(--fny-dim);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px dashed rgba(160, 190, 255, 0.28);
	border-radius: 12px;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
}

body.fny-body .fny-more:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(61, 224, 196, 0.5);
}

/* ------------------------------------------------------------------ search */

/* Search needs JavaScript: only shown once it can work, with its height reserved from first paint. */
.fny-search {
	display: none;
	margin: 0 0 14px;
}

html.fny-js .fny-search {
	display: block;
}

.fny-search-row {
	display: flex;
	gap: 8px;
}

.fny-q {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding: 0 14px;
	color: #fff;
	font: 1rem var(--fny-sans);
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--fny-line);
	border-radius: 12px;
	-webkit-appearance: none;
	appearance: none;
}

.fny-q::placeholder {
	color: var(--fny-faint);
}

.fny-q:focus {
	outline: none;
	border-color: var(--fny-accent);
	box-shadow: 0 0 0 3px rgba(61, 224, 196, 0.22);
}

.fny-locate {
	flex: 0 0 46px;
	height: 46px;
	display: inline-grid;
	place-items: center;
	color: var(--fny-accent);
	background: rgba(61, 224, 196, 0.1);
	border: 1px solid rgba(61, 224, 196, 0.35);
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.fny-locate:hover {
	background: rgba(61, 224, 196, 0.2);
}

.fny-locate:active {
	transform: scale(0.95);
}

.fny-suggest {
	margin: 6px 0 0;
	padding: 4px;
	list-style: none;
	max-height: 260px;
	overflow-y: auto;
	background: rgba(8, 14, 34, 0.96);
	border: 1px solid var(--fny-line);
	border-radius: 12px;
}

.fny-suggest[hidden] {
	display: none;
}

.fny-suggest li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 10px;
	border-radius: 8px;
	color: var(--fny-ink);
	font-size: 0.95rem;
	cursor: pointer;
}

.fny-suggest li small {
	color: var(--fny-faint);
	font-size: 0.8rem;
}

.fny-suggest li[aria-selected='true'],
.fny-suggest li:hover {
	background: rgba(61, 224, 196, 0.16);
}

.fny-search-opts {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.fny-rd-l {
	color: var(--fny-dim);
	font-size: 0.85rem;
}

.fny-rd {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 10px;
	color: var(--fny-ink);
	font: 0.95rem var(--fny-sans);
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--fny-line);
	border-radius: 10px;
}

.fny-rd option {
	color: #111;
}

.fny-go {
	height: 40px;
	padding: 0 16px;
	color: var(--fny-accent-ink);
	font: 700 0.9rem var(--fny-sans);
	background: linear-gradient(135deg, var(--fny-accent), #7ef0dc);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s;
}

.fny-go:hover {
	box-shadow: 0 6px 20px rgba(61, 224, 196, 0.35);
}

.fny-go:active {
	transform: scale(0.97);
}

.fny-go[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.fny-notice {
	margin: 0 0 14px;
	padding: 10px 12px;
	color: #ffe2b8;
	font-size: 0.9rem;
	background: rgba(255, 180, 84, 0.12);
	border: 1px solid rgba(255, 180, 84, 0.35);
	border-radius: 10px;
}

.fny-notice[hidden] {
	display: none;
}

.fny-notice a,
.fny-notice button {
	color: var(--fny-amber);
}

.fny-notice button {
	padding: 0;
	font: inherit;
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

.fny-results.is-loading {
	opacity: 0.45;
	transition: opacity 0.2s;
}

/* ----------------------------------------------------------------- results */

.fny-label {
	margin: 20px 0 8px;
	color: var(--fny-faint);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.fny-results > .fny-label:first-child {
	margin-top: 4px;
}

.fny-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.fny-stat {
	margin: 0;
	padding: 10px 10px 9px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--fny-line);
	border-radius: 12px;
}

.fny-stat b {
	display: block;
	color: #fff;
	font: 700 1.3rem / 1.1 var(--fny-serif);
	font-variant-numeric: tabular-nums;
}

.fny-stat span {
	display: block;
	margin-top: 3px;
	color: var(--fny-dim);
	font-size: 0.72rem;
	line-height: 1.25;
}

.fny-symlist {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 6px;
}

.fny-symlist li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	padding: 10px 12px;
	background: rgba(255, 180, 84, 0.08);
	border: 1px solid rgba(255, 180, 84, 0.28);
	border-radius: 12px;
}

.fny-sym-k {
	color: var(--fny-amber);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fny-sym-v {
	color: #fff;
	font-family: var(--fny-serif);
	font-size: 1.05rem;
}

.fny-sym-y {
	color: var(--fny-dim);
	font-size: 0.85rem;
}

.fny-sym-src {
	margin-left: auto;
	font-size: 0.8rem;
}

.fny-cards {
	display: grid;
	gap: 8px;
}

.fny-card {
	display: flex;
	gap: 12px;
	padding: 10px;
	background: rgba(255, 255, 255, 0.045);
	border: 1px solid var(--fny-line);
	border-radius: 14px;
	transition: background 0.2s, border-color 0.2s, transform 0.2s;
	animation: fny-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
	animation-delay: calc(var(--i, 0) * 55ms);
}

.fny-card:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(61, 224, 196, 0.4);
	transform: translateY(-1px);
}

.fny-card-art {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 12px;
	overflow: hidden;
}

.fny-card-art img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 6px;
	filter: brightness(0) invert(1);
	opacity: 0.9;
}

.fny-icon {
	width: 56px;
	height: 56px;
	display: block;
	background: var(--gc, var(--fny-g8));
	opacity: 0.85;
	-webkit-mask: var(--glyph) center / 62% no-repeat;
	mask: var(--glyph) center / 62% no-repeat;
}

.fny-icon[data-grp='0'] { --gc: var(--fny-g0); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 17l3-1 1-5 2 3 2-6 2 6 2-3 1 4 5 1v3h-4v3h-2v-3h-5v3H8v-3H5v3H3z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='1'] { --gc: var(--fny-g1); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 15c2 0 2-2 5-2s3 2 5 2 3-2 5-2 3 2 5 2v3c-2 0-2-2-5-2s-3 2-5 2-3-2-5-2-3 2-5 2zM14 4l4 6h-9z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='2'] { --gc: var(--fny-g2); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 8c4 0 7 2 10 7 3-5 6-7 10-7-2 4-5 6-10 6S4 12 2 8z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='3'] { --gc: var(--fny-g3); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm10 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM3 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm18 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM12 12c-3 0-6 3-6 6 0 2 2 2 3 1 2-1 4-1 6 0 1 1 3 1 3-1 0-3-3-6-6-6z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='4'] { --gc: var(--fny-g4); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 12c3-5 9-6 13-3l5-3v12l-5-3c-4 3-10 2-13-3z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='5'] { --gc: var(--fny-g5); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 15c3 0 3-4 7-4s3 2 6 2 3-4 7-4v3c-3 0-3 3-6 3s-3-2-6-2-4 4-8 4z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='6'] { --gc: var(--fny-g6); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm0 4a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm0 3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='7'] { --gc: var(--fny-g7); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20C4 10 10 4 20 4c0 10-6 16-16 16z'/%3E%3C/svg%3E"); }
.fny-icon[data-grp='8'] { --gc: var(--fny-g8); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 10-8 10-8-10z'/%3E%3C/svg%3E"); }

.fny-card-body {
	min-width: 0;
}

.fny-card-name {
	margin: 0;
	color: #fff;
	font: 700 1.05rem / 1.2 var(--fny-serif);
}

.fny-card-common {
	margin-left: 4px;
	color: var(--fny-dim);
	font: 400 0.8rem var(--fny-sans);
}

.fny-card-line {
	margin: 3px 0 6px;
	color: var(--fny-ink);
	font-size: 0.88rem;
	line-height: 1.4;
}

.fny-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	color: var(--fny-dim);
	font-size: 0.75rem;
}

.fny-card-period {
	color: var(--fny-ink);
	font-weight: 600;
}

.fny-pill {
	padding: 1px 8px;
	color: #0a0f1f;
	font-weight: 700;
	background: var(--fny-g8);
	border-radius: 999px;
}

.fny-pill[data-grp='0'] { background: var(--fny-g0); }
.fny-pill[data-grp='1'] { background: var(--fny-g1); }
.fny-pill[data-grp='2'] { background: var(--fny-g2); }
.fny-pill[data-grp='3'] { background: var(--fny-g3); }
.fny-pill[data-grp='4'] { background: var(--fny-g4); }
.fny-pill[data-grp='5'] { background: var(--fny-g5); }
.fny-pill[data-grp='6'] { background: var(--fny-g6); }
.fny-pill[data-grp='7'] { background: var(--fny-g7); }

.fny-chips {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.fny-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 32px;
	padding: 0 11px 0 9px;
	color: var(--fny-ink);
	font: 600 0.8rem var(--fny-sans);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--fny-line);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	animation: fny-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.fny-chip::before {
	content: '';
	width: 9px;
	height: 9px;
	background: var(--c, var(--fny-accent));
	border-radius: 50%;
}

.fny-chip:hover,
.fny-chip.is-active {
	background: rgba(255, 255, 255, 0.14);
	border-color: var(--c, var(--fny-accent));
}

.fny-chip-n {
	color: var(--fny-dim);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.fny-land {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 6px;
}

.fny-land li {
	padding: 9px 12px;
	color: var(--fny-ink);
	font-size: 0.88rem;
	line-height: 1.4;
	background: rgba(255, 255, 255, 0.04);
	border-left: 3px solid var(--fny-accent);
	border-radius: 4px 10px 10px 4px;
}

.fny-land b {
	margin-right: 8px;
	color: #fff;
}

.fny-land span {
	display: inline-block;
	margin-right: 8px;
	color: var(--fny-faint);
	font-size: 0.78rem;
}

.fny-state-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 4px 8px;
}

body.fny-body a.fny-state,
body.fny-body button.fny-state {
	width: 100%;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
	text-align: left;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 8px 10px;
	color: var(--fny-ink);
	font-size: 0.9rem;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid transparent;
	border-radius: 10px;
	transition: background 0.2s, border-color 0.2s;
}

body.fny-body a.fny-state:hover,
body.fny-body button.fny-state:hover,
body.fny-body button.fny-state:focus-visible {
	background: rgba(61, 224, 196, 0.12);
	border-color: rgba(61, 224, 196, 0.4);
}

.fny-state-n {
	color: var(--fny-faint);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- timeline */

.fny-timeline {
	position: absolute;
	z-index: 20;
	left: 444px;
	right: 24px;
	bottom: calc(20px + var(--fny-adh, 0px));
	height: var(--fny-tl-h);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px 16px 8px 12px;
	background: var(--fny-glass);
	-webkit-backdrop-filter: blur(20px) saturate(1.3);
	backdrop-filter: blur(20px) saturate(1.3);
	border: 1px solid var(--fny-line);
	border-radius: var(--fny-radius);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 44px rgba(0, 0, 0, 0.4);
}

.fny-play {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	color: var(--fny-accent-ink);
	background: linear-gradient(135deg, var(--fny-accent), #7ef0dc);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s;
}

.fny-play:hover {
	box-shadow: 0 0 0 6px rgba(61, 224, 196, 0.18);
}

.fny-play:active {
	transform: scale(0.94);
}

.fny-play .fny-ico-pause,
.fny-play[aria-pressed='true'] .fny-ico-play {
	display: none;
}

.fny-play[aria-pressed='true'] .fny-ico-pause {
	display: block;
}

.fny-tl-main {
	flex: 1;
	min-width: 0;
}

.fny-tl-read {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0 0 4px;
	white-space: nowrap;
	overflow: hidden;
}

.fny-tl-ma {
	min-width: 2.4ch;
	color: #fff;
	font: 700 1.15rem / 1 var(--fny-serif);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.fny-tl-unit {
	color: var(--fny-dim);
	font-size: 0.78rem;
}

.fny-tl-period {
	display: inline-grid;
	margin-left: auto;
	color: var(--fny-amber);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.fny-tl-period > span {
	grid-area: 1 / 1;
	justify-self: end;
	transition: opacity 0.3s ease, transform 0.3s ease;
	animation: fny-fade-up 0.3s ease backwards;
}

.fny-tl-period > span.is-out {
	opacity: 0;
	transform: translateY(-5px);
}

@keyframes fny-fade-up {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
}

.fny-tl-rail {
	position: relative;
	height: 30px;
	cursor: ew-resize;
	touch-action: none;
	outline-offset: 4px;
	-webkit-user-select: none;
	user-select: none;
}

.fny-tl-bands {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 14px;
	overflow: hidden;
	border-radius: 7px;
}

.fny-band {
	position: absolute;
	top: 0;
	height: 100%;
	background: var(--c);
	opacity: 0.85;
	overflow: hidden;
	border-right: 1px solid rgba(5, 10, 26, 0.6);
}

.fny-band span {
	position: absolute;
	left: 4px;
	top: 0;
	color: rgba(5, 10, 26, 0.85);
	font-size: 0.6rem;
	font-weight: 700;
	line-height: 14px;
	white-space: nowrap;
}

.fny-band.is-narrow span {
	display: none;
}

.fny-tl-ticks {
	position: absolute;
	left: 0;
	right: 0;
	top: 16px;
	height: 14px;
}

.fny-tick {
	position: absolute;
	top: 0;
	padding: 0 2px;
	color: var(--fny-faint);
	font: 600 0.62rem / 14px var(--fny-sans);
	background: none;
	border: 0;
	transform: translateX(-50%);
	cursor: pointer;
}

.fny-tick:last-child {
	transform: translateX(-100%);
}

.fny-tick:hover {
	color: #fff;
}

.fny-tick[data-ma='66'] {
	color: var(--fny-amber);
}

/* The handle rides a full-width track moved by transform (no layout per frame). */
.fny-tl-pos {
	position: absolute;
	left: 0;
	top: -3px;
	width: 100%;
	height: 20px;
	pointer-events: none;
	will-change: transform;
	transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fny-timeline.is-live .fny-tl-pos {
	transition: none;
}

.fny-tl-handle {
	position: absolute;
	left: -1.5px;
	top: 0;
	width: 3px;
	height: 20px;
	background: #fff;
	border-radius: 2px;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 0 16px rgba(61, 224, 196, 0.95);
}

.fny-tl-handle::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -6px;
	width: 13px;
	height: 13px;
	margin-left: -6.5px;
	background: radial-gradient(circle at 40% 35%, #fff, #cffaf1);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(61, 224, 196, 0.22);
	transition: transform 0.2s, box-shadow 0.2s;
}

.fny-tl-rail:hover .fny-tl-handle::before,
.fny-tl-rail:focus-visible .fny-tl-handle::before,
.fny-timeline.is-live .fny-tl-handle::before {
	transform: scale(1.25);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(61, 224, 196, 0.28);
}

body.fny-body .fny-tl-rail:focus-visible {
	outline: none;
}

.fny-tl-rail:focus-visible .fny-tl-bands {
	box-shadow: 0 0 0 2px var(--fny-accent);
}

/* ----------------------------------------------------------- phones: sheet */

@media (max-width: 899px) {
	.fny-mast {
		padding: 0 12px;
	}

	.fny-logo img {
		width: 118px;
	}

	.fny-stage {
		/* where the sheet sits before boot measures the real peek: its top at 52svh */
		--sheet-y0: calc(52svh - var(--fny-mast-h) - var(--fny-tl-h) - 14px);
	}

	.fny-globe,
	.fny-fallback {
		inset: 0 0 auto 0;
		height: 52svh;
		/* a vertical swipe on the globe scrolls the page; a horizontal one turns the globe */
		touch-action: pan-y;
	}

	.fny-sky::after {
		top: 26svh;
		left: 50%;
		width: min(40svh, 74vw);
	}

	.fny-panel {
		left: 0;
		right: 0;
		top: calc(var(--fny-mast-h) + var(--fny-tl-h) + 14px);
		bottom: var(--fny-adh, 0px);
		width: auto;
		border-radius: 24px 24px 0 0;
		border-bottom: 0;
		background: linear-gradient(180deg, rgba(12, 22, 50, 0.94), rgba(6, 12, 30, 0.97));
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 -18px 50px rgba(0, 0, 0, 0.5);
		transform: translate3d(0, var(--sheet-y0), 0);
		will-change: transform;
		touch-action: none;
	}

	.fny-grip {
		flex: 0 0 24px;
		display: grid;
		place-items: center;
		width: 100%;
		padding: 0;
		background: none;
		border: 0;
		cursor: grab;
		touch-action: none;
	}

	.fny-grip span {
		width: 40px;
		height: 5px;
		background: rgba(255, 255, 255, 0.28);
		border-radius: 3px;
		transition: background 0.2s, width 0.2s;
	}

	.fny-stage.is-dragging .fny-grip span {
		width: 52px;
		background: rgba(255, 255, 255, 0.5);
	}

	.fny-panel-scroll {
		overflow: hidden;
		padding: 2px 16px calc(24px + env(safe-area-inset-bottom));
	}

	.fny-stage.is-full .fny-panel-scroll {
		overflow-y: auto;
		touch-action: pan-y;
	}

	.fny-tabs {
		margin: 0 -16px 10px;
		padding: 0 16px 2px;
	}

	.fny-h1 {
		font-size: 1.6rem;
	}

	.fny-timeline {
		left: 8px;
		right: 8px;
		top: calc(var(--fny-mast-h) + 6px);
		bottom: auto;
		padding: 6px 12px 6px 8px;
		gap: 10px;
		transform: translate3d(0, var(--sheet-y0), 0);
		will-change: transform;
	}

	.fny-play {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}

	.fny-tick[data-ma='400'],
	.fny-tick[data-ma='200'],
	.fny-tick[data-ma='100'] {
		display: none;
	}

	/* Without JavaScript there is no sheet: the panel is page flow under the globe. */
	html:not(.fny-js) .fny-stage {
		height: auto;
		min-height: 0;
		padding: calc(52svh + 8px) 0 0;
		overflow: visible;
	}

	html:not(.fny-js) .fny-timeline {
		top: calc(52svh - var(--fny-tl-h) - 8px);
		transform: none;
	}

	html:not(.fny-js) .fny-panel {
		position: relative;
		top: auto;
		margin: 0 8px;
		border-radius: 24px;
		transform: none;
	}

	html:not(.fny-js) .fny-panel-scroll {
		overflow: visible;
	}

	html:not(.fny-js) .fny-grip {
		display: none;
	}
}

@media (max-width: 899px) and (max-height: 640px) {
	.fny-stage {
		min-height: 520px;
	}
}

/* -------------------------------------------------------- modes and motion */

body.fny-body.fny-clean .fny-mast,
body.fny-body.fny-clean .fny-panel,
body.fny-body.fny-clean .fny-timeline,
body.fny-body.fny-clean .fny-article,
body.fny-body.fny-clean .fny-foot,
body.fny-body.fny-clean .fny-noscript {
	display: none;
}

body.fny-body.fny-clean .fny-stage,
body.fny-body.fny-embed .fny-stage {
	height: 100vh;
	height: 100svh;
}

body.fny-body.fny-clean .fny-globe,
body.fny-body.fny-clean .fny-fallback {
	inset: 0;
	height: 100%;
}

@keyframes fny-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms;
		animation-delay: 0ms;
		animation-iteration-count: 1;
		transition-duration: 0.001ms;
		scroll-behavior: auto;
	}
}
