/* Nova — оформление статей.
   Самодостаточно, как и tools.css: тему сайта можно поменять, вид статьи
   останется. Схема одна, светлая: статья лежит в общем потоке страницы, и
   собственная тёмная подложка посреди светлой темы выглядит поломкой.
   Все классы с приставкой na-, чтобы не столкнуться с темой. */

.na {
	--na-accent: #3f6fff;
	--na-accent-2: #8b5cf6;
	--na-ok: #0f9d58;
	--na-warn: #b45309;
	--na-err: #dc2626;
	--na-txt: #16203a;
	--na-dim: #5a6684;
	--na-line: #e4e9f5;
	--na-line-2: #cfd8ec;
	--na-soft: #f5f8ff;
	--na-radius: 16px;

	color: var(--na-txt);
	font-size: 17px;
	line-height: 1.68;
	-webkit-text-size-adjust: 100%;
}

.na > :first-child { margin-top: 0; }
.na p { margin: 0 0 1.05em; }
.na a { color: var(--na-accent); text-underline-offset: 3px; }
.na a:hover { text-decoration-thickness: 2px; }

/* ─── заголовки ───────────────────────────────────────────────────────────── */
.na h2 {
	margin: 2em 0 .7em;
	font-size: clamp(22px, 3.1vw, 28px);
	line-height: 1.25;
	letter-spacing: -.01em;
	font-weight: 700;
	position: relative;
	padding-left: 16px;
}
.na h2::before {
	content: "";
	position: absolute;
	left: 0; top: .18em; bottom: .18em;
	width: 5px;
	border-radius: 4px;
	background: linear-gradient(180deg, var(--na-accent), var(--na-accent-2));
}
.na h3 {
	margin: 1.6em 0 .5em;
	font-size: clamp(18px, 2.3vw, 21px);
	line-height: 1.3;
	font-weight: 650;
}

/* ─── вступление и короткий ответ ──────────────────────────────────────────── */
.na-lead {
	font-size: 1.1em;
	color: #2b3657;
}

/* Короткий ответ в начале: человек пришёл за одним фактом, и держать его
   десять абзацев ради просмотров — верный способ потерять его насовсем. */
.na-tldr {
	margin: 0 0 1.6em;
	padding: 18px 20px 18px 22px;
	border-radius: var(--na-radius);
	background: linear-gradient(135deg, #f2f6ff, #fbf7ff 70%, #f4f0ff);
	border: 1px solid #dbe3fb;
	box-shadow: 0 10px 28px -18px rgba(44, 69, 160, .5);
	position: relative;
	overflow: hidden;
}
.na-tldr::before {
	content: "";
	position: absolute; inset: 0 auto 0 0; width: 4px;
	background: linear-gradient(180deg, var(--na-accent), var(--na-accent-2));
}
.na-tldr > :last-child { margin-bottom: 0; }
.na-tldr b, .na-tldr strong { color: #1d2a52; }

/* ─── содержание ───────────────────────────────────────────────────────────── */
.na-toc {
	margin: 0 0 1.8em;
	padding: 16px 20px;
	border: 1px solid var(--na-line);
	border-radius: var(--na-radius);
	background: var(--na-soft);
}
.na-toc__h {
	margin: 0 0 .5em;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--na-dim);
}
.na-toc ol { margin: 0; padding-left: 1.3em; }
.na-toc li { margin: .25em 0; }
.na-toc a { text-decoration: none; }
.na-toc a:hover { text-decoration: underline; }

/* ─── шаги ─────────────────────────────────────────────────────────────────── */
.na-steps {
	counter-reset: na-s;
	list-style: none;
	margin: 1.2em 0 1.6em;
	padding: 0;
}
.na-steps > li {
	counter-increment: na-s;
	position: relative;
	margin: 0 0 14px;
	padding: 14px 18px 14px 58px;
	border: 1px solid var(--na-line);
	border-radius: var(--na-radius);
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 26px -20px rgba(31, 51, 120, .45);
}
.na-steps > li::before {
	content: counter(na-s);
	position: absolute;
	left: 16px; top: 15px;
	width: 28px; height: 28px;
	display: grid; place-items: center;
	border-radius: 9px;
	background: linear-gradient(145deg, var(--na-accent), var(--na-accent-2));
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 6px 14px -6px rgba(63, 111, 255, .8);
}
.na-steps > li > :last-child { margin-bottom: 0; }
.na-steps b { display: block; margin-bottom: .2em; }

/* ─── списки ───────────────────────────────────────────────────────────────── */
.na ul.na-list { list-style: none; margin: 1em 0 1.4em; padding: 0; }
.na ul.na-list > li {
	position: relative;
	margin: .45em 0;
	padding-left: 26px;
}
.na ul.na-list > li::before {
	content: "";
	position: absolute; left: 7px; top: .62em;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--na-accent), var(--na-accent-2));
}

/* ─── врезки ───────────────────────────────────────────────────────────────── */
.na-note, .na-warn, .na-ok {
	margin: 1.2em 0 1.5em;
	padding: 14px 18px 14px 50px;
	border-radius: 14px;
	border: 1px solid var(--na-line);
	background: var(--na-soft);
	position: relative;
	font-size: .97em;
}
.na-note > :last-child, .na-warn > :last-child, .na-ok > :last-child { margin-bottom: 0; }
.na-note::before, .na-warn::before, .na-ok::before {
	position: absolute;
	left: 16px; top: 13px;
	width: 22px; height: 22px;
	display: grid; place-items: center;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	line-height: 1;
}
.na-note::before { content: "i"; background: var(--na-accent); }
.na-warn::before { content: "!"; background: var(--na-warn); }
.na-ok::before   { content: "✓"; background: var(--na-ok); }
.na-warn { background: #fffaf0; border-color: #f4e3c2; }
.na-ok   { background: #f2fbf6; border-color: #cce9d9; }

/* ─── таблица ──────────────────────────────────────────────────────────────── */
.na-tabw { margin: 1.2em 0 1.6em; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.na-tab {
	width: 100%;
	border-collapse: collapse;
	font-size: .96em;
	background: #fff;
	border: 1px solid var(--na-line);
	border-radius: var(--na-radius);
	overflow: hidden;
}
.na-tab th, .na-tab td {
	padding: 11px 14px;
	text-align: left;
	border-bottom: 1px solid var(--na-line);
	vertical-align: top;
}
.na-tab th {
	background: var(--na-soft);
	font-weight: 650;
	font-size: .92em;
	color: #334066;
	white-space: nowrap;
}
.na-tab tr:last-child td { border-bottom: 0; }
.na-tab td:first-child { font-weight: 600; }

/* ─── путь, команда, код ───────────────────────────────────────────────────── */
.na code, .na .na-code {
	padding: .12em .42em;
	border-radius: 6px;
	background: #eef2fb;
	border: 1px solid #dfe6f6;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: .9em;
	white-space: nowrap;
}
.na pre.na-pre {
	margin: 1.1em 0 1.5em;
	padding: 14px 16px;
	border-radius: 12px;
	background: #111831;
	color: #dbe4ff;
	border: 1px solid #22304f;
	overflow-x: auto;
	font-size: .88em;
	line-height: 1.55;
}
.na pre.na-pre code {
	padding: 0; border: 0; background: none; color: inherit; white-space: pre;
}

/* ─── кнопка-ссылка ────────────────────────────────────────────────────────── */
.na-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: .2em 0 1.4em;
	padding: 12px 20px;
	border-radius: 12px;
	background: linear-gradient(145deg, var(--na-accent), var(--na-accent-2));
	color: #fff !important;
	font-weight: 650;
	text-decoration: none;
	box-shadow: 0 12px 26px -12px rgba(63, 111, 255, .85);
	transition: transform .14s ease, box-shadow .14s ease;
}
.na-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(63, 111, 255, .9); }

/* ─── кнопки перехода на официальный ресурс (первый экран) ──────────────────── */
/* Язык оформления взят у qosymsha.vhod.kz: плашка-иконка слева, заголовок с
   подзаголовком, стрелка, уезжающая вправо на наведении, подъём карточки и
   цветные варианты. Блок стоит до текста статьи, поэтому он — первое, что видит
   пришедший за ссылкой. */
.na-go { margin: .2em 0 1.8em; }
.na-go__h {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 .7em;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--na-dim);
}
.na-go__h svg { width: 18px; height: 18px; color: var(--na-accent); }
.na-go__grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 620px) { .na-go__grid { grid-template-columns: 1fr; } }

.na-gobtn {
	position: relative;
	display: flex;
	align-items: center;
	gap: 13px;
	min-height: 66px;
	padding: 13px 16px;
	border-radius: 16px;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.22;
	text-decoration: none !important;
	color: #fff !important;
	overflow: hidden;
	isolation: isolate;
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.na-gobtn__ico {
	flex: 0 0 42px;
	width: 42px; height: 42px;
	display: grid; place-items: center;
	border-radius: 12px;
	background: rgba(255, 255, 255, .2);
}
.na-gobtn__ico svg { width: 22px; height: 22px; }
.na-gobtn__tx { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.na-gobtn__sub { display: block; font-weight: 500; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.na-gobtn__ar { flex: 0 0 18px; width: 18px; height: 18px; transition: transform .2s ease; }
.na-gobtn:hover .na-gobtn__ar { transform: translateX(4px); }
.na-gobtn:hover { transform: translateY(-3px); }
.na-gobtn:active { transform: translateY(0); }

/* Блик, один раз пробегающий по кнопке: он живёт в псевдоэлементе под
   содержимым (z-index:-1 плюс isolation:isolate на кнопке), поэтому текст и
   иконку не затемняет. У «ghost» блика нет — на светлом фоне он не виден. */
.na-gobtn::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0; bottom: 0; left: -70%;
	width: 45%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
	transform: skewX(-22deg);
	animation: na-shine 4.6s ease-in-out infinite;
}
@keyframes na-shine { 0%, 55% { left: -70%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .na-gobtn::after { animation: none; } }

.na-gobtn--primary {
	background: linear-gradient(135deg, #4a63d8, #2a3c96);
	box-shadow: 0 14px 28px -12px rgba(42, 60, 150, .95), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.na-gobtn--primary:hover { box-shadow: 0 20px 34px -12px rgba(42, 60, 150, 1), inset 0 1px 0 rgba(255, 255, 255, .35); }
.na-gobtn--lime {
	background: linear-gradient(135deg, #3fb56e, #148a49);
	box-shadow: 0 14px 28px -12px rgba(20, 138, 73, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.na-gobtn--lime:hover { box-shadow: 0 20px 34px -12px rgba(20, 138, 73, 1), inset 0 1px 0 rgba(255, 255, 255, .4); }
.na-gobtn--orange {
	background: linear-gradient(135deg, #ffa84a, #e2731a);
	box-shadow: 0 14px 28px -12px rgba(226, 115, 26, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.na-gobtn--orange:hover { box-shadow: 0 20px 34px -12px rgba(226, 115, 26, 1), inset 0 1px 0 rgba(255, 255, 255, .4); }
.na-gobtn--ghost {
	background: #fff;
	color: var(--na-txt) !important;
	border: 1.5px solid var(--na-line-2);
	box-shadow: 0 10px 22px -16px rgba(27, 37, 80, .6);
}
.na-gobtn--ghost .na-gobtn__ico { background: #eef3ff; color: var(--na-accent); }
.na-gobtn--ghost .na-gobtn__sub { opacity: .62; }
.na-gobtn--ghost::after { display: none; }
.na-gobtn--ghost:hover { border-color: #b9c6ec; box-shadow: 0 16px 28px -16px rgba(27, 37, 80, .7); }

/* ─── вопросы и ответы ─────────────────────────────────────────────────────── */
.na-faq { margin: 2.2em 0 0; }
.na-faq__h, .na-tools__h, .na-src__h {
	margin: 0 0 .8em;
	font-size: clamp(20px, 2.6vw, 25px);
	font-weight: 700;
	padding-left: 16px;
	position: relative;
}
.na-faq__h::before, .na-tools__h::before, .na-src__h::before {
	content: "";
	position: absolute; left: 0; top: .18em; bottom: .18em;
	width: 5px; border-radius: 4px;
	background: linear-gradient(180deg, var(--na-accent), var(--na-accent-2));
}
.na-faq__i {
	margin: 0 0 10px;
	border: 1px solid var(--na-line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
}
.na-faq__i summary {
	padding: 13px 44px 13px 18px;
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	position: relative;
}
.na-faq__i summary::-webkit-details-marker { display: none; }
.na-faq__i summary::after {
	content: "+";
	position: absolute; right: 16px; top: 50%;
	transform: translateY(-50%);
	width: 22px; height: 22px;
	display: grid; place-items: center;
	border-radius: 7px;
	background: var(--na-soft);
	border: 1px solid var(--na-line-2);
	color: var(--na-accent);
	font-weight: 700;
	line-height: 1;
}
.na-faq__i[open] summary::after { content: "–"; }
.na-faq__i[open] summary { border-bottom: 1px solid var(--na-line); }
.na-faq__a { padding: 13px 18px; font-size: .97em; }
.na-faq__a > :last-child { margin-bottom: 0; }

/* ─── ссылки на сервисы ────────────────────────────────────────────────────── */
.na-tools { margin: 2.2em 0 0; }
.na-tools__g {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.na-tool {
	display: block;
	padding: 16px 18px;
	border-radius: 14px;
	border: 1px solid var(--na-line);
	background: linear-gradient(150deg, #fff, #f8faff);
	text-decoration: none !important;
	color: inherit !important;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.na-tool:hover {
	transform: translateY(-2px);
	border-color: var(--na-line-2);
	box-shadow: 0 18px 32px -20px rgba(31, 51, 120, .65);
}
.na-tool__t {
	display: block;
	font-weight: 650;
	color: var(--na-accent);
	margin-bottom: .2em;
}
.na-tool__d { display: block; font-size: .9em; color: var(--na-dim); }

/* ─── источники и отметка о проверке ───────────────────────────────────────── */
.na-src { margin: 2.2em 0 0; font-size: .95em; }
.na-src ul { margin: 0; padding-left: 1.25em; }
.na-src li { margin: .3em 0; }
.na-stamp {
	margin: 1.6em 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--na-line);
	font-size: .9em;
	color: var(--na-dim);
}

/* ─── вводный абзац главной ────────────────────────────────────────────────── */
.na-home__sub {
	max-width: 46em;
	color: #5a6684;
	font-size: clamp(16px, 2vw, 19px);
	line-height: 1.6;
}

/* ─── карточка в ленте ─────────────────────────────────────────────────────── */
/* Этот блок живёт вне .na, поэтому переменные здесь свои: в ленте обёртки
   статьи нет, и наследовать их неоткуда. */
.na-teaser {
	margin: .4em 0 0;
	color: #5a6684;
	font-size: 16px;
	line-height: 1.6;
}

.na-teaser__m {
	display: inline-block;
	margin-left: 2px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	color: #3f6fff;
}

.na-teaser__m::after { content: " →"; }
.na-teaser__m:hover { text-decoration: underline; }

/* ─── узкий экран ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.na { font-size: 16px; }
	.na-steps > li { padding: 12px 14px 12px 52px; }
	.na-tldr { padding: 15px 16px 15px 19px; }
	.na code, .na .na-code { white-space: normal; word-break: break-all; }
}

/* --- Video --- */
.na-video {
	margin: 28px auto;
	max-width: 620px;
}
.na-video__frame {
	position: relative;
	border: 1px solid var(--na-line);
	border-radius: var(--na-radius);
	overflow: hidden;
	background: #0b1020;
	box-shadow: 0 18px 40px -16px rgba(22, 32, 58, .45);
}
.na-video__frame video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.na-video__cap {
	margin: 10px 2px 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--na-dim);
}


/* ─── форма поиска на внешний справочник (поле lookup) ───────────────────── */
.na-lookup:has(+ .na-go) { margin-bottom: 1.2em; }
.na-lookup {
	margin: 0 0 1.8em;
	padding: 16px 18px 14px;
	border-radius: var(--na-radius);
	background: linear-gradient(135deg, #f2f6ff, #fbf7ff 70%, #f4f0ff);
	border: 1px solid #dbe3fb;
	box-shadow: 0 10px 28px -18px rgba(44, 69, 160, .5);
}
.na-lookup__h {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-weight: 700;
	font-size: 16px;
	color: #1d2a52;
	cursor: pointer;
}
.na-lookup__h svg { width: 19px; height: 19px; color: var(--na-accent); flex: 0 0 19px; }
.na-lookup__row { display: flex; gap: 10px; }
.na-lookup__in {
	flex: 1 1 auto;
	min-width: 0;
	height: 50px;
	padding: 0 16px;
	border: 1.5px solid var(--na-line-2);
	border-radius: 12px;
	background: #fff;
	color: var(--na-txt);
	font: inherit;
	font-size: 17px;
	letter-spacing: .02em;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.na-lookup__in::placeholder { color: #8b95b0; letter-spacing: 0; }
.na-lookup__in:focus {
	outline: none;
	border-color: var(--na-accent);
	box-shadow: 0 0 0 4px rgba(63, 111, 255, .16);
}
.na-lookup__in:user-invalid { border-color: var(--na-err); }
.na-lookup__btn {
	flex: 0 0 auto;
	height: 50px;
	padding: 0 24px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, #4a63d8, #2a3c96);
	box-shadow: 0 12px 24px -12px rgba(42, 60, 150, .95), inset 0 1px 0 rgba(255, 255, 255, .3);
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease;
}
.na-lookup__btn:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px rgba(42, 60, 150, 1), inset 0 1px 0 rgba(255, 255, 255, .35); }
.na-lookup__btn:active { transform: translateY(0); }
.na-lookup__btn:focus-visible { outline: 3px solid rgba(63, 111, 255, .45); outline-offset: 2px; }
.na-lookup__hint { margin: 9px 0 0 !important; font-size: 13.5px; line-height: 1.45; color: var(--na-dim); }
@media (max-width: 480px) {
	.na-lookup__row { flex-direction: column; }
	.na-lookup__btn { width: 100%; }
}


/* ─── переключатель языка статьи (поле alt) ──────────────────────────────── */
.na-lang {
	display: inline-flex; gap: 2px; margin: 0 0 16px; padding: 3px;
	border-radius: 11px; border: 1px solid var(--na-line-2); background: #fff;
	font-size: 13.5px; font-weight: 600; line-height: 1;
}
.na-lang__i {
	display: inline-block; padding: 8px 14px; border-radius: 8px;
	color: var(--na-dim); text-decoration: none !important;
	transition: color .16s ease, background .16s ease;
}
.na a.na-lang__i { color: var(--na-dim); }
.na a.na-lang__i:hover { color: var(--na-accent); background: var(--na-soft); }
.na-lang__i.is-on { color: #fff; background: linear-gradient(145deg, var(--na-accent), var(--na-accent-2)); }

/* ─── картинки-схемы в статье (na-fig) ───────────────────────────────────────
   <figure class="na-fig"><img src="…svg" width="640" height="…" alt="…" loading="lazy">
   <figcaption>…</figcaption></figure>. SVG рисуются под ширину 640, текст в них
   крупный — на телефоне не мельче ~11px. */
.na-fig {
	margin: 1.7em auto;
	max-width: 640px;
	text-align: center;
}
.na-fig img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 22px;
	box-shadow: 0 18px 42px -22px rgba(29, 42, 82, .45), 0 0 0 1px var(--na-line);
	background: var(--na-soft);
}
.na-fig figcaption {
	margin-top: .75em;
	font-size: .9em;
	line-height: 1.5;
	color: var(--na-dim);
}
