/* FX24 Placements. Uses theme tokens when present (var(--c-*)), with fallbacks. */

.plc { position: relative; display: block; }
.plc.is-empty { display: none !important; }
/* Waiting placeholders (lazy, maybe far below) are static; only one being fetched shimmers, and the
   shimmer moves a pseudo-element with transform (compositor) — no repaint per frame while scrolling. */
.plc:not(.is-filled):not(.is-empty) { border-radius: 12px; background: #F1F5F9; overflow: hidden; }
.plc.is-loading:not(.is-filled)::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
	transform: translateX(-100%); animation: plc-shimmer 1.2s linear infinite;
}
@keyframes plc-shimmer { to { transform: translateX(100%); } }
.plc.is-filled { animation: plc-in 420ms cubic-bezier(.22, 1, .36, 1) both; }
.plc.is-swapping > * { opacity: 0; transition: opacity 250ms ease; }
@keyframes plc-in { from { opacity: 0; } to { opacity: 1; } }

.plc-unit { position: relative; }
.plc-label {
	position: absolute; top: 8px; right: 10px; z-index: 2; padding: 3px 7px; border-radius: 4px;
	font: 600 .625rem/1 var(--f-head, system-ui, sans-serif); letter-spacing: .1em; text-transform: uppercase;
	color: rgba(255, 255, 255, .78); background: rgba(0, 0, 0, .28); pointer-events: none;
}
.plc-unit--image .plc-label, .plc-unit:has(.plc-native--light) .plc-label { color: #5b6470; background: rgba(255, 255, 255, .88); }

/* Image */
.plc-img { display: block; overflow: hidden; border-radius: var(--r, 12px); box-shadow: 0 18px 40px -26px rgba(2, 26, 51, .55); }
.plc-img img { display: block; width: 100%; height: auto; transition: transform 600ms cubic-bezier(.22, 1, .36, 1); }
a.plc-img:hover img { transform: scale(1.02); }

/* HTML (network code) */
.plc-html { display: flex; justify-content: center; }

/* Native */
.plc-native {
	--plc-accent: var(--c-accent, #D11239);
	position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center;
	padding: 26px 28px; border-radius: 12px; overflow: hidden; isolation: isolate;
	background: radial-gradient(120% 140% at 100% 0, #0B4A86 0, var(--c-primary, #04305C) 45%, var(--c-ink-deep, #00172D) 100%);
	color: #fff; font-family: var(--f-body, system-ui, sans-serif);
}
.plc-native--light { background: var(--c-surface-2, #F8F9FB); color: var(--c-text, #191C1E); box-shadow: inset 0 0 0 1px var(--c-line, #E5E7EB); }
.plc-native--black { background: radial-gradient(90% 120% at 100% 0, #1b1b1b 0, #050505 60%); }
.plc-native__media img { display: block; width: 104px; height: 104px; object-fit: contain; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.plc-native--light .plc-native__media img { background: #fff; }
.plc-native__body { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.plc-native__kicker { margin: 0; font: 700 .6875rem/1.2 var(--f-head, system-ui, sans-serif); text-transform: uppercase; letter-spacing: .14em; color: var(--plc-accent); filter: brightness(1.35); }
.plc-native--light .plc-native__kicker { filter: none; }
.plc-native__title { margin: 0; font: 700 clamp(1.125rem, 1rem + .5vw, 1.4rem)/1.25 var(--f-head, system-ui, sans-serif); letter-spacing: -.01em; }
.plc-native__title a { color: inherit; text-decoration: none; }
.plc-native__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* whole card clickable */
.plc-native__text { margin: 0; font-size: .9375rem; line-height: 1.5; opacity: .82; }
.plc-native__list { display: grid; gap: 4px; margin: 2px 0 0; padding: 0; list-style: none; font-size: .9375rem; line-height: 1.45; }
.plc-native__list li { position: relative; padding-left: 18px; opacity: .88; }
.plc-native__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 1px; background: var(--plc-accent); filter: brightness(1.35); }
.plc-native--light .plc-native__list li::before { filter: none; }
.plc-native__ctas { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.plc-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 8px;
	font: 700 .875rem/1.2 var(--f-head, system-ui, sans-serif); text-decoration: none; text-align: center;
	transition: transform 160ms cubic-bezier(.22, 1, .36, 1), filter 160ms, box-shadow 240ms;
}
.plc-btn:active { transform: scale(.97); }
.plc-btn--primary { background: var(--plc-accent); color: #fff; }
.plc-btn--primary:hover { filter: brightness(1.1); box-shadow: 0 10px 24px -12px var(--plc-accent); }
.plc-btn--ghost { color: inherit; box-shadow: inset 0 0 0 1.5px var(--plc-accent); }
.plc-btn--ghost:hover { background: color-mix(in srgb, var(--plc-accent) 14%, transparent); }

/* ── Zone layouts ─────────────────────────────── */

/* Vertical cards: mega menu, sidebar */
.plc--mega-menu .plc-native, .plc--rail-top .plc-native, .plc--rail-sticky .plc-native, .fx24p-preview .plc-native {
	grid-template-columns: 1fr; align-content: start; gap: 16px; padding: 24px; height: 100%;
}
.plc--mega-menu .plc-native__media img, .plc--rail-top .plc-native__media img, .plc--rail-sticky .plc-native__media img { width: 72px; height: 72px; }
.plc--mega-menu, .plc--mega-menu .plc-unit { height: 100%; }
.plc--mega-menu .plc-native { display: flex; flex-direction: column; align-items: stretch; border-radius: 12px; min-height: 100%; }
.plc--mega-menu .plc-native__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.plc--mega-menu .plc-native__ctas { margin-top: auto; padding-top: 12px; }
.plc--mega-menu .plc-native__title { font-size: 1.5rem; line-height: 1.2; }
.plc--mega-menu .plc-native__ctas { width: 100%; }
.plc--mega-menu .plc-btn { flex: 1 1 auto; }
.plc--rail-sticky .plc-native { min-height: 420px; align-content: center; }

/* FAQ: under an opened answer */
.plc--faq-answer .plc-native { padding: 24px 26px; }
.plc--faq-answer .plc-native__media img { width: 88px; height: 88px; }

/* Search overlay row */
:is(.plc--search-sponsored, .plc--faq-search) .plc-native { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 12px 14px; border-radius: 12px; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-native__media img { width: 56px; height: 56px; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-native__text { display: none; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-native__title { font-size: 1rem; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-native__ctas { margin: 0; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-btn--ghost { display: none; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-label { display: none; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-native__kicker::before { content: "Partner · "; }

/* Mobile anchor: fixed above the tab bar */
.plc--mobile-anchor.is-filled {
	position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom)); z-index: 94;
	padding: 6px 40px 6px 8px; background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 24px -16px rgba(2, 26, 51, .45);
	animation: plc-up 360ms cubic-bezier(.32, .72, 0, 1) both;
}
@keyframes plc-up { from { transform: translateY(100%); } to { transform: none; } }
.plc--mobile-anchor .plc-img img { max-height: 56px; width: auto; margin: 0 auto; }
.plc--mobile-anchor .plc-native { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.plc--mobile-anchor .plc-native__media img { width: 40px; height: 40px; }
.plc--mobile-anchor .plc-native__text, .plc--mobile-anchor .plc-native__kicker, .plc--mobile-anchor .plc-btn--ghost, .plc--mobile-anchor .plc-label { display: none; }
.plc--mobile-anchor .plc-native__title { font-size: .875rem; }
.plc--mobile-anchor .plc-native__ctas { margin: 0; }
.plc--mobile-anchor .plc-btn { min-height: 34px; padding: 0 12px; font-size: .75rem; }
.plc-close {
	position: absolute; top: 50%; right: 6px; width: 28px; height: 28px; margin-top: -14px; border: 0; border-radius: 50%;
	background: #F1F5F9; color: #5b6470; font-size: 18px; line-height: 1; cursor: pointer;
}

/* Menu sheet (mobile/tablet) */
.plc--menu-sheet { margin: 16px 0 8px; }
.plc--menu-sheet .plc-native { padding: 18px; gap: 14px; }
.plc--menu-sheet .plc-native__media img { width: 56px; height: 56px; }

@media (max-width: 560px) {
	.plc-native { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px; }
	.plc-native__media img { width: 64px; height: 64px; }
	.plc--menu-sheet .plc-native, :is(.plc--search-sponsored, .plc--faq-search) .plc-native, .plc--mobile-anchor .plc-native { grid-template-columns: auto minmax(0, 1fr); }
	:is(.plc--search-sponsored, .plc--faq-search) .plc-native__ctas { grid-column: 1 / -1; }
	.plc-native__ctas .plc-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.plc.is-filled, .plc--mobile-anchor.is-filled { animation-name: plc-in; }
	.plc-img img { transition: none; }
}

/* ── FX24 System (terminal style) ─────────────────
   Vertical card (spec 320×480) by default; a container ≥ 600px wide gets the horizontal banner
   (status bar / statement + badge + metrics / provider card + CTA). */
.plc-unit--system { container-type: inline-size; }
.plc-sys {
	--sys-red: #D11239; --sys-grey: #94A3B8; --sys-line: rgba(148, 163, 184, .16);
	--sys-mono: var(--f-mono, "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace);
	position: relative; display: flex; flex-direction: column; gap: 22px; height: 100%;
	padding: 20px 20px 16px; border-radius: var(--r, 12px); overflow: hidden; isolation: isolate;
	background:
		radial-gradient(60% 34% at 50% 78%, rgba(209, 18, 57, .16), transparent 70%),
		radial-gradient(50% 30% at 80% 18%, rgba(30, 64, 175, .18), transparent 70%),
		#06111F;
	box-shadow: inset 0 0 0 1px var(--sys-line), 0 20px 44px -26px rgba(2, 26, 51, .6);
	color: #fff; font-family: var(--f-body, Inter, system-ui, sans-serif);
}
.plc-sys__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--sys-line);
	font: 500 .6875rem/1.2 var(--sys-mono); letter-spacing: .08em; text-transform: uppercase;
}
.plc-sys__state { display: inline-flex; align-items: center; gap: 8px; color: var(--sys-red); min-width: 0; }
.plc-sys__state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sys-red); box-shadow: 0 0 8px rgba(209, 18, 57, .7); }
.plc-sys__state:empty::before { display: none; }
.plc-sys__status { display: inline-flex; align-items: center; gap: 8px; color: #fff; white-space: nowrap; }
.plc-sys__status::after { content: ""; width: 3px; height: 12px; background: var(--sys-red); } /* static: endless blinking kept frames coming */
.plc-sys__sponsored { color: var(--sys-grey); }
.plc-sys__sponsored::after { content: " //"; }

.plc-sys__main { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.plc-sys__content { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.plc-sys__badge {
	display: inline-block; padding: 6px 10px; border: 1px solid var(--sys-line); border-radius: 6px; background: rgba(148, 163, 184, .06);
	font: 400 .6875rem/1.2 var(--sys-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sys-grey);
}
.plc-sys__badge::before { content: "[ "; }
.plc-sys__badge::after { content: " ]"; }
.plc-sys__content > .plc-sys__badge { margin-bottom: 26px; }
.plc-sys__title { margin: 0; font: 600 1.5rem/1.4 var(--f-body, Inter, sans-serif); letter-spacing: .005em; color: #fff; text-wrap: balance; }
.plc-sys__title a { color: inherit; text-decoration: none; }
.plc-sys__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* whole card clickable */
.plc-sys__title em { font-style: normal; color: var(--sys-red); }
.plc-sys__text { margin: -4px 0 0; font: 400 .9375rem/1.55 var(--f-body, Inter, sans-serif); color: var(--sys-grey); }
.plc-sys__tech { margin: -4px 0 0; font: 400 .6875rem/1.4 var(--sys-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sys-grey); word-spacing: .2em; }

.plc-sys__side { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.plc-sys__cta {
	position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 8px;
	background: var(--sys-red); color: #fff; text-decoration: none; text-align: center;
	font: 600 .9375rem/1.2 var(--sys-mono); letter-spacing: .02em; word-spacing: .3em;
	box-shadow: 0 4px 10px -6px rgba(209, 18, 57, .7); /* small blur: big glows are costly to repaint */
	transition: filter 160ms, transform 160ms cubic-bezier(.22, 1, .36, 1);
}
.plc-sys__cta:hover { filter: brightness(1.1); }
.plc-sys__cta:active { transform: scale(.98); }

.plc-sys__prov { display: flex; align-items: flex-start; gap: 14px; }
.plc-sys__tag {
	flex: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 8px; background: rgba(148, 163, 184, .12);
	font: 500 .75rem/1 var(--sys-mono); letter-spacing: .04em; color: #E2E8F0;
}
.plc-sys__pname { margin: 0 0 6px; font: 600 1rem/1.3 var(--f-body, Inter, sans-serif); color: #fff; }
.plc-sys__pdesc { margin: 0; font: 400 .6875rem/1.3 var(--sys-mono); letter-spacing: .02em; color: var(--sys-grey); }

.plc-sys__meta {
	display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--sys-line);
	font: 400 .625rem/1.3 var(--sys-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sys-grey); word-spacing: .2em;
}
.plc-sys__meta li:nth-child(n+3) { display: none; } /* vertical: two labels, left and right */

/* Sidebars keep the 320×480 proportions of the spec */
.plc--rail-top .plc-sys, .plc--rail-sticky .plc-sys { min-height: 480px; }

/* Horizontal banner */
@container (min-width: 600px) {
	.plc-sys { gap: 16px; padding: 22px 28px 18px; background: radial-gradient(40% 80% at 85% 50%, rgba(30, 64, 175, .14), transparent 70%), #061529; border-radius: var(--r, 12px); }
	.plc-sys__bar { padding: 0; border: 0; font-size: .75rem; letter-spacing: .2em; }
	.plc-sys__status { letter-spacing: .06em; }
	.plc-sys__main { flex-direction: row; align-items: center; gap: 40px; }
	.plc-sys__content { flex: 1; gap: 14px; min-width: 0; }
	.plc-sys__content > .plc-sys__badge { order: 2; margin: 6px 0 0; }
	.plc-sys__title { order: 1; font-size: clamp(1.25rem, 1rem + 1.4cqi, 1.5625rem); }
	.plc-sys__text, .plc-sys__tech { order: 3; margin: 0; }
	.plc-sys__side { flex: 0 0 min(300px, 40%); margin: 0; }
	.plc-sys__meta { justify-content: flex-start; gap: 22px; padding: 0; border: 0; text-transform: none; letter-spacing: .02em; }
	.plc-sys__meta li:nth-child(n+3) { display: list-item; }
	.plc-sys__meta li { display: inline-flex; align-items: center; gap: 6px; }
	.plc-sys__meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--sys-red); }
	.plc-sys__cta { min-height: 42px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8125rem; }
}

/* Mega menu: the promo column is a console card ("> KICKER:", statement, command line with a cursor) */
.plc--mega-menu .plc-unit--system, .plc--mega-menu .plc-sys { height: auto; }
.plc--mega-menu .plc-sys { gap: 18px; padding: 26px 14px 0; background: rgba(6, 17, 31, .6); border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .22); }
.plc--mega-menu .plc-sys__bar { padding: 0; border: 0; font-size: .8125rem; letter-spacing: .14em; }
.plc--mega-menu .plc-sys__state { gap: 0; }
.plc--mega-menu .plc-sys__state::before { content: "> "; white-space: pre; width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; }
.plc--mega-menu .plc-sys__state::after { content: ":"; }
.plc--mega-menu .plc-sys__status,
.plc--mega-menu .plc-sys__badge,
.plc--mega-menu .plc-sys__text,
.plc--mega-menu .plc-sys__side,
.plc--mega-menu .plc-sys__meta { display: none; }
.plc--mega-menu .plc-sys__main { gap: 0; }
.plc--mega-menu .plc-sys__content { gap: 0; }
.plc--mega-menu .plc-sys__title { font-size: 1.0625rem; font-weight: 500; line-height: 1.55; padding-bottom: 22px; }
.plc--mega-menu .plc-sys__tech {
	display: flex; align-items: center; gap: 10px; align-self: stretch; margin: 0 -14px; padding: 12px 14px;
	border-top: 1px solid rgba(148, 163, 184, .22); text-transform: none; letter-spacing: .02em; font-size: .75rem; word-spacing: 0;
}
.plc--mega-menu .plc-sys__tech::before { content: ">"; }
.plc--mega-menu .plc-sys__tech::after { content: ""; width: 8px; height: 14px; background: var(--sys-red); }


/* Horizontal card keeps a steady height: equals the zones' reserved min height, so nothing jumps. */
@container (min-width: 600px) { .plc-sys { min-height: 200px; } }

/* Compact zones: same style, fewer parts */
.plc--menu-sheet .plc-sys, :is(.plc--search-sponsored, .plc--faq-search) .plc-sys, .plc--mobile-anchor .plc-sys { min-height: 0; }
.plc--menu-sheet .plc-sys { gap: 12px; padding: 16px; }
.plc--menu-sheet .plc-sys__bar { padding-bottom: 10px; }
.plc--menu-sheet .plc-sys__main { gap: 14px; }
.plc--menu-sheet .plc-sys__title { font-size: 1.125rem; }
.plc--menu-sheet .plc-sys__cta { min-height: 40px; }
.plc--menu-sheet :is(.plc-sys__badge, .plc-sys__text, .plc-sys__tech, .plc-sys__meta, .plc-sys__prov) { display: none; }

/* Search overlay: one row — state, statement, button */
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys { flex-direction: row; align-items: center; gap: 14px; padding: 12px 14px; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__bar { flex: none; padding: 0; border: 0; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__main { flex-direction: row; align-items: center; gap: 14px; flex: 1; min-width: 0; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__content { flex: 1; min-width: 0; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__title { font-size: .9375rem; line-height: 1.35; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__side { flex: none; margin: 0; }
:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__cta { min-height: 34px; padding: 0 12px; font-size: .75rem; }
:is(.plc--search-sponsored, .plc--faq-search) :is(.plc-sys__status, .plc-sys__badge, .plc-sys__text, .plc-sys__tech, .plc-sys__meta, .plc-sys__prov) { display: none; }
/* Phones: the partner row stacks — label, title, a full-width button (no overlap in a narrow overlay). */
@media (max-width: 640px) {
	:is(.plc--search-sponsored, .plc--faq-search) .plc-sys { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px; }
	:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__main { flex-direction: column; align-items: stretch; gap: 10px; }
	:is(.plc--search-sponsored, .plc--faq-search) .plc-sys__cta { width: 100%; justify-content: center; }
}

/* Mobile anchor: statement + button in one strip */
.plc--mobile-anchor .plc-sys { flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.plc--mobile-anchor .plc-sys__main { flex-direction: row; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.plc--mobile-anchor .plc-sys__content { flex: 1; min-width: 0; }
.plc--mobile-anchor .plc-sys__title { font-size: .8125rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plc--mobile-anchor .plc-sys__side { flex: none; margin: 0; }
.plc--mobile-anchor .plc-sys__cta { min-height: 34px; padding: 0 10px; font-size: .6875rem; }
.plc--mobile-anchor :is(.plc-sys__bar, .plc-sys__badge, .plc-sys__text, .plc-sys__tech, .plc-sys__meta, .plc-sys__prov) { display: none; }

/* FAQ side rail: the spec's 320×480 card */
.plc--faq-rail .plc-sys { min-height: 480px; }
