/*
Theme Name: Zhas Hub
Theme URI: https://zhashub.kz/
Author: Zhas Hub
Description: Тема молодёжного онлайн-журнала zhashub.kz в стиле коллажа-зина: мобильная, быстрая, со светлой и тёмной темой, полками рубрик, оглавлением, реакциями и блоком Telegram. Совместима с Rank Math.
Version: 1.6.0
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zhashub
*/

/* ---------- Токены ---------- */
:root {
	--bg: #f7f6f2;
	--surface: #ffffff;
	--surface-2: #efede7;
	--text: #111116;
	--muted: #62626e;
	--line: #e4e1da;
	--accent: #5b3df5;
	--accent-ink: #ffffff;
	--accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
	--link: color-mix(in srgb, var(--accent) 88%, #000);
	--lime: #d7ff3f;
	--ink-on-lime: #111116;
	--radius: 20px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(17, 17, 22, .05), 0 10px 30px rgba(17, 17, 22, .07);
	--font: "Geologica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-display: "Geologica", ui-sans-serif, system-ui, sans-serif;
	--wrap: 1240px;
	--read: 720px;
	--gap: clamp(16px, 3vw, 28px);
	--header-h: 60px;
	color-scheme: light;
}

[data-theme="dark"] {
	--bg: #0e0e13;
	--surface: #17171f;
	--surface-2: #20202b;
	--text: #f2f2f5;
	--muted: #a4a4b3;
	--line: #2a2a37;
	--accent: color-mix(in srgb, #5b3df5 70%, #fff);
	--accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
	--link: color-mix(in srgb, var(--accent) 80%, #fff);
	--shadow: none;
	color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
body.has-layer { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--ink-on-lime); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.read { width: 100%; max-width: calc(var(--read) + 2 * clamp(16px, 4vw, 32px)); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: #fff; }

.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Кнопки ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 0;
	background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; line-height: 1;
	transition: transform .15s ease, filter .15s ease, background-color .15s ease;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--line); }
.btn--ghost:hover { color: var(--accent); border-color: var(--accent); filter: none; }
.btn--ghost:disabled { opacity: .6; cursor: default; transform: none; }
.btn--lime { background: var(--lime); color: var(--ink-on-lime); }
.btn--lime:hover { color: var(--ink-on-lime); }

.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 0; background: transparent; color: var(--text); transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn--filled { background: var(--surface-2); }
.icon-btn--filled:hover { background: var(--accent); color: #fff; }

/* ---------- Плашки рубрик ---------- */
.chip {
	--c: var(--accent);
	display: inline-flex; align-items: center; gap: 6px; flex: none;
	height: 30px; padding: 0 12px 0 10px; border-radius: 999px;
	background: color-mix(in srgb, var(--c) 13%, var(--surface));
	color: color-mix(in srgb, var(--c) 75%, var(--text));
	font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap;
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
[data-theme="dark"] .chip { background: color-mix(in srgb, var(--c) 22%, var(--surface)); color: color-mix(in srgb, var(--c) 55%, #fff); }
a.chip:hover { background: var(--c); color: #fff; }
.chip__emoji { font-size: 14px; line-height: 1; }
.chip.is-current { background: var(--c); color: #fff; }
.chip--on-dark { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chip--text { height: auto; padding: 0; background: none !important; color: color-mix(in srgb, var(--c) 80%, var(--text)); font-size: 12px; }
[data-theme="dark"] .chip--text { color: color-mix(in srgb, var(--c) 55%, #fff); }

/* ---------- Шапка ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.site-header__burger { margin-left: -10px; }
.site-header__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: -8px; }

.logo { margin: 0; font-size: inherit; line-height: 1; }
.logo__link { display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.04em; color: var(--text); }
.logo__link:hover { color: var(--text); }
.logo__zhas { padding-right: 2px; }
.logo__hub {
	display: inline-block; padding: 4px 8px 5px; border-radius: 10px; background: var(--lime); color: var(--ink-on-lime);
	transform: rotate(-4deg); transition: transform .2s ease;
}
.logo__link:hover .logo__hub { transform: rotate(3deg) scale(1.05); }
.logo .custom-logo-link img { max-height: 36px; width: auto; }

.site-nav { display: none; }
.site-nav__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav__list a { display: block; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--text); }
.site-nav__list a:hover, .site-nav__list .current-menu-item > a, .site-nav__list .current-category-ancestor > a { background: var(--surface-2); color: var(--text); }

.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

@media (min-width: 1024px) {
	.site-header__burger { display: none; }
	.site-nav { display: block; margin-left: 20px; }
	:root { --header-h: 68px; }
}

/* Полоса прогресса чтения */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.admin-bar .progress { top: 32px; }
.progress__bar { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff4fa3); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Лента рубрик ---------- */
.rubric-bar { border-bottom: 1px solid var(--line); background: var(--bg); }
.rubric-bar__track {
	display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
	mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.rubric-bar__track::-webkit-scrollbar { display: none; }
.rubric-bar .chip { height: 36px; padding: 0 14px 0 12px; font-size: 14px; }

/* ---------- Мобильное меню ---------- */
.drawer, .search-overlay {
	position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 14, .45);
	opacity: 0; transition: opacity .2s ease;
}
.drawer.is-open, .search-overlay.is-open { opacity: 1; }
.drawer__panel {
	position: absolute; inset: 0 auto 0 0; width: min(420px, 92vw); overflow-y: auto;
	background: var(--bg); padding: 12px 20px 32px;
	transform: translateX(-100%); transition: transform .22s ease;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-bottom: 12px; }
.drawer__label { margin: 20px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.drawer__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tile {
	--c: var(--accent);
	display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 92px; padding: 14px;
	border-radius: 16px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--text); font-weight: 700; line-height: 1.2;
}
[data-theme="dark"] .tile { background: color-mix(in srgb, var(--c) 20%, var(--surface)); }
.tile:hover { background: var(--c); color: #fff; }
.tile__emoji { font-size: 26px; line-height: 1; }
.drawer__menu, .drawer__menu ul { margin: 0; padding: 0; list-style: none; }
.drawer__menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 18px; color: var(--text); }
.drawer__menu ul a { padding-left: 16px; font-size: 16px; font-weight: 500; }
.drawer__socials { display: flex; gap: 8px; margin-top: 24px; }

/* ---------- Поиск ---------- */
.search-overlay { background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.search-overlay__box { padding-top: 16px; transform: translateY(-12px); transition: transform .2s ease; max-width: 760px; }
.search-overlay.is-open .search-overlay__box { transform: none; }
.search-overlay__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search-overlay__title { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.search-overlay__hints { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.search-form { position: relative; display: flex; }
.search-form__input {
	width: 100%; height: 58px; padding: 0 64px 0 20px; border-radius: 18px;
	border: 2px solid var(--line); background: var(--surface); color: var(--text);
	font: inherit; font-size: 18px; outline: none; transition: border-color .15s ease;
	-webkit-appearance: none; appearance: none;
}
.search-form__input:focus { border-color: var(--accent); }
.search-form__input::placeholder { color: var(--muted); }
.search-form__btn {
	position: absolute; right: 7px; top: 7px; width: 44px; height: 44px; border-radius: 13px; border: 0;
	display: grid; place-items: center; background: var(--accent); color: #fff;
}

/* ---------- Карточки ---------- */
.card { position: relative; min-width: 0; }
.card__media {
	position: relative; display: block; overflow: hidden; border-radius: var(--radius);
	background: var(--surface-2); aspect-ratio: 16 / 10;
}
.card__media img, .thumb__ph {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card__media img { transform: scale(1.04); }
.thumb__ph {
	display: grid; place-items: center;
	background:
		radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--c) 55%, #fff) 0, transparent 55%),
		linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #111));
}
.thumb__ph span { font-size: clamp(36px, 6vw, 64px); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.card__title { font-size: 18px; line-height: 1.25; font-weight: 750; letter-spacing: -.015em; }
.card__title a { color: var(--text); background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s ease; }
.card:hover .card__title a { background-size: 100% 2px; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .chip { position: relative; z-index: 2; }
.card__excerpt { color: var(--muted); font-size: 15px; line-height: 1.5; }
.card__meta { color: var(--muted); font-size: 13px; font-weight: 500; }

.card--grid .card__body { padding-top: 14px; }

/* Большая */
.card--hero { border-radius: calc(var(--radius) + 4px); overflow: hidden; color: #fff; isolation: isolate; }
.card--hero .card__media { aspect-ratio: 4 / 5; border-radius: 0; }
.card--hero .card__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 62%, rgba(0, 0, 0, .86) 100%);
}
.card--hero .card__body { position: absolute; inset: auto 0 0 0; padding: 22px; gap: 10px; }
.card--hero .card__title { font-size: clamp(24px, 4.4vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.card--hero .card__title a { color: #fff; }
.card--hero .card__excerpt { color: rgba(255, 255, 255, .85); font-size: 16px; max-width: 60ch; display: none; }
.card--hero .card__meta { color: rgba(255, 255, 255, .75); }
@media (min-width: 700px) {
	.card--hero .card__media { aspect-ratio: 16 / 10; }
	.card--hero .card__body { padding: 32px; }
	.card--hero .card__excerpt { display: block; }
}

/* Компактная */
.card--compact { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card--compact:last-child { border-bottom: 0; }
.card--compact .card__media { aspect-ratio: 1; border-radius: 14px; }
.card--compact .card__body { gap: 4px; }
.card--compact .card__title { font-size: 16px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Строка ленты */
.card--row { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.card--row .card__media { aspect-ratio: 1; border-radius: 14px; }
.card--row .card__title { font-size: 17px; line-height: 1.3; }
.card--row .card__excerpt { display: none; }
@media (min-width: 700px) {
	.card--row { grid-template-columns: 280px 1fr; gap: 24px; padding: 22px 0; }
	.card--row .card__media { aspect-ratio: 16 / 10; border-radius: var(--radius); }
	.card--row .card__title { font-size: 22px; }
	.card--row .card__excerpt { display: block; }
}

/* Популярное */
.card--pop { padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
[data-theme="dark"] .card--pop { border-color: var(--line); }
.card--pop .card__num {
	position: absolute; z-index: 2; top: 4px; left: 12px;
	font-family: var(--font-display); font-weight: 900; font-size: 64px; line-height: 1;
	color: var(--lime); -webkit-text-stroke: 2px var(--ink-on-lime); paint-order: stroke fill;
	text-shadow: 0 4px 0 var(--ink-on-lime);
}
.card--pop .card__media { border-radius: 14px; aspect-ratio: 4 / 3; margin-top: 26px; }
.card--pop .card__body { padding-top: 12px; }
.card--pop .card__title { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Секции главной ---------- */
.home-hero { display: grid; gap: 8px; padding-top: 16px; }
.home-hero__side { background: var(--surface); border-radius: var(--radius); padding: 4px 16px; border: 1px solid var(--line); }
@media (min-width: 960px) {
	.home-hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; padding-top: 24px; }
	.home-hero__side { padding: 8px 22px; display: flex; flex-direction: column; justify-content: center; }
	.home-hero__main .card--hero, .home-hero__main .card--hero .card__media { height: 100%; }
	.home-hero__main .card--hero .card__media { aspect-ratio: auto; min-height: 520px; }
}

.section { padding-top: clamp(36px, 6vw, 64px); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.03em; }
.section__title a { color: var(--text); }
.section__title a:hover { color: var(--c, var(--accent)); }
.section__emoji {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px;
	background: color-mix(in srgb, var(--c, var(--accent)) 15%, var(--surface));
}
.section__more { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 700; }
.section__more .icon { width: 16px; height: 16px; }
.section__more:hover { background: var(--c, var(--accent)); color: #fff; }

/* Горизонтальные ленты (свайп на телефоне, сетка на десктопе) */
.track {
	display: grid; grid-auto-flow: column; gap: 14px;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
	margin-inline: calc(-1 * clamp(16px, 4vw, 32px)); padding-inline: clamp(16px, 4vw, 32px); scroll-padding-inline: clamp(16px, 4vw, 32px);
	padding-bottom: 4px;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.track--shelf, .track--related { grid-auto-columns: 74%; }
.track--pop { grid-auto-columns: 64%; }
@media (min-width: 600px) {
	.track--shelf, .track--related { grid-auto-columns: 42%; }
	.track--pop { grid-auto-columns: 36%; }
}
@media (min-width: 1024px) {
	.track { margin-inline: 0; padding-inline: 0; overflow: visible; grid-auto-flow: row; }
	.track--shelf { grid-template-columns: repeat(4, 1fr); }
	.track--shelf > :nth-child(n+5) { display: none; }
	.track--related { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
	.track--pop { grid-template-columns: repeat(5, 1fr); }
}

/* Telegram */
.tg-cta { margin-top: clamp(36px, 6vw, 64px); }
.tg-cta__inner {
	position: relative; overflow: hidden; display: grid; gap: 16px; align-items: center;
	padding: 24px; border-radius: calc(var(--radius) + 4px); color: #fff;
	background: radial-gradient(circle at 110% -20%, #ff4fa3 0, transparent 45%), linear-gradient(135deg, var(--accent), #2e7dff);
}
.tg-cta__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 255, 255, .18); }
.tg-cta__icon .icon { width: 30px; height: 30px; }
.tg-cta__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; }
.tg-cta__sub { margin-top: 4px; color: rgba(255, 255, 255, .86); font-size: 15px; }
.tg-cta .btn { justify-self: start; }
@media (min-width: 700px) {
	.tg-cta__inner { grid-template-columns: auto 1fr auto; padding: 28px 32px; gap: 22px; }
	.tg-cta .btn { justify-self: end; }
}
.article .tg-cta { margin-top: 40px; }

/* Лента «Свежее» */
.feed__list { border-top: 1px solid var(--line); }
.feed__more { display: flex; justify-content: center; padding-top: 24px; }
.feed__more .btn { min-width: 220px; }

/* Рекламные места */
.slot { margin: 28px auto; text-align: center; }
.slot--home { margin-top: clamp(36px, 6vw, 64px); }
.zh-widget__title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }

/* ---------- Рубрика, поиск ---------- */
.archive-head { display: flex; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: 12px; }
.archive-head__emoji {
	--c: var(--accent);
	display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 20px; font-size: 32px;
	background: color-mix(in srgb, var(--c) 15%, var(--surface));
	font-family: var(--font-display); font-weight: 800; color: var(--c);
}
.archive-head[style] .archive-head__emoji { --c: inherit; }
.archive-head__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 5vw, 48px); letter-spacing: -.04em; }
.archive-head__desc { margin-top: 8px; color: var(--muted); max-width: 70ch; }
.archive-head__desc p + p { margin-top: 8px; }
.archive-head__count { margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.archive-head__kicker { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.archive-head--search { display: block; }
.archive-head--search .search-form { margin-top: 18px; max-width: 720px; }
.archive-head--search .archive-head__title { margin-top: 4px; word-break: break-word; }

.grid { display: grid; gap: 32px 24px; padding-top: 20px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.pagination { padding-top: 40px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 14px;
	background: var(--surface); border: 1px solid var(--line); font-weight: 700;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .page-numbers.dots { background: none; border: 0; }

.empty { padding: 40px 0; color: var(--muted); }
.empty__title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Статья ---------- */
.article__head { padding-top: clamp(20px, 4vw, 40px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.article__crumbs { font-size: 13px; color: var(--muted); }
.article__crumbs a { color: var(--muted); }
.article__crumbs .separator { margin: 0 6px; opacity: .6; }
.article__title { font-size: clamp(30px, 5.2vw, 50px); line-height: 1.08; font-weight: 850; letter-spacing: -.03em; text-wrap: balance; }
.article__lead { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--muted); font-weight: 450; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.article__meta .icon { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 2px; }
.article__cover { margin: 24px auto 0; max-width: 1000px; padding-inline: 0; }
@media (min-width: 700px) { .article__cover { padding-inline: 20px; } }
.article__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; }
@media (min-width: 700px) { .article__cover img { border-radius: calc(var(--radius) + 4px); } }
.article--page .article__head { padding-bottom: 8px; }

/* Оглавление */
.toc { margin: 28px 0; padding: 4px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.toc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; font-weight: 800; }
.toc__head::-webkit-details-marker { display: none; }
.toc__head::after { content: ""; width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; margin-right: 4px; }
.toc[open] .toc__head::after { transform: rotate(-135deg) translateY(-2px); }
.toc__label { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.toc__count { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.toc__list { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: toc; }
.toc__list li { counter-increment: toc; }
.toc__list a { display: flex; gap: 12px; padding: 8px 0; color: var(--text); font-weight: 550; line-height: 1.35; border-top: 1px dashed var(--line); }
.toc__list li:first-child a { border-top: 0; }
.toc__list a::before { content: counter(toc, decimal-leading-zero); color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.toc__list a:hover { color: var(--accent); }

/* Текст статьи */
.entry { padding-top: 24px; font-size: 18px; line-height: 1.72; overflow-wrap: break-word; }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { margin-top: 1.9em; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
.entry h3 { margin-top: 1.6em; font-size: clamp(20px, 2.6vw, 24px); line-height: 1.25; font-weight: 750; }
.entry h4 { margin-top: 1.4em; font-size: 19px; font-weight: 750; }
.entry h2 + *, .entry h3 + *, .entry h4 + * { margin-top: .6em; }
.entry a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.entry a:hover { text-decoration-color: currentColor; }
.entry strong, .entry b { font-weight: 750; }
.entry ul, .entry ol { padding-left: 0; list-style: none; }
.entry li { position: relative; padding-left: 30px; }
.entry li + li { margin-top: .45em; }
.entry ul > li::before { content: ""; position: absolute; left: 8px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.entry ol { counter-reset: li; }
.entry ol > li { counter-increment: li; }
.entry ol > li::before {
	content: counter(li); position: absolute; left: 0; top: .15em; display: grid; place-items: center;
	width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); color: var(--accent);
	font-size: 13px; font-weight: 800; line-height: 1;
}
.entry li > ul, .entry li > ol { margin-top: .45em; }
.entry blockquote, .entry .wp-block-quote {
	margin-inline: 0; padding: 18px 22px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--accent-soft); font-size: 19px; font-weight: 550;
}
.entry blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--muted); }
.entry .wp-block-pullquote { border: 0; padding: 24px 0; text-align: left; }
.entry .wp-block-pullquote blockquote { background: none; border: 0; padding: 0; font-size: 24px; font-weight: 750; }
.entry figure { margin: 1.6em 0; }
.entry figure img, .entry > p > img, .entry .wp-block-image img { border-radius: var(--radius); }
.entry figcaption, .entry .wp-element-caption { margin-top: 8px; color: var(--muted); font-size: 14px; text-align: left; }
.entry .alignwide { margin-inline: calc(-1 * min(120px, 6vw)); max-width: none; }
.entry .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.entry .alignfull img { border-radius: 0; }
.entry hr, .entry .wp-block-separator { border: 0; height: 0; margin: 2.2em auto; text-align: center; }
.entry hr::before, .entry .wp-block-separator::before { content: "✦ ✦ ✦"; color: var(--muted); letter-spacing: .6em; }
.entry .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.entry table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; background: var(--surface); }
.entry th, .entry td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.entry th { background: var(--surface-2); font-weight: 750; }
.entry tr:last-child td { border-bottom: 0; }
.entry .wp-block-table { margin-inline: 0; }
.entry .wp-block-table table { border: 0; }
.entry code { padding: .1em .35em; border-radius: 6px; background: var(--surface-2); font-size: .9em; }
.entry pre { overflow-x: auto; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 15px; }
.entry iframe, .entry .wp-block-embed { max-width: 100%; border-radius: var(--radius-sm); }
.entry .wp-block-embed__wrapper iframe { width: 100%; }
.entry mark { background: var(--lime); color: var(--ink-on-lime); padding: 0 .15em; border-radius: 4px; }
.entry .wp-block-button__link { border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; padding: 14px 24px; }
.entry .has-background { border-radius: var(--radius-sm); padding: 18px 22px; }
.entry .wp-block-details { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.entry .wp-block-details summary { cursor: pointer; font-weight: 750; }
.entry > p:empty { display: none; }
.page-links { display: flex; gap: 8px; margin-top: 24px; font-weight: 700; }

/* Подвал статьи */
.article__foot { padding-top: 36px; display: grid; gap: 28px; }
.reactions { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.reactions__label { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.reactions__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.reaction {
	display: inline-flex; align-items: center; gap: 6px; min-width: 64px; height: 50px; padding: 0 16px; border-radius: 999px;
	border: 1.5px solid var(--line); background: var(--bg); font-weight: 700; font-size: 15px;
	transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
.reaction__emoji { font-size: 22px; line-height: 1; }
.reaction:hover { transform: translateY(-2px); border-color: var(--accent); }
.reaction[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.reactions.is-voted .reaction:not([aria-pressed="true"]) { opacity: .65; }
.reactions.is-voted .reaction { cursor: default; }
.reactions.is-voted .reaction:hover { transform: none; }
.reaction.is-pop .reaction__emoji { animation: zhas-pop .45s ease; }
@keyframes zhas-pop { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-10deg); } 100% { transform: scale(1); } }

.share__label { font-weight: 800; margin-bottom: 10px; }
.share__list { display: flex; flex-wrap: wrap; gap: 8px; }
.share__btn {
	display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px;
	border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; color: var(--text);
}
.share__btn .icon { width: 18px; height: 18px; }
.share__btn:hover { border-color: var(--accent); color: var(--accent); }
.share__btn--tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.share__btn--tg:hover { color: #fff; filter: brightness(1.08); border-color: #229ed9; }
.share__btn--wa { background: #25d366; border-color: #25d366; color: #0b3d1e; }
.share__btn--wa:hover { color: #0b3d1e; filter: brightness(1.05); border-color: #25d366; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 600; }

.related { padding-bottom: 8px; }

/* Комментарии */
.comments { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments__title, .comment-reply-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.comments__list, .comments__list .children { list-style: none; padding: 0; margin: 0; }
.comments__list .children { padding-left: 20px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.comment-meta .avatar { border-radius: 50%; }
.comment-content { margin-top: 8px; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
.comment-form p { margin-bottom: 14px; }

/* ---------- 404 ---------- */
.notfound { padding-top: 40px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.notfound__code {
	font-family: var(--font-display); font-weight: 900; font-size: clamp(96px, 22vw, 200px); line-height: .9; letter-spacing: -.06em;
	background: linear-gradient(135deg, var(--accent), #ff4fa3 60%, #ff8a00); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound__title { font-family: var(--font-display); font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -.03em; }
.notfound__text { color: var(--muted); max-width: 52ch; }
.notfound .search-form { width: 100%; max-width: 560px; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: clamp(56px, 8vw, 96px); background: #101016; color: #d9d9e3; }
[data-theme="dark"] .site-footer { background: #08080c; border-top: 1px solid var(--line); }
.site-footer a { color: #d9d9e3; }
.site-footer a:hover { color: var(--lime); }
.site-footer__inner { display: grid; gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.site-footer .logo__link { color: #fff; font-size: 26px; }
.site-footer__tagline { margin-top: 14px; max-width: 42ch; color: #a8a8b8; font-size: 15px; }
.site-footer__socials { display: flex; gap: 8px; margin-top: 18px; }
.site-footer .icon-btn--filled { background: rgba(255, 255, 255, .08); color: #fff; }
.site-footer .icon-btn--filled:hover { background: var(--lime); color: var(--ink-on-lime); }
.site-footer__label { margin-bottom: 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a8a9a; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-weight: 600; font-size: 15px; }
.site-footer__menu ul { flex-direction: column; gap: 10px; }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #8a8a9a; }
@media (min-width: 900px) {
	.site-footer__inner { grid-template-columns: 1.1fr 1.6fr .8fr; gap: 48px; padding-top: 56px; }
}

.to-top {
	display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; border: 0;
	background: rgba(255, 255, 255, .08); color: #fff;
}
.to-top:hover { background: var(--lime); color: var(--ink-on-lime); }

/* Уведомление */
.toast {
	position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 200;
	padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 15px;
	transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* Меньше движения */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Печать */
@media print {
	.site-header, .rubric-bar, .site-footer, .article__foot, .related, .tg-cta, .progress, .toc, .slot { display: none !important; }
	body { background: #fff; color: #000; }
}

/* Оглавление внутри текста не наследует оформление списков и ссылок статьи */
.entry .toc__list { counter-reset: toc; }
.entry .toc__list > li { counter-increment: toc; padding-left: 0; margin-top: 0; }
.entry .toc__list > li::before { content: none; }
.entry .toc__list a { text-decoration: none; color: var(--text); }
.entry .toc__list a:hover { color: var(--accent); }

/* Таблицы: перебиваем толстые рамки стандартного блока */
.entry .wp-block-table thead { border-bottom: 0; }
.entry .wp-block-table tfoot { border-top: 0; }
.entry .wp-block-table th, .entry .wp-block-table td { border: 0; border-bottom: 1px solid var(--line); }
.entry .wp-block-table tr:last-child td { border-bottom: 0; }
.entry .wp-block-table td + td, .entry .wp-block-table th + th { border-left: 1px solid var(--line); }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
.comment-form-cookies-consent input { margin-top: 4px; flex: none; }
.comment-form-cookies-consent label { margin: 0; font-weight: 500; }

/* Подвал всегда внизу экрана, даже на коротких страницах */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }
@media (max-width: 480px) {
	.reactions { padding: 18px 12px; }
	.reactions__list { gap: 6px; flex-wrap: nowrap; }
	.reaction { min-width: 0; height: 46px; padding: 0 11px; }
	.reaction__emoji { font-size: 20px; }
}

/* Кнопка «Случайная статья» в шапке */
.dice-btn span { font-size: 21px; line-height: 1; display: inline-block; transition: transform .4s ease; }
.dice-btn:hover span { transform: rotate(180deg); }

/* Логотип одним словом: «zhas» вплотную к плашке «hub» */
.logo__link { gap: 0; }
.logo__zhas { padding-right: 0; margin-right: 3px; }
.logo__hub {
	margin-left: 0; padding: 3px 7px 5px; border-radius: 9px;
	transform-origin: 30% 60%;
	animation: zhas-hub 7s ease-in-out 1.5s infinite;
}
.logo__link:hover .logo__hub { animation: none; transform: rotate(4deg) scale(1.06); }
@keyframes zhas-hub {
	0%, 82%, 100% { transform: rotate(-4deg); }
	86% { transform: rotate(5deg) scale(1.06); }
	90% { transform: rotate(-7deg); }
	94% { transform: rotate(2deg); }
}
.logo__zhas { margin-right: 1px; }
.logo__hub { padding: 3px 7px 5px 5px; }

/* ==========================================================================
   Коллаж-зин 1.5: бумага, полароиды, скотч, стикеры, приписки от руки
   ========================================================================== */
:root {
	--bg: #f2ede3;
	--surface: #fffdf8;
	--surface-2: #e8e1d3;
	--text: #161513;
	--muted: #6b655a;
	--line: #d9cfbd;
	--accent: #2d4bff;
	--link: #2d4bff;
	--pen: #2d4bff;
	--red: #ec3b2c;
	--marker: #d7ff3f;
	--tape: rgba(255, 222, 89, .75);
	--tape-b: rgba(150, 212, 255, .72);
	--tape-p: rgba(255, 160, 200, .72);
	--paper-shadow: 0 1px 1px rgba(40, 30, 10, .08), 0 6px 16px rgba(40, 30, 10, .12);
	--font: "Geologica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-display: "Geologica", ui-sans-serif, system-ui, sans-serif;
	--hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
	--tk: .5;
	--radius: 0px;
	--radius-sm: 0px;
}
[data-theme="dark"] {
	--bg: #1a1916;
	--surface: #f4efe4;
	--surface-2: #2a2823;
	--text: #f1ebdd;
	--muted: #a59d8d;
	--line: #3b382f;
	--accent: #8fa2ff;
	--link: #8fa2ff;
	--pen: #8fa2ff;
	--tape: rgba(255, 222, 89, .55);
	--tape-b: rgba(150, 212, 255, .5);
	--tape-p: rgba(255, 160, 200, .5);
	--paper-shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .45);
}
@media (min-width: 900px) { :root { --tk: 1; } }

body {
	background-color: var(--bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	font-family: var(--font);
}
h1, h2, h3, .card__title { font-family: var(--font-display); }

/* Эмодзи больше не используем: рубрика — это стикер или кусок скотча */
.chip__emoji, .tile__emoji, .archive-head__emoji, .section__emoji { display: none !important; }

/* Приписки от руки */
.scribble {
	font-family: var(--hand); font-weight: 600; font-size: 26px; line-height: 1;
	color: var(--pen); transform: rotate(-4deg); display: inline-block; white-space: nowrap;
}
.note-title { font-family: var(--hand); font-weight: 700; font-size: 32px; line-height: 1; color: var(--pen); margin: 0 0 4px; }

/* Стикеры */
.sticker {
	position: absolute; z-index: 5; display: grid; place-items: center;
	width: 92px; height: 92px; border-radius: 50%;
	background: var(--red); color: #fff;
	font-family: var(--hand); font-weight: 700; font-size: 28px; line-height: .9; text-align: center;
	box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(0, 0, 0, .22);
	transform: rotate(12deg); pointer-events: none;
}
.sticker--hero { top: -22px; right: 18px; }
@media (max-width: 699px) { .sticker { width: 74px; height: 74px; font-size: 23px; } .sticker--hero { top: -14px; right: 10px; } }

/* Шапка: бумага и логотип-наклейка */
.site-header { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.site-header.is-scrolled { border-bottom: 1px dashed var(--line); }
.logo__link { font-family: var(--font-display); font-weight: 900; letter-spacing: -.05em; }
.logo__hub { box-shadow: 0 0 0 2px #fff, 0 3px 6px rgba(0, 0, 0, .18); }
.icon-btn { border-radius: 0; }

/* Полоса рубрик — кусочки цветного скотча */
.rubric-bar { border-bottom: 0; background: transparent; }
.rubric-bar__track { gap: 6px; padding-top: 10px; padding-bottom: 14px; mask-image: none; -webkit-mask-image: none; }
.rubric-bar .chip,
.tile {
	--clip: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 95%, 0 48%);
	height: 32px; padding: 0 16px; border-radius: 0;
	background: color-mix(in srgb, var(--c) 42%, transparent); color: var(--text);
	font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0;
	clip-path: var(--clip);
	transform: rotate(calc(var(--t, -1.5deg) * var(--tk)));
}
.rubric-bar .chip:nth-child(3n+2) { --t: 1.5deg; }
.rubric-bar .chip:nth-child(3n) { --t: -.5deg; }
[data-theme="dark"] .rubric-bar .chip { background: color-mix(in srgb, var(--c) 55%, transparent); color: #fff; }
.rubric-bar a.chip:hover, .rubric-bar .chip.is-current { background: var(--c); color: #fff; }

/* Стикер рубрики в карточках */
.chip {
	height: 26px; padding: 0 11px; border-radius: 999px; background: var(--c); color: #fff;
	font-size: 12px; font-weight: 800;
	box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0, 0, 0, .18);
	transform: rotate(-3deg);
}
[data-theme="dark"] .chip { background: var(--c); color: #fff; }
a.chip:hover { background: var(--text); color: var(--bg); }
.chip--on-dark { background: var(--c); backdrop-filter: none; -webkit-backdrop-filter: none; }
.chip--text { height: auto; padding: 0; box-shadow: none; transform: none; background: none !important; font-family: var(--hand); font-size: 19px; font-weight: 700; color: color-mix(in srgb, var(--c) 80%, var(--text)); }

/* Кнопки — бумажные ярлыки */
.btn { border-radius: 0; background: var(--text); color: var(--bg); transform: rotate(-1deg); font-weight: 800; }
.btn:hover { color: var(--bg); transform: rotate(0) translateY(-2px); filter: none; }
.btn--ghost { background: var(--surface); color: #161513; border: 2px dashed #161513; }
.btn--ghost:hover { color: #161513; background: var(--marker); border-color: #161513; }
.btn--lime { background: var(--marker); color: #161513; }
.btn--lime:hover { color: #161513; }

/* Заголовки секций — вырезка из газеты + приписка */
.section__head { justify-content: flex-start; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section__title {
	display: inline-block; padding: .12em .4em .18em; background: var(--text); color: var(--bg);
	font-weight: 900; font-size: clamp(24px, 3.6vw, 40px); letter-spacing: -.04em; line-height: 1;
	transform: rotate(calc(-1.5deg * var(--tk)));
	clip-path: polygon(0 4%, 100% 0, 99% 96%, 1% 100%);
}
.section__title a { color: var(--bg); }
.section__title a:hover { color: var(--marker); }
.shelf .section__title { background: var(--c); color: #fff; }
.shelf .section__title a { color: #fff; }
.section__more {
	margin-left: auto; padding: 0; background: none; border-radius: 0;
	font-family: var(--hand); font-size: 24px; font-weight: 700; color: var(--pen);
	text-decoration: underline wavy; text-underline-offset: 6px; text-decoration-thickness: 1.5px;
}
.section__more:hover { background: none; color: var(--red); }

/* Полароиды */
.card--grid, .card--pop {
	background: var(--surface); padding: 10px 10px 16px; box-shadow: var(--paper-shadow);
	transform: rotate(calc(var(--t, -1.6deg) * var(--tk)));
	transition: transform .2s ease, box-shadow .2s ease;
	color: #161513;
}
.card--grid::before, .card--pop::before, .card--hero::before, .home-hero__side::before, .card--row::before {
	content: ""; position: absolute; z-index: 3; top: -11px; left: 50%;
	width: 84px; height: 24px; margin-left: -42px;
	background: var(--tape); transform: rotate(-4deg);
	clip-path: polygon(2% 0, 98% 6%, 100% 100%, 0 94%);
}
.track > .card:nth-child(3n+2), .grid > .card:nth-child(3n+2) { --t: 1.2deg; }
.track > .card:nth-child(3n+2)::before, .grid > .card:nth-child(3n+2)::before { background: var(--tape-b); transform: rotate(5deg); }
.track > .card:nth-child(3n), .grid > .card:nth-child(3n) { --t: -.6deg; }
.track > .card:nth-child(3n)::before, .grid > .card:nth-child(3n)::before { background: var(--tape-p); left: 22%; }
.card--grid:hover, .card--pop:hover { transform: rotate(0) translateY(-4px) scale(1.015); z-index: 4; box-shadow: 0 2px 2px rgba(40, 30, 10, .08), 0 16px 30px rgba(40, 30, 10, .18); }
.card--grid .card__media, .card--pop .card__media { border-radius: 0; aspect-ratio: 1 / 1; margin: 0; }
.card--grid .card__body, .card--pop .card__body { padding: 12px 4px 0; gap: 6px; }
.card--grid .card__title a, .card--pop .card__title a { color: #161513; }
.card--grid .card__title, .card--pop .card__title { font-size: 16px; font-weight: 700; }
.card--grid .card__meta, .card--pop .card__meta, .card--compact .card__meta, .card--row .card__meta {
	font-family: var(--hand); font-size: 19px; font-weight: 600; color: #7a7366;
}
.card__title a { background-image: linear-gradient(var(--marker), var(--marker)); background-size: 0 .45em; background-position: 0 92%; }
.card:hover .card__title a { background-size: 100% .45em; }
.track { gap: 22px; padding-top: 18px; padding-bottom: 18px; }
@media (min-width: 1024px) { .track--shelf, .track--related, .track--pop { gap: 28px; } }

/* Популярное: номер — круглая наклейка */
.card--pop .card__num {
	top: -14px; left: -12px; z-index: 6; display: grid; place-items: center;
	width: 50px; height: 50px; border-radius: 50%;
	background: var(--red); color: #fff; font-family: var(--hand); font-size: 32px; font-weight: 700;
	-webkit-text-stroke: 0; text-shadow: none;
	box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0, 0, 0, .2); transform: rotate(-10deg);
}
.track--pop > .card:nth-child(2n) .card__num { background: var(--pen); transform: rotate(8deg); }
.card--pop .card__media { margin-top: 0; }

/* Главная: большой полароид и тетрадный листок */
.home-hero { gap: 34px; padding-top: 22px; }
.home-hero__main { position: relative; }
.card--hero {
	background: var(--surface); padding: 12px 12px 0; overflow: visible; border-radius: 0; color: #161513;
	box-shadow: var(--paper-shadow); transform: rotate(calc(-1deg * var(--tk)));
}
.card--hero::before { left: 18px; margin-left: 0; width: 110px; transform: rotate(-28deg); top: -4px; }
.card--hero::after {
	content: ""; position: absolute; z-index: 3; bottom: 8px; right: -26px; width: 110px; height: 26px;
	background: var(--tape-b); transform: rotate(-32deg); clip-path: polygon(2% 0, 98% 6%, 100% 100%, 0 94%);
}
.card--hero .card__media { border-radius: 0; aspect-ratio: 4 / 3; }
.card--hero .card__media::after { display: none; }
.card--hero .card__body { position: relative; inset: auto; padding: 18px 6px 22px; gap: 12px; }
.card--hero .card__title { font-size: clamp(26px, 4.2vw, 46px); line-height: 1.12; font-weight: 900; letter-spacing: -.035em; }
.card--hero .card__title a {
	color: #161513; background: none;
}
.card--hero .card__title a span, .card--hero .card__title a {
	box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.card--hero:hover .card__title a { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); }
.card--hero .card__excerpt { color: #4b463e; display: block; font-size: 16px; }
.card--hero .card__meta { color: #7a7366; font-family: var(--hand); font-size: 21px; font-weight: 600; }
.card--hero .chip--on-dark { color: #fff; }
@media (min-width: 960px) {
	.home-hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; padding-top: 34px; }
	.home-hero__main .card--hero, .home-hero__main .card--hero .card__media { height: auto; }
	.home-hero__main .card--hero .card__media { min-height: 0; aspect-ratio: 16 / 10; }
}

.home-hero__side {
	position: relative; align-self: start; border: 0; border-radius: 0;
	padding: 22px 18px 14px 46px; color: #161513;
	background:
		linear-gradient(90deg, transparent 32px, rgba(236, 59, 44, .45) 32px, rgba(236, 59, 44, .45) 34px, transparent 34px),
		repeating-linear-gradient(180deg, var(--surface) 0 31px, rgba(45, 75, 255, .16) 31px 32px);
	background-color: var(--surface);
	box-shadow: var(--paper-shadow);
	transform: rotate(calc(1.2deg * var(--tk)));
}
.home-hero__side::before { background: var(--tape-p); }
.home-hero__side .note-title { color: #2d4bff; }
.home-hero__side .card--compact { border-bottom: 0; grid-template-columns: 74px 1fr; padding: 10px 0; }
.home-hero__side .card--compact .card__media { border-radius: 0; border: 4px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .15); transform: rotate(-2deg); }
.home-hero__side .card--compact:nth-child(odd) .card__media { transform: rotate(2deg); }
.home-hero__side .card__title a { color: #161513; }
@media (min-width: 960px) { .home-hero__side { padding: 26px 24px 16px 52px; } }

/* Лента «Свежее» — карточки из картотеки */
.feed__list { border-top: 0; display: grid; gap: 22px; }
.card--row {
	background: var(--surface); color: #161513; padding: 14px; border-bottom: 0;
	box-shadow: var(--paper-shadow); transform: rotate(calc(var(--t, -.5deg) * var(--tk)));
}
.card--row:nth-child(even) { --t: .5deg; }
.card--row::before { width: 64px; margin-left: -32px; top: -10px; }
.card--row:nth-child(3n+2)::before { background: var(--tape-b); left: 85%; }
.card--row:nth-child(3n)::before { background: var(--tape-p); left: 12%; }
.card--row .card__media { border-radius: 0; }
.card--row .card__title a { color: #161513; }
.card--row .card__excerpt { color: #4b463e; }
@media (min-width: 700px) {
	.card--row { padding: 18px; gap: 26px; }
	.card--row .card__media { aspect-ratio: 4 / 3; }
	.card--row .card__title { font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
}
.feed__more { padding-top: 34px; }

/* Telegram — флаер с линией отреза */
.tg-cta__inner {
	position: relative; overflow: visible; border-radius: 0; color: #fff;
	background: var(--pen); transform: rotate(calc(-1deg * var(--tk)));
	box-shadow: var(--paper-shadow); outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: -12px;
}
.tg-cta__icon { border-radius: 50%; background: #fff; color: var(--pen); }
.tg-cta__title { font-weight: 900; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.035em; }
.tg-cta__sub { color: rgba(255, 255, 255, .85); }
.tg-cta__note { position: absolute; right: 26px; top: -22px; color: var(--marker); font-size: 30px; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
[data-theme="dark"] .tg-cta__inner { background: #2d4bff; }
@media (max-width: 699px) { .tg-cta__note { right: 14px; top: -16px; font-size: 24px; } }

/* Рубрика и поиск */
.archive-head { padding-top: 34px; padding-bottom: 20px; }
.archive-head__title {
	display: inline-block; padding: .08em .35em .14em; background: var(--c, var(--text)); color: #fff;
	font-weight: 900; transform: rotate(calc(-1.5deg * var(--tk))); clip-path: polygon(0 4%, 100% 0, 99% 96%, 1% 100%);
}
.archive-head--search .archive-head__title { background: var(--text); color: var(--bg); }
.archive-head__count { font-family: var(--hand); font-size: 22px; color: var(--pen); }
.grid { gap: 40px 28px; padding-top: 26px; }
.pagination .page-numbers { border-radius: 0; background: var(--surface); color: #161513; box-shadow: var(--paper-shadow); }
.pagination .page-numbers.current { background: var(--text); color: var(--bg); }
.search-form__input { border-radius: 0; border: 2px dashed var(--text); background: var(--surface); color: #161513; }
.search-form__btn { border-radius: 0; background: var(--text); color: var(--bg); }

/* Меню-шторка */
.drawer__panel { background-color: var(--bg); background-image: inherit; }
.drawer__tiles { gap: 10px; }
.tile { height: auto; min-height: 0; padding: 12px 16px; clip-path: var(--clip); }
.drawer__tiles li:nth-child(even) .tile { --t: 1.5deg; }

/* Статья */
.article__title { font-weight: 900; letter-spacing: -.035em; }
.article__title { background: none; }
.article__title span, .article__title { box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.article__lead { font-size: 20px; }
.article__meta { font-family: var(--hand); font-size: 21px; color: var(--muted); }
.article__cover { position: relative; }
.article__cover img { border-radius: 0 !important; }
@media (min-width: 700px) {
	.article__cover { background: #fff; padding: 12px 12px 40px; box-shadow: var(--paper-shadow); transform: rotate(-.6deg); max-width: 1000px; margin-inline: auto; }
	.article__cover::before { content: ""; position: absolute; z-index: 3; top: -12px; left: 50%; width: 120px; height: 26px; margin-left: -60px; background: var(--tape); transform: rotate(-3deg); clip-path: polygon(2% 0, 98% 6%, 100% 100%, 0 94%); }
}
.entry h2 { font-weight: 900; letter-spacing: -.03em; }
.entry h2::after { content: ""; display: block; width: 72px; height: 10px; margin-top: 6px; background: var(--marker); transform: rotate(-2deg); }
.entry blockquote {
	border-left: 0; background: #fff3a8; color: #161513; padding: 22px 24px; border-radius: 0;
	box-shadow: var(--paper-shadow); transform: rotate(-.8deg); font-family: var(--hand); font-size: 25px; line-height: 1.25;
}
.entry ul > li::before { border-radius: 50%; transform: none; background: var(--red); }
.entry figure img, .entry > p > img, .entry .wp-block-image img { border-radius: 0; border: 8px solid #fff; box-shadow: var(--paper-shadow); }
.entry mark { background: var(--marker); }
.toc {
	border: 0; border-radius: 0; color: #161513;
	background: repeating-linear-gradient(180deg, var(--surface) 0 31px, rgba(45, 75, 255, .14) 31px 32px);
	box-shadow: var(--paper-shadow); transform: rotate(.4deg);
}
.toc__label { font-family: var(--hand); font-size: 28px; color: #2d4bff; }
.entry .toc__list a { color: #161513; }
.reactions { border-radius: 0; background: var(--surface); color: #161513; box-shadow: var(--paper-shadow); border: 0; transform: rotate(-.4deg); }
.reactions__label { font-family: var(--hand); font-size: 28px; font-weight: 700; color: #2d4bff; }
.reaction { border-radius: 999px; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .15); }
.tags a { border-radius: 0; background: color-mix(in srgb, var(--tape) 90%, transparent); clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 95%, 0 48%); color: #161513; }
.share__btn { border-radius: 0; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { border-radius: 0; }

/* Подвал */
.site-footer { background: #161513; }

@media (prefers-reduced-motion: reduce) {
	.card--grid, .card--pop { transition: none; }
}
html, body { overflow-x: clip; }
.tg-cta__note { color: var(--red); text-shadow: none; top: -26px; }
.home-hero__side .chip--text, .card--compact .chip--text { color: color-mix(in srgb, var(--c) 80%, #161513); }

/* ==========================================================================
   Коллаж 1.6: спокойнее — наклон только у акцентов, короткая палитра
   ========================================================================== */
:root {
	--tape: rgba(222, 205, 160, .82);
	--tape-b: var(--tape);
	--tape-p: var(--tape);
	--pen: #e0352b;
	--red: #e0352b;
}
[data-theme="dark"] { --tape: rgba(222, 205, 160, .6); --pen: #ff6a5c; --red: #e0352b; }

/* Ровно всё, кроме акцентов */
.card--grid, .card--pop, .card--row, .btn, .section__title, .archive-head__title,
.rubric-bar .chip, .tile, .toc, .reactions, .chip { transform: none; }
.card--grid:hover, .card--pop:hover { transform: translateY(-3px); }
.btn:hover { transform: translateY(-1px); }

/* Полоса рубрик: текстом, текущая — маркером */
.rubric-bar__track { gap: 2px; padding-top: 6px; padding-bottom: 8px; }
.rubric-bar .chip, [data-theme="dark"] .rubric-bar .chip {
	clip-path: none; background: none; color: var(--text); height: 34px; padding: 0 10px;
	font-size: 15px; font-weight: 600; box-shadow: none;
}
.rubric-bar a.chip:hover { background: none; color: var(--text); text-decoration: underline wavy var(--red); text-underline-offset: 5px; }
.rubric-bar .chip.is-current, [data-theme="dark"] .rubric-bar .chip.is-current {
	background: linear-gradient(transparent 55%, var(--marker) 55%, var(--marker) 90%, transparent 90%); color: var(--text);
}
[data-theme="dark"] .rubric-bar .chip.is-current { color: #161513; background: var(--marker); }

/* Рубрика в карточке — кусок бежевого скотча с текстом */
.chip, [data-theme="dark"] .chip, .chip--on-dark {
	height: 24px; padding: 0 10px; border-radius: 0; background: var(--tape); color: #161513;
	font-size: 12px; font-weight: 700; box-shadow: none;
	clip-path: polygon(3% 0, 97% 6%, 100% 50%, 97% 100%, 2% 94%, 0 50%);
}
a.chip:hover { background: var(--marker); color: #161513; }
.chip--text, .home-hero__side .chip--text, .card--compact .chip--text { clip-path: none; color: var(--red); }

/* Заголовки секций: чёрная вырезка, без цветов рубрик */
.shelf .section__title { background: var(--text); color: var(--bg); }
.shelf .section__title a { color: var(--bg); }
.section__more { color: var(--red); text-decoration-color: var(--red); }

/* Кнопки */
.btn--ghost { border-style: solid; }

/* Полароиды прямые; скотч один и тот же, но в разных местах */
.card--grid::before, .card--pop::before { width: 64px; margin-left: -32px; transform: rotate(-3deg); }
.track > .card:nth-child(3n+2)::before, .grid > .card:nth-child(3n+2)::before { transform: rotate(4deg); left: 30%; }
.track > .card:nth-child(3n)::before, .grid > .card:nth-child(3n)::before { left: 68%; transform: rotate(-6deg); }
.card--pop .card__num, .track--pop > .card:nth-child(2n) .card__num { background: var(--red); }
.track--pop > .card:nth-child(2n) .card__num { transform: rotate(9deg); }

/* Полка A: большой полароид + список справа */
@media (min-width: 1024px) {
	.shelf--a .track--shelf { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: repeat(3, auto); column-gap: 44px; row-gap: 0; align-items: start; }
	.shelf--a .track--shelf > :first-child { grid-row: 1 / 4; }
	.shelf--a .track--shelf > :first-child .card__media { aspect-ratio: 4 / 3; }
	.shelf--a .track--shelf > :first-child .card__title { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
	.shelf--a .track--shelf > :not(:first-child) {
		display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center;
		background: none; box-shadow: none; padding: 16px 0; border-bottom: 1px dashed var(--line); color: var(--text);
	}
	.shelf--a .track--shelf > :not(:first-child)::before { display: none; }
	.shelf--a .track--shelf > :not(:first-child) .card__media { aspect-ratio: 1; border: 5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .14); }
	.shelf--a .track--shelf > :not(:first-child) .card__body { padding: 0; }
	.shelf--a .track--shelf > :not(:first-child) .card__title { font-size: 19px; }
	.shelf--a .track--shelf > :not(:first-child) .card__title a { color: var(--text); }
	.shelf--a .track--shelf > :not(:first-child):hover { transform: none; }
	.shelf--a .track--shelf > :nth-child(n+5) { display: none; }
}

/* Полка B: только заголовки, как газетные вырезки */
.shelf--b .track--shelf { counter-reset: clip; }
.shelf--b .track--shelf > .card {
	counter-increment: clip; background: none; box-shadow: none; padding: 18px 0 20px; color: var(--text);
	border-top: 2px solid var(--text);
}
.shelf--b .track--shelf > .card::before { display: none; }
.shelf--b .track--shelf > .card .card__media { display: none; }
.shelf--b .track--shelf > .card .card__body { padding: 0; gap: 10px; }
.shelf--b .track--shelf > .card .card__body::before {
	content: counter(clip, decimal-leading-zero); font-family: var(--hand); font-size: 34px; font-weight: 700; line-height: .8; color: var(--red);
}
.shelf--b .track--shelf > .card .card__title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.shelf--b .track--shelf > .card .card__title a { color: var(--text); }
.shelf--b .track--shelf > .card:hover { transform: none; }
@media (max-width: 1023px) {
	.shelf--b .track--shelf { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding-inline: 0; gap: 0; }
	.shelf--b .track--shelf > :nth-child(n+5) { display: none; }
}
@media (min-width: 1024px) { .shelf--b .track--shelf { column-gap: 32px; } }

/* Лента «Свежее»: чистый список */
.feed__list { gap: 0; }
.card--row, .card--row:nth-child(even) {
	background: none; box-shadow: none; padding: 20px 0; color: var(--text);
	border-bottom: 1px dashed var(--line);
}
.card--row::before { display: none; }
.card--row .card__media { border: 6px solid #fff; box-shadow: 0 2px 8px rgba(40, 30, 10, .14); }
.card--row .card__title a { color: var(--text); }
.card--row .card__excerpt { color: var(--muted); }
@media (min-width: 700px) {
	.card--row { grid-template-columns: 220px 1fr; padding: 24px 0; }
	.card--row .card__title { font-size: 25px; }
}

/* Telegram: чёрный флаер, лаймовая кнопка */
.tg-cta__inner, [data-theme="dark"] .tg-cta__inner { background: #161513; color: #f2ede3; outline-color: rgba(242, 237, 227, .35); }
[data-theme="dark"] .tg-cta__inner { box-shadow: 0 0 0 1px #3b382f; }
.tg-cta__icon { background: var(--marker); color: #161513; }
.tg-cta__sub { color: rgba(242, 237, 227, .75); }
.tg-cta__note { color: var(--red); }

/* Статья */
.toc__label, .reactions__label, .home-hero__side .note-title, .note-title { color: var(--red); }
.entry blockquote { background: #fffdf8; border-left: 4px solid var(--red); transform: none; }
.tags a { background: var(--tape); }

/* ---------- 1.6: остальные страницы ---------- */
:root { --accent: #161513; --link: #c22a1f; }
[data-theme="dark"] { --accent: #f1ebdd; --link: #ff7a6b; }
.entry a { text-decoration-color: currentColor; }
.search-form__input:focus { border-color: var(--red); }
.dice-btn .icon { transition: transform .4s ease; }
.dice-btn:hover .icon { transform: rotate(90deg); }
.drawer__dice { display: inline-flex; align-items: center; gap: 10px; }

/* Шторка: рубрики — одинаковые полоски скотча */
.tile, [data-theme="dark"] .tile { background: var(--tape); color: #161513; transform: none; }
.tile:hover { background: var(--marker); color: #161513; }

/* Заголовок рубрики — чёрная вырезка */
.archive-head__title, .archive-head[style] .archive-head__title { background: var(--text); color: var(--bg); }

/* Страницы */
.page .article__title, .page-title { letter-spacing: -.035em; }

/* 404 — вырезка с наклейкой */
.notfound { position: relative; }
.notfound__code {
	display: inline-block; padding: .02em .16em .08em; background: var(--text); color: var(--bg);
	-webkit-background-clip: border-box; background-clip: border-box;
	clip-path: polygon(0 3%, 100% 0, 99% 97%, 1% 100%); transform: rotate(-2deg);
}
.notfound__code + * { margin-top: 10px; }

/* Оглавление и прочие «бумажные» блоки в тёмной теме: текст всегда тёмный */
.toc, .toc a, .toc__count, .toc__toggle, .toc__list li { color: #161513; }
.toc__num, .entry .toc__list .toc__num { color: var(--red); }
.toc__count { color: #7a7366; }
.toc__head { color: #161513; }
.toc__count { color: #7a7366; }
.toc__list a, .entry .toc__list a { color: #161513; border-top-color: rgba(22, 21, 19, .15); }
.toc__list a::before { color: var(--red); }
