:root {
	--bg: #fbfaf9;
	--fg: #191a1f;
	--muted: #6a6b75;
	--line: #e5e2dd;
	--line-soft: #efece7;
	--accent: #bf1f24;
	--accent-soft: #fbeceb;
	--card: #ffffff;
	--shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 24px rgba(20, 20, 40, .05);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #15161a;
		--fg: #e9e8ec;
		--muted: #9a9aa6;
		--line: #2a2c33;
		--line-soft: #22242a;
		--accent: #ff7b74;
		--accent-soft: #2b1d1d;
		--card: #1c1e23;
		--shadow: none;
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}

.wrap {
	max-width: 42rem;
	margin: 0 auto;
	padding: 0 22px;
}

/* ── шапка ─────────────────────────────── */

header.site {
	border-bottom: 1px solid var(--line-soft);
	background: var(--bg);
	position: sticky;
	top: 0;
	z-index: 5;
}

header.site .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 15px;
}

a.logo {
	color: var(--fg);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.02rem;
	letter-spacing: -0.02em;
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

a.logo .mark {
	width: 26px;
	height: 26px;
	display: block;
}

header.site nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.92rem;
}

header.site nav a:hover { color: var(--fg); }

/* ── типографика ───────────────────────── */

h1 {
	font-size: 2.15rem;
	line-height: 1.17;
	letter-spacing: -0.032em;
	font-weight: 750;
	margin: 40px 0 16px;
}

h2 {
	font-size: 1.32rem;
	line-height: 1.32;
	letter-spacing: -0.02em;
	font-weight: 700;
	margin: 48px 0 14px;
	scroll-margin-top: 70px;
}

h3 {
	font-size: 1.04rem;
	font-weight: 650;
	margin: 26px 0 8px;
}

p, ul, ol { margin: 0 0 17px; }

li { margin-bottom: 8px; }

strong { font-weight: 650; }

.lead {
	font-size: 1.15rem;
	line-height: 1.6;
	color: var(--muted);
	margin-bottom: 26px;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.meta {
	font-size: 0.84rem;
	color: var(--muted);
	padding-bottom: 26px;
	border-bottom: 1px solid var(--line-soft);
	margin-bottom: 8px;
}

/* ── оглавление ────────────────────────── */

.toc {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 18px 22px;
	margin: 28px 0 8px;
	box-shadow: var(--shadow);
}

.toc-title {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
	margin-bottom: 10px;
}

.toc ol {
	margin: 0;
	padding-left: 20px;
	font-size: 0.97rem;
}

.toc li { margin-bottom: 5px; }

.toc a { text-decoration: none; }

.toc a:hover { text-decoration: underline; }

/* ── блоки ─────────────────────────────── */

table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 22px;
	font-size: 0.97rem;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
}

th, td {
	text-align: left;
	padding: 11px 14px;
	border-bottom: 1px solid var(--line-soft);
}

th {
	font-weight: 650;
	font-size: 0.84rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	background: var(--line-soft);
}

tr:last-child td { border-bottom: 0; }

.note {
	background: var(--accent-soft);
	border-radius: 12px;
	padding: 16px 20px;
	margin: 0 0 22px;
	font-size: 0.98rem;
}

.note p:last-child { margin-bottom: 0; }

code {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 1px 6px;
	font-size: 0.88em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	word-break: break-word;
}

/* нумерованные шаги */

ol.steps {
	list-style: none;
	counter-reset: s;
	padding: 0;
	margin: 0 0 22px;
}

ol.steps > li {
	counter-increment: s;
	position: relative;
	padding-left: 42px;
	margin-bottom: 15px;
}

ol.steps > li::before {
	content: counter(s);
	position: absolute;
	left: 0;
	top: 1px;
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.86rem;
	font-weight: 700;
	display: grid;
	place-items: center;
}

/* ── CTA ───────────────────────────────── */

.cta {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 24px 26px;
	margin: 34px 0;
	box-shadow: var(--shadow);
}

.cta h2 { margin-top: 0; }

.cta p:last-of-type { margin-bottom: 20px; }

.btn {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	padding: 12px 22px;
	border-radius: 10px;
}

.btn:hover { filter: brightness(1.08); }

@media (prefers-color-scheme: dark) {
	.btn { color: #15161a; }
}

.btn-sub {
	display: block;
	font-size: 0.85rem;
	color: var(--muted);
	margin-top: 10px;
}

/* ── FAQ ───────────────────────────────── */

.faq {
	border-top: 1px solid var(--line-soft);
	margin-top: 8px;
}

.faq h3 {
	font-size: 1.02rem;
	margin: 22px 0 6px;
}

.faq p {
	color: var(--muted);
	margin-bottom: 0;
}

/* ── главная ───────────────────────────── */

.guides {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 14px;
}

.guides li {
	margin: 0;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	transition: transform .12s ease, border-color .12s ease;
}

.guides li:hover {
	transform: translateY(-1px);
	border-color: var(--accent);
}

.guides a {
	display: block;
	padding: 20px 22px;
	text-decoration: none;
	color: var(--fg);
}

.guides .t {
	font-size: 1.12rem;
	font-weight: 650;
	letter-spacing: -0.015em;
	display: block;
}

.guides .d {
	display: block;
	color: var(--muted);
	font-size: 0.96rem;
	margin-top: 5px;
}

/* ── подвал ────────────────────────────── */

footer.site {
	border-top: 1px solid var(--line-soft);
	margin-top: 60px;
	padding-block: 26px 46px;
	color: var(--muted);
	font-size: 0.87rem;
}

footer.site p { margin-bottom: 8px; }

@media (max-width: 520px) {
	body { font-size: 16px; }
	h1 { font-size: 1.72rem; margin-top: 30px; }
	h2 { font-size: 1.22rem; margin-top: 38px; }
	.lead { font-size: 1.06rem; }
	.cta, .toc { padding: 18px 18px; }
	th, td { padding: 10px 11px; }
}
