/* ==========================================================================
   Азбука кредита — main.css
   Токены → база → раскладка → компоненты → статья → калькуляторы → утилиты
   ========================================================================== */

@font-face {
	font-family: "Onest";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/onest-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Onest";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/onest-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Onest";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/onest-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Токены ---------- */
:root {
	color-scheme: light;
	--bg: #f6f5f1;
	--surface: #ffffff;
	--surface-2: #efede7;
	--surface-3: #e6e3db;
	--ink: #14181c;
	--ink-2: #4b535c;
	--ink-3: #737b84;
	--line: #e2dfd6;
	--line-2: #d4d0c5;
	--accent: #0b7a57;
	--accent-ink: #075c41;
	--accent-soft: #e2f1ea;
	--on-accent: #ffffff;
	--hl: #f7d774;
	--warn: #9a5300;
	--warn-soft: #fbf0dc;
	--bad: #b42318;
	--bad-soft: #fbe9e7;
	--good: #0b7a57;
	--shadow-1: 0 1px 2px rgb(20 24 28 / .05), 0 2px 6px rgb(20 24 28 / .04);
	--shadow-2: 0 2px 4px rgb(20 24 28 / .04), 0 12px 32px -8px rgb(20 24 28 / .14);
	--radius: 14px;
	--radius-sm: 10px;
	--radius-lg: 22px;
	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
	--hdr-h: 64px;
	--ease: cubic-bezier(.22, 1, .36, 1);
	--font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #0e1113;
		--surface: #151a1d;
		--surface-2: #1b2125;
		--surface-3: #232a2f;
		--ink: #e9ecea;
		--ink-2: #a9b1ae;
		--ink-3: #7e8784;
		--line: rgb(255 255 255 / .08);
		--line-2: rgb(255 255 255 / .14);
		--accent: #34c792;
		--accent-ink: #5fd9ab;
		--accent-soft: rgb(52 199 146 / .12);
		--on-accent: #06281b;
		--hl: #1f7a58;
		--warn: #f0b35a;
		--warn-soft: rgb(240 179 90 / .1);
		--bad: #ff8a80;
		--bad-soft: rgb(255 138 128 / .1);
		--good: #34c792;
		--shadow-1: 0 1px 2px rgb(0 0 0 / .3);
		--shadow-2: 0 2px 4px rgb(0 0 0 / .25), 0 16px 40px -12px rgb(0 0 0 / .6);
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0e1113;
	--surface: #151a1d;
	--surface-2: #1b2125;
	--surface-3: #232a2f;
	--ink: #e9ecea;
	--ink-2: #a9b1ae;
	--ink-3: #7e8784;
	--line: rgb(255 255 255 / .08);
	--line-2: rgb(255 255 255 / .14);
	--accent: #34c792;
	--accent-ink: #5fd9ab;
	--accent-soft: rgb(52 199 146 / .12);
	--on-accent: #06281b;
	--hl: #1f7a58;
	--warn: #f0b35a;
	--warn-soft: rgb(240 179 90 / .1);
	--bad: #ff8a80;
	--bad-soft: rgb(255 138 128 / .1);
	--good: #34c792;
	--shadow-1: 0 1px 2px rgb(0 0 0 / .3);
	--shadow-2: 0 2px 4px rgb(0 0 0 / .25), 0 16px 40px -12px rgb(0 0 0 / .6);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}
.main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; height: auto; }
svg.icon { flex: none; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.022em; font-weight: 750; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ink); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Кнопки, чипы ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 20px;
	border: 0; border-radius: 12px;
	background: var(--accent); color: var(--on-accent);
	font-weight: 650; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 1px 2px rgb(0 0 0 / .12);
	transition: transform .14s var(--ease), background-color .18s var(--ease);
}
.btn:hover { color: var(--on-accent); background: var(--accent-ink); }
:root[data-theme="dark"] .btn:hover { background: var(--accent-ink); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--block { display: flex; width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }

.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 10px; border-radius: 999px;
	background: var(--accent-soft); color: var(--accent-ink);
	font-size: 12.5px; font-weight: 600; line-height: 1.4; text-decoration: none; letter-spacing: .01em;
	transition: background-color .15s var(--ease);
}
a.chip:hover { background: color-mix(in oklab, var(--accent-soft), var(--accent) 12%); color: var(--accent-ink); }
.chip--lg { padding: 8px 14px; font-size: 14px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
a.chip--lg:hover { background: var(--surface); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.chip--muted { background: var(--surface-2); color: var(--ink-2); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }

.iconbtn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; border: 0; border-radius: 12px;
	background: transparent; color: var(--ink); cursor: pointer;
	transition: background-color .15s var(--ease), transform .12s var(--ease);
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn:active { transform: scale(.94); }

.eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--accent-ink);
	margin-bottom: 14px;
}

/* ---------- Шапка ---------- */
.hdr {
	position: sticky; top: 0; z-index: 40;
	background: color-mix(in oklab, var(--bg) 84%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	border-bottom: 1px solid transparent;
	transition: border-color .2s var(--ease);
}
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr__in { display: flex; align-items: center; gap: 16px; height: var(--hdr-h); }
.hdr__tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.hdr__search { border-top: 1px solid var(--line); padding: 12px 0; background: var(--bg); }
.hdr__search .search { max-width: 640px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.logo:hover { color: var(--ink); }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.logo__name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.logo__tag { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.nav { display: none; }
.nav__list { display: flex; list-style: none; gap: 2px; }
.nav__list a {
	display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 10px;
	color: var(--ink-2); font-size: 14.5px; font-weight: 550; text-decoration: none;
	transition: color .15s var(--ease), background-color .15s var(--ease);
}
.nav__list a:hover, .nav__list .current-menu-item > a, .nav__list .current-post-ancestor > a, .nav__list a[aria-current] { color: var(--ink); background: var(--surface-2); }

@media (min-width: 1080px) {
	.nav { display: block; margin-left: 12px; }
	.hdr__burger { display: none; }
}

[data-theme-toggle] .i-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .i-sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) [data-theme-toggle] .i-sun { display: block; }
	:root:not([data-theme="light"]) [data-theme-toggle] .i-moon { display: none; }
}

/* Мобильное меню — полноэкранный лист */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgb(10 12 14 / .45); }
.sheet[hidden] { display: none; }
.sheet__panel {
	position: absolute; inset: 0 0 0 auto; width: min(420px, 100%);
	background: var(--bg); padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom));
	overflow-y: auto; overscroll-behavior: contain;
	display: flex; flex-direction: column; gap: 18px;
	box-shadow: var(--shadow-2);
}
.sheet.is-open .sheet__panel { animation: sheet-in .26s var(--ease) both; }
.sheet.is-open { animation: fade-in .2s var(--ease) both; }
@keyframes sheet-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet__top { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.sheet__list { list-style: none; display: grid; gap: 2px; }
.sheet__list a {
	display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-radius: 12px;
	font-size: 19px; font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.sheet__list a:hover, .sheet__list a:active { background: var(--surface-2); }
.sheet__sub { list-style: none; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.sheet__sub a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ink-2); text-decoration: none; }
body.is-locked { overflow: hidden; }

/* ---------- Поиск ---------- */
.search { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; }
.search__icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search__input {
	flex: 1; min-width: 0; height: 50px; padding: 0 12px 0 42px;
	border: 1px solid var(--line-2); border-radius: 14px;
	background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
	transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search__input::placeholder { color: var(--ink-3); }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search__btn { position: absolute; right: 6px; }
.search__input::-webkit-search-cancel-button { display: none; }
.search .search__input { padding-right: 96px; }

/* ---------- Главная: hero ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(36px, 6vw, 64px); isolation: isolate; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(60% 70% at 85% 10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 70%),
		linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
		linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
	-webkit-mask-image: radial-gradient(90% 80% at 60% 20%, #000 30%, transparent 75%);
	mask-image: radial-gradient(90% 80% at 60% 20%, #000 30%, transparent 75%);
	opacity: .9;
}
.hero__grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
.hero__title { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.9rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; max-width: 15ch; }
.hl {
	background: linear-gradient(transparent 58%, color-mix(in oklab, var(--hl) 75%, transparent) 58%, color-mix(in oklab, var(--hl) 75%, transparent) 92%, transparent 92%);
	padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero__lead { margin-top: 18px; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--ink-2); max-width: 56ch; }
.hero__text .search { margin-top: 26px; max-width: 560px; }
.hero__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (min-width: 960px) {
	.hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); }
}

/* ---------- Секции ---------- */
.sec { padding: clamp(36px, 6vw, 72px) 0 0; }
.sec--tight { padding-top: 48px; }
.sec__head { margin-bottom: 22px; }
.sec__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec__title { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem); letter-spacing: -.028em; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more .icon { transition: transform .18s var(--ease); }
.more:hover .icon { transform: translateX(3px); }

/* Плитки разделов */
.tiles { list-style: none; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
	position: relative; display: grid; gap: 6px; height: 100%;
	padding: 20px; border-radius: var(--radius); background: var(--surface);
	box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
	color: var(--ink); text-decoration: none;
	transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.tile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-2); }
.tile__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 8px; }
.tile__name { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.tile__lead { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.tile__count { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); }
.tile__count .icon { transition: transform .18s var(--ease); }
@media (max-width: 559px) {
	.tile { grid-template-columns: 46px 1fr; column-gap: 14px; row-gap: 2px; padding: 16px; }
	.tile__icon { grid-row: span 3; margin: 0; }
	.tile__name { font-size: 17px; }
	.tile__lead { font-size: 14px; }
	.tile__count { margin-top: 4px; }
}
.tile:hover .tile__count .icon { transform: translateX(3px); }
.tile--accent { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-1); }
.tile--accent:hover { color: var(--bg); }
.tile--accent .tile__lead { color: color-mix(in oklab, var(--bg) 72%, transparent); }
.tile--accent .tile__icon { background: color-mix(in oklab, var(--bg) 14%, transparent); color: var(--bg); }
.tile--accent .tile__count { color: var(--hl); }
:root[data-theme="dark"] .tile--accent .tile__count { color: var(--accent); }

/* Гайды */
.guides { display: grid; gap: 12px; }
@media (min-width: 700px) { .guides { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.guides--inline { margin-bottom: 24px; }
.guide {
	display: grid; align-content: start; gap: 8px;
	padding: 22px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
	background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
	box-shadow: inset 0 0 0 1px var(--line);
	transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.guide:hover { color: var(--ink); transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-2); }
.guide__icon { color: var(--accent-ink); }
.guide__kicker { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.guide__title { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.guide__excerpt { color: var(--ink-2); font-size: 14.5px; }
.guide__meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }

/* Карточки */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card {
	position: relative; display: flex; flex-direction: column;
	border-radius: var(--radius); overflow: hidden; background: var(--surface);
	box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
	transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-2); }
.card__media { display: block; aspect-ratio: 1200 / 630; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card__media img { transform: scale(1.025); }
.card__ph { display: grid; place-items: center; height: 100%; color: var(--ink-3); }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.card__title { font-size: 18px; line-height: 1.28; letter-spacing: -.015em; font-weight: 700; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__title a:hover { color: var(--accent-ink); }
.card .chip { position: relative; z-index: 2; }
.card__excerpt { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--ink-3); }

/* Методология */
.method {
	display: grid; gap: 28px; padding: clamp(22px, 4vw, 44px);
	border-radius: var(--radius-lg); background: var(--surface);
	box-shadow: inset 0 0 0 1px var(--line);
}
.method__head p:not(.eyebrow) { margin: 12px 0 20px; color: var(--ink-2); max-width: 46ch; }
.method__steps { list-style: none; display: grid; gap: 18px; }
.method__steps li { display: flex; gap: 14px; }
.method__n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.method__t { font-weight: 700; margin-bottom: 4px; }
.method__steps p:not(.method__t) { color: var(--ink-2); font-size: 15px; }
@media (min-width: 900px) { .method { grid-template-columns: .9fr 1.1fr; align-items: center; } }

/* ---------- Хлебные крошки ---------- */
.crumbs { padding: 18px 0 8px; font-size: 13.5px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; color: var(--ink-3); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--line-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }
.crumbs span[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* ---------- Архив ---------- */
.arch__head { display: flex; gap: 18px; align-items: flex-start; padding: 12px 0 28px; }
.arch__icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); }
.arch__title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); letter-spacing: -.032em; font-weight: 800; }
.arch__desc { margin-top: 12px; color: var(--ink-2); max-width: 70ch; font-size: 16.5px; }
.arch__desc p + p { margin-top: 10px; }
.arch__head--search > div { width: 100%; max-width: 640px; }
.arch__head--search .search { margin-top: 18px; }
@media (max-width: 559px) { .arch__icon { display: none; } }
.empty { padding: 32px 0; color: var(--ink-2); }

.pager { margin-top: 32px; }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px;
	background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-weight: 600;
}
.pager .current { background: var(--ink); color: var(--bg); box-shadow: none; }
.pager a:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-ink); }

.results { list-style: none; display: grid; gap: 10px; max-width: 820px; }
.result { display: grid; gap: 6px; justify-items: start; padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.result__title { font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.result__title:hover { color: var(--accent-ink); }
.result__excerpt { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Статья ---------- */
.post { padding-bottom: 8px; }
.post__head { padding: 10px 0 24px; max-width: 820px; }
.post__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.post__title { font-size: clamp(1.85rem, 1.2rem + 2.7vw, 3.1rem); line-height: 1.08; letter-spacing: -.032em; font-weight: 800; }
.post__lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 62ch; }
.post__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.post__meta li { display: inline-flex; align-items: center; gap: 6px; }
.post__meta .icon { color: var(--ink-3); }

.post__layout { display: grid; gap: 32px; }
.post__main { min-width: 0; }
.post__aside { display: none; }
@media (min-width: 1100px) {
	.post__layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; }
	.post__aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--hdr-h) + 20px); align-self: start; max-height: calc(100dvh - var(--hdr-h) - 40px); overflow: auto; }
	.toc--mobile { display: none; }
}

.toc--side { padding: 4px 0; }
.toc__title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; }
.toc--side a {
	display: block; padding: 6px 12px; border-left: 2px solid var(--line);
	color: var(--ink-2); font-size: 14px; line-height: 1.4; text-decoration: none;
	transition: color .15s var(--ease), border-color .15s var(--ease);
}
.toc--side a:hover { color: var(--ink); border-color: var(--line-2); }
.toc--side a.is-active { color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.toc--mobile { margin-bottom: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.toc--mobile summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-weight: 650; cursor: pointer; list-style: none; }
.toc--mobile summary::-webkit-details-marker { display: none; }
.toc--mobile summary .icon { transition: transform .2s var(--ease); color: var(--ink-3); }
.toc--mobile[open] summary .icon { transform: rotate(180deg); }
.toc--mobile ol { padding: 0 8px 12px; counter-reset: toc; }
.toc--mobile a { display: flex; gap: 10px; padding: 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.toc--mobile a::before { counter-increment: toc; content: counter(toc); color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.toc--mobile a:hover { background: var(--surface-2); color: var(--ink); }

.disclaimer {
	display: flex; gap: 12px; margin-top: 40px; padding: 16px 18px; border-radius: var(--radius);
	background: var(--surface-2); color: var(--ink-2); font-size: 14px; line-height: 1.55;
}
.disclaimer .icon { flex: none; margin-top: 2px; color: var(--ink-3); }

/* ---------- Типографика текста ---------- */
.prose { max-width: 740px; font-size: 17px; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.1em; margin-bottom: -.2em; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); letter-spacing: -.025em; }
.prose h3 { margin-top: 1.8em; margin-bottom: -.35em; font-size: 1.22rem; letter-spacing: -.015em; }
.prose h2 + *, .prose h3 + * { margin-top: .9em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--ink-3); }
.prose ol > li::marker { font-weight: 650; font-variant-numeric: tabular-nums; }
.prose strong { font-weight: 700; }
.prose a { font-weight: 500; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.prose .lead { font-size: 1.14em; line-height: 1.6; color: var(--ink-2); }
.prose img { border-radius: var(--radius); }

/* Коротко */
.summary {
	padding: 20px 22px; border-radius: var(--radius);
	background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
}
.summary__title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--accent-ink); margin-bottom: 10px !important; }
.summary ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.summary li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.5; }
.summary li + li { margin-top: 0; }
.summary li::before {
	content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 16px; border-radius: 50%;
	background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7a57' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Таблицы */
.table { margin-inline: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.prose table, .sched table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose table:has(th:nth-child(3)), .sched table { min-width: 520px; }
.prose th, .prose td, .sched th, .sched td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th, .sched thead th { background: var(--surface-2); font-size: 13px; font-weight: 650; color: var(--ink-2); text-transform: none; letter-spacing: .01em; white-space: nowrap; }
.prose tbody tr:last-child td, .sched tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--ink-2); }
.prose td:first-child:not(:only-child) { width: 42%; }
.table figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* Подсказки */
.note, .warn {
	position: relative; padding: 16px 18px 16px 50px; border-radius: var(--radius); font-size: 16px; line-height: 1.6;
}
.note { background: var(--accent-soft); }
.warn { background: var(--warn-soft); }
.note::before, .warn::before {
	content: ""; position: absolute; left: 16px; top: 17px; width: 22px; height: 22px;
	background-color: var(--accent-ink);
	-webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.note::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 16v-4.5M12 8h.01'/%3E%3C/svg%3E"); }
.warn::before { background-color: var(--warn); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.7 18-8-14a2 2 0 0 0-3.4 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.note > * + *, .warn > * + * { margin-top: .6em; }

/* Плюсы и минусы */
.proscons { display: grid; gap: 12px; }
@media (min-width: 640px) { .proscons { grid-template-columns: 1fr 1fr; } }
.pros, .cons { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.proscons__title { font-weight: 750; margin-bottom: 10px !important; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pros .proscons__title { color: var(--good); }
.cons .proscons__title { color: var(--bad); }
.proscons__title::before { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--surface); font-size: 16px; font-weight: 800; line-height: 1; }
.pros .proscons__title::before { content: "+"; background: var(--good); }
.cons .proscons__title::before { content: "−"; background: var(--bad); }
.pros ul, .cons ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.pros li, .cons li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.5; }
.pros li + li, .cons li + li { margin-top: 0; }
.pros li::before, .cons li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; }
.pros li::before { background: var(--good); }
.cons li::before { background: var(--bad); }

/* Шаги */
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.prose ol.steps > li { position: relative; padding-left: 46px; margin: 0; }
.prose ol.steps > li::before {
	counter-increment: step; content: counter(step);
	position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}

/* CTA */
.prose .cta { display: flex; justify-content: flex-start; margin-top: 1.6em; }

/* FAQ */
.faq { margin-top: 2.4em !important; }
.faq h2 { margin-top: 0; margin-bottom: 16px; }
.faq details { border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.faq details + details { margin-top: 8px; }
.faq summary {
	position: relative; display: block; padding: 16px 52px 16px 18px; cursor: pointer; list-style: none;
	font-weight: 650; font-size: 16.5px; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: ""; position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
	background: var(--ink-3);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq details > div { padding: 0 18px 16px; color: var(--ink-2); font-size: 16px; }
.faq details > div > * + * { margin-top: .6em; }

/* Источники */
.sources { margin-top: 2.4em !important; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.sources h2 { font-size: 1.05rem !important; margin: 0 0 10px !important; letter-spacing: -.01em; }
.sources ul { padding-left: 1.1em; }
.sources li + li { margin-top: .3em; }
.sources .checked { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

/* ---------- Калькуляторы ---------- */
.calc {
	border-radius: var(--radius-lg); background: var(--surface);
	box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2);
	padding: clamp(18px, 3vw, 26px);
}
.calc--mini { display: grid; gap: 16px; }
.calc__head { display: grid; gap: 2px; }
.calc__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 18px; letter-spacing: -.01em; }
.calc__hint { font-size: 13.5px; color: var(--ink-3); }
.field { display: grid; gap: 8px; }
.field__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.field output { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.input {
	height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px;
	background: var(--bg); color: var(--ink); font: inherit; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; --p: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--p), var(--surface-3) var(--p)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgb(0 0 0 / .18); transition: transform .12s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgb(0 0 0 / .18); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

.calc__result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.calc__result > div { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.calc__result dt { font-size: 13px; color: var(--ink-2); }
.calc__result dd { margin: 4px 0 0; font-size: 20px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc__result > div:first-child { background: var(--accent-soft); }
.calc__result > div:first-child dd { color: var(--accent-ink); }
.calc__more { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.calc__more .icon { transition: transform .18s var(--ease); }
.calc__more:hover .icon { transform: translateX(3px); }

.calc--full { display: grid; gap: 22px; margin-bottom: 36px; }
.calc__form { display: grid; gap: 18px; }
.calc__out { display: grid; gap: 14px; align-content: start; }
.calc__result--big { grid-template-columns: 1fr; }
.calc__result--big dd { font-size: 24px; }
@media (min-width: 560px) { .calc__result--big { grid-template-columns: repeat(3, 1fr); } .calc__result--big > div:first-child { grid-column: 1 / -1; } .calc__result--big > div:first-child dd { font-size: 34px; } }
@media (min-width: 960px) {
	.calc--full { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px 40px; padding: 32px; }
	.calc--full .sched, .calc--full .calc__note { grid-column: 1 / -1; }
}
.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.seg legend { width: 100%; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.bar__a { background: var(--accent); transition: width .3s var(--ease); }
.bar__b { background: var(--hl); transition: width .3s var(--ease); }
:root[data-theme="dark"] .bar__b { background: #d9b441; }
.bar__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -8px; }
.dot--a { background: var(--accent); }
.dot--b { background: var(--hl); }
.sched { border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.sched summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-weight: 650; cursor: pointer; list-style: none; }
.sched summary::-webkit-details-marker { display: none; }
.sched[open] summary .icon { transform: rotate(180deg); }
.sched .table-scroll { border-radius: 0 0 var(--radius) var(--radius); max-height: 420px; overflow-y: auto; }
.sched table { font-variant-numeric: tabular-nums; font-size: 14px; }
.sched td { white-space: nowrap; }
.calc__note { font-size: 13.5px; color: var(--ink-3); }

/* ---------- 410 ---------- */
.gone { max-width: 640px; padding: clamp(40px, 8vw, 96px) 0 24px; }
.gone__code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--line-2); }
.gone__title { margin-top: 12px; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -.03em; }
.gone__lead { margin: 14px 0 24px; color: var(--ink-2); font-size: 17px; }
.gone__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- Подвал ---------- */
.ftr { margin-top: clamp(56px, 8vw, 96px); padding: 48px 0 calc(28px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); font-size: 14.5px; }
.ftr__grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.ftr__brand { grid-column: 1 / -1; display: grid; gap: 14px; max-width: 420px; }
.ftr__brand p { color: var(--ink-2); }
.ftr__h { font-weight: 700; margin-bottom: 10px; }
.ftr__col ul { list-style: none; display: grid; gap: 4px; }
.ftr__col a { display: inline-flex; min-height: 32px; align-items: center; color: var(--ink-2); text-decoration: none; }
.ftr__col a:hover { color: var(--accent-ink); }
.ftr__legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; color: var(--ink-3); font-size: 13px; line-height: 1.55; }
@media (min-width: 900px) {
	.ftr__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
	.ftr__brand { grid-column: auto; }
}

/* Cookie */
.cookie {
	position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
	display: flex; align-items: center; gap: 14px; max-width: 560px; margin-inline: auto;
	padding: 12px 12px 12px 18px; border-radius: 16px;
	background: color-mix(in oklab, var(--surface) 92%, transparent);
	-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
	box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2);
	font-size: 13.5px; color: var(--ink-2); line-height: 1.45;
	animation: cookie-in .3s var(--ease) both .6s;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Движение ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.card:hover, .tile:hover, .guide:hover { transform: none; }
}

/* ---------- Печать ---------- */
@media print {
	.hdr, .ftr, .post__aside, .toc, .cookie, .sheet, .crumbs, .disclaimer { display: none !important; }
	body { background: #fff; color: #000; }
	.prose { max-width: none; font-size: 12pt; }
}

/* ---------- Форма обратной связи ---------- */
.cform { display: grid; gap: 16px; max-width: 640px; padding: clamp(18px, 3vw, 26px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cform__row { display: grid; gap: 16px; }
@media (min-width: 560px) { .cform__row { grid-template-columns: 1fr 1fr; } }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.input--text { font-size: 16px; font-weight: 500; }
.input--area { height: auto; min-height: 140px; padding: 12px 14px; font-size: 16px; font-weight: 400; line-height: 1.5; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
.cform .btn { justify-self: start; }
.prose .cform { margin-top: 1.4em; }
.prose .cform > * + * { margin-top: 0; }

/* Узкие телефоны: шапка без переполнения */
@media (max-width: 420px) {
	.hdr__in { gap: 8px; }
	.iconbtn { width: 40px; }
	.logo { gap: 8px; }
	.logo__text { overflow: hidden; }
	.logo__tag { overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
}
@media (max-width: 350px) {
	.logo__tag { display: none; }
}
.nobr { white-space: nowrap; }
