/* ==========================================================================
   Alfarabius — стили темы
   Шрифты: Unbounded (знак, заголовки разделов) + Manrope (интерфейс и текст)
   ========================================================================== */

/* ---------- 1. Токены ---------- */

:root {
	--font-display: "Unbounded", "Manrope", system-ui, sans-serif;
	--font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--bg: #F3F5F9;
	--surface: #FFFFFF;
	--surface-2: #F7F8FB;
	--ink: #0D1526;
	--ink-2: #273041;
	--muted: #5C687C;
	--faint: #8C97A9;
	--line: #E2E6EE;
	--line-soft: #ECEFF4;

	--brand: #2E55E6;
	--brand-ink: #15307F;
	--brand-50: #EEF2FF;
	--brand-100: #DDE5FF;
	--gold: #F7B924;
	--gold-ink: #2A2106;

	--r-sm: 10px;
	--r: 16px;
	--r-lg: 22px;
	--r-xl: 28px;

	--sh-1: 0 1px 2px rgba(13, 21, 38, .04), 0 1px 3px rgba(13, 21, 38, .05);
	--sh-2: 0 2px 4px rgba(13, 21, 38, .04), 0 14px 32px -10px rgba(13, 21, 38, .16);
	--sh-3: 0 24px 60px -20px rgba(13, 21, 38, .35);

	--side-w: 288px;
	--gutter: clamp(18px, 3.6vw, 56px);
	--ease: cubic-bezier(.2, .8, .2, 1);
}

/* Тона: рубрики, сюжеты, акценты */
[data-tone="lapis"]   { --t: #2E55E6; --t-50: #EEF2FF; --t-100: #DDE5FF; --t-ink: #15307F; }
[data-tone="violet"]  { --t: #7448F0; --t-50: #F3EEFF; --t-100: #E5DAFF; --t-ink: #4B23B8; }
[data-tone="emerald"] { --t: #0E9F6A; --t-50: #E7F7EF; --t-100: #C8EEDB; --t-ink: #0A6B48; }
[data-tone="amber"]   { --t: #EE8E0B; --t-50: #FFF5E5; --t-100: #FDE3B8; --t-ink: #9A4D05; }
[data-tone="teal"]    { --t: #0E97A4; --t-50: #E5F6F7; --t-100: #C3EBEE; --t-ink: #0A6870; }
[data-tone="rose"]    { --t: #E4466A; --t-50: #FFEEF2; --t-100: #FFD5DF; --t-ink: #A71F40; }
[data-tone="slate"]   { --t: #5C687C; --t-50: #F0F3F7; --t-100: #E1E6EE; --t-ink: #273041; }

/* ---------- 2. База ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink-2);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	font-weight: 500;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); margin: 0; font-weight: 800; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; }

::selection { background: var(--brand-100); color: var(--ink); }

:focus-visible {
	outline: 3px solid rgba(46, 85, 230, .45);
	outline-offset: 2px;
	border-radius: 6px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ar-skip {
	position: fixed;
	top: 12px; left: 12px;
	z-index: 1000;
	padding: 10px 16px;
	border-radius: 12px;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
	transform: translateY(-160%);
	transition: transform .2s var(--ease);
}
.ar-skip:focus { transform: none; }

.ar-ico { flex: none; display: block; }

/* ---------- 3. Каркас: сайдбар + контент ---------- */

.ar-app { min-height: 100vh; }

.ar-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.ar-content {
	flex: 1;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 36px var(--gutter) 24px;
}

@media (min-width: 1024px) {
	.ar-app {
		display: grid;
		grid-template-columns: var(--side-w) minmax(0, 1fr);
		background: linear-gradient(90deg, var(--surface) calc(var(--side-w) - 1px), var(--line) 0, var(--line) var(--side-w), transparent 0);
	}
	.ar-topbar { display: none !important; }
	.ar-side {
		position: sticky;
		top: 0;
		height: 100vh;
		overflow-y: auto;
		scrollbar-width: thin;
		scrollbar-color: var(--line) transparent;
	}
	.admin-bar .ar-side { top: 32px; height: calc(100vh - 32px); }
	.ar-side__close, .ar-scrim { display: none !important; }
	.ar-content { padding-top: 40px; }
}

/* ---------- 4. Сайдбар ---------- */

.ar-side {
	background: var(--surface);
	border-right: 1px solid var(--line);
	z-index: 60;
}

.ar-side__inner {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-height: 100%;
	padding: 28px 20px 22px;
}

.ar-side__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 0 4px;
}

/* Знак и название */
.ar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ink);
	min-width: 0;
}
.ar-brand__mark { flex: none; display: block; line-height: 0; }
.ar-mark { display: block; line-height: 0; }
.ar-mark img { display: block; }
.ar-mark--coin img { border-radius: 50%; }
.ar-brand__mark .ar-mark--coin img { box-shadow: 0 8px 18px -8px rgba(21, 48, 127, .55); }
.ar-brand__mark .ar-mark img { transition: transform .5s var(--ease); }
.ar-brand:hover .ar-brand__mark .ar-mark img { transform: rotate(-4deg) scale(1.05); }
.ar-brand__mark .ar-mark--free img { transform: scale(1.12); }
.ar-brand:hover .ar-brand__mark .ar-mark--free img { transform: rotate(-3deg) scale(1.16); }
.ar-brand__logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; }
.ar-brand__text { display: flex; flex-direction: column; min-width: 0; }
.ar-brand__name {
	margin: 0;
	font-family: var(--font-display);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1.15;
	color: var(--ink);
}
.ar-brand__tag {
	margin-top: 4px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted);
	line-height: 1.3;
}
.ar-brand--compact .ar-brand__name { font-size: 17px; }
.ar-brand--compact .ar-brand__logo { width: 40px; height: 40px; }

/* Поиск */
.ar-search {
	position: relative;
	display: flex;
	align-items: center;
	height: 46px;
	padding: 0 5px 0 14px;
	border-radius: 14px;
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	transition: background .2s, border-color .2s, box-shadow .2s;
}
.ar-search:hover { border-color: var(--line); }
.ar-search:focus-within {
	background: #fff;
	border-color: var(--brand);
	box-shadow: 0 0 0 4px rgba(46, 85, 230, .12);
}
.ar-search__icon { color: var(--faint); display: grid; place-items: center; }
.ar-search:focus-within .ar-search__icon { color: var(--brand); }
.ar-search__input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 10px;
	border: 0;
	background: transparent;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ink);
	outline: none;
}
.ar-search__input::placeholder { color: var(--faint); font-weight: 500; }
.ar-search__input::-webkit-search-cancel-button { display: none; }
.ar-search__btn {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: #fff;
	color: var(--ink-2);
	box-shadow: var(--sh-1);
	transition: background .2s, color .2s, transform .2s;
}
.ar-search__btn:hover { background: var(--brand); color: #fff; }
.ar-search:focus-within .ar-search__btn { background: var(--brand); color: #fff; }

.ar-search--lg { height: 62px; border-radius: 18px; padding: 0 7px 0 20px; background: #fff; border-color: var(--line); box-shadow: var(--sh-1); }
.ar-search--lg .ar-search__input { font-size: 17px; padding: 0 14px; }
.ar-search--lg .ar-search__btn {
	width: auto;
	height: 48px;
	padding: 0 22px;
	border-radius: 13px;
	background: var(--brand);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
}
.ar-search--lg .ar-search__btn:hover { background: var(--brand-ink); }

/* Навигация */
.ar-nav__label {
	margin: 4px 12px 8px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--faint);
}
.ar-nav__list,
.ar-nav__list ul { list-style: none; margin: 0; padding: 0; }
.ar-nav__list > li + li { margin-top: 2px; }
.ar-nav__list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 13px;
	font-size: 15px;
	font-weight: 700;
	color: var(--ink-2);
	transition: background .18s, color .18s;
}
.ar-nav__icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--surface-2);
	color: var(--muted);
	transition: background .18s, color .18s, transform .25s var(--ease);
}
.ar-nav__list a:hover { background: var(--surface-2); color: var(--ink); }
.ar-nav__list a:hover .ar-nav__icon { background: #fff; color: var(--brand); box-shadow: var(--sh-1); transform: scale(1.05); }
.ar-nav__list .current-menu-item > a,
.ar-nav__list .current-menu-parent > a,
.ar-nav__list .current-post-ancestor > a,
.ar-nav__list .current-category-ancestor > a {
	background: var(--brand-50);
	color: var(--brand-ink);
}
.ar-nav__list .current-menu-item > a .ar-nav__icon,
.ar-nav__list .current-menu-parent > a .ar-nav__icon,
.ar-nav__list .current-post-ancestor > a .ar-nav__icon,
.ar-nav__list .current-category-ancestor > a .ar-nav__icon {
	background: var(--brand);
	color: #fff;
	box-shadow: 0 6px 14px -6px rgba(46, 85, 230, .7);
}
.ar-nav__list .sub-menu { margin: 2px 0 6px 56px; }
.ar-nav__list .sub-menu a { padding: 6px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Низ сайдбара */
.ar-side__foot {
	margin-top: auto;
	padding: 18px 8px 0;
	border-top: 1px solid var(--line-soft);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.ar-side__links {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
}
.ar-side__links a {
	font-size: 14px;
	font-weight: 700;
	color: var(--muted);
	transition: color .18s;
}
.ar-side__links a:hover,
.ar-side__links a[aria-current] { color: var(--ink); }

.ar-social { list-style: none; padding: 0; display: flex; gap: 8px; }
.ar-social__link {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	color: var(--ink-2);
	transition: background .2s, color .2s, transform .25s var(--ease), border-color .2s;
}
.ar-social__link:hover { transform: translateY(-2px); color: #fff; border-color: transparent; }
.ar-social__link[data-net="instagram"]:hover { background: radial-gradient(circle at 30% 107%, #FDCB52 0%, #FD5949 40%, #D6249F 65%, #285AEB 100%); }
.ar-social__link[data-net="telegram"]:hover  { background: #229ED9; }
.ar-social__link[data-net="facebook"]:hover  { background: #1877F2; }
.ar-social__link[data-net="tiktok"]:hover    { background: #111; box-shadow: -2px -2px 0 #25F4EE inset, 2px 2px 0 #FE2C55 inset; }

.ar-side__copy { font-size: 12.5px; font-weight: 600; color: var(--faint); }

/* ---------- 5. Мобильная шапка и выезжающее меню ---------- */

.ar-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 64px;
	padding: 0 12px 0 16px;
	background: rgba(255, 255, 255, .86);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--line);
}
.ar-topbar__actions { display: flex; gap: 4px; }

.ar-iconbtn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--ink);
	transition: background .18s;
}
.ar-iconbtn:hover { background: var(--surface-2); }

@media (max-width: 1023.98px) {
	html { scroll-padding-top: 80px; }
	.ar-side {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(88vw, 340px);
		overflow-y: auto;
		overscroll-behavior: contain;
		transform: translateX(-102%);
		transition: transform .32s var(--ease), box-shadow .32s;
		visibility: hidden;
	}
	.ar-menu-open .ar-side {
		transform: none;
		visibility: visible;
		box-shadow: var(--sh-3);
	}
	.ar-side__inner { padding-top: 18px; }
	.ar-scrim {
		position: fixed;
		inset: 0;
		z-index: 55;
		background: rgba(13, 21, 38, .42);
		-webkit-backdrop-filter: blur(2px);
		backdrop-filter: blur(2px);
		opacity: 0;
		transition: opacity .25s;
	}
	.ar-menu-open .ar-scrim { opacity: 1; }
	.ar-menu-open { overflow: hidden; }
	.ar-content { padding-top: 24px; }
}
@media (min-width: 600px) and (max-width: 782px) {
	.admin-bar .ar-topbar { top: 46px; }
}
@media (max-width: 782px) {
	.admin-bar .ar-side { top: 46px; }
}

/* ---------- 6. Общие элементы ---------- */

.ar-section { margin-top: 64px; }
.ar-home > .ar-section:first-child,
.ar-content > main > .ar-section:first-child { margin-top: 0; }

.ar-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--t, var(--brand));
}
.ar-eyebrow--light { color: rgba(255, 255, 255, .72); }

.ar-shead {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 28px;
	margin-bottom: 24px;
}
.ar-shead__main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ar-shead__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 15px;
	background: var(--t-50);
	color: var(--t);
	box-shadow: inset 0 0 0 1px var(--t-100);
}
.ar-shead__title {
	font-family: var(--font-display);
	font-size: clamp(21px, 2vw, 26px);
	font-weight: 600;
	letter-spacing: -.015em;
	line-height: 1.2;
	color: var(--ink);
}
.ar-shead__desc { margin-top: 5px; font-size: 15px; font-weight: 500; color: var(--muted); max-width: 640px; }
.ar-shead--dark .ar-shead__title { color: #fff; }

.ar-link-more {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px 0 16px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--line);
	font-size: 14px;
	font-weight: 700;
	color: var(--ink);
	white-space: nowrap;
	transition: border-color .2s, color .2s, box-shadow .2s;
}
.ar-link-more .ar-ico { transition: transform .25s var(--ease); color: var(--brand); }
.ar-link-more:hover { border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px rgba(46, 85, 230, .08); }
.ar-link-more:hover .ar-ico { transform: translateX(3px); }

@media (max-width: 639.98px) {
	.ar-shead { flex-direction: column; align-items: flex-start; }
	.ar-shead__icon { width: 42px; height: 42px; border-radius: 13px; }
	.ar-section { margin-top: 48px; }
}

.ar-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	max-width: 100%;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--t-50, var(--brand-50));
	color: var(--t-ink, var(--brand-ink));
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: .01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ar-badge--lg { padding: 6px 12px; font-size: 13px; }
.ar-badge--quiet { background: #fff !important; color: var(--muted) !important; box-shadow: inset 0 0 0 1px var(--line); }
a.ar-badge--quiet:hover { color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--faint); }
a.ar-badge:not(.ar-badge--quiet):hover { background: var(--t-100, var(--brand-100)); }
.ar-badge--glass {
	background: rgba(255, 255, 255, .16) !important;
	color: #fff !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.ar-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--faint);
}
.ar-meta__sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.ar-meta--light { color: rgba(255, 255, 255, .78); }

.ar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 52px;
	padding: 0 22px;
	border: 0;
	border-radius: 14px;
	font-size: 15px;
	font-weight: 800;
	white-space: nowrap;
	transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.ar-btn .ar-ico { transition: transform .25s var(--ease); }
.ar-btn:hover .ar-ico { transform: translateX(3px); }
.ar-btn:active { transform: translateY(1px); }
.ar-btn--primary { background: var(--brand); color: #fff; box-shadow: 0 10px 22px -12px rgba(46, 85, 230, .9); }
.ar-btn--primary:hover { background: var(--brand-ink); color: #fff; }
.ar-btn--gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 12px 26px -12px rgba(247, 185, 36, .9); }
.ar-btn--gold:hover { background: #FFC93F; }
.ar-btn--ghost-light { height: 46px; background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.ar-btn--ghost-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.ar-panel {
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--r-xl);
	box-shadow: var(--sh-1);
}

/* Обложки и заглушки */
.ar-thumb { position: relative; display: block; overflow: hidden; background: var(--t-50, var(--brand-50)); }
.ar-thumb__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s var(--ease);
}
.ar-thumb__ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--t);
	background:
		radial-gradient(120% 90% at 100% 0%, var(--t-100) 0%, transparent 55%),
		radial-gradient(90% 80% at 0% 100%, var(--t-100) 0%, transparent 60%),
		var(--t-50);
}
.ar-thumb__ph::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(currentColor 1px, transparent 1px);
	background-size: 18px 18px;
	opacity: .12;
	-webkit-mask-image: linear-gradient(135deg, #000, transparent 70%);
	mask-image: linear-gradient(135deg, #000, transparent 70%);
}
.ar-thumb__ph .ar-ico { position: relative; opacity: .9; }

/* ---------- 7. Карточка записи ---------- */

.ar-grid { display: grid; gap: 22px; }
.ar-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ar-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

@media (max-width: 1279.98px) {
	.ar-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1099.98px) {
	.ar-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
	.ar-grid--3 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.ar-grid--4 {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 78%;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin: 0 calc(var(--gutter) * -1);
		padding: 2px var(--gutter) 10px;
		scroll-padding: 0 var(--gutter);
		scrollbar-width: none;
	}
	.ar-grid--4::-webkit-scrollbar { display: none; }
	.ar-grid--4 > * { scroll-snap-align: start; }
}

.ar-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--r-lg);
	overflow: hidden;
	box-shadow: var(--sh-1);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.ar-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: transparent; }
.ar-card__media { aspect-ratio: 16 / 10; }
.ar-card:hover .ar-thumb__img { transform: scale(1.04); }
.ar-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	padding: 18px 20px 20px;
}
.ar-card__title {
	font-size: 17.5px;
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: -.01em;
	color: var(--ink);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ar-card__title a { color: inherit; transition: color .2s; }
.ar-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ar-card:hover .ar-card__title a { color: var(--brand-ink); }
.ar-card__excerpt {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ar-card .ar-meta { margin-top: auto; padding-top: 4px; }
.ar-grid--4 .ar-card__title { font-size: 16px; -webkit-line-clamp: 4; }
.ar-grid--4 .ar-card__body { padding: 16px 18px 18px; }

@media (max-width: 639.98px) {
	.ar-grid--3 .ar-card { flex-direction: row; border-radius: 18px; }
	.ar-grid--3 .ar-card:hover { transform: none; }
	.ar-grid--3 .ar-card__media { flex: none; width: 116px; aspect-ratio: auto; min-height: 128px; }
	.ar-grid--3 .ar-card__body { gap: 7px; padding: 14px 16px 14px 14px; }
	.ar-grid--3 .ar-card__title { font-size: 15.5px; line-height: 1.32; -webkit-line-clamp: 4; }
	.ar-grid--3 .ar-card__excerpt { display: none; }
	.ar-grid--3 .ar-badge { padding: 3px 8px; font-size: 11px; }
	.ar-grid--3 .ar-thumb__ph .ar-ico { width: 32px; height: 32px; }
}

/* Строка */
.ar-row { position: relative; display: flex; gap: 14px; align-items: center; }
.ar-row__media { flex: none; width: 84px; height: 64px; border-radius: 12px; }
.ar-row__title { font-size: 15px; font-weight: 800; line-height: 1.35; }
.ar-row__title a { color: var(--ink); }
.ar-row__title a::after { content: ""; position: absolute; inset: 0; }
.ar-row:hover .ar-row__title a { color: var(--brand-ink); }

/* ---------- 8. Главная: популярное за неделю ---------- */

.ar-bento {
	display: grid;
	grid-template-columns: 1.55fr 1fr 1fr;
	grid-template-rows: 262px 262px;
	gap: 18px;
}
.ar-pop {
	position: relative;
	isolation: isolate;
	min-width: 0;
	border-radius: var(--r-xl);
	overflow: hidden;
	background: var(--t-ink, #15307F);
	box-shadow: var(--sh-1);
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.ar-pop--lead { grid-row: 1 / 3; }
.ar-pop:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.ar-pop__media { position: absolute; inset: 0; z-index: -2; }
.ar-pop:hover .ar-thumb__img { transform: scale(1.05); }
.ar-pop__shade {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(9, 14, 28, .05) 0%, rgba(9, 14, 28, .1) 30%, rgba(9, 14, 28, .62) 64%, rgba(9, 14, 28, .9) 100%);
}
.ar-pop .ar-thumb__ph { color: #fff; background: radial-gradient(120% 90% at 100% 0%, var(--t) 0%, transparent 60%), linear-gradient(160deg, var(--t-ink), #0D1526); }
.ar-pop .ar-thumb__ph { place-items: start end; padding: 26px 28px; }
.ar-pop .ar-thumb__ph .ar-ico { opacity: .28; width: 72px; height: 72px; }
.ar-pop__rank {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 34px;
	padding: 0 10px;
	border-radius: 11px;
	background: rgba(255, 255, 255, .16);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
}
.ar-pop--lead .ar-pop__rank {
	min-width: 54px;
	height: 42px;
	font-size: 16px;
	background: var(--gold);
	color: var(--gold-ink);
	box-shadow: 0 10px 24px -10px rgba(247, 185, 36, .9);
}
.ar-pop__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 20px;
	color: #fff;
}
.ar-pop__title {
	font-size: 17px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -.01em;
	color: #fff;
	text-wrap: balance;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ar-pop__title a { color: inherit; }
.ar-stretched::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.ar-pop--lead .ar-pop__body { gap: 14px; padding: 30px 32px 30px; }
.ar-pop--lead .ar-pop__title { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.18; letter-spacing: -.02em; -webkit-line-clamp: 4; }
.ar-pop__excerpt {
	font-size: 15.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .84);
	max-width: 560px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 1279.98px) {
	.ar-bento { grid-template-columns: 1fr 1fr; grid-template-rows: 360px 230px 230px; }
	.ar-pop--lead { grid-row: auto; grid-column: 1 / 3; }
}
@media (max-width: 759.98px) {
	.ar-bento {
		grid-template-columns: none;
		grid-template-rows: none;
		grid-auto-flow: column;
		grid-auto-columns: 84%;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin: 0 calc(var(--gutter) * -1);
		padding: 2px var(--gutter) 12px;
		scroll-padding: 0 var(--gutter);
		scrollbar-width: none;
	}
	.ar-bento::-webkit-scrollbar { display: none; }
	.ar-pop, .ar-pop--lead { grid-column: auto; height: 380px; scroll-snap-align: start; }
	.ar-pop--lead .ar-pop__body { padding: 22px; }
	.ar-pop--lead .ar-pop__title { font-size: 23px; }
	.ar-pop__title { font-size: 19px; }
}

/* ---------- 9. Главная: вузы ---------- */

.ar-unis__panel {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(26px, 3.6vw, 48px);
	border-radius: 32px;
	color: #fff;
	background:
		radial-gradient(900px 420px at 105% -10%, rgba(120, 150, 255, .55), transparent 60%),
		linear-gradient(135deg, #0F2363 0%, #1A3BA8 52%, #2E55E6 100%);
	box-shadow: 0 30px 60px -30px rgba(21, 48, 127, .65);
}
.ar-unis__panel::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(250deg, #000 0%, transparent 55%);
	mask-image: linear-gradient(250deg, #000 0%, transparent 55%);
}
.ar-unis__glow {
	position: absolute;
	z-index: -1;
	left: -140px;
	bottom: -220px;
	width: 520px;
	height: 520px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(247, 185, 36, .32), transparent);
	pointer-events: none;
}
.ar-unis__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
}
.ar-unis__title {
	font-family: var(--font-display);
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -.02em;
	color: #fff;
}
.ar-unis__desc { margin-top: 10px; max-width: 540px; font-size: 16px; color: rgba(255, 255, 255, .78); }
.ar-unis__stat {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}
.ar-unis__stat strong {
	font-family: var(--font-display);
	font-size: clamp(40px, 4.6vw, 60px);
	font-weight: 600;
	line-height: 1;
	color: var(--gold);
	letter-spacing: -.03em;
}
.ar-unis__stat span { margin-top: 6px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .72); }

.ar-ufilter {
	display: grid;
	grid-template-columns: 1.7fr 1fr 1fr 1fr;
	gap: 10px;
	padding: 10px;
	border-radius: 22px;
	background: rgba(255, 255, 255, .1);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.ar-field {
	position: relative;
	display: flex;
	align-items: center;
	height: 52px;
	min-width: 0;
	border-radius: 14px;
	background: #fff;
	color: var(--ink);
	transition: box-shadow .2s;
}
.ar-field:focus-within { box-shadow: 0 0 0 4px rgba(247, 185, 36, .55); }
.ar-field--search { padding-left: 16px; color: var(--faint); }
.ar-field input,
.ar-field select {
	width: 100%;
	height: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	font-size: 15px;
	font-weight: 600;
	outline: none;
}
.ar-field input { padding: 0 14px 0 10px; }
.ar-field input::placeholder { color: var(--faint); font-weight: 500; }
.ar-field select {
	-webkit-appearance: none;
	appearance: none;
	padding: 0 40px 0 16px;
	cursor: pointer;
	text-overflow: ellipsis;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235C687C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.ar-field--wide { grid-column: 1 / 4; }
.ar-ufilter .ar-btn { height: 52px; }

.ar-unis__sub {
	margin: 32px 0 14px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .62);
}
.ar-unis__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
.ar-uni {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 14px 14px 14px 14px;
	border-radius: 18px;
	background: #fff;
	color: var(--ink);
	box-shadow: 0 10px 24px -16px rgba(5, 14, 50, .6);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.ar-uni:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -18px rgba(5, 14, 50, .7); }
.ar-uni__logo {
	flex: none;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border-radius: 14px;
	background: var(--surface-2);
	box-shadow: inset 0 0 0 1px var(--line-soft);
	color: var(--brand);
	overflow: hidden;
}
.ar-uni__logo-img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.ar-uni__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ar-uni__title {
	font-size: 14.5px;
	font-weight: 800;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ar-uni__meta { font-size: 13px; font-weight: 600; color: var(--muted); }
.ar-uni__facts { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); }
.ar-uni__facts > span { white-space: nowrap; }
.ar-uni__facts > span + span::before { content: "·"; margin-right: 10px; color: var(--faint); }
.ar-uni__go { color: var(--faint); transition: transform .25s var(--ease), color .2s; }
.ar-uni:hover .ar-uni__go { transform: translateX(3px); color: var(--brand); }
.ar-unis__foot { margin-top: 26px; }

@media (max-width: 1279.98px) {
	.ar-unis__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ar-ufilter { grid-template-columns: 1fr 1fr 1fr; }
	.ar-field--search { grid-column: 1 / -1; }
	.ar-field--wide { grid-column: 1 / 3; }
}
@media (max-width: 759.98px) {
	.ar-unis__panel { border-radius: 26px; margin: 0 calc(var(--gutter) * -.5); }
	.ar-unis__head { flex-direction: column; align-items: flex-start; }
	.ar-unis__stat { flex-direction: row; align-items: baseline; gap: 10px; text-align: left; }
	.ar-ufilter { grid-template-columns: 1fr; padding: 8px; border-radius: 20px; }
	.ar-field--search, .ar-field--wide { grid-column: auto; }
	.ar-unis__grid { grid-template-columns: 1fr; }
	.ar-uni:nth-child(n+5) { display: none; }
	.ar-unis__foot .ar-btn { width: 100%; }
}

/* ---------- 10. Главная: календарь и сюжеты ---------- */

.ar-calwrap { padding: clamp(16px, 2.4vw, 32px); }
.ar-calwrap .alf-cal { margin: 0; max-width: none; }
.ar-calwrap .alf-cal__list { display: none !important; }

.ar-story {
	position: relative;
	padding: clamp(20px, 2.6vw, 32px);
	border-radius: 32px;
	background:
		radial-gradient(700px 240px at 0% 0%, var(--t-50), transparent 70%),
		linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
	box-shadow: inset 0 0 0 1px var(--line-soft);
}
.ar-story .ar-shead__icon { background: var(--t); color: #fff; box-shadow: 0 10px 22px -12px var(--t); }
.ar-story .ar-shead__desc { max-width: 560px; }
.ar-story .ar-thumb { background: var(--t-50); }
@media (max-width: 639.98px) {
	.ar-story { margin: 48px calc(var(--gutter) * -.5) 0; padding: 22px calc(var(--gutter) * .5); border-radius: 26px; }
	.ar-story .ar-grid--4 { margin: 0 calc(var(--gutter) * -.5); padding-left: calc(var(--gutter) * .5); padding-right: calc(var(--gutter) * .5); }
}

/* ---------- 11. Ленты, рубрики, поиск ---------- */

.ar-pagehead {
	display: flex;
	align-items: flex-start;
	gap: 22px;
	margin-bottom: 28px;
	padding: clamp(22px, 3vw, 36px);
	border-radius: 32px;
	background:
		radial-gradient(600px 260px at 100% 0%, var(--t-50), transparent 70%),
		#fff;
	border: 1px solid var(--line-soft);
	box-shadow: var(--sh-1);
}
.ar-pagehead__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border-radius: 18px;
	background: var(--t);
	color: #fff;
	box-shadow: 0 14px 26px -14px var(--t);
}
.ar-pagehead__text { min-width: 0; }
.ar-pagehead__title {
	font-family: var(--font-display);
	font-size: clamp(26px, 3.2vw, 38px);
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -.02em;
	overflow-wrap: anywhere;
}
.ar-pagehead__desc { margin-top: 12px; max-width: 720px; font-size: 16.5px; color: var(--muted); }
.ar-pagehead__desc p + p { margin-top: .6em; }
@media (max-width: 639.98px) {
	.ar-pagehead { flex-direction: column; gap: 16px; border-radius: 26px; }
	.ar-pagehead__icon { width: 52px; height: 52px; border-radius: 16px; }
}

.ar-searchbar { margin: -8px 0 28px; max-width: 760px; }

.ar-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.ar-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--line);
	font-size: 14px;
	font-weight: 700;
	color: var(--ink-2);
	transition: border-color .2s, background .2s, color .2s;
}
.ar-chip .ar-ico { color: var(--t, var(--brand)); }
.ar-chip:hover { border-color: var(--t, var(--brand)); color: var(--ink); }
.ar-chip__count {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--surface-2);
	font-size: 12px;
	color: var(--muted);
}
.ar-chip.is-active { background: var(--t); border-color: var(--t); color: #fff; }
.ar-chip.is-active .ar-ico { color: #fff; }
.ar-chip.is-active .ar-chip__count { background: rgba(255, 255, 255, .2); color: #fff; }

.ar-pagination { margin-top: 44px; }
.ar-pagination ul.page-numbers {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}
.ar-pagination li { display: block; }
.ar-pagination li > .page-numbers {
	display: grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 12px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--line);
	font-size: 15px;
	font-weight: 800;
	color: var(--ink-2);
	transition: border-color .2s, color .2s, background .2s;
}
.ar-pagination li > a.page-numbers:hover { border-color: var(--brand); color: var(--brand-ink); }
.ar-pagination li > .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.ar-pagination li > .page-numbers.dots { background: transparent; border-color: transparent; }

.ar-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 64px 24px;
	text-align: center;
	background: #fff;
	border: 1px dashed var(--line);
	border-radius: 28px;
}
.ar-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--brand-50); color: var(--brand); }
.ar-empty h2 { font-size: 22px; }
.ar-empty p { color: var(--muted); max-width: 440px; }
.ar-empty .ar-search { width: 100%; max-width: 560px; margin-top: 8px; }

/* ---------- 12. Статья ---------- */

.ar-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 90;
	height: 3px;
	pointer-events: none;
}
.admin-bar .ar-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .ar-progress { top: 46px; } }
.ar-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--brand), #7B95FF 60%, var(--gold));
	transform: scaleX(0);
	transform-origin: 0 50%;
	border-radius: 0 3px 3px 0;
}

.ar-single { max-width: 1180px; margin: 0 auto; }

.ar-crumbs { margin-bottom: 18px; font-size: 13.5px; font-weight: 600; color: var(--faint); }
.ar-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
.ar-crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.ar-crumbs li + li::before {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-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='m9 6 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='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: .7;
}
.ar-crumbs a { color: var(--muted); transition: color .2s; }
.ar-crumbs a:hover { color: var(--brand); }
.ar-crumbs p { margin: 0; }
.ar-crumbs .separator { margin: 0 6px; color: var(--line); }
.ar-crumbs .last { color: var(--ink-2); }

.ar-article__head { max-width: 900px; }
.ar-article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ar-article__title {
	font-size: clamp(28px, 3.1vw, 42px);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -.026em;
	color: var(--ink);
	text-wrap: balance;
}
.ar-article__lead {
	margin-top: 18px;
	max-width: 780px;
	font-size: clamp(17px, 1.5vw, 20px);
	line-height: 1.6;
	font-weight: 500;
	color: var(--ink-2);
}
.ar-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin-top: 22px;
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
}
.ar-article__metaitem { display: inline-flex; align-items: center; gap: 7px; }
.ar-article__metaitem .ar-ico { color: var(--faint); }

.ar-article__cover { margin: 30px 0 0; }
.ar-article__cover-img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 26px;
	background: var(--line-soft);
	box-shadow: var(--sh-1);
}
.ar-article__cover figcaption { margin-top: 10px; padding: 0 6px; font-size: 13px; font-weight: 500; color: var(--faint); }

.ar-article__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 56px;
	margin-top: 40px;
}
.ar-article__main { min-width: 0; max-width: 760px; }
.ar-article__aside { display: none; }

@media (min-width: 1280px) {
	.ar-article__layout { grid-template-columns: minmax(0, 760px) 280px; justify-content: space-between; }
	.ar-article__aside { display: block; }
	.ar-article__sticky { position: sticky; top: 32px; }
	.admin-bar .ar-article__sticky { top: 64px; }
	.ar-toc--inline { display: none; }
	/* Под оглавлением поп-ап: длинное оглавление прокручивается внутри, чтобы всё помещалось в экран */
	.ar-article__sticky.has-promo .ar-toc--side ol {
		max-height: max(150px, calc(100vh - var(--promo-h, 260px) - 130px));
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: var(--line) transparent;
	}
}

/* Оглавление */
.ar-toc ol { list-style: none; margin: 0; padding: 0; }
.ar-toc--side { padding-left: 4px; }
.ar-toc__title {
	margin-bottom: 12px;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--faint);
}
.ar-toc--side a {
	display: block;
	padding: 7px 0 7px 16px;
	border-left: 2px solid var(--line);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--muted);
	transition: color .2s, border-color .2s;
}
.ar-toc--side a:hover { color: var(--ink); border-left-color: var(--faint); }
.ar-toc--side a.is-active { color: var(--brand-ink); border-left-color: var(--brand); font-weight: 800; }

.ar-toc--inline {
	margin-bottom: 32px;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--line);
	box-shadow: var(--sh-1);
}
.ar-toc--inline summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	font-weight: 800;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
}
.ar-toc--inline summary::-webkit-details-marker { display: none; }
.ar-toc--inline summary .ar-ico { color: var(--brand); }
.ar-toc__count { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.ar-toc--inline[open] summary { border-bottom: 1px solid var(--line-soft); }
.ar-toc--inline ol { counter-reset: toc; padding: 10px 12px 14px; }
.ar-toc--inline li { counter-increment: toc; }
.ar-toc--inline a {
	display: flex;
	gap: 12px;
	padding: 8px 8px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--ink-2);
}
.ar-toc--inline a::before { content: counter(toc, decimal-leading-zero); flex: none; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.ar-toc--inline a:hover { background: var(--surface-2); color: var(--brand-ink); }

/* Типографика текста статьи */
.ar-prose {
	font-size: 18px;
	line-height: 1.75;
	font-weight: 500;
	color: #1E2636;
	overflow-wrap: break-word;
}
.ar-prose > * { margin-top: 0; margin-bottom: 0; }
.ar-prose > * + * { margin-top: 1.1em; }
.ar-prose > h2 { margin-top: 2.1em; }
.ar-prose > h3 { margin-top: 1.7em; }
.ar-prose > h4 { margin-top: 1.5em; }
.ar-prose > :first-child { margin-top: 0; }
.ar-prose > p + p { margin-top: 1em; }
.ar-prose > h2 + *, .ar-prose > h3 + *, .ar-prose > h4 + * { margin-top: .7em; }
.ar-prose h2 {
	margin-top: 2.1em;
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 800;
	line-height: 1.22;
	letter-spacing: -.022em;
	color: var(--ink);
	scroll-margin-top: 24px;
}
.ar-prose h3 {
	margin-top: 1.7em;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -.012em;
	color: var(--ink);
}
.ar-prose h4 { margin-top: 1.5em; font-size: 18px; font-weight: 800; }
.ar-prose h2 strong, .ar-prose h3 strong { font-weight: inherit; }
.ar-prose a {
	color: var(--brand);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(46, 85, 230, .3);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: color .2s, text-decoration-color .2s;
}
.ar-prose a:hover { color: var(--brand-ink); text-decoration-color: currentColor; }
.ar-prose strong, .ar-prose b { font-weight: 800; color: var(--ink); }

.ar-prose ul:not([class]),
.ar-prose ol:not([class]),
.ar-prose .wp-block-list { padding-left: 0; list-style: none; }
.ar-prose ul:not([class]) > li,
.ar-prose ul.wp-block-list > li { position: relative; padding-left: 28px; }
.ar-prose ul:not([class]) > li::before,
.ar-prose ul.wp-block-list > li::before {
	content: "";
	position: absolute;
	left: 8px;
	top: .68em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--brand);
	box-shadow: 0 0 0 4px var(--brand-50);
}
.ar-prose ol:not([class]),
.ar-prose ol.wp-block-list { counter-reset: li; }
.ar-prose ol:not([class]) > li,
.ar-prose ol.wp-block-list > li { position: relative; padding-left: 40px; counter-increment: li; }
.ar-prose ol:not([class]) > li::before,
.ar-prose ol.wp-block-list > li::before {
	content: counter(li);
	position: absolute;
	left: 0;
	top: .2em;
	display: grid;
	place-items: center;
	width: 27px;
	height: 27px;
	border-radius: 9px;
	background: var(--brand-50);
	color: var(--brand-ink);
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1;
}
.ar-prose li + li { margin-top: .55em; }
.ar-prose li > ul, .ar-prose li > ol { margin-top: .55em; }

.ar-prose blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 20px 24px;
	border-left: 4px solid var(--gold);
	border-radius: 0 18px 18px 0;
	background: #FFF9EA;
	color: var(--ink);
	font-weight: 600;
}
.ar-prose blockquote p + p { margin-top: .6em; }
.ar-prose blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--muted); }

.ar-prose figure { margin-left: 0; margin-right: 0; }
.ar-prose img { border-radius: 18px; }
.ar-prose figure img { width: 100%; height: auto; }
.ar-prose figcaption,
.ar-prose .wp-caption-text,
.ar-prose .wp-element-caption {
	margin-top: 10px;
	padding: 0 4px;
	font-size: 13.5px;
	line-height: 1.5;
	font-weight: 500;
	color: var(--faint);
	text-align: left;
}
.ar-prose .wp-caption { max-width: 100%; }
.ar-prose .aligncenter { margin-left: auto; margin-right: auto; }
.ar-prose .alignleft { float: left; margin: .4em 1.4em 1em 0; max-width: 50%; }
.ar-prose .alignright { float: right; margin: .4em 0 1em 1.4em; max-width: 50%; }

.ar-table,
.ar-prose .wp-block-table {
	margin: 1.6em 0;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: #fff;
	-webkit-overflow-scrolling: touch;
}
.ar-prose .wp-block-table .ar-table { margin: 0; border: 0; border-radius: 0; }
.ar-prose table {
	width: 100%;
	min-width: 540px;
	border-collapse: collapse;
	font-size: 15.5px;
	line-height: 1.5;
	font-variant-numeric: tabular-nums;
}
.ar-prose th {
	padding: 13px 16px;
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
	text-align: left;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--ink);
	vertical-align: bottom;
}
.ar-prose td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--line-soft);
	vertical-align: top;
}
.ar-prose tbody tr:last-child td { border-bottom: 0; }
.ar-prose tbody tr { transition: background .15s; }
.ar-prose tbody tr:hover { background: #FAFBFE; }
.ar-prose td:first-child { font-weight: 700; color: var(--ink); }

.ar-prose hr { height: 1px; margin: 2.6em 0; border: 0; background: var(--line); }
.ar-prose code { padding: .12em .42em; border-radius: 7px; background: var(--surface-2); font-size: .88em; }
.ar-prose pre { padding: 18px 20px; border-radius: 16px; background: #0D1526; color: #E6EAF2; overflow-x: auto; font-size: 14.5px; }
.ar-prose pre code { padding: 0; background: none; }
.ar-prose details {
	padding: 16px 20px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--line);
}
.ar-prose details + details { margin-top: 10px; }
.ar-prose summary { font-weight: 800; color: var(--ink); cursor: pointer; }
.ar-prose details[open] summary { margin-bottom: 10px; }
.ar-prose iframe { width: 100%; border: 0; border-radius: 18px; }

/* Rank Math FAQ / HowTo */
.ar-prose .rank-math-list-item { padding: 18px 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.ar-prose .rank-math-list-item + .rank-math-list-item { margin-top: 10px; }
.ar-prose .rank-math-question { margin: 0 0 6px; font-size: 18px; }

.ar-article__taglist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }

.ar-pagelinks { margin-top: 28px; font-weight: 700; }

/* Поделиться */
.ar-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	margin-top: 44px;
	padding: 18px 20px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid var(--line-soft);
	box-shadow: var(--sh-1);
}
.ar-share__label { font-size: 15px; font-weight: 800; color: var(--ink); }
.ar-share__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border: 0;
	border-radius: 12px;
	background: var(--surface-2);
	color: var(--ink-2);
	font-size: 14px;
	font-weight: 700;
	transition: background .2s, color .2s, transform .2s var(--ease);
}
.ar-share__btn:hover { transform: translateY(-1px); color: #fff; }
.ar-share__btn[data-net="telegram"]:hover { background: #229ED9; }
.ar-share__btn[data-net="whatsapp"]:hover { background: #1FAF55; }
.ar-share__btn[data-net="facebook"]:hover { background: #1877F2; }
.ar-share__btn[data-ar-copy]:hover { background: var(--ink); }
.ar-share__btn.is-done { background: #0E9F6A !important; color: #fff; }
@media (max-width: 639.98px) {
	.ar-share__btn span { display: none; }
	.ar-share__btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.ar-share__btn[data-ar-copy] span { display: none; }
}

.ar-related { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }

/* Комментарии */
.ar-comments { max-width: 760px; margin-top: 48px; padding: 28px; }
.ar-comments__title { font-size: 22px; margin-bottom: 18px; }
.ar-comments__list { list-style: none; padding: 0; }
.ar-comments__list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.ar-comments textarea,
.ar-comments input[type="text"],
.ar-comments input[type="email"],
.ar-comments input[type="url"] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface-2);
}
.ar-comments textarea:focus,
.ar-comments input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(46, 85, 230, .12); }
.ar-comments label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.ar-comments .comment-form > p { margin-top: 14px; }

/* ---------- 13. Страницы и 404 ---------- */

.ar-page { max-width: 920px; margin: 0 auto; }
.ar-page--wide { max-width: none; }
.ar-page__card { padding: clamp(22px, 4vw, 48px); }
.ar-page__head { margin-bottom: 26px; }
.ar-page__title {
	font-family: var(--font-display);
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.02em;
}
.ar-page .ar-prose { max-width: 760px; }
.ar-entry > * + * { margin-top: 1.1em; }
.ar-entry > p { max-width: 760px; font-size: 17px; line-height: 1.7; }
.ar-page--wide .alf-cal { max-width: none; }

.ar-404 { max-width: 1180px; margin: 0 auto; }
.ar-404__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 680px;
	margin: 24px auto 0;
	padding: clamp(32px, 5vw, 56px);
	text-align: center;
}
.ar-404__mark {
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	margin-bottom: 6px;
	border-radius: 26px;
	background: linear-gradient(135deg, #3B63F5, #142C7A);
	color: #fff;
	box-shadow: 0 18px 36px -16px rgba(21, 48, 127, .8);
}
.ar-404__title { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.02em; }
.ar-404__text { max-width: 480px; color: var(--muted); }
.ar-404__card .ar-search { width: 100%; margin: 10px 0 4px; }
.ar-404 .ar-section { margin-top: 64px; }
.ar-404__card .ar-link-more { margin-top: 4px; }

/* ---------- 14. Подвал ---------- */

.ar-footer { margin-top: 88px; padding: 28px var(--gutter) 32px; border-top: 1px solid var(--line); }
.ar-footer__text {
	max-width: 680px;
	margin: 0 auto;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--faint);
	text-align: center;
	text-wrap: balance;
}

/* ---------- 15. Совместимость с плагинами ---------- */

/* Каталог вузов: шрифт и цвета темы вместо прежних (Lato) */
.ar-body .afv:not(#afv-x) {
	font-family: var(--font-sans);
	--afv-accent: #15307F;
	--afv-accent-deep: #0F2363;
	--afv-accent-mid: #4A66C8;
	--afv-accent-soft: #EEF2FF;
	--afv-warm: #F7B924;
	--afv-warm-soft: #FFF6DC;
	--afv-line: #E2E6EE;
	--afv-soft: #F3F5F9;
	--afv-ink: #0D1526;
	--afv-muted: #5C687C;
}
.ar-content > .afv { margin: 0 auto; }
.ar-plugin-page { max-width: 1240px; margin: 0 auto; }

/* Мобильный текст статьи чуть компактнее */
@media (max-width: 639.98px) {
	.ar-prose { font-size: 17px; line-height: 1.7; }
}

/* Календарь: всплывающая подсказка поверх мобильной шапки */
.alf-popover { z-index: 80; }

/* Подсветка ссылок на якоря после перехода */
.ar-prose :target { animation: ar-flash 1.6s var(--ease); }
@keyframes ar-flash {
	0% { background: rgba(247, 185, 36, .35); }
	100% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- 16. Печать ---------- */

@media print {
	.ar-side, .ar-topbar, .ar-share, .ar-related, .ar-footer, .ar-progress, .ar-article__aside, .ar-toc { display: none !important; }
	.ar-app { display: block; }
	.ar-content { padding: 0; }
	body { background: #fff; }
}
