:root {
	--ink: #130b23;
	--night: #1f1532;
	--plum: #2b1f41;
	--deep: #0c0717;
	--line: #463663;
	--violet: #7b52c7;
	--violet-dark: #5a36a3;
	--violet-soft: #a68be0;
	--leaf: #7bd06d;
	--leaf-light: #a6e39b;
	--leaf-deep: #2f6e26;
	--text: #e9e4f1;
	--muted: #b3a9c6;
	--paper: #f1edf7;
	--paper-ink: #1f1532;
	--paper-muted: #4f4466;
	--radius: 14px;
	--radius-sm: 10px;
	--serif: Georgia, "Times New Roman", serif;
	--sans: Verdana, Geneva, sans-serif;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font-family: var(--sans);
	font-size: 0.95rem;
	line-height: 1.7;
}

h1,
h2,
h3,
h4 {
	font-family: var(--serif);
	font-weight: normal;
	line-height: 1.25;
	margin: 0 0 0.6em;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--leaf);
	text-underline-offset: 3px;
}

a:hover {
	color: var(--leaf-light);
}

a:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--leaf);
	outline-offset: 3px;
	border-radius: 6px;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

address {
	font-style: normal;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0.5rem;
	z-index: 30;
	background: var(--leaf);
	color: var(--ink);
	padding: 0.45rem 0.9rem;
	border-radius: var(--radius-sm);
}

.skip:focus {
	left: 1rem;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(19, 11, 35, 0.95);
	border-bottom: 1px solid var(--line);
}

.bar {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0.4rem 1.25rem;
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--text);
	text-decoration: none;
	flex: none;
}

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

.brand-mark {
	width: 34px;
	height: 34px;
	flex: none;
}

.brand-name {
	font-family: var(--serif);
	font-size: 0.95rem;
	letter-spacing: 0.14em;
}

.menu {
	margin-left: auto;
}

.menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.1rem;
}

.menu a {
	display: block;
	color: var(--muted);
	text-decoration: none;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	padding: 0.35rem 0;
	border-bottom: 2px solid transparent;
}

.menu a:hover {
	color: var(--text);
	border-bottom-color: var(--leaf);
}

.menu a[aria-current=page] {
	color: var(--text);
	border-bottom-color: var(--violet);
}

.langs {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	flex: none;
	font-size: 0.74rem;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 0.15rem;
}

.langs a {
	color: var(--muted);
	text-decoration: none;
	padding: 0.12rem 0.5rem;
	border-radius: 10px;
}

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

.langs a[aria-current=page] {
	background: var(--violet);
	color: #ffffff;
}

.langs-dot {
	color: var(--line);
}

.wave {
	display: block;
	line-height: 0;
}

.wave svg {
	display: block;
	width: 100%;
	height: 46px;
}

.wave-down {
	background: var(--ink);
}

.wave-down path {
	fill: var(--night);
}

.wave-up {
	background: var(--night);
}

.wave-up path {
	fill: var(--ink);
}

.wave-foot {
	background: var(--ink);
}

.wave-foot path {
	fill: var(--deep);
}

.foot {
	color: var(--muted);
	font-size: 0.85rem;
}

.foot-body {
	background: var(--deep);
}

.foot-grid {
	max-width: 72rem;
	margin: 0 auto;
	padding: 2rem 1.25rem 1.5rem;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem;
}

.foot-title {
	font-family: var(--serif);
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text);
	margin-bottom: 0.9rem;
}

.foot-org {
	color: var(--text);
	margin-bottom: 0.4rem;
}

.foot address {
	margin-bottom: 0.6rem;
}

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

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

.foot a {
	overflow-wrap: anywhere;
}

.foot-copy {
	max-width: 72rem;
	margin: 0 auto;
	padding: 1rem 1.25rem 2rem;
	border-top: 1px solid var(--line);
	font-size: 0.78rem;
}

.tone-ink {
	background: var(--ink);
}

.tone-night {
	background: var(--night);
}

.doc {
	max-width: 72rem;
	margin: 0 auto;
	padding: 3.25rem 1.25rem;
	display: grid;
	grid-template-columns: 13rem minmax(0, 1fr);
	gap: 2.5rem;
}

.doc-aside {
	border-right: 1px solid var(--line);
	padding-right: 1.5rem;
}

.doc-aside-inner {
	position: sticky;
	top: 5rem;
}

.doc-num {
	display: block;
	font-family: var(--serif);
	color: var(--leaf);
	font-size: 0.85rem;
	letter-spacing: 0.18em;
}

.doc-label {
	font-size: 1.45rem;
	margin: 0.3rem 0 0;
}

.doc-body {
	max-width: 46rem;
}

.doc-title {
	font-size: 1.65rem;
}

section[id] {
	scroll-margin-top: 3.5rem;
}

@media (max-width: 1000px) {
	.bar {
		flex-wrap: wrap;
		gap: 0.3rem 0.75rem;
		padding: 0.4rem 1rem 0.2rem;
	}

	.langs {
		order: 2;
		margin-left: auto;
	}

	.menu {
		order: 3;
		width: 100%;
		margin: 0;
		overflow-x: auto;
	}

	.menu ul {
		gap: 1rem;
		white-space: nowrap;
	}

	section[id] {
		scroll-margin-top: 5.5rem;
	}
}

@media (max-width: 760px) {
	.doc {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
		padding: 2.5rem 1rem;
	}

	.doc-aside {
		border-right: 0;
		border-bottom: 1px solid var(--line);
		padding: 0 0 0.75rem;
	}

	.doc-aside-inner {
		position: static;
	}

	.foot-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
		padding: 1.75rem 1rem 1.25rem;
	}

	.foot-copy {
		padding: 1rem 1rem 1.75rem;
	}
}

@media (max-width: 400px) {
	.brand-name {
		font-size: 0.85rem;
		letter-spacing: 0.08em;
	}

	.brand-mark {
		width: 30px;
		height: 30px;
	}
}
