/*
Theme Name: Eshpalta
Theme URI: https://eshpalta.com
Author: Eshpalta
Author URI: https://eshpalta.com
Description: Редакційна тема у стилі старої газети — топ-листи фільмів, книг і блогерів. Чистий контент без зайвої нумерації, автозміст, FAQ-блок (Yoast-сумісний), легкі відео-ембеди, Google News, self-hosted шрифти.
Version: 4.7.0
Requires at least: 6.5
Tested up to: 7.1
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: eshpalta
Tags: blog, news, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
	--paper: #f2ead9;
	--paper-deep: #e9dfc8;
	--ink: #1c1712;
	--ink-soft: #4a4038;
	--ink-faint: #8a7d6c;
	--rule: #cabb9c;
	--rule-strong: #1c1712;
	--accent: #7c2a1c;
	--accent-deep: #571a10;
	--gold: #9c7a2e;

	--f-display: 'Fraunces', Georgia, serif;
	--f-body: 'Source Serif 4', Georgia, serif;
	--f-label: 'Archivo Narrow', Arial, sans-serif;

	--wrap: 1180px;
	--radius-none: 0;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { background: var(--paper-deep); }

body {
	margin: 0;
	background: var(--paper);
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px;
	width: auto; height: auto; clip: auto;
	background: var(--ink); color: var(--paper);
	padding: 10px 16px; z-index: 999; font-family: var(--f-label);
}

::selection { background: var(--accent); color: var(--paper); }

/* ---------- Layout shell ---------- */
.page { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); max-width: var(--wrap); margin: 0 auto; }
.page__inner { padding: 0 32px 64px; }
main#main { display: block; }

/* ---------- Topbar ---------- */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	font-family: var(--f-label);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.gnews-btn {
	display: inline-flex; align-items: center; gap: 7px;
	border: 1px solid var(--ink); padding: 6px 12px;
	color: var(--ink); font-family: var(--f-label); font-weight: 600;
	font-size: 12px; letter-spacing: .04em; text-transform: none;
}
.gnews-btn svg { width: 15px; height: 15px; }
.gnews-btn:hover { background: var(--ink); color: var(--paper); }

.site-search {
	display: flex; align-items: stretch; gap: 0;
	margin: 14px 0 0;
	border: 1px solid var(--ink);
}
.site-search__input {
	flex: 1; min-width: 0; border: none; outline: none; background: var(--paper);
	font-family: var(--f-body); font-size: 15px; font-style: italic; color: var(--ink);
	padding: 10px 14px;
}
.site-search__input::placeholder { color: var(--ink-faint); }
.site-search__submit {
	border: none; border-left: 1px solid var(--ink); background: var(--ink); color: var(--paper);
	font-family: var(--f-label); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
	padding: 0 18px; cursor: pointer;
}
.site-search__submit:hover { background: var(--accent); }

/* ---------- Masthead ---------- */
.masthead {
	text-align: center;
	padding: 22px 0 18px;
	border-top: 3px double var(--rule-strong);
	border-bottom: 3px double var(--rule-strong);
}
.masthead__title {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 900;
	font-size: clamp(40px, 8vw, 84px);
	letter-spacing: -.01em;
	line-height: 1;
}
.masthead__title a { color: var(--ink); }
.masthead__title a:hover { color: var(--accent); }
.masthead__sub {
	margin: 10px 0 0;
	font-family: var(--f-label);
	font-style: italic;
	font-size: 13px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

/* ---------- Nav (collapsible menu: links + search) ---------- */
.site-nav {
	padding: 6px 0 18px;
	border-bottom: 1px solid var(--rule);
}
.site-nav[hidden] { display: none; }
.site-nav ul { list-style: none; display: flex; flex-direction: column; margin: 0; padding: 0; }
.site-nav li { border-top: 1px solid var(--rule); }
.site-nav li:first-child { border-top: none; }
.site-nav a {
	display: block;
	padding: 12px 2px;
	font-family: var(--f-label);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink);
}
.site-nav a:hover,
.site-nav .current-menu-item > a { color: var(--accent); }

.nav-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px; height: 26px;
	background: none; border: none; cursor: pointer; padding: 0;
	flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); }

/* ---------- Reading progress ---------- */
.reading-progress {
	position: sticky; top: 0; z-index: 40;
	height: 3px; background: var(--rule);
}
.reading-progress__bar {
	display: block; height: 100%; width: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
}

/* ---------- Breadcrumbs / page title ---------- */
.breadcrumbs {
	font-family: var(--f-label);
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 22px 0 0;
}
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--accent); }

.page-title {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: clamp(30px, 5vw, 46px);
	margin: 10px 0 26px;
	border-bottom: 1px solid var(--rule);
	padding-bottom: 18px;
}

/* ---------- Article header ---------- */
.article-header { margin: 8px 0 30px; text-align: center; }
.article-header__eyebrow a {
	font-family: var(--f-label); font-weight: 700; font-size: 12px;
	letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.article-header__title {
	font-family: var(--f-display);
	font-weight: 800;
	font-size: clamp(32px, 5.4vw, 58px);
	line-height: 1.08;
	margin: 12px 0 24px;
}
.article-meta {
	display: flex; flex-wrap: wrap; gap: 4px 18px;
	max-width: 720px; margin: 32px auto 0;
	font-family: var(--f-label); font-size: 12px; letter-spacing: .05em;
	text-transform: uppercase; color: var(--ink-faint);
}
.article-cover-wrap {
	margin: 0;
	border-top: 1px solid var(--rule-strong);
	border-bottom: 1px solid var(--rule-strong);
	background: var(--paper-deep);
}
/*
 * Обкладинка НЕ обрізається: висоту задає сам файл (height:auto), а
 * резерв місця до завантаження (CLS = 0) дають width/height атрибути
 * <img>, тому власного aspect-ratio тут немає. max-height + contain
 * лише страхують від дуже високих (портретних) постерів — вони
 * вписуються цілком, з полями на тлі паперу, а не кропаються.
 */
.article-cover {
	display: block;
	width: 100%;
	height: auto;
	max-height: 720px;
	object-fit: contain;
	filter: sepia(.18) contrast(1.03);
}
.article-cover-caption {
	margin: 0;
	padding: 8px 4px 10px;
	font-family: var(--f-label);
	font-size: 13px;
	line-height: 1.4;
	font-style: italic;
	color: var(--ink-faint);
	text-align: center;
}

/* flow-root: контейнер охоплює float-картинки, вони не вилазять на блок автора */
.article-intro, .article-body { display: flow-root; max-width: 720px; margin: 0 auto 44px; font-size: 19px; color: var(--ink-soft); }
.drop-cap > p:first-child::first-letter {
	font-family: var(--f-display);
	font-weight: 800;
	font-size: 4.6em;
	float: left;
	line-height: .82;
	padding: 5px 8px 0 0;
	color: var(--accent);
}

/* ---------- Headings inside article text ----------
 * H2–H4 у тексті статті НЕ стилізуємо: шрифт, розмір, відступи —
 * стандартні браузерні, успадковують шрифт і колір тексту. Тема
 * задає лише функціональне: відступ при переході за якорем зі
 * змісту й clear, щоб заголовок не «обтікав» float-картинку.
 * Візуально оформлені заголовки блоків теми — це div із класами
 * (.popular__heading, .side-box__title, .faq__label ...).
 */
:is(.article-body, .article-intro) :is(h2, h3, h4, h5, h6) {
	scroll-margin-top: 20px;
	clear: both;
	/*
	 * Завжди зліва, незалежно від контексту. text-align — властивість,
	 * що успадковується: якщо редактор обгорнув абзац/блок у Group з
	 * вирівнюванням "по ширині" (клас has-text-align-justify стоїть на
	 * ОБГОРТЦІ, не на самому h2), заголовок всередині успадковував би
	 * justify і без жодного власного класу — тому раніше точковий фікс
	 * по класу на самому h2 не спрацьовував. Тут — безумовний reset,
	 * незалежно від того, звідки прийшло успадкування.
	 */
	text-align: left !important;
}

/*
 * ---------- Зображення в тексті статті / сторінки ----------
 * Тема не мала CSS для класів, які WordPress ставить у розмітку
 * зображень (alignleft/alignright/aligncenter, wp-caption, figcaption, gallery),
 * тому вирівнювання «не працювало», а підпис із inline width:810px
 * розпирав колонку. Правила діють і на .article-intro (page.php).
 * Порядок важливий: ці правила стоять ПЕРЕД .yt-embed__facade img,
 * який має однакову специфічність і мусить лишатись останнім.
 */
:is(.article-body, .article-intro) img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 18px 0;
	border: 1px solid var(--rule-strong);
}
:is(.article-body, .article-intro) figure {
	margin: 26px 0;
	max-width: 100%;   /* перебиває inline width:810px у [caption] */
}
:is(.article-body, .article-intro) figure img { margin: 0 auto; }
:is(.article-body, .article-intro) figcaption,
:is(.article-body, .article-intro) .wp-caption-text {
	margin: 8px 0 0;
	font-family: var(--f-label);
	font-size: 13px;
	line-height: 1.45;
	font-style: italic;
	color: var(--ink-faint);
	text-align: center;
}

/* Вирівнювання (класи WordPress: класичний і блоковий редактор) */
:is(.article-body, .article-intro) .aligncenter,
:is(.article-body, .article-intro) .alignnone { float: none; }
:is(.article-body, .article-intro) .aligncenter { margin-left: auto; margin-right: auto; }
:is(.article-body, .article-intro) img.aligncenter { margin-top: 26px; margin-bottom: 26px; }
:is(.article-body, .article-intro) .alignleft {
	float: left;
	max-width: 50%;
	margin: 6px 26px 16px 0;
}
:is(.article-body, .article-intro) .alignright {
	float: right;
	max-width: 50%;
	margin: 6px 0 16px 26px;
}
:is(.article-body, .article-intro) .alignwide,
:is(.article-body, .article-intro) .alignfull { float: none; max-width: 100%; }

/* Галереї (html5-розмітка [gallery]: без цього CSS ядро нічого не стилізує) */
:is(.article-body, .article-intro) .gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 26px 0;
	clear: both;
}
:is(.article-body, .article-intro) .gallery-columns-1 { grid-template-columns: minmax(0, 1fr); }
:is(.article-body, .article-intro) .gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.article-body, .article-intro) .gallery-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(.article-body, .article-intro) .gallery-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
:is(.article-body, .article-intro) .gallery-item { margin: 0; }
:is(.article-body, .article-intro) .gallery-item img,
:is(.article-body, .article-intro) .wp-block-gallery img { width: 100%; margin: 0; }


/*
 * Safety-net: якщо в статтю вручну вставили сирий <iframe> (класичний
 * редактор, код з "Share -> Embed") і JS з якоїсь причини не встиг
 * підмінити його на фасад (повільний зв'язок, заблокований скрипт) —
 * вёрстка всеодно не ламається: aspect-ratio утримує пропорцію
 * незалежно від width/height-атрибутів самого тега.
 */
.article-body iframe,
.article-body embed,
.article-body object {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	margin: 24px 0;
}

/* Загальна адаптивна обгортка для не-YouTube embed'ів (Vimeo тощо). */
.embed-responsive {
	margin: 24px 0;
}
.embed-responsive iframe {
	margin: 0;
}

/* YouTube-фасад: превʼю-картинка замість live-плеєра до кліку. */
.yt-embed {
	position: relative;
	aspect-ratio: 16 / 9;
	width: 100%;
	margin: 24px 0;
	background: #000;
	overflow: hidden;
}
.yt-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	margin: 0;
}
.yt-embed__facade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	margin: 0;
	background: none;
	cursor: pointer;
	display: block;
}
.yt-embed__facade img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	margin: 0;
	display: block;
}
.yt-embed__play {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 68px; height: 48px;
	background: rgba(0, 0, 0, 0.75);
	border-radius: 14px;
	transition: background-color 0.15s ease;
}
.yt-embed__play::before {
	content: "";
	position: absolute;
	top: 50%; left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 19px;
	border-color: transparent transparent transparent #fff;
}
.yt-embed__facade:hover .yt-embed__play,
.yt-embed__facade:focus-visible .yt-embed__play {
	background: #ff0000;
}
.yt-embed__facade:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.article-body blockquote {
	margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent);
	font-style: italic; color: var(--ink-soft);
}

/* ---------- Table of contents (без нумерації; H3 вкладені в H2) ---------- */
.toc {
	clear: both;
	max-width: 720px; margin: 30px auto; padding: 22px 26px;
	border: 1px solid var(--rule-strong); background: var(--paper-deep);
}
.toc__label {
	font-family: var(--f-label); font-weight: 700; font-size: 12px;
	letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px;
}
.toc__list, .toc__sublist { list-style: none; margin: 0; padding: 0; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--accent); }

/* Рівень H2: жирний, з тонкою лінією між розділами */
.toc__item--h2 {
	padding: 9px 0;
	border-top: 1px solid var(--rule);
	font-family: var(--f-display); font-weight: 700; font-size: 16px; line-height: 1.35;
}
.toc__list > .toc__item--h2:first-child { padding-top: 0; border-top: none; }
.toc__list > .toc__item--h2:last-child { padding-bottom: 0; }

/* Рівень H3: менший, звичайної вагою, з відступом і вертикальною лінією-«гілкою» */
.toc__sublist {
	margin: 8px 0 0 3px; padding-left: 14px;
	border-left: 2px solid var(--rule);
}
.toc__item--h3 {
	padding: 3px 0;
	font-family: var(--f-body); font-weight: 400; font-size: 14.5px; line-height: 1.4;
}
.toc__item--h3 a { color: var(--ink-soft); }
.toc__item--h3 a:hover { color: var(--accent); }

/* ---------- Author box ---------- */
.author-box {
	max-width: 720px; margin: 40px auto 0;
	display: flex; gap: 16px; align-items: center;
	padding: 20px; border: 1px solid var(--rule); background: var(--paper-deep);
}
.author-box__avatar { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--rule-strong); }
.author-box__name { font-family: var(--f-display); font-weight: 700; font-size: 16px; margin: 0; }
.author-box__name a { color: var(--ink); }
.author-box__bio { font-size: 14px; color: var(--ink-soft); margin: 4px 0 0; }

/* ---------- Related posts ---------- */
.related { max-width: 720px; margin: 52px auto 0; }
.related__label {
	font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
	color: var(--accent); border-bottom: 3px double var(--rule-strong); padding-bottom: 10px; margin: 0 0 20px;
}
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px; }
.related__card { display: block; }
.related__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--rule-strong); filter: grayscale(.4) sepia(.1); transition: filter .3s ease; }
.related__card:hover .related__img { filter: none; }
.related__title { display: block; margin-top: 10px; font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 52px auto 0; }
.faq__label {
	font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
	color: var(--ink-faint); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__question {
	cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative;
	font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--ink);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after {
	content: '+'; position: absolute; right: 4px; top: 14px; font-family: var(--f-body); font-size: 22px; color: var(--accent);
}
.faq__item[open] .faq__question::after { content: '−'; }
.faq__answer { padding: 0 0 18px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.faq__answer p:last-child { margin-bottom: 0; }

/* ---------- Home: lead + popular ---------- */
.lead-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	grid-template-rows: auto auto;
	gap: 28px 40px;
	padding: 36px 0 44px;
	border-bottom: 3px double var(--rule-strong);
	position: relative; /* область для розтягнутого посилання заголовка */
}
.lead__eyebrow { font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.lead__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.06; margin: 0 0 14px; }
.lead__title a { color: var(--ink); }
/*
 * ОДНЕ посилання на запис. Раніше кожен матеріал мав 2–3 посилання
 * на той самий URL (картинка, заголовок, «Читати →»). Тепер посилання
 * лише на заголовку, а його ::after розтягується на всю картку, тож
 * клік по картинці й по картці працює без дубля в коді, зайвих
 * зупинок Tab і повторів для скрінрідерів.
 */
/* z-index:1 — вище картинки: її filter створює власний шар і інакше перекрив би посилання */
.lead__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lead__text { color: var(--ink-soft); font-size: 17px; }
/*
 * Головне фото — без кропу: висоту задає файл, а не комірка сітки.
 * .lead__media — сам grid-item (<a>); раніше grid-row стояв на <img>
 * всередині <a> і не працював. Колонку й рядки задаємо явно, щоб
 * auto-розміщення не поміняло місцями текст і фото.
 */
.lead__media { display: block; grid-column: 2; grid-row: 1 / 3; align-self: start; }
.lead__img { display: block; width: 100%; height: auto; filter: sepia(.15) contrast(1.03); border: 1px solid var(--rule-strong); }
/* Заглушки без картинки (span) — блоки з фоном, щоб сітка не «провалювалась» */
span.lead__img, span.pick-card__img, span.related__img { display: block; background: var(--paper-deep); }
span.lead__img { aspect-ratio: 16 / 9; }

.popular { grid-column: 1; border-top: 1px solid var(--rule); padding-top: 20px; position: relative; z-index: 2; /* над розтягнутим посиланням lead — його посилання клікабельні */ }
.popular__heading { font-family: var(--f-display); font-weight: 700; font-size: 18px; margin: 0 0 14px; }
.popular__item { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-top: 1px dotted var(--rule); }
.popular__item:first-of-type { border-top: none; }
.popular__num { font-family: var(--f-display); font-weight: 800; color: var(--accent); font-size: 15px; }
.popular__title a { color: var(--ink); font-size: 15px; }

.empty-note { padding: 60px 0; text-align: center; color: var(--ink-faint); font-style: italic; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 20px; }
.section-head__title { font-family: var(--f-display); font-weight: 700; font-size: 26px; margin: 0; }
.section-head a { font-family: var(--f-label); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px 34px; }
.pick-card__img { width: 100%; aspect-ratio: 5/2; object-fit: cover; border: 1px solid var(--rule-strong); filter: grayscale(.4) sepia(.1); }
.pick-card__cat { font-family: var(--f-label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 12px 0 4px; }
.pick-card__title { font-family: var(--f-display); font-weight: 700; font-size: 20px; margin: 0 0 8px; }
.pick-card__title a { color: var(--ink); }
.pick-grid > div, .card-grid > div { position: relative; }
.pick-card__title a::after { content: ""; position: absolute; inset: 0; }
.pick-grid > div:hover .pick-card__img, .card-grid > div:hover .pick-card__img { filter: none; }

/* ---------- Listing pages (archive/index/search/author) ---------- */
.content-columns { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; margin-top: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; }
.card-grid > div { border-top: 1px solid var(--rule); padding-top: 14px; }

.side-box { border: 1px solid var(--rule); padding: 20px; margin-bottom: 24px; }
.side-box__title { font-family: var(--f-display); font-weight: 700; font-size: 17px; margin: 0 0 14px; border-bottom: 3px double var(--rule-strong); padding-bottom: 8px; }
.side-box__list { list-style: none; margin: 0; padding: 0; }
.side-box__list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dotted var(--rule); font-size: 14px; }
.side-box__list li:first-child { border-top: none; }
.side-box__list span { font-family: var(--f-display); font-weight: 800; color: var(--accent); }
.side-box__list a { color: var(--ink); }

.pagination { margin-top: 30px; font-family: var(--f-label); font-size: 13px; }
.pagination .page-numbers { display: inline-block; padding: 6px 11px; border: 1px solid var(--rule); margin-right: 4px; color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 70px 0; }
.error-code { font-family: var(--f-display); font-weight: 900; font-size: 120px; color: var(--rule); margin: 0; line-height: 1; }
.error-search { justify-content: center; margin: 26px auto 0; max-width: 280px; }

/* ---------- Comments ---------- */
.comments-area { max-width: 720px; margin: 52px auto 0; }
.comments-title { font-family: var(--f-display); font-weight: 700; font-size: 22px; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 3px double var(--rule-strong); }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding: 0 0 0 34px; }
.comment-list > li + li,
.comment-list .children > li { border-top: 1px dotted var(--rule); }
.comment-body { padding: 18px 0; }
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author .avatar { border-radius: 50%; display: block; }
.comment-author .fn { font-family: var(--f-label); font-weight: 700; font-style: normal; font-size: 14px; color: var(--ink); }
.comment-metadata { font-family: var(--f-label); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 8px; }
.comment-metadata a { color: inherit; }
.comment-content p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.comment-content p:last-child { margin-bottom: 0; }
.comment-reply-link { font-family: var(--f-label); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.comment-reply-link:hover { color: var(--accent-deep); }
.comments-closed { color: var(--ink-faint); font-style: italic; }

.comment-respond { border-top: 3px double var(--rule-strong); padding-top: 24px; }
.comment-reply-title { font-family: var(--f-display); font-weight: 700; font-size: 20px; margin: 0 0 16px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-family: var(--f-label); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%; border: 1px solid var(--rule); background: var(--paper); outline: none;
	font-family: var(--f-body); font-size: 15px; color: var(--ink); padding: 10px 14px;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); }
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form .comment-form-cookies-consent label { margin: 0; text-transform: none; letter-spacing: 0; }
.comment-form .button,
.comment-form input#submit {
	border: none; background: var(--ink); color: var(--paper); cursor: pointer;
	font-family: var(--f-label); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
	padding: 12px 22px;
}
.comment-form .button:hover, .comment-form input#submit:hover { background: var(--accent); }

/* Пагінація багатосторінкових записів (<!--nextpage-->) */
.page-links { margin: 30px 0; font-family: var(--f-label); font-size: 13px; }
.page-links__label { margin-right: 8px; color: var(--ink-faint); }
.page-links a, .page-links > span:not(.page-links__label) { display: inline-block; padding: 5px 10px; border: 1px solid var(--rule); margin-right: 4px; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
	margin-top: 60px; padding-top: 24px;
	border-top: 3px double var(--rule-strong);
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
	font-family: var(--f-label); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
}
.site-footer__links { display: flex; gap: 18px; }
.site-footer__links a { color: var(--ink-soft); }
.site-footer__links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.content-columns { grid-template-columns: minmax(0, 1fr); }
	.lead-grid { grid-template-columns: minmax(0, 1fr); }
	.lead__media { grid-column: 1; grid-row: auto; }
}

/* Вузькі екрани: обтікання не має сенсу — картинки стають окремими блоками по центру */
@media (max-width: 600px) {
	:is(.article-body, .article-intro) .alignleft,
	:is(.article-body, .article-intro) .alignright {
		float: none;
		max-width: 100%;
		margin: 22px auto;
	}
	:is(.article-body, .article-intro) .gallery[class*="gallery-columns-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
	.page__inner { padding: 0 18px 44px; }
}
