/*
 * The PowerUp Dashboard as a graphic (inc/dashboard-feature.php, home page):
 * an app window drawn in HTML, on a band that runs from the hero's navy
 * (#0D0F1E) down to the stages' surface (#13152E), so it sits between them
 * with no seam. The window is the dashboard in the site's dark look: the
 * score panel is the real page's, the other panels are its white cards
 * turned dark.
 *
 * Motion (assets/js/dashboard-feature.js). The stylesheet's plain state is
 * the finished picture. The states before it plays exist only under
 * html.vf-js (set in wp_head) and only where motion is welcome, so with no
 * script, or with reduced motion, the finished picture shows.
 *   is-in    the band has come into view: everything plays in, once
 *   is-live  the band is on screen in an open tab: the idle loop runs
 * Only transform and opacity move, plus the stroke offset of the ring and
 * the chart line (paint only, nothing is laid out again).
 */
.vfd {
	--vfd-ease: cubic-bezier(.22, .61, .36, 1);
	--vfd-line: rgba(255, 255, 255, .08);
	--vfd-line-strong: rgba(255, 255, 255, .12);
	--vfd-card: #191B3B;
	--vfd-body: rgba(255, 255, 255, .74);
	--vfd-mute: rgba(255, 255, 255, .6);
	position: relative; overflow: hidden; overflow: clip;
	padding: 8px 0 clamp(72px, 8vw, 120px);
	background:
		radial-gradient(46% 52% at 50% 46%, rgba(108, 99, 255, .2), transparent 72%),
		radial-gradient(30% 36% at 86% 78%, rgba(214, 86, 200, .12), transparent 72%),
		linear-gradient(180deg, #0D0F1E 30%, #13152E);
	color: #FFFFFF; font: 500 14px/1.45 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.vfd *, .vfd *::before, .vfd *::after { box-sizing: border-box; }
/* :where keeps this reset as light as one class, so each part's own spacing below wins. */
.vfd :where(p, ul, ol) { margin: 0; padding: 0; list-style: none; }
.vfd i, .vfd em, .vfd u { font-style: normal; text-decoration: none; }
.vfd svg { display: block; }

/* The hero's rings, carried on to the left. */
.vfd__ring { position: absolute; border-radius: 50%; pointer-events: none; }
.vfd__ring--a { left: -300px; top: 12%; width: 760px; height: 760px; border: 1px solid rgba(169, 163, 255, .12); }
.vfd__ring--b { left: -140px; top: 34%; width: 440px; height: 440px; border: 1px solid rgba(187, 89, 224, .16); }

.vfd__rail { position: relative; max-width: 1240px; margin-inline: auto; padding-inline: 24px; box-sizing: content-box; } /* the site column (.vfh-rail): edges line up with the stage cards and the logo */
.vfd-stage { pointer-events: none; user-select: none; }

/* ── The window ────────────────────────────────────────────────────────── */
.vfd-win {
	position: relative; border: 1px solid var(--vfd-line-strong); border-radius: 18px;
	background: linear-gradient(180deg, #13152E, #0F1126);
	box-shadow: 0 0 0 1px rgba(13, 15, 30, .6), 0 70px 140px -70px #6C63FF, 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.vfd-bar { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--vfd-line); border-radius: 17px 17px 0 0; background: rgba(255, 255, 255, .03); }
.vfd-bar__dots { position: absolute; left: 16px; top: 50%; display: flex; gap: 7px; transform: translateY(-50%); }
.vfd-bar__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.vfd-bar__dots i:first-child { background: #6C63FF; }
.vfd-bar__dots i:nth-child(2) { background: #A05DEA; }
.vfd-bar__dots i:nth-child(3) { background: #D656C8; }
.vfd-bar__url { display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 140px); height: 26px; padding: 0 14px; overflow: hidden; border: 1px solid var(--vfd-line); border-radius: 999px; background: rgba(13, 15, 30, .6); color: var(--vfd-mute); font-size: 12px; font-weight: 600; white-space: nowrap; }
.vfd-bar__url svg { flex: none; color: #A9A3FF; }

.vfd-app { position: relative; padding: clamp(14px, 2vw, 28px); }
.vfd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; min-height: 60px; margin-bottom: clamp(14px, 1.6vw, 22px); }
.vfd-head__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; color: #FFFFFF; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.vfd-head__title span { color: var(--vfd-mute); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.vfd-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.vfd-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--vfd-line-strong); border-radius: 999px; background: rgba(255, 255, 255, .04); color: #FFFFFF; font-size: 13px; line-height: 1.3; font-weight: 700; }
.vfd-badge small { color: var(--vfd-mute); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.vfd-badge--status { border-color: transparent; background: linear-gradient(90deg, #6C63FF, #A05DEA 55%, #C546B6); }
.vfd-badge--status small { color: rgba(255, 255, 255, .82); }

.vfd-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr) 340px; gap: 18px; }
.vfd-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.vfd-box { min-width: 0; padding: 20px 22px; border: 1px solid var(--vfd-line); border-radius: 16px; background: var(--vfd-card); }
.vfd-col > .vfd-box { flex: 1 1 auto; }
.vfd-col > .vfd-verified { flex: 0 0 auto; }
.vfd-h { display: flex; align-items: center; gap: 9px; color: #FFFFFF; font-size: 16px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.vfd-h svg { flex: none; color: #C98BEA; }
.vfd-sub { margin-top: 4px; color: var(--vfd-body); font-size: 13px; line-height: 1.5; }
.vfd-tag { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: #FFF1B8; color: #4A3D00; font-size: 10px; line-height: 1.3; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.vfd-tag--soon { background: rgba(169, 163, 255, .16); color: #C9C5FF; }

/* ── The score: the dashboard's own panel ──────────────────────────────── */
.vfd-score { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--vfd-line-strong); border-radius: 16px; background: linear-gradient(180deg, #171A38, #0F1126); }
.vfd-score::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 45% at 50% 0%, rgba(108, 99, 255, .24), transparent 70%), radial-gradient(60% 40% at 100% 100%, rgba(214, 86, 200, .14), transparent 70%); }
.vfd-score > * { position: relative; }
.vfd-score__cap { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--vfd-line); color: var(--vfd-mute); font-size: 10.5px; line-height: 1.2; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.vfd-score__cap b { color: #A9A3FF; font-weight: 700; text-align: right; }
.vfd-score__main { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 20px 6px; text-align: center; }
.vfd-dial { position: relative; width: 184px; height: 184px; }
.vfd-dial svg { width: 100%; height: 100%; overflow: visible; }
.vfd-dial__track, .vfd-dial__seg { fill: none; stroke-width: 9; stroke-linecap: round; }
.vfd-dial__track { stroke: rgba(255, 255, 255, .13); }
.vfd-dial__seg { stroke: var(--c); filter: drop-shadow(0 0 5px var(--c)); stroke-dashoffset: 0; }
.vfd-dial__orbit { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 1; stroke-dasharray: 2 7; transform-box: fill-box; transform-origin: center; }
.vfd-dial__n { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vfd-dial__n b { background: linear-gradient(100deg, #A9A3FF, #C98BEA 50%, #F08FE3); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 62px; line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.vfd-dial__n span { margin-top: 5px; color: var(--vfd-body); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.vfd-score__band { font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.vfd-self { padding: 2px 10px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; color: rgba(255, 255, 255, .82); font-size: 10px; line-height: 1.5; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.vfd-score__line { color: var(--vfd-body); font-size: 13px; }

/* The five stages, each filled to its points. */
.vfd-legend { display: grid; gap: 10px; margin: 14px 20px 0; padding: 16px 0 20px; border-top: 1px solid var(--vfd-line); }
.vfd-legend li { display: grid; grid-template-columns: minmax(0, 86px) minmax(0, 1fr) 50px; align-items: center; gap: 10px; color: rgba(255, 255, 255, .86); font-size: 13.5px; line-height: 1.2; font-weight: 600; }
.vfd-legend li > span { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vfd-legend li > span::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.vfd-legend i { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.vfd-legend u { display: block; height: 100%; border-radius: 3px; background: var(--c); transform-origin: left center; }
.vfd-legend b { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.vfd-legend small { color: var(--vfd-mute); font-size: 11.5px; font-weight: 600; }

/* ── History ───────────────────────────────────────────────────────────── */
.vfd-chart { width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.vfd-chart__grid { stroke: rgba(255, 255, 255, .1); stroke-width: 1; stroke-dasharray: 3 5; }
.vfd-chart__tick { fill: rgba(255, 255, 255, .5); font: 600 10.5px Manrope, sans-serif; }
.vfd-chart__area { fill: url(#vfd-area); }
.vfd-chart__line { fill: none; stroke: url(#vfd-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.vfd-chart__dot { fill: #191B3B; stroke: #8560F4; stroke-width: 3; }
.vfd-chart__dot--now { fill: #D656C8; stroke: #FFFFFF; }
.vfd-chart__val { fill: #FFFFFF; font: 800 14px Manrope, sans-serif; text-anchor: middle; }
.vfd-chart__date { fill: rgba(255, 255, 255, .6); font: 600 11px Manrope, sans-serif; text-anchor: middle; }

/* ── Next steps ────────────────────────────────────────────────────────── */
.vfd-steps { display: grid; gap: 8px; margin-top: 14px; }
.vfd-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--vfd-line); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.vfd-step__n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #FFFFFF; font-size: 12.5px; font-weight: 800; }
.vfd-step__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vfd-step__text small { color: var(--ink); font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.vfd-step__text b { color: #FFFFFF; font-size: 14px; line-height: 1.3; font-weight: 700; }
.vfd-step__pts { flex: none; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #FFFFFF; font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Status and plan ───────────────────────────────────────────────────── */
.vfd-ladder { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.vfd-ladder::before { content: ""; position: absolute; left: 11px; right: 33.33%; top: 10px; height: 2px; margin-right: -11px; background: linear-gradient(90deg, #6C63FF, #BB59E0); }
.vfd-ladder li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.vfd-ladder i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #6C63FF; color: #FFFFFF; }
.vfd-ladder li:nth-child(2) i { background: #A05DEA; }
.vfd-ladder .is-now i { border: 4px solid #BB59E0; background: #FFFFFF; box-shadow: 0 0 14px #BB59E0; }
.vfd-ladder b { color: rgba(255, 255, 255, .8); font-size: 13px; line-height: 1.2; font-weight: 700; }
.vfd-ladder .is-now b { color: #FFFFFF; font-weight: 800; }
.vfd-ladder em { white-space: nowrap; color: #C98BEA; font-size: 10px; line-height: 1.2; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.vfd-plan { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--vfd-line); }
.vfd-plan small { color: var(--vfd-mute); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.vfd-plan b { font-size: 14px; font-weight: 800; }
.vfd-plan span { grid-column: 1 / -1; color: var(--vfd-body); font-size: 12.5px; }

/* ── Reporting (the partner's view) ────────────────────────────────────── */
.vfd-live { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5EE0A0; }
.vfd-live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #5EE0A0; opacity: 0; }
.vfd-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.vfd-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 8px; padding: 10px 12px; border: 1px solid var(--vfd-line); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.vfd-tile small { grid-column: 1 / -1; color: var(--vfd-mute); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.vfd-tile b { justify-self: start; color: #FFFFFF; font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; transform-origin: left bottom; }
.vfd-tile svg { width: 70px; height: 26px; overflow: visible; }
.vfd-tile path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.vfd-mix { display: flex; gap: 2px; width: 70px; height: 8px; margin-bottom: 6px; }
.vfd-mix i { border-radius: 2px; }

/* ── The toasts: one at a time, from the script ────────────────────────── */
.vfd-toasts { position: absolute; top: clamp(14px, 2vw, 28px); right: clamp(14px, 2vw, 28px); width: 300px; height: 60px; }
.vfd-toast {
	position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 12px;
	border: 1px solid rgba(169, 163, 255, .34); border-radius: 14px; background: #23265A;
	box-shadow: 0 24px 50px -24px #000, 0 18px 50px -22px #6C63FF;
	opacity: 0; transform: translateY(-12px) scale(.97);
	transition: opacity .35s var(--vfd-ease), transform .45s var(--vfd-ease);
}
.vfd-toast.is-on { opacity: 1; transform: none; }
.vfd-toast i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6C63FF, #BB59E0); color: #FFFFFF; }
.vfd-toast span { display: flex; flex-direction: column; min-width: 0; color: var(--vfd-body); font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
.vfd-toast b { color: #FFFFFF; font-size: 13.5px; font-weight: 800; }

/* ── Motion ────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
	/* Playing in. Each rule is where a part starts from; the delays below
	   stagger the way back to the finished picture. */
	.vfd-win { transition: opacity .7s var(--vfd-ease), transform 1s var(--vfd-ease); }
	.vfd-in { transition: opacity .55s var(--vfd-ease), transform .7s var(--vfd-ease); transition-delay: calc(.3s + var(--i) * 90ms); }
	.vfd-dial__seg { transition: stroke-dashoffset 1s var(--vfd-ease), opacity .2s linear; transition-delay: calc(.75s + var(--i) * 130ms); }
	.vfd-legend u { transition: transform .9s var(--vfd-ease); transition-delay: calc(1s + var(--i) * 110ms); }
	.vfd-chart__line { transition: stroke-dashoffset 1.3s var(--vfd-ease) .9s; }
	.vfd-chart__area { transition: opacity .8s linear 1.5s; }
	.vfd-chart__pt { transition: opacity .35s linear; transition-delay: calc(1s + var(--i) * 300ms); }
	.vfd-step { transition: opacity .45s var(--vfd-ease), transform .55s var(--vfd-ease); transition-delay: calc(1.1s + var(--i) * 160ms); }
	.vfd-ladder::before { transform-origin: left center; transition: transform .9s var(--vfd-ease) 1.1s; }
	.vfd-tile b.is-bump { animation: vfd-bump .5s var(--vfd-ease); }

	.vf-js .vfd:not(.is-in) .vfd-win { opacity: 0; transform: translateY(56px) scale(.965); }
	.vf-js .vfd:not(.is-in) .vfd-in { opacity: 0; transform: translateY(18px); }
	.vf-js .vfd:not(.is-in) .vfd-dial__seg { opacity: 0; stroke-dashoffset: calc(var(--on) * 1px); }
	.vf-js .vfd:not(.is-in) .vfd-legend u { transform: scaleX(0); }
	.vf-js .vfd:not(.is-in) .vfd-chart__line { stroke-dashoffset: 1; }
	.vf-js .vfd:not(.is-in) .vfd-chart__area,
	.vf-js .vfd:not(.is-in) .vfd-chart__pt { opacity: 0; }
	.vf-js .vfd:not(.is-in) .vfd-step { opacity: 0; transform: translateX(-14px); }
	.vf-js .vfd:not(.is-in) .vfd-ladder::before { transform: scaleX(0); }

	/* The idle loop, only while the band is on screen. */
	.vfd.is-live .vfd-live::after { animation: vfd-pulse 2.4s ease-out infinite; }
	.vfd.is-live .vfd-dial__orbit { animation: vfd-spin 40s linear infinite; }
}
@keyframes vfd-pulse { 0% { opacity: .9; transform: scale(.5); } 70%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes vfd-spin { to { transform: rotate(360deg); } }
@keyframes vfd-bump { 35% { transform: scale(1.16); } }

/* A small tilt toward the pointer, where there is one (the script sets the angles). */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
	.vfd-stage { transform: perspective(2000px) rotateX(var(--vfd-rx, 0deg)) rotateY(var(--vfd-ry, 0deg)); transition: transform .5s ease-out; }
}

/* ── Narrower screens ──────────────────────────────────────────────────── */
/* Two columns: the score beside history and next steps, the rest in a row below. */
@media (max-width: 1179px) {
	.vfd-grid { grid-template-columns: 300px minmax(0, 1fr); }
	.vfd-score__cap { letter-spacing: .08em; }
	.vfd-col--side { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
}
@media (max-width: 899px) {
	.vfd-grid { grid-template-columns: 264px minmax(0, 1fr); gap: 14px; }
	.vfd-col { gap: 14px; }
	.vfd-col--side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vfd-verified { grid-column: 1 / -1; }
	.vfd-dial { width: 160px; height: 160px; }
	.vfd-dial__n b { font-size: 54px; }
	/* No room left in the header: the toast moves to the window's foot. */
	.vfd-toasts { top: auto; bottom: -26px; left: auto; right: 24px; width: 300px; height: 58px; }
	.vfd-toast { transform: translateY(12px) scale(.97); }
}
/* A phone: the score and the next steps, nothing else. */
@media (max-width: 759px) {
	.vfd { padding-bottom: 88px; }
	.vfd__ring { display: none; }
	.vfd-win { border-radius: 14px; }
	.vfd-bar { height: 38px; border-radius: 13px 13px 0 0; }
	.vfd-bar__dots i { width: 8px; height: 8px; }
	.vfd-bar__url { max-width: calc(100% - 96px); margin-left: 48px; padding: 0 10px; font-size: 11px; }
	.vfd-head { min-height: 0; }
	.vfd-grid { grid-template-columns: minmax(0, 1fr); }
	.vfd-hist, .vfd-col--side { display: none; }
	.vfd-box { padding: 16px; }
	.vfd-step { gap: 10px; padding: 9px 10px; }
	.vfd-step__text b { font-size: 13px; }
	.vfd-step__pts { padding: 3px 8px; font-size: 11px; }
	.vfd-toasts { left: 14px; right: 14px; width: auto; height: 56px; }
}
