/* ====================================================
   DIVERGENCE CHART — charts.css
   Colours/fonts reference variables from style.css only.
   ==================================================== */

/* --- Header --- */
.lab-frozen-article .chart-header {
	margin-bottom: 10px;
}
.lab-frozen-article .chart-title {
	margin-top: 5px;
	margin-bottom: 0;
}

/* --- Legend (placed below title, above chart) --- */
.lab-frozen-article .chart-legend-wrapper {
	display: flex;
	gap: 24px;
	margin: 10px 0 16px;
	flex-wrap: wrap;
	align-items: center;
}
.lab-frozen-article .chart-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: var(--white);
}
.lab-frozen-article .chart-legend-line {
	width: 28px;
	height: 2.5px;
	background: var(--white);
	flex-shrink: 0;
	border-radius: 2px;
}
.lab-frozen-article .chart-legend-line.sat {
	background: repeating-linear-gradient(
		90deg,
		var(--grey-25) 0,
		var(--grey-25) 6px,
		transparent 6px,
		transparent 10px
	);
}

/* --- SVG wrapper — enables floating overlays, full width --- */
.lab-frozen-article .chart-svg-wrapper {
	position: relative;
	width: 100%;
}

/* --- Base SVG --- */
.lab-frozen-article .divergence-chart {
	width: 100%;
	display: block;
}

/* --- Grid & axes --- */
.lab-frozen-article .chart-gridline {
	stroke: var(--grey-75);
	stroke-width: 1;
	fill: none;
}
.lab-frozen-article .chart-axis {
	stroke: var(--grey-50);
	stroke-width: 1.5;
	fill: none;
}

/* --- SVG text labels (all white) --- */
.lab-frozen-article .chart-label {
	fill: var(--white);
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 11px;
	font-weight: 500;
}
.lab-frozen-article .chart-label-right  { text-anchor: end; }
.lab-frozen-article .chart-label-center { text-anchor: middle; }
.lab-frozen-article .chart-label-left   { text-anchor: start; }

/* --- Gap fill --- */
.lab-frozen-article .chart-gap-fill {
	fill: rgba(255, 255, 255, 0.07);
	stroke: none;
	animation: chart-fade-in 1.5s ease-out 1.5s both;
}

/* --- Attacker line: draws in --- */
.lab-frozen-article .chart-line-attacker {
	stroke: var(--white);
	stroke-width: 2.5;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: chart-draw 2s ease-out 0.3s forwards;
}

/* --- SAT line: fades in after attacker finishes --- */
.lab-frozen-article .chart-line-sat {
	stroke: var(--grey-25);
	stroke-width: 2;
	fill: none;
	stroke-dasharray: 6 4;
	stroke-linecap: round;
	opacity: 0;
	animation: chart-fade-in 0.8s ease-out 2.2s forwards;
}

/* --- Dots --- */
.lab-frozen-article .chart-dot,
.lab-frozen-article .chart-dot-sat {
	transform-box: fill-box;
	transform-origin: center;
}
.lab-frozen-article .chart-dot     { fill: var(--white); }
.lab-frozen-article .chart-dot-sat { fill: var(--grey-25); }

/* staggered appearance matching line draw timing */
.lab-frozen-article .chart-dot-d1     { animation: chart-dot-pulse 0.45s ease-out 1.1s both; }
.lab-frozen-article .chart-dot-d2     { animation: chart-dot-pulse 0.45s ease-out 1.55s both; }
.lab-frozen-article .chart-dot-d3     { animation: chart-dot-pulse 0.45s ease-out 2.0s both; }
.lab-frozen-article .chart-dot-sat-d1 { animation: chart-dot-pulse 0.45s ease-out 2.35s both; }

/* --- ChatGPT annotation --- */
.lab-frozen-article .chart-annotation-line {
	stroke: var(--grey-50);
	stroke-width: 1;
	stroke-dasharray: 4 3;
	opacity: 0;
	animation: chart-fade-in 0.5s ease-out 1.1s forwards;
}
.lab-frozen-article .chart-annotation-text {
	fill: var(--white);
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 11px;
	font-weight: 600;
	text-anchor: start;
	opacity: 0;
	animation: chart-fade-in 0.5s ease-out 1.1s forwards;
}

/* --- 2023 inline annotation (connector + text in gap area) --- */
.lab-frozen-article .chart-callout-line {
	stroke: var(--grey-50);
	stroke-width: 1;
	fill: none;
	opacity: 0;
	animation: chart-fade-in 0.5s ease-out 1.65s forwards;
}
.lab-frozen-article .chart-inline-annotation {
	fill: var(--white);
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 10px;
	font-weight: 500;
	text-anchor: middle;
	opacity: 0;
	animation: chart-fade-in 0.5s ease-out 1.65s forwards;
}

/* --- Floating HTML callout labels (overlaid on SVG) --- */
.lab-frozen-article .chart-float {
	position: absolute;
	pointer-events: none;
	opacity: 0;
	animation: chart-fade-in 0.6s ease-out 2.3s forwards;
	text-align: right;
}
.lab-frozen-article .chart-float-attacker {
	top: 5%;
	right: 2%;
	max-width: 210px;
}
.lab-frozen-article .chart-float-sat {
	top: 74%;
	right: 2%;
	max-width: 210px;
}
.lab-frozen-article .chart-float-title {
	margin: 0 0 3px;
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 12px;
	font-weight: 700;
	color: var(--white);
	line-height: 1.2em;
}
.lab-frozen-article .chart-float-body {
	margin: 0;
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 11px;
	font-weight: 400;
	color: var(--grey-25);
	line-height: 1.5em;
}

/* --- Mobile: bottom annotation text (in SVG) --- */
.lab-frozen-article .chart-bottom-label {
	fill: var(--white);
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-anchor: start;
}
.lab-frozen-article .chart-bottom-label-sat {
	fill: var(--grey-25);
}
.lab-frozen-article .chart-bottom-text {
	fill: var(--grey-25);
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 10px;
	font-weight: 400;
	text-anchor: start;
}

/* --- Source note --- */
.lab-frozen-article .chart-source-note {
	margin-top: 15px;
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 12px;
	line-height: 1.6em;
	color: var(--grey-50);
}

/* --- Desktop / Mobile visibility --- */
.lab-frozen-article .chart-desktop { display: block; }
.lab-frozen-article .chart-mobile  { display: none; }

/* --- Keyframe animations --- */
@keyframes chart-draw {
	to { stroke-dashoffset: 0; }
}
@keyframes chart-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes chart-dot-pulse {
	0%   { opacity: 0; transform: scale(0); }
	60%  { opacity: 1; transform: scale(1.7); }
	100% { opacity: 1; transform: scale(1); }
}

/* --- Mobile breakpoint --- */
@media (max-width: 768px) {
	.lab-frozen-article .chart-desktop        { display: none; }
	.lab-frozen-article .chart-mobile         { display: block; }
	.lab-frozen-article .chart-float          { display: none; }
	.lab-frozen-article .chart-legend-wrapper { margin-bottom: 10px; }
}

/* ====================================================
   DISCLOSURE TIMELINE — axis + event nodes
   ==================================================== */

.lab-frozen-article .disclosure-timeline {
	--dt-axis-color: rgba(255, 255, 255, 0.18);
	--dt-axis-accent: rgba(255, 255, 255, 0.4);
	--dt-node-color: var(--white);
	--dt-drop-color: rgba(255, 255, 255, 0.22);
	--dt-label-color: var(--grey-25);
	--dt-title-color: var(--white);
	--dt-body-color: var(--grey-25);
	--dt-caption-w: 190px;
	--dt-drop-h: 32px;
	--dt-caption-gap: 14px;

	position: relative;
	margin: 8px 0 0;
	padding: 0;
	min-height: 360px;
}

/* --- Axis --- */
.lab-frozen-article .disclosure-timeline__axis {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: linear-gradient(
		to right,
		transparent 0,
		var(--dt-axis-color) 12px,
		var(--dt-axis-color) calc(100% - 12px),
		transparent 100%
	);
}
/* Axis caps: small labels anchored to the very ends of the axis */
.lab-frozen-article .disclosure-timeline__axis-cap {
	position: absolute;
	top: 14px;
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--dt-label-color);
	white-space: nowrap;
	line-height: 1;
}
.lab-frozen-article .disclosure-timeline__axis-cap--start { left: 0; }
.lab-frozen-article .disclosure-timeline__axis-cap--end { right: 0; }

/* "Two patch bypasses" chevron annotation */
.lab-frozen-article .disclosure-timeline__bypass {
	position: absolute;
	top: -16px;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	color: rgba(255, 255, 255, 0.55);
	pointer-events: none;
}
.lab-frozen-article .disclosure-timeline__bypass svg {
	display: block;
}
.lab-frozen-article .disclosure-timeline__bypass-label {
	margin-top: 4px;
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 10px;
	font-weight: 500;
	font-style: italic;
	letter-spacing: 0.01em;
	color: var(--grey-25);
	white-space: nowrap;
	line-height: 1;
}

/* --- Events --- */
.lab-frozen-article .disclosure-timeline__events {
	position: absolute;
	inset: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}
.lab-frozen-article .disclosure-timeline__event {
	position: absolute;
	left: var(--at);
	top: 0;
	bottom: 0;
	width: 0;
}

/* Node: ring + dot — sits on the axis */
.lab-frozen-article .disclosure-timeline__node {
	position: absolute;
	top: 50%;
	left: 0;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--dt-node-color);
	transform: translate(-50%, -50%);
	box-shadow: 0 0 0 4px var(--grey-100), 0 0 0 5px rgba(255, 255, 255, 0.35);
	z-index: 2;
}
.lab-frozen-article .disclosure-timeline__node--open {
	background: var(--grey-100);
	box-shadow: 0 0 0 4px var(--grey-100), 0 0 0 5px var(--white);
}

/* Drop hairline from axis to caption */
.lab-frozen-article .disclosure-timeline__event::before {
	content: '';
	position: absolute;
	left: 0;
	width: 1px;
	height: var(--dt-drop-h);
	background: var(--dt-drop-color);
	transform: translateX(-0.5px);
}
.lab-frozen-article .disclosure-timeline__event--above::before {
	bottom: calc(50% + 6px);
}
.lab-frozen-article .disclosure-timeline__event--below::before {
	top: calc(50% + 6px);
}

/* Caption: absolutely anchored to the event x-position; centered by default */
.lab-frozen-article .disclosure-timeline__caption {
	position: absolute;
	left: 0;
	width: var(--dt-caption-w);
	transform: translateX(-50%);
	color: var(--dt-body-color);
}
.lab-frozen-article .disclosure-timeline__event--above .disclosure-timeline__caption {
	bottom: calc(50% + 6px + var(--dt-drop-h) + var(--dt-caption-gap));
	text-align: center;
}
.lab-frozen-article .disclosure-timeline__event--below .disclosure-timeline__caption {
	top: calc(50% + 6px + var(--dt-drop-h) + var(--dt-caption-gap));
	text-align: center;
}

/* Edge alignment so captions don't overflow the panel */
.lab-frozen-article .disclosure-timeline__event[style*="--at: 0%"] .disclosure-timeline__caption {
	transform: translateX(0);
	text-align: left;
}
.lab-frozen-article .disclosure-timeline__event[style*="--at: 100%"] .disclosure-timeline__caption {
	transform: translateX(-100%);
	text-align: right;
}

.lab-frozen-article .disclosure-timeline__date {
	display: block;
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--white);
	opacity: 0.75;
	line-height: 1;
	margin-bottom: 10px;
}
.lab-frozen-article .disclosure-timeline__vendor {
	display: block;
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--dt-title-color);
	line-height: 1.2em;
	margin-bottom: 6px;
}
.lab-frozen-article .disclosure-timeline__body {
	margin: 0;
	font-family: 'Inter', 'Arial', sans-serif;
	font-size: 12.5px;
	font-weight: 400;
	color: var(--dt-body-color);
	line-height: 1.55em;
	letter-spacing: 0.005em;
}

/* --- Mobile: vertical timeline --- */
@media (max-width: 768px) {
	.lab-frozen-article .disclosure-timeline {
		min-height: 0;
		padding: 4px 0 4px 32px;
	}
	.lab-frozen-article .disclosure-timeline__axis {
		position: absolute;
		top: 10px;
		bottom: 10px;
		left: 6px;
		right: auto;
		width: 1px;
		height: auto;
		background: linear-gradient(
			to bottom,
			transparent 0,
			var(--dt-axis-color) 10px,
			var(--dt-axis-color) calc(100% - 10px),
			transparent 100%
		);
	}
	.lab-frozen-article .disclosure-timeline__axis-cap,
	.lab-frozen-article .disclosure-timeline__bypass {
		display: none;
	}
	.lab-frozen-article .disclosure-timeline__events {
		position: static;
		inset: auto;
		display: flex;
		flex-direction: column;
		gap: 26px;
	}
	.lab-frozen-article .disclosure-timeline__event,
	.lab-frozen-article .disclosure-timeline__event--above,
	.lab-frozen-article .disclosure-timeline__event--below {
		position: relative;
		left: 0;
		top: auto;
		bottom: auto;
		width: 100%;
		min-height: 0;
	}
	.lab-frozen-article .disclosure-timeline__event::before {
		display: none;
	}
	.lab-frozen-article .disclosure-timeline__node {
		position: absolute;
		top: 10px;
		left: -26px;
		transform: none;
		width: 9px;
		height: 9px;
		box-shadow: 0 0 0 4px var(--grey-100), 0 0 0 5px rgba(255, 255, 255, 0.35);
	}
	.lab-frozen-article .disclosure-timeline__caption,
	.lab-frozen-article .disclosure-timeline__event--above .disclosure-timeline__caption,
	.lab-frozen-article .disclosure-timeline__event--below .disclosure-timeline__caption,
	.lab-frozen-article .disclosure-timeline__event[style*="--at: 0%"] .disclosure-timeline__caption,
	.lab-frozen-article .disclosure-timeline__event[style*="--at: 100%"] .disclosure-timeline__caption {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		width: 100%;
		max-width: 100%;
		text-align: left;
		transform: none;
	}
	.lab-frozen-article .disclosure-timeline__date {
		margin-bottom: 8px;
	}
	.lab-frozen-article .disclosure-timeline__vendor {
		font-size: 17px;
		margin-bottom: 4px;
	}
	.lab-frozen-article .disclosure-timeline__body {
		font-size: 13px;
	}
}

/* ====================================================
   REGULATION INFOGRAPHIC
   ==================================================== */

.lab-frozen-article .reg-subtitle {
	margin: 6px 0 24px;
	font-size: 0.9em;
	line-height: 1.4em;
	color: var(--grey-25);
}
.lab-frozen-article .reg-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-bottom: 10px;
}
.lab-frozen-article .reg-card {
	background: var(--grey-75);
	border-radius: 20px;
	padding: 25px;
}
.lab-frozen-article .reg-eyebrow {
	display: block;
	margin-bottom: 10px;
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 0.65em;
	font-weight: 900;
	letter-spacing: 0.05em;
	line-height: 1em;
	text-transform: uppercase;
	color: var(--grey-25);
}
.lab-frozen-article .reg-stat {
	display: block;
	font-family: 'Inter Tight', 'Arial', sans-serif;
	font-size: 3em;
	font-weight: 800;
	line-height: 0.95em;
	letter-spacing: -0.04em;
	color: var(--white);
	margin-bottom: 16px;
}
.lab-frozen-article .reg-copy {
	font-size: 0.85em;
	line-height: 1.5em;
	color: var(--white);
	margin: 0 0 10px;
}
.lab-frozen-article .reg-source {
	font-size: 0.65em;
	line-height: 1.4em;
	color: var(--grey-50);
	margin: 0;
}

/* Precedent bar */
.lab-frozen-article .reg-precedent {
	background: var(--grey-75);
	border-radius: 20px;
	padding: 25px;
	display: flex;
	align-items: center;
	gap: 30px;
}
.lab-frozen-article .reg-precedent-stat {
	flex-shrink: 0;
	min-width: 120px;
}
.lab-frozen-article .reg-precedent-stat .reg-stat {
	font-size: 3.5em;
	margin-bottom: 0;
}
.lab-frozen-article .reg-precedent-content {
	flex: 1;
}
.lab-frozen-article .reg-precedent-content .reg-copy {
	margin-bottom: 6px;
}

/* 3-column grid at lg and above */
@media (min-width: 992px) {
	.lab-frozen-article .reg-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Stack precedent bar on smaller screens */
@media (max-width: 991px) {
	.lab-frozen-article .reg-precedent {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.lab-frozen-article .reg-precedent-stat {
		min-width: unset;
	}
	.lab-frozen-article .reg-precedent-stat .reg-stat {
		font-size: 3em;
	}
}
