html {
	box-sizing: border-box;
}

:root {
	--bg: #0b0e17;
	--text: rgba(255, 255, 255, 0.92);
	--muted: rgba(255, 255, 255, 0.70);
	--card: rgba(255, 255, 255, 0.06);
	--card-2: rgba(255, 255, 255, 0.03);
	--border: rgba(255, 255, 255, 0.12);
	--border-strong: rgba(255, 255, 255, 0.18);
	--shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

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

body {
	background-color: var(--bg);
	color: var(--text);
	margin: 0;
	font-size: 16px;
	font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body:before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(800px 500px at 20% 10%, rgba(83, 120, 255, 0.18), transparent 60%),
		radial-gradient(700px 420px at 80% 20%, rgba(255, 120, 90, 0.10), transparent 60%),
		radial-gradient(900px 600px at 50% 90%, rgba(90, 255, 190, 0.08), transparent 65%);
	pointer-events: none;
	z-index: -1;
}

/* ---- overal layout  -----*/

.link {
	margin-left: -1.25em;
}

.link:before {
	display: inline-block;
	width: 1.25em;
	content: "→";
}

hr {
	opacity: 0.2;
	margin: 1em 0 1em 0;
}

figure {
	margin: 0;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 14px;
	border: 1px solid var(--border);
}

#topbar {
	position: absolute;
	top: 0;
	width: 100%;
	padding: 1rem 3%;
	height: 3rem;
	position: fixed;
	background-color: rgba(11, 14, 23, 0.85);
	color: var(--text);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(10px);
	z-index: 999;
}

#topbar.scrolled {
	background-color: rgba(11, 14, 23, 0.95);
	border-bottom-color: rgba(255, 255, 255, 0.12);
}

#topbar nav {
	display: flex;
	justify-content: start;
}

#topbar nav div {
	margin-right: 10px;
}

main {
	margin-top: 3rem;
	position: relative;
}

header,
article,
footer section {
	max-width: 1240px;
	margin: 2.25rem auto 0;
	padding: 0 5%;
}

header {
	margin-top: 10rem;
	margin-bottom: 2.5rem;
}

.hero {
	width: 100%;
}

/* .hero-card {
	border-radius: 18px;
	border: 1px solid var(--border);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
	box-shadow: var(--shadow);
	padding: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
} */

.hero-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 16px;
	padding: 3rem;
	margin-bottom: 3rem;
	color: white;
	text-align: center;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.hero-kicker {
	margin: 0 0 0.5rem;
	color: var(--muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.95rem;
}

.hero-lede {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.5;
	max-width: 75ch;
}

.hero-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 1.25rem;
}

.hero-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.10);
	color: var(--text);
	padding: 0.5rem 0.95rem;
	text-decoration: none;
	font-size: 0.98rem;
}

.hero-action:hover {
	text-decoration: none;
	border-color: rgba(255, 255, 255, 0.30);
	background: rgba(255, 255, 255, 0.14);
}

.hero-action--muted {
	border-color: var(--border);
	background: rgba(255, 255, 255, 0.04);
	color: var(--muted);
}

.go_home a:hover {
	text-decoration: none;
}

section {
	margin-bottom: 10rem;
}

figure {
	margin: 1rem 0;
}

/* ---- datastory components -----*/

.toc {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.toc a {
	color: var(--muted);
	text-decoration: none;
	border: 1px solid var(--border);
	background: var(--card);
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	font-size: 0.95rem;
}

.toc a:hover {
	color: var(--text);
	border-color: var(--border-strong);
	text-decoration: none;
}

.story-section {
	padding: 1.25rem;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: var(--card-2);
	box-shadow: var(--shadow);
}

.story-head {
	margin-bottom: 1.25rem;
}

.lede {
	color: var(--muted);
	font-size: 1.05rem;
	margin-top: 0.25rem;
	max-width: 75ch;
	text-align: justify;
}

.story-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	align-items: start;
	margin-top: 1.25rem;
}

.story-copy {
	padding: 0.25rem 0.25rem;
	margin-bottom: 0.25rem;
}

.story-copy h5 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--muted);
}

.story-copy p {
	margin-bottom: 0;
	text-align: justify;
}

.viz-text-extra p {
	text-align: justify;
}

.viz-card {
	margin: 1rem 0 1.25rem;
	padding: 0.75rem;
	border-radius: 14px;
	background: var(--card);
	border: 1px solid var(--border);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.viz-iframe {
	display: block;
	width: 100%;
	min-height: 600px;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.02);
}

.viz-iframe.viz-tall {
	height: 680px;
	min-height: 420px;
}

.viz-single-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.viz-switcher {
	width: 100%;
	border-radius: 14px;
	background: var(--card);
	border: 1px solid var(--border);
	padding: 0.75rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.viz-overlay {
	position: fixed;
	inset: 0;
	background: rgba(11, 14, 23, 0.82);
	backdrop-filter: blur(10px);
	z-index: 2000;
	padding: 1.25rem;
}

.viz-overlay__panel {
	height: calc(100vh - 2.5rem);
	max-width: 1240px;
	margin: 0 auto;
	border-radius: 16px;
	border: 1px solid var(--border);
	background: rgba(11, 14, 23, 0.96);
	box-shadow: var(--shadow);
	padding: 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.viz-overlay__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.viz-overlay__title {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.viz-overlay__iframe {
	flex: 1;
	width: 100%;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.02);
}

html.is-overlay-open,
html.is-overlay-open body {
	overflow: hidden;
}

.viz-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.viz-tabs {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.viz-tab {
	appearance: none;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.04);
	color: var(--muted);
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.95rem;
}

.viz-tab:hover {
	border-color: var(--border-strong);
	color: var(--text);
}

.viz-tab.is-active {
	background: rgba(255, 255, 255, 0.10);
	border-color: rgba(255, 255, 255, 0.22);
	color: var(--text);
}

.viz-actions {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.download-menu {
	position: relative;
}

.download-menu>summary {
	list-style: none;
}

.download-menu>summary::-webkit-details-marker {
	display: none;
}

.download-menu[open]>summary {
	border-color: rgba(255, 255, 255, 0.30);
	background: rgba(255, 255, 255, 0.14);
}

.download-menu__panel {
	position: absolute;
	right: 0;
	top: calc(100% + 0.6rem);
	width: min(520px, 92vw);
	max-height: min(520px, 60vh);
	overflow: auto;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: rgba(11, 14, 23, 0.98);
	box-shadow: var(--shadow);
	padding: 0.5rem;
	z-index: 50;
}

.download-menu__title {
	margin: 0.25rem 0.5rem 0.35rem;
	color: var(--muted);
	font-size: 0.9rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.download-menu__item {
	display: block;
	padding: 0.45rem 0.6rem;
	border-radius: 12px;
	border: 1px solid transparent;
	color: var(--text);
}

.download-menu__item:hover {
	text-decoration: none;
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.10);
}

.protocol-actions {
	display: flex;
	justify-content: flex-start;
	margin: 1.25rem 0 1rem;
}

.viz-action {
	appearance: none;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.04);
	color: var(--muted);
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	font-size: 0.95rem;
	text-decoration: none;
	cursor: pointer;
}

.viz-action:hover {
	border-color: var(--border-strong);
	color: var(--text);
	text-decoration: none;
}

.viz-caption {
	margin: 0.75rem 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

#icons {
	display: flex;
	justify-content: space-between;
	margin-top: 30px;
}

.protocol h1 {
	font-size: 1.7rem;
	margin-top: 2rem;
}

.protocol h2 {
	font-size: 1.3rem;
}


/* ---- data visualizations -----*/

#dataviz_01 {
	border: none;
	max-width: 100%;
	height: auto;
}

.download_big {
	display: flex;
	justify-content: space-between;
	margin: 1.25rem 5%;
	gap: 1rem;
	flex-wrap: wrap;
}

.download_small {
	display: flex;
	justify-content: space-between;
	margin: 1.25rem 0;
	gap: 1rem;
	flex-wrap: wrap;
}

/* ---- footer -----*/

footer {
	margin-bottom: 3rem;
	border-top: 1px solid var(--border);
	padding-top: 3rem;
}

footer section {
	display: flex;
	justify-content: space-between;
}

footer section div {
	width: 45%;
}

/* ---- typography -----*/

h1 {
	font-size: 2.35rem;
	font-weight: bold;
	margin: 0 0 0.5rem;
}

h2 {
	font-size: 1.7rem;
	font-weight: normal;
	margin: 0 0 1rem;
	color: var(--muted);
}

h3 {
	font-size: 1rem;
	font-weight: normal;
	margin: 0 0 1rem;
}

h4 {
	font-size: 1.2rem;
	font-weight: bold;
	margin: 0 0 0.5rem;
}

p {
	font-size: 1.1rem;
	line-height: 1.55;
	margin: 0 0 1rem;
}

figcaption {
	font-size: 0.9rem;
	color: var(--muted);
}

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

a:hover {
	text-decoration: underline;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.author {
	width: 200px;
	display: inline-block;
}

#abstract {
	margin-bottom: 2rem;
}

figcaption {
	padding: 0;
}

.no_margin figcaption {
	padding: 0 3%;
}

#abstract {
	background-color: var(--card);
	color: var(--text);
	padding: 1rem;
	border-radius: 14px;
	border: 1px solid var(--border);
}

#abstract p {
	font-style: normal;
	font-weight: normal;
	font-size: 1.15rem;
	line-height: 1.5;
	margin: 0;
}

.download a {
	text-decoration: underline;
	color: var(--muted);
}

.download a:hover {
	color: var(--text);
}



/* ---- tablet version -----*/

@media only screen and (max-width: 1440px) {

	header,
	article,
	footer section {
		padding-left: 6%;
		padding-right: 6%;
	}
}

@media only screen and (max-width: 992px) {
	h1 {
		font-size: 1.9rem;
	}

	h2,
	#abstract {
		font-size: 1.5rem;
	}

	.author {
		display: block;
	}

	li {
		margin-bottom: 1em;
	}

	header,
	article,
	footer section {
		margin-left: 5%;
		margin-right: 5%;
	}

	/* story grid already stacks */

	footer section {
		display: block;
	}

	footer section div:nth-child(1) {
		margin-bottom: 3rem;
	}

	.download {
		display: flex;
		justify-content: space-between;
		margin: 1rem 0;
		gap: 1rem;
		flex-wrap: wrap;
	}

	.download_small {
		margin: 0;
	}

	figcaption {
		padding: 0%;
	}

	.no_margin figcaption {
		padding: 0 5%;
	}

	footer section div {
		width: 100%;
	}

	.viz-iframe {
		height: 520px;
		min-height: 320px;
	}

	.viz-iframe.viz-tall {
		height: 600px;
		min-height: 420px;
	}

	/* ---- map -----*/

	#map02 {
		width: calc(100% - 180px);
	}

	#sidebar_map02 {
		width: 180px;
	}

	#map04 {
		width: calc(100% - 180px);
	}

	#sidebar_map04 {
		width: 180px;
	}

}