:root {
	--navy: #14224a;
	--ink: #1b2440;
	--soft: #56607d;
	--line: #d5dae6;
	--gold: #f0b52b;
	--red: #c8322c;
	--green: #0b7f46;
	--head: Unbounded, "Segoe UI", sans-serif;
	--body: Montserrat, "Segoe UI", sans-serif;
	--wide: 1200px;
	color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font: 500 18px/1.6 var(--body);
	overflow-wrap: break-word;
}
body.map-open { overflow: hidden; }
h1, h2 { font-family: var(--head); color: var(--navy); text-wrap: balance; margin: 0; }
h1 { font-weight: 800; font-size: clamp(27px, 4.3vw, 50px); line-height: 1.16; letter-spacing: -0.02em; }
h2 { font-weight: 600; font-size: clamp(21px, 2.3vw, 28px); line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Напис: «Фронт» жовтий, «Атлас» червоний, відтінки з аватарки */
.wordmark { font: 800 19px/1 var(--head); color: #e3ba3b; letter-spacing: -0.01em; }
.wordmark b { color: #c13134; font-weight: 800; }

/* ---------- Верхня смуга ---------- */
.top {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 50%; display: block; }
.brand .wordmark { font-size: 24px; }
.top nav { display: flex; gap: 8px; }
.top nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 800; color: var(--navy); text-decoration: none; border-radius: 8px; }
.top nav a:hover { background: #eef1f8; }
.top nav [aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; text-decoration-color: var(--gold); }

/* ---------- Вступ ---------- */
.intro {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 30px 24px 40px;
	display: grid;
	grid-template-columns: 168px 1fr;
	gap: 44px;
	align-items: start;
}
.logo { display: block; width: 168px; height: 168px; border-radius: 50%; }
.intro-text p { max-width: 62ch; margin: 20px 0 0; }
.intro-text p + p { margin-top: 12px; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 10px 26px;
	border-radius: 8px;
	font-weight: 800;
	color: #fff;
	text-decoration: none;
}
.telegram { background: #0f76ab; }
.telegram:hover { background: #0b5f8b; }
.tiktok { background: #111; }
.tiktok:hover { background: #3a3a3a; }

.more { background: var(--navy); }
.more:hover { background: #23366f; }
.outline { color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.outline:hover { background: #eef1f8; }

/* ---------- Мапа: рамка з градусами, як на аркуші атласу ---------- */
.sheet { max-width: calc(var(--wide) + 48px); margin: 0 auto; padding: 0 24px; }
.ruler { position: relative; height: 30px; overflow: hidden; }
.ruler i { position: absolute; bottom: 0; height: 9px; border: 1.5px solid var(--navy); }
.ruler i.dark { background: var(--navy); }
.ruler span { position: absolute; top: 0; translate: -50% 0; font: 700 12px/18px var(--body); color: var(--soft); white-space: nowrap; }
.ruler.bottom i { top: 0; bottom: auto; }
.ruler.bottom span { top: 12px; }
.map-slot { height: min(660px, 78vh); background: #e5e3df; }
.map { position: relative; height: 100%; display: flex; flex-direction: column; background: #e5e3df; }
.map iframe { flex: 1; width: 100%; min-height: 0; border: 0; display: block; }
.map-bar { display: none; }
.map-cover { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; }
.map-cover:focus-visible { outline-offset: -6px; }
.open {
	min-height: 64px;
	padding: 14px 36px;
	background: var(--gold);
	color: var(--navy);
	font: 800 clamp(18px, 2vw, 22px)/1.2 var(--head);
	box-shadow: 0 10px 34px rgb(0 0 0 / 0.45);
	transition: scale 0.15s;
}
.map-cover:hover .open { scale: 1.05; }

.map-open .map { position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 10; }
.map-open .map-cover { display: none; }
.map-open .map-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 16px 0 6px;
	height: 50px;
	background: #fff;
}
.map-close { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--navy); font: 800 17px var(--body); cursor: pointer; }

/* ---------- Основний текст ---------- */
.block {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 52px 24px;
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 20px 56px;
}
.block + .block { border-top: 1px solid var(--line); }
.sheet + .block { margin-top: 18px; }
.prose { max-width: 64ch; }
.prose :last-child { margin-bottom: 0; }
h3 { margin: 30px 0 6px; font: 800 1.08em/1.35 var(--body); color: var(--navy); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.legend li { display: flex; gap: 16px; }
.legend i { flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 4px; background: var(--c); }
.legend b { display: block; color: var(--navy); }
.numbers { display: flex; flex-wrap: wrap; gap: 20px 56px; margin: 0 0 22px; }
.numbers dt { color: var(--soft); }
.numbers dd { margin: 0; font: 800 clamp(30px, 4.2vw, 46px)/1.2 var(--head); letter-spacing: -0.02em; white-space: nowrap; }
.ua dd { color: var(--green); }
.ru dd { color: var(--red); }

/* ---------- Сторінка «Підсумки» ---------- */
.page-head { max-width: var(--wide); margin: 0 auto; padding: 34px 24px 44px; }
.page-head p { max-width: 60ch; margin: 18px 0 0; }
.month {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 44px 24px 64px;
	border-top: 3px solid var(--navy);
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 32px 56px;
	align-items: start;
}
.month-head { position: sticky; top: 24px; }
.month-head h2 { font-size: clamp(25px, 2.8vw, 34px); margin-bottom: 24px; }
.month-head .numbers { display: grid; gap: 14px; }
.month-head > p { margin: 18px 0 0; }
.balance { height: 14px; border-radius: 4px; overflow: hidden; background: var(--red); }
.balance i { display: block; height: 100%; background: var(--green); border-right: 3px solid #fff; }
.month-body > p { max-width: 64ch; }
.month-body > h3:first-child { margin-top: 0; }
.events { list-style: none; margin: 14px 0 0; padding: 0; }
.events li {
	display: grid;
	grid-template-columns: 9.5em minmax(0, 1fr) auto;
	gap: 4px 20px;
	padding: 14px 0;
	border-top: 1px solid var(--line);
}
.events time { color: var(--soft); }
.events b { display: block; }
.events div { line-height: 1.45; }
.nobr { white-space: nowrap; }
.events li > span { font-weight: 800; white-space: nowrap; }
.events .ua b, .events .ua > span { color: var(--green); }
.events .ru b, .events .ru > span { color: var(--red); }
.note { margin-top: 14px; font-size: 16px; color: var(--soft); }
.foot-links a { color: var(--navy); margin-left: 18px; }

.join { background: var(--navy); color: #fff; padding: 60px 24px; text-align: center; }
.join h2 { color: #fff; }
.join p { margin: 14px 0 0; }
.join .socials { justify-content: center; }
.join .tiktok { background: #fff; color: #111; }
.join .tiktok:hover { background: #dfe4f0; }

footer {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 26px 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 10px 24px;
	font-size: 15px;
	color: var(--soft);
}

@media (max-width: 760px) {
	body { font-size: 17px; }
	.top { padding: 10px 10px 10px 18px; gap: 8px; }
	.brand { gap: 8px; }
	.brand img { width: 42px; height: 42px; }
	.brand .wordmark { font-size: 17px; }
	.top nav { gap: 0; }
	.top nav a { padding: 0 8px; font-size: 16px; }
	.intro { grid-template-columns: 1fr; padding: 12px 18px 20px; }
	.intro .logo { display: none; }
	.page-head { padding: 14px 18px 30px; }
	.month { grid-template-columns: 1fr; padding: 32px 18px 48px; }
	.month-head { position: static; }
	.events li { grid-template-columns: minmax(0, 1fr) auto; }
	.events div { grid-column: 1 / -1; grid-row: 2; }
	.events li > span { grid-column: 2; }
	.intro-text p { margin-top: 14px; }
	.socials { margin-top: 20px; }
	.intro .button { flex: 1; }
	.sheet { padding: 0; }
	.map-slot { height: 520px; }
	.block { grid-template-columns: 1fr; padding: 38px 18px; }
	.legend { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .open { transition: none; } }
