/* Faction identity on the Decks screens (Theo, 23 Nov 2026). Drawn by faction.js; this file is its colours and motion.
   Each faction has: --fac its colour, --fac-ink a lighter tint for words, --fac-base the dark its screens sit on.
   To retune a faction, change its three colours here. To change what its backdrop draws, see DRAW in faction.js. */

[data-fac="APO"] { --fac: #D4A72C; --fac-ink: #F2D272; --fac-base: #110C05; }
[data-fac="BLT"] { --fac: #4CB84C; --fac-ink: #8FE8A6; --fac-base: #020908; }
[data-fac="CON"] { --fac: #22C3D8; --fac-ink: #6BE3F2; --fac-base: #03080B; }
[data-fac="DEF"] { --fac: #E0433A; --fac-ink: #FF8376; --fac-base: #100706; }
[data-fac="DUN"] { --fac: #C27A2E; --fac-ink: #EBAA63; --fac-base: #120B06; }
[data-fac="TRN"] { --fac: #9A5CE0; --fac-ink: #C3A0FF; --fac-base: #0C0817; }

/* ---------------------------------------------------------------- the emblem, wherever it is used */
.plate2 .em { position: absolute; top: clamp(10px, 1vw, 16px); left: clamp(10px, 1vw, 16px); width: clamp(30px, 2.6vw, 44px); aspect-ratio: 1; color: var(--fac-ink); filter: drop-shadow(0 2px 6px rgba(14, 10, 28, .9)); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.plate2 .em svg, .crumbs .cem svg, .fb-mark svg, .fi-em svg, .fachead .fem svg { display: block; width: 100%; height: 100%; }
.plate2.locked .em { color: var(--muted); }
.plate2:hover .em, .plate2:focus-visible .em { transform: scale(1.12); }
.fplates .plate2[data-fac]:hover, .fplates .plate2[data-fac]:focus-visible { box-shadow: 0 0 0 1px var(--fac), 0 10px 26px rgba(14, 10, 28, .5); }
.crumbs .cem { align-self: center; width: 1.5em; aspect-ratio: 1; color: var(--fac-ink); }

/* ---------------------------------------------------------------- inside a faction: its colour on the screen's own parts */
#p-decks[data-fac] .crumbs .at { color: var(--fac-ink); }
#p-decks[data-fac] .crumbs .sep { color: var(--fac); opacity: .7; }
#p-decks[data-fac] .plate2 { box-shadow: 0 0 0 1px color-mix(in srgb, var(--fac) 26%, transparent), 0 14px 34px rgba(0, 0, 0, .6); }
#p-decks[data-fac] .plate2:hover, #p-decks[data-fac] .plate2:focus-visible { box-shadow: 0 0 0 1px var(--fac), 0 18px 44px rgba(0, 0, 0, .7); }
#p-decks[data-fac] .plate2 .id { color: var(--fac-ink); }
#p-decks[data-fac] .deckinfo h2 { color: var(--fac-ink); }
#p-decks[data-fac] .deckinfo h1 { padding-bottom: 12px; background: linear-gradient(var(--fac), var(--fac)) 0 100% / 56px 2px no-repeat; }
#p-decks[data-fac] .cards h2 { color: var(--fac-ink); background: linear-gradient(180deg, var(--fac-base) 70%, transparent); }
#p-decks[data-fac] .cards h2 span { color: var(--muted); }
/* the faction's own page: its name over its backdrop, then its four decks */
.facpage { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: clamp(12px, 2.2vh, 26px); min-height: 0; }
.fachead { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); padding: clamp(6px, 1.6vh, 20px) 0 clamp(2px, .8vh, 10px); }
.fachead .fem { flex: none; width: clamp(54px, 9.5vh, 92px); aspect-ratio: 1; color: var(--fac-ink); filter: drop-shadow(0 0 16px color-mix(in srgb, var(--fac) 60%, transparent)); }
.homepage .fachead h1 { font-size: clamp(24px, 3.3vw, 52px); letter-spacing: .1em; text-shadow: 0 2px 26px rgba(0, 0, 0, .8); }
.fachead p { margin: 8px 0 0; max-width: 72ch; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.45; color: var(--ink); }
.fachead p b { margin-right: .5em; font-weight: 600; color: var(--fac-ink); }
.facpage .dplates { min-height: 0; }
#p-decks[data-fac] ::selection { background: var(--fac); color: #06040C; }
#p-decks[data-fac] { scrollbar-color: var(--fac) transparent; }

/* ---------------------------------------------------------------- the backdrop
   Back to front: the faction's hero picture nearly lost in the dark, the drawing, the emblem as a watermark,
   a scrim that keeps the words readable, film grain. The painting and the drawing lean a little with the mouse. */
.facbg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--fac-base, var(--bg)); color: var(--fac); opacity: 0; transition: opacity .7s cubic-bezier(.16, 1, .3, 1); pointer-events: none; }
#p-decks[data-fac] .facbg { opacity: 1; }
.fb-art { position: absolute; inset: -3%; background: var(--art) 50% 32% / cover no-repeat; opacity: .26; filter: saturate(.6) contrast(1.15); transform: translate(calc(var(--px, 0) * -8px), calc(var(--py, 0) * -6px)); transition: transform .9s cubic-bezier(.16, 1, .3, 1); -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 62%); mask-image: linear-gradient(90deg, transparent 6%, #000 62%); }
.facbg .fb { position: absolute; inset: -2%; width: 104%; height: 104%; transform: translate(calc(var(--px, 0) * -20px), calc(var(--py, 0) * -14px)); transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.facbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--fac-base) 0, color-mix(in srgb, var(--fac-base) 72%, transparent) 26%, color-mix(in srgb, var(--fac-base) 30%, transparent) 60%, color-mix(in srgb, var(--fac-base) 12%, transparent)), linear-gradient(180deg, color-mix(in srgb, var(--fac-base) 60%, transparent), transparent 22%, transparent 70%, color-mix(in srgb, var(--fac-base) 70%, transparent)), radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0, 0, 0, .5)); }
.fb-mark { position: absolute; right: -4vh; bottom: -7vh; width: 62vh; aspect-ratio: 1; opacity: .07; z-index: 1; }
.fb-mark svg { stroke-width: 1.6; }
.fb-grain, .fi-grain { position: absolute; inset: 0; z-index: 2; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); mix-blend-mode: overlay; opacity: .2; }

/* Continuum */
.con-pipes { stroke: color-mix(in srgb, var(--fac) 22%, var(--fac-base)); }
.con-lines { stroke-opacity: .55; }
.con-nodes { stroke: none; fill: color-mix(in srgb, var(--fac) 45%, var(--fac-base)); }
.con-pulse path { stroke: #D9FBFF; stroke-width: 2.4; stroke-dasharray: 26 974; animation: fb-run linear infinite; }
@keyframes fb-run { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
/* Apostolis */
.apo-rays { fill-opacity: .075; }
.apo-rays path { animation: fb-breathe 9s ease-in-out infinite alternate; }
.apo-lines { stroke-width: 2; stroke-opacity: .3; }
.apo-rose { stroke-width: 1.6; stroke-opacity: .34; }
@keyframes fb-breathe { to { opacity: .1; } }
/* Blot: veils of light in the dark, an eclipsed star, filaments that sway */
.facbg[data-fac="BLT"]::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(38% 30% at 22% 78%, rgba(40, 190, 130, .22), transparent 70%), radial-gradient(34% 44% at 80% 30%, rgba(60, 210, 160, .14), transparent 70%), radial-gradient(30% 26% at 56% 96%, rgba(96, 70, 190, .18), transparent 70%); filter: blur(30px); animation: fb-veil 26s ease-in-out infinite alternate; }
.blt-eclipse { opacity: .62; }
.blt-fil g { animation: fb-sway ease-in-out infinite alternate; }
.blt-fil .tip { fill: #DFFFEA; stroke: none; opacity: .85; }
.blt-motes { fill: var(--fac-ink); }
.blt-motes circle { animation: fb-drift ease-in-out infinite alternate; }
@keyframes fb-drift { to { transform: translate(18px, -46px); } }
@keyframes fb-sway { from { transform: skewX(-2.4deg); } to { transform: skewX(2.4deg); } }
@keyframes fb-veil { to { transform: translate(4%, -3%) scale(1.08); } }
/* Defectors */
.def-seams { stroke: #000; stroke-width: 5; stroke-opacity: .7; }
.def-rivets { fill: color-mix(in srgb, var(--fac) 30%, #2A1512); }
.def-scratch { stroke: color-mix(in srgb, var(--fac-ink) 60%, #fff); stroke-width: 1.3; stroke-opacity: .22; }
.def-hz { opacity: .2; }
/* Dundanin */
.dun-facets { stroke-width: 1; stroke-opacity: .16; }
.dun-facets .gl { fill: var(--fac-ink); animation: fb-glint ease-in-out infinite alternate; }
@keyframes fb-glint { from { fill-opacity: .02; } to { fill-opacity: .2; } }
/* Terran */
.trn-grid { opacity: .1; }
.trn-stars { fill: var(--ink); }
.trn-lines { stroke-width: 1.4; stroke-opacity: .42; }
.trn-marks { stroke-width: 1.8; stroke-opacity: .5; }
.trn-sweep { fill-opacity: .07; animation: fb-sweep 16s linear infinite; }
@keyframes fb-sweep { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- the intro: a title card
   Common to all six: the faction's hero picture comes up out of black and pushes in slowly, graded toward the
   faction's colour; film grain; cinema bars; a flare across the emblem; the name tracks in; a rule; the identity line.
   Then each faction adds its own effect and its own way of uncovering the screen.
   Full: about 1.85s to arrive and hold, then the uncovering. Brief: a third of that. --out is when the uncovering starts.
   --my pushes the title below the middle so the painting's subject stays clear. */
.fi { --out: 1850ms; --my: 11vh; position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; overflow: hidden; color: var(--fac); pointer-events: none; }
.fi.brief { --out: 380ms; }
.fi[hidden] { display: none; }
.fi-bg, .fi-fx, .fi-bars { position: absolute; inset: 0; }
.fi-bg i { position: absolute; inset: 0; overflow: hidden; background: var(--fac-base); }
.fi-bg i + i { display: none; }
.fi-bg u { position: absolute; inset: 0; background: var(--art) 50% 16% / cover no-repeat; animation: fi-push 2.7s cubic-bezier(.2, .7, .2, 1) both; }
.fi-bg u::before { content: ""; position: absolute; inset: 0; background: var(--fac); mix-blend-mode: soft-light; opacity: .42; }
.fi-bg u::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 44% at 50% calc(50% + var(--my) + 3vh), color-mix(in srgb, var(--fac-base) 84%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in srgb, var(--fac-base) 55%, transparent), transparent 24%, transparent 46%, color-mix(in srgb, var(--fac-base) 90%, transparent) 94%), radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(0, 0, 0, .62)); }
.fi.brief .fi-bg u { animation: none; transform: scale(1.03); }
@keyframes fi-push { from { transform: scale(1.17); filter: brightness(0) saturate(.4); } 24% { filter: brightness(1) saturate(1); } to { transform: scale(1.03); filter: brightness(1) saturate(1); } }
.fi-fx i { position: absolute; display: block; }
.fi-fx .pt { position: absolute; inset: 0; animation: fi-gone .25s ease-in var(--out) forwards; }
.fi-grain { inset: -8%; opacity: .3; animation: fi-jit .5s steps(1, end) infinite, fi-gone .25s ease-in var(--out) forwards; }
.fi-bars { animation: fi-gone .25s ease-in var(--out) forwards; }
.fi-bars::before, .fi-bars::after { content: ""; position: absolute; left: 0; right: 0; height: 6.5vh; background: #000; animation: fi-bar .8s cubic-bezier(.16, 1, .3, 1) both; }
.fi-bars::before { top: 0; --from: -100%; }
.fi-bars::after { bottom: 0; --from: 100%; }
.fi.brief .fi-bars, .fi.brief .fi-grain { display: none; }
@keyframes fi-jit { 0% { transform: none; } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, -2%); } }
@keyframes fi-bar { from { transform: translateY(var(--from)); } }

.fi-mark { position: relative; grid-area: 1 / 1; display: grid; justify-items: center; gap: clamp(10px, 1.7vh, 20px); margin-top: calc(var(--my) * 2); padding: 0 20px; text-align: center; animation: fi-gone .25s ease-in var(--out) forwards; }
.fi-em { position: relative; width: clamp(92px, 17vh, 160px); aspect-ratio: 1; margin-bottom: clamp(2px, .8vh, 10px); color: var(--fac-ink); animation: fi-em .9s cubic-bezier(.16, 1, .3, 1) 260ms both; }
.fi-em svg { position: relative; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--fac) 80%, transparent)) drop-shadow(0 4px 10px rgba(0, 0, 0, .7)); }
/* the flare: a long thin streak of light across the emblem, the way a wide lens smears a bright point */
.fi-em::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(92vw, 1000px); height: 2px; margin: -1px 0 0 max(-46vw, -500px); background: linear-gradient(90deg, transparent, var(--fac) 28%, #fff 50%, var(--fac) 72%, transparent); box-shadow: 0 0 22px 3px color-mix(in srgb, var(--fac) 55%, transparent); animation: fi-flare 1.5s cubic-bezier(.16, 1, .3, 1) 300ms both; }
.fi-mark b { font: 400 clamp(21px, 3.6vw, 54px)/1.15 var(--f-disp); letter-spacing: .16em; margin-right: -.16em; text-transform: uppercase; color: var(--ink); white-space: nowrap; text-shadow: 0 2px 26px rgba(0, 0, 0, .85); animation: fi-track 1.2s cubic-bezier(.16, 1, .3, 1) 480ms both; }
.fi-rule { display: block; width: clamp(120px, 20vw, 300px); height: 1px; background: linear-gradient(90deg, transparent, var(--fac-ink), transparent); animation: fi-rule .9s cubic-bezier(.16, 1, .3, 1) 880ms both; }
.fi-id { font: 500 clamp(11.5px, .95vw, 15px)/1.3 var(--f-body); letter-spacing: .24em; margin-right: -.24em; text-transform: uppercase; color: var(--fac-ink); text-shadow: 0 1px 12px rgba(0, 0, 0, .9); animation: fi-up .7s cubic-bezier(.16, 1, .3, 1) 1060ms both; }
.fi.brief .fi-em { animation: fi-em .3s cubic-bezier(.16, 1, .3, 1) both; }
.fi.brief .fi-em::before, .fi.brief .fi-rule, .fi.brief .fi-id { display: none; }
.fi.brief .fi-mark b { animation: fi-up .3s cubic-bezier(.16, 1, .3, 1) 60ms both; }
@keyframes fi-em { from { opacity: 0; transform: scale(1.28); filter: blur(14px); } }
@keyframes fi-flare { 0% { opacity: 0; transform: scaleX(0); } 35% { opacity: 1; transform: scaleX(1); } 100% { opacity: .3; transform: scaleX(.42); } }
@keyframes fi-track { from { opacity: 0; letter-spacing: .4em; margin-right: -.4em; filter: blur(10px); } }
@keyframes fi-rule { from { opacity: 0; transform: scaleX(0); } }
@keyframes fi-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes fi-gone { to { opacity: 0; } }
@keyframes fi-fade { to { opacity: 0; } }

/* Continuum: the feed tears, locks on, and cuts out */
.fi[data-fac="CON"] { animation: con-out .52s steps(1, end) var(--out) forwards; }
.fi[data-fac="CON"] .fi-bg i { animation: con-art 1.6s steps(1, end) 120ms both; }
.fi[data-fac="CON"] .fi-bg u::before { opacity: .6; }
.fi[data-fac="CON"] .scan { inset: 0; background: repeating-linear-gradient(180deg, rgba(34, 195, 216, .1) 0 1px, transparent 1px 4px); }
.fi[data-fac="CON"] .scan::after { content: ""; position: absolute; left: 0; right: 0; top: -24vh; height: 24vh; background: linear-gradient(180deg, transparent, rgba(107, 227, 242, .16)); animation: con-beam 1.5s linear 200ms both; }
.fi[data-fac="CON"] .fi-mark { animation: con-in .5s steps(1, end) 260ms both, fi-gone .1s steps(1, end) var(--out) forwards; }
.fi[data-fac="CON"] .fi-mark.g1 { color: #E8FDFF; animation: con-slice-a 1s steps(1, end) 260ms both; }
.fi[data-fac="CON"] .fi-mark.g2 { color: #0F8496; animation: con-slice-b 1s steps(1, end) 260ms both; }
.fi[data-fac="CON"] .fi-mark.g1 *, .fi[data-fac="CON"] .fi-mark.g2 * { color: inherit; }
.fi[data-fac="CON"] .fi-mark.g1 .fi-em::before, .fi[data-fac="CON"] .fi-mark.g2 .fi-em::before, .fi[data-fac="CON"] .fi-mark.g1 .fi-rule, .fi[data-fac="CON"] .fi-mark.g2 .fi-rule { display: none; }
.fi[data-fac="CON"] .tear { left: 0; right: 0; background: var(--fac); opacity: 0; mix-blend-mode: screen; animation: con-tear .52s steps(1, end) both; }
@keyframes con-art { 0% { transform: none; } 7% { transform: translateX(-3%); } 11% { transform: none; } 30% { transform: translateX(2.2%) skewX(-2deg); } 34% { transform: none; } 60% { transform: translateX(-1.4%); } 63%, 100% { transform: none; } }
@keyframes con-beam { to { transform: translateY(130vh); } }
@keyframes con-in { 0% { opacity: 0; } 12% { opacity: 1; transform: translateX(-14px) skewX(-8deg); } 22% { opacity: 0; } 34% { opacity: 1; transform: translateX(9px); } 46% { opacity: .5; transform: translateX(-3px) skewX(4deg); } 58%, 100% { opacity: 1; transform: none; } }
@keyframes con-slice-a { 0% { opacity: 0; } 10% { opacity: .9; clip-path: inset(12% 0 64% 0); transform: translateX(-22px); } 26% { clip-path: inset(58% 0 22% 0); transform: translateX(16px); } 40% { clip-path: inset(34% 0 48% 0); transform: translateX(-9px); } 55% { opacity: .7; clip-path: inset(74% 0 8% 0); transform: translateX(6px); } 66% { opacity: 0; } 84% { opacity: .8; clip-path: inset(44% 0 46% 0); transform: translateX(-12px); } 90%, 100% { opacity: 0; } }
@keyframes con-slice-b { 0% { opacity: 0; } 14% { opacity: .9; clip-path: inset(40% 0 30% 0); transform: translateX(20px); } 30% { clip-path: inset(6% 0 78% 0); transform: translateX(-14px); } 46% { clip-path: inset(66% 0 14% 0); transform: translateX(10px); } 60% { opacity: 0; } 86% { opacity: .8; clip-path: inset(20% 0 66% 0); transform: translateX(8px); } 92%, 100% { opacity: 0; } }
@keyframes con-tear { 0% { opacity: 0; } 20% { opacity: .5; transform: translateX(var(--x)); } 45% { opacity: .12; transform: translateX(calc(var(--x) * -1)); } 70% { opacity: .38; transform: none; } 100% { opacity: 0; } }
@keyframes con-out { 0% { clip-path: inset(0 0 0 0); } 14% { clip-path: inset(0 0 62% 0); transform: translateX(-2%); } 30% { clip-path: inset(22% 0 30% 0); transform: translateX(3%); } 46% { clip-path: inset(0 0 0 0); opacity: .35; transform: none; } 60% { clip-path: inset(70% 0 6% 0); opacity: 1; transform: translateX(-4%); } 76% { clip-path: inset(40% 0 52% 0); transform: translateX(2%); } 90%, 100% { clip-path: inset(50% 0 50% 0); opacity: 0; } }

/* Apostolis: light through the painting, motes in it, then the doors part on a flash */
.fi[data-fac="APO"] .fi-bg i { display: block; right: 50%; box-shadow: inset -1px 0 0 rgba(242, 210, 114, .6); animation: apo-door-l .68s cubic-bezier(.7, 0, .2, 1) var(--out) forwards; }
.fi[data-fac="APO"] .fi-bg i u { right: auto; width: 200%; }
.fi[data-fac="APO"] .fi-bg i + i { left: 50%; right: 0; box-shadow: inset 1px 0 0 rgba(242, 210, 114, .6); animation-name: apo-door-r; }
.fi[data-fac="APO"] .fi-bg i + i u { left: -100%; }
.fi[data-fac="APO"] .rays { inset: -40% -20%; background: repeating-conic-gradient(from 180deg at 50% 26%, rgba(255, 226, 140, 0) 0deg, rgba(255, 226, 140, .22) 3deg, rgba(255, 226, 140, 0) 7deg, rgba(255, 226, 140, 0) 11deg); mix-blend-mode: screen; -webkit-mask-image: radial-gradient(closest-side at 50% 40%, #000, transparent); mask-image: radial-gradient(closest-side at 50% 40%, #000, transparent); animation: apo-rays 2.2s cubic-bezier(.16, 1, .3, 1) both, fi-fade .25s ease-in var(--out) forwards; }
.fi[data-fac="APO"] .seam { top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(180deg, transparent, #FFF3C4 6%, #FFF3C4 36%, transparent 42%, transparent 86%, #FFF3C4 91%, transparent); animation: apo-seam 1.2s cubic-bezier(.16, 1, .3, 1) 200ms both, fi-fade .2s ease-in var(--out) forwards; }
.fi[data-fac="APO"] .flash { inset: 0; background: radial-gradient(ellipse 34% 90% at 50% 50%, rgba(255, 244, 204, .95), rgba(255, 220, 130, .35) 45%, transparent 72%); opacity: 0; animation: apo-flash .7s ease-out var(--out) forwards; }
.fi[data-fac="APO"] .mote { width: var(--s); height: var(--s); border-radius: 50%; background: #FFE9A8; box-shadow: 0 0 6px 1px rgba(255, 220, 130, .7); animation: fi-float linear infinite; }
@keyframes apo-rays { from { opacity: 0; transform: rotate(-12deg) scale(.86); } }
@keyframes apo-seam { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: .85; } }
@keyframes apo-flash { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }
@keyframes apo-door-l { to { transform: translateX(-101%); } }
@keyframes apo-door-r { to { transform: translateX(101%); } }
@keyframes fi-float { 0% { opacity: 0; transform: none; } 18% { opacity: .9; } 100% { opacity: 0; transform: translate(2vw, -15vh); } }

/* Blot: it is already here. Veils of light drift over the painting, filaments reach in from the edges, and the screen
   opens like a slit pupil. */
@property --fi-r { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.fi[data-fac="BLT"] { -webkit-mask-image: radial-gradient(ellipse calc(var(--fi-r) * .62) var(--fi-r) at 50% 50%, transparent 76%, #000 100%); mask-image: radial-gradient(ellipse calc(var(--fi-r) * .62) var(--fi-r) at 50% 50%, transparent 76%, #000 100%); animation: blt-out .68s cubic-bezier(.6, 0, .2, 1) var(--out) forwards; }
.fi[data-fac="BLT"] .fi-bg u { animation: blt-push 2.7s cubic-bezier(.2, .7, .2, 1) both; }
.fi[data-fac="BLT"] .fi-bg u::before { background: #0FA77C; opacity: .5; }
.fi[data-fac="BLT"] .veil { inset: -30%; filter: blur(46px); mix-blend-mode: screen; animation: blt-veil 2.8s ease-in-out both; }
.fi[data-fac="BLT"] .veil.a { background: radial-gradient(36% 26% at 28% 62%, rgba(60, 230, 160, .42), transparent 70%); --vx: 6%; --vy: -4%; }
.fi[data-fac="BLT"] .veil.b { background: radial-gradient(30% 34% at 72% 40%, rgba(40, 200, 190, .32), transparent 70%); --vx: -5%; --vy: 3%; }
.fi[data-fac="BLT"] .veil.c { background: radial-gradient(28% 22% at 52% 82%, rgba(120, 80, 220, .34), transparent 70%); --vx: 3%; --vy: -5%; }
.fi[data-fac="BLT"] .reach { position: absolute; inset: 0; width: 100%; height: 100%; color: #C9FFE0; opacity: .5; filter: drop-shadow(0 0 5px rgba(80, 240, 170, .7)); }
.fi[data-fac="BLT"] .reach path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: blt-reach 1.5s cubic-bezier(.16, 1, .3, 1) both; }
.fi[data-fac="BLT"] .mote { width: var(--s); height: var(--s); border-radius: 50%; background: #D8FFE8; box-shadow: 0 0 7px 1px rgba(90, 240, 170, .7); animation: fi-float linear infinite; }
.fi[data-fac="BLT"] .fi-em { animation: blt-em 1.5s cubic-bezier(.16, 1, .3, 1) 320ms both; }
.fi[data-fac="BLT"] .fi-mark b { animation-duration: 1.5s; }
@keyframes blt-push { from { transform: scale(1.2); filter: brightness(0) saturate(.3); } 45% { filter: brightness(.8) saturate(.9); } to { transform: scale(1.04); filter: brightness(.92) saturate(1); } }
@keyframes blt-veil { from { opacity: 0; transform: none; } 40% { opacity: 1; } to { opacity: .8; transform: translate(var(--vx), var(--vy)) scale(1.1); } }
@keyframes blt-reach { to { stroke-dashoffset: 0; } }
@keyframes blt-em { from { opacity: 0; transform: scale(.86); filter: blur(18px); } }
@keyframes blt-out { from { --fi-r: 0%; } 85% { opacity: 1; } to { --fi-r: 190%; opacity: 0; } }

/* Defectors: warning paint for cinema bars, an alarm in the air, the mark stamped on, a blade to take it off */
.fi[data-fac="DEF"] { animation: def-shake .22s steps(1, end) 560ms, def-out .5s cubic-bezier(.7, 0, .2, 1) var(--out) forwards; }
.fi[data-fac="DEF"] .fi-bars { display: none; }
.fi[data-fac="DEF"] .fi-bg u::before { opacity: .55; }
.fi[data-fac="DEF"] .hz { left: 0; right: 0; height: 7.5vh; background: repeating-linear-gradient(-55deg, var(--fac) 0 26px, #130706 26px 52px); box-shadow: 0 8px 26px rgba(0, 0, 0, .7); }
.fi[data-fac="DEF"] .hz.a { top: 0; --from: -100%; animation: def-bar .42s cubic-bezier(.16, 1, .3, 1) 90ms both; }
.fi[data-fac="DEF"] .hz.b { bottom: 0; --from: 100%; box-shadow: 0 -8px 26px rgba(0, 0, 0, .7); animation: def-bar .42s cubic-bezier(.16, 1, .3, 1) 170ms both; }
.fi[data-fac="DEF"] .strobe { inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 30%, var(--fac)); mix-blend-mode: screen; opacity: 0; animation: def-strobe 1.3s ease-in-out 200ms both; }
.fi[data-fac="DEF"] .fi-em { color: var(--fac); animation: def-stamp .22s cubic-bezier(.2, .9, .3, 1) 540ms both; }
.fi[data-fac="DEF"] .fi-em::after { content: ""; position: absolute; inset: -12%; border: 2px solid var(--fac-ink); border-radius: 50%; animation: def-ring .7s cubic-bezier(.16, 1, .3, 1) 560ms both; }
@keyframes def-bar { from { transform: translateX(var(--from)); } }
@keyframes def-strobe { 0% { opacity: 0; } 22% { opacity: .5; } 44% { opacity: .06; } 66% { opacity: .34; } 100% { opacity: 0; } }
@keyframes def-stamp { from { opacity: 0; transform: scale(2.3) rotate(-8deg); } }
@keyframes def-ring { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(2.6); } }
@keyframes def-shake { 0% { transform: translate(8px, -5px); } 33% { transform: translate(-6px, 4px); } 66% { transform: translate(3px, 2px); } 100% { transform: none; } }
@keyframes def-out { from { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, -30% 100%); } to { clip-path: polygon(130% 0%, 130% 0%, 130% 100%, 100% 100%); } }

/* Dundanin: heat from below, embers, the mark struck on the anvil, then the gates draw apart */
.fi[data-fac="DUN"] .fi-bg i { display: block; bottom: 50%; box-shadow: inset 0 -1px 0 rgba(255, 190, 110, .6); animation: dun-gate-t .68s cubic-bezier(.75, 0, .25, 1) var(--out) forwards; }
.fi[data-fac="DUN"] .fi-bg i u { bottom: auto; height: 200%; }
.fi[data-fac="DUN"] .fi-bg i + i { top: 50%; bottom: 0; box-shadow: inset 0 1px 0 rgba(255, 190, 110, .6); animation-name: dun-gate-b; }
.fi[data-fac="DUN"] .fi-bg i + i u { top: -100%; }
.fi[data-fac="DUN"] .heat { left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(0deg, rgba(245, 120, 30, .42), transparent); mix-blend-mode: screen; animation: dun-heat 1.1s ease-in-out infinite alternate, fi-fade .25s ease-in var(--out) forwards; }
.fi[data-fac="DUN"] .molten { left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: linear-gradient(90deg, transparent, #F08A2B 18%, #FFE7AE 50%, #F08A2B 82%, transparent); box-shadow: 0 0 18px 2px rgba(255, 150, 50, .6); animation: dun-molten .6s cubic-bezier(.16, 1, .3, 1) 320ms both, fi-fade .2s ease-in var(--out) forwards; }
.fi[data-fac="DUN"] .spk { top: calc(50% + var(--my)); width: 4px; height: 4px; background: #FFD890; opacity: 0; animation: dun-spark .8s cubic-bezier(.1, .7, .3, 1) both; }
.fi[data-fac="DUN"] .ember { bottom: -2vh; width: var(--s); height: var(--s); border-radius: 50%; background: #FFB45A; box-shadow: 0 0 6px 1px rgba(255, 140, 40, .8); opacity: 0; animation: dun-ember linear both; }
.fi[data-fac="DUN"] .fi-em { animation: dun-strike .4s cubic-bezier(.16, 1, .3, 1) 560ms both; }
@keyframes dun-heat { from { opacity: .55; } to { opacity: 1; } }
@keyframes dun-molten { from { transform: scaleX(0); } }
@keyframes dun-spark { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
@keyframes dun-ember { 0% { opacity: 0; transform: none; } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -72vh); } }
@keyframes dun-strike { from { opacity: 0; transform: scale(1.3); filter: brightness(4); } }
@keyframes dun-gate-t { to { transform: translateY(-101%); } }
@keyframes dun-gate-b { to { transform: translateY(101%); } }

/* Terran: range rings close on the mark, the brackets lock, the plot is wiped clear */
.fi[data-fac="TRN"] { animation: trn-out .5s cubic-bezier(.7, 0, .2, 1) var(--out) forwards; }
.fi[data-fac="TRN"] .grid { inset: 0; background: linear-gradient(rgba(195, 160, 255, .13) 1px, transparent 1px) 50% 50% / 64px 64px, linear-gradient(90deg, rgba(195, 160, 255, .13) 1px, transparent 1px) 50% 50% / 64px 64px; -webkit-mask-image: radial-gradient(ellipse at 50% 60%, #000, transparent 75%); mask-image: radial-gradient(ellipse at 50% 60%, #000, transparent 75%); animation: fi-up .8s ease-out both; }
.fi[data-fac="TRN"] .rg { left: 50%; top: calc(50% + var(--my)); width: 52vh; height: 52vh; margin: -26vh 0 0 -26vh; border: 1.5px solid var(--fac-ink); border-radius: 50%; opacity: .7; animation: trn-ring .9s cubic-bezier(.16, 1, .3, 1) 200ms both; }
.fi[data-fac="TRN"] .rg:nth-child(3) { width: 72vh; height: 72vh; margin: -36vh 0 0 -36vh; border-style: dashed; animation-delay: 300ms; }
.fi[data-fac="TRN"] .rg:nth-child(4) { width: 96vh; height: 96vh; margin: -48vh 0 0 -48vh; opacity: .4; animation-delay: 400ms; }
.fi[data-fac="TRN"] .br { left: 50%; top: calc(50% + var(--my)); width: 34px; height: 34px; border: 0 solid var(--fac-ink); --bx: min(40vw, 420px); --by: min(22vh, 190px); animation: trn-lock .6s cubic-bezier(.16, 1, .3, 1) 520ms both; }
.fi[data-fac="TRN"] .br.tl { border-width: 2px 0 0 2px; margin: calc(var(--by) * -1) 0 0 calc(var(--bx) * -1); --fx: -70px; --fy: -70px; }
.fi[data-fac="TRN"] .br.tr { border-width: 2px 2px 0 0; margin: calc(var(--by) * -1) 0 0 calc(var(--bx) - 34px); --fx: 70px; --fy: -70px; }
.fi[data-fac="TRN"] .br.bl { border-width: 0 0 2px 2px; margin: calc(var(--by) - 34px) 0 0 calc(var(--bx) * -1); --fx: -70px; --fy: 70px; }
.fi[data-fac="TRN"] .br.br2 { border-width: 0 2px 2px 0; margin: calc(var(--by) - 34px) 0 0 calc(var(--bx) - 34px); --fx: 70px; --fy: 70px; }
.fi[data-fac="TRN"] .sweep { top: 0; bottom: 0; left: 0; width: 2px; background: var(--fac-ink); box-shadow: -40px 0 60px 20px rgba(154, 92, 224, .25); opacity: .8; animation: trn-scan 1.1s cubic-bezier(.4, 0, .2, 1) 150ms both; }
@keyframes trn-ring { from { opacity: 0; transform: scale(1.9); } }
@keyframes trn-lock { from { opacity: 0; transform: translate(var(--fx), var(--fy)); } }
@keyframes trn-scan { from { transform: translateX(-4px); } to { transform: translateX(100vw); opacity: 0; } }
@keyframes trn-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }

/* ---------------------------------------------------------------- phone: the screen scrolls, the backdrop stays put */
@media (max-width: 860px) {
  .facbg { position: fixed; }
  .facbg::after { background: linear-gradient(180deg, color-mix(in srgb, var(--fac-base) 78%, transparent), color-mix(in srgb, var(--fac-base) 46%, transparent)); }
  .fb-art { opacity: .2; -webkit-mask-image: none; mask-image: none; }
  .fb-mark { width: 74vw; right: -12vw; bottom: 8vh; }
  .fi { position: fixed; z-index: 30; --my: 9vh; }
  .fi-mark b { white-space: normal; text-wrap: balance; }
  .fachead { align-items: flex-start; }
  .fachead p b { display: block; margin: 0 0 4px; }
  .facpage { display: block; }
  .facpage .dplates { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .facbg, .plate2 .em, .facbg .fb, .fb-art { transition: none; transform: none; }
  .facbg *, .facbg::before { animation: none !important; }
}
