:root {
	--bg: #0c1118;
	--panel: #141c28;
	--border: rgba(255, 255, 255, 0.08);
	--text: #e8edf4;
	--muted: #8b98a8;
	--accent: #18bfef;
	--accent-bright: #5eeaff;
	--accent-deep: #0891b2;
	--accent-dim: rgba(24, 191, 239, 0.15);
	--accent-glow: rgba(24, 191, 239, 0.32);
	--warn: #fbbf24;
	--radius: 12px;
	--font: "DM Sans", system-ui, sans-serif;
	--display: "Outfit", var(--font);
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body.explorer-page {
	margin: 0;
	font-family: var(--font);
	background: var(--bg);
	background-image: linear-gradient(180deg, rgba(24, 191, 239, 0.07) 0%, transparent 28rem);
	color: var(--text);
	line-height: 1.55;
	min-height: 100vh;
}

@media (prefers-reduced-motion: no-preference) {
	body.explorer-page {
		animation: explorerEnter 0.55s ease-out both;
	}

	.wrap--main {
		animation: explorerContent 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
	}
}

@keyframes explorerEnter {
	from {
		opacity: 0.92;
	}
	to {
		opacity: 1;
	}
}

@keyframes explorerContent {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Top bar — same structure & polish as calculators mini-site */
.site-bridge {
	position: sticky;
	top: 0;
	z-index: 50;
	background: linear-gradient(180deg, rgba(10, 16, 24, 0.92) 0%, rgba(6, 10, 16, 0.86) 55%, rgba(6, 10, 14, 0.82) 100%);
	backdrop-filter: blur(20px) saturate(1.45);
	-webkit-backdrop-filter: blur(20px) saturate(1.45);
	border-bottom: 1px solid rgba(148, 163, 184, 0.1);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.05) inset,
		0 10px 40px rgba(0, 0, 0, 0.32);
}

.site-bridge__inner {
	max-width: min(72rem, calc(100% - 2rem));
	margin: 0 auto;
	padding: 0.75rem 1rem 0.8rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	font-size: 0.9rem;
}

.site-bridge__start {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem 0.5rem;
	min-width: 0;
	padding: 0.32rem 0.75rem 0.32rem 0.6rem;
	border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(148, 163, 184, 0.12));
	border-radius: 999px;
	background: linear-gradient(
		160deg,
		color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, 0.05)) 0%,
		rgba(255, 255, 255, 0.02) 45%,
		rgba(0, 0, 0, 0.05) 100%
	);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-bridge a {
	text-decoration: none;
}

.site-bridge a:hover {
	text-decoration: none;
}

.site-bridge__brand {
	color: var(--text);
	font-weight: 700;
	font-size: 0.96rem;
	letter-spacing: -0.02em;
	padding: 0.22rem 0.4rem;
	margin: -0.1rem 0 -0.1rem -0.15rem;
	border-radius: 10px;
	transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-bridge__brand:hover {
	color: var(--accent-bright);
	background: var(--accent-dim);
}

.site-bridge__sep {
	color: var(--muted);
	opacity: 0.55;
	font-weight: 500;
	font-size: 0.82rem;
	user-select: none;
}

.site-bridge__mark {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	flex-shrink: 0;
	box-shadow: 0 2px 14px rgba(24, 191, 239, 0.22);
}

.site-bridge__here {
	font-family: var(--display);
	color: #e2e8f0;
	font-weight: 600;
	font-size: 0.84rem;
	letter-spacing: -0.025em;
}

.site-bridge__back {
	margin-left: auto;
	color: #05080d;
	font-weight: 600;
	font-size: 0.78rem;
	padding: 0.48rem 1.05rem;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, #fff 22%, transparent);
	background: linear-gradient(
		145deg,
		var(--accent) 0%,
		var(--accent-deep) 55%,
		color-mix(in srgb, var(--accent-deep) 85%, #000) 100%
	);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.2) inset,
		0 4px 18px var(--accent-glow);
	transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.site-bridge__back:hover {
	filter: brightness(1.06);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.25) inset,
		0 8px 28px var(--accent-glow);
	transform: translateY(-1px);
}

.wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
}

.wrap--main {
	padding-top: 1.75rem;
}

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

.load-error {
	background: rgba(248, 113, 113, 0.12);
	border: 1px solid rgba(248, 113, 113, 0.35);
	border-radius: var(--radius);
	padding: 1rem 1.15rem;
	color: #fecaca;
	margin-bottom: 1.5rem;
}

.hero {
	margin-bottom: 1.75rem;
}

.hero__eyebrow {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	margin: 0 0 0.5rem;
}

.hero h1 {
	font-size: clamp(1.45rem, 4vw, 2rem);
	font-weight: 700;
	margin: 0 0 0.75rem;
	line-height: 1.2;
}

.hero__lead {
	font-size: 1.05rem;
	color: var(--muted);
	margin: 0;
	max-width: 52rem;
}

.hero__lead strong {
	color: var(--text);
}

.plain-intro {
	margin-bottom: 2rem;
}

.plain-intro__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.plain-intro__item {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.1rem 1.15rem;
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	column-gap: 0.85rem;
	row-gap: 0.35rem;
	align-items: start;
}

.plain-intro__icon {
	grid-row: 1 / -1;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--accent-dim);
	color: var(--accent);
	font-weight: 700;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(24, 191, 239, 0.35);
}

.plain-intro__item strong {
	grid-column: 2;
	font-size: 0.95rem;
	color: var(--text);
}

.plain-intro__item span:last-child {
	grid-column: 2;
	font-size: 0.86rem;
	color: var(--muted);
	line-height: 1.5;
}

.callouts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.callout {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.1rem 1.2rem;
}

.callout__value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--accent);
	margin: 0 0 0.25rem;
	line-height: 1.1;
}

.callout__label {
	font-size: 0.85rem;
	color: var(--muted);
	margin: 0;
}

.viz-section {
	margin-bottom: 2rem;
}

.viz-section__title {
	font-size: 1.25rem;
	margin: 0 0 0.35rem;
	font-weight: 700;
}

.viz-section__subtitle {
	font-size: 0.92rem;
	color: var(--muted);
	margin: 0 0 1.25rem;
}

.viz-grid {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.viz-split {
	display: grid;
	grid-template-columns: 1.38fr 0.95fr;
	gap: 1rem;
	align-items: stretch;
}

.viz-split--short {
	grid-template-columns: 1fr 1fr;
}

@media screen and (max-width: 820px) {
	.viz-split,
	.viz-split--short {
		grid-template-columns: 1fr;
	}
}

.chart-panel {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.15rem 1rem 1.35rem;
}

.chart-panel--donut {
	display: flex;
	flex-direction: column;
}

.chart-panel--full {
	width: 100%;
}

.chart-panel__h {
	font-size: 1rem;
	margin: 0 0 0.35rem;
	font-weight: 600;
}

.chart-panel__sub {
	font-size: 0.82rem;
	color: var(--muted);
	margin: 0 0 1rem;
	line-height: 1.45;
}

.chart-wrap {
	position: relative;
	max-width: 100%;
}

.chart-wrap--hist {
	height: 260px;
}

.chart-wrap--doughnut {
	height: 280px;
	max-width: 320px;
	margin: 0 auto;
}

.chart-wrap--wide {
	height: 260px;
}

.chart-wrap--tall {
	height: 320px;
}

.chart-wrap--short {
	height: 220px;
}

.controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin-bottom: 1rem;
}

.controls label {
	font-size: 0.9rem;
	color: var(--muted);
}

.controls select {
	font-family: var(--font);
	font-size: 0.95rem;
	padding: 0.45rem 2rem 0.45rem 0.65rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--bg);
	color: var(--text);
	cursor: pointer;
}

.table-panel {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem 1rem 1.5rem;
	margin-bottom: 2rem;
}

.table-panel h2 {
	font-size: 1.05rem;
	margin: 0 0 0.35rem;
	font-weight: 600;
}

.table-panel__sub {
	font-size: 0.86rem;
	color: var(--muted);
	margin: 0 0 1rem;
}

.table-scroll {
	overflow-x: auto;
	border-radius: 8px;
	border: 1px solid var(--border);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

thead th {
	text-align: left;
	padding: 0.65rem 0.75rem;
	background: rgba(0, 0, 0, 0.35);
	color: var(--muted);
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

thead th:hover {
	color: var(--accent);
}

tbody td {
	padding: 0.55rem 0.75rem;
	border-top: 1px solid var(--border);
}

tbody tr:hover td {
	background: var(--accent-dim);
}

.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

thead th.num {
	text-align: right;
}

.disclaimer {
	background: rgba(251, 191, 36, 0.08);
	border: 1px solid rgba(251, 191, 36, 0.25);
	border-radius: var(--radius);
	padding: 1.1rem 1.2rem;
	margin-bottom: 2rem;
}

.disclaimer h2 {
	font-size: 0.95rem;
	margin: 0 0 0.6rem;
	color: var(--warn);
}

.disclaimer ul {
	margin: 0;
	padding-left: 1.2rem;
	color: var(--muted);
	font-size: 0.88rem;
}

.disclaimer li {
	margin-bottom: 0.35rem;
}

.methodology {
	border-top: 1px solid var(--border);
	padding-top: 1.5rem;
}

.methodology h2 {
	font-size: 1rem;
	margin: 0 0 0.75rem;
}

.methodology ol {
	margin: 0;
	padding-left: 1.2rem;
	color: var(--muted);
	font-size: 0.88rem;
}

.methodology li {
	margin-bottom: 0.4rem;
}

.footer-note {
	font-size: 0.8rem;
	color: var(--muted);
	margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	body.explorer-page,
	.wrap--main {
		animation: none;
	}

	.site-bridge__back {
		transition: none !important;
	}
}
