/* ==========================================================================
   SVT Visual Kit — VS-page charts
   Every colour in every chart resolves through the six tokens below.
   No chart carries an inline hex.
   ========================================================================== */

.svt-chart-fig,
.svt-rings {
	--svt-c-a:     var(--svt-click, #4974C4);  /* product A — the site blue  */
	--svt-c-b:     #C8842B;                    /* product B — theme warm     */
	--svt-c-gold:  #D4A54F;                    /* score gold                 */
	--svt-c-ink:   #1A1A1A;
	--svt-c-body:  #79746A;
	--svt-c-rule:  #E5E1D8;

	margin: 1.8rem 0;
}

.svt-chart {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	font-family: inherit;
	overflow: visible;
}

.svt-chart__title {
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--svt-c-ink);
	margin: 0 0 .9rem;
	line-height: 1.3;
}

/* fills and strokes ------------------------------------------------------ */

.svt-chart .c-a    { fill: var(--svt-c-a); }
.svt-chart .c-b    { fill: var(--svt-c-b); }
.svt-chart .c-gold { fill: var(--svt-c-gold); }
.svt-chart .c-ink  { fill: var(--svt-c-ink); }
.svt-chart .c-body { fill: var(--svt-c-body); }

.svt-chart .c-rule { stroke: var(--svt-c-rule); stroke-width: 1; fill: none; }
.svt-chart .c-axis { stroke: var(--svt-c-ink);  stroke-width: 1.5; }
.svt-chart .c-link { stroke: var(--svt-c-rule); stroke-width: 3; }

.svt-chart .c-rule-fill { fill: none; stroke: var(--svt-c-rule); stroke-width: 1; }

/* diverging: the win/lose contrast carries the comparison ---------------- */

.svt-chart .is-win  { opacity: 1; }
.svt-chart .is-lose { opacity: .38; }
.svt-chart .is-tie  { opacity: .7; }

/* radar ------------------------------------------------------------------ */

.svt-chart--radar .c-area {
	fill-opacity: .16;
	stroke-width: 2.5;
	stroke-linejoin: round;
}
.svt-chart--radar .c-area.c-a { stroke: var(--svt-c-a); }
.svt-chart--radar .c-area.c-b { stroke: var(--svt-c-b); }

/* rings ------------------------------------------------------------------ */

.svt-rings {
	display: flex;
	flex-wrap: wrap;
	gap: 1.6rem;
	align-items: flex-start;
}
.svt-rings .svt-chart--ring { width: auto; flex: 0 0 auto; }

.svt-chart--ring .c-seg {
	fill: none;
	stroke-linecap: butt;
}
.svt-chart--ring .c-seg.c-a    { stroke: var(--svt-c-a); }
.svt-chart--ring .c-seg.c-b    { stroke: var(--svt-c-b); }
.svt-chart--ring .c-seg.c-gold { stroke: var(--svt-c-gold); }
.svt-chart--ring .c-seg.c-off  { stroke: var(--svt-c-rule); }

.svt-chart--ring .c-seg.is-anim {
	animation: svt-seg-pop .34s cubic-bezier(.2, .7, .2, 1) both;
	animation-delay: var(--d, 0s);
}

@keyframes svt-seg-pop {
	from { opacity: 0; transform-box: fill-box; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.svt-chart--ring .c-seg.is-anim { animation: none; opacity: 1; }
}

/* the accessible data table --------------------------------------------- */

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

/* narrow screens --------------------------------------------------------- */

@media (max-width: 560px) {
	.svt-rings { gap: 1rem; justify-content: center; }
	.svt-rings .svt-chart--ring { width: 108px; }
}
