/*
Theme Name: Eshpalta
Theme URI: https://eshpalta.com
Author: Eshpalta
Author URI: https://eshpalta.com
Description: Редакційна тема у стилі старої газети — топ-листи фільмів, книг і блогерів. Семантична розмітка, автозміст, FAQ-блок (Yoast-сумісний), вбудована schema.org-розмітка для Google (вимикається при SEO-плагіні), легкі відео-ембеди, self-hosted шрифти.
Version: 4.8.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
*/

/*
 * Self-hosted шрифти (Fraunces, Source Serif 4, Archivo Narrow), SIL OFL 1.1.
 * Файли лежать у /assets/fonts і віддаються з домену сайту — жодних
 * запитів до fonts.googleapis.com. @font-face живе тут, у style.css:
 * один блокуючий CSS-файл замість двох.
 * Кирилиця є лише в Source Serif 4 (основний текст); Fraunces та
 * Archivo Narrow — латинські, кирилиця в заголовках іде на Georgia/Arial.
 */
/* ---------- Fraunces (display) ---------- */
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-400-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-ext-400-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Fraunces';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-500-italic.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Fraunces';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-ext-500-italic.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-600-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-ext-600-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-700-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-ext-700-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-900-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('assets/fonts/fraunces-latin-ext-900-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Source Serif 4 (body) — latin + cyrillic (укр. текст) ---------- */
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-latin-ext-400-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-cyrillic-400-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-cyrillic-ext-400-normal.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-latin-ext-400-italic.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-cyrillic-400-italic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-cyrillic-ext-400-italic.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-latin-ext-600-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-cyrillic-600-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/source-serif-4-cyrillic-ext-600-normal.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---------- Archivo Narrow (label/UI) ---------- */
@font-face {
	font-family: 'Archivo Narrow';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-500-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-ext-500-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-500-italic.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-ext-500-italic.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-600-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-ext-600-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-700-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Archivo Narrow';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/archivo-narrow-latin-ext-700-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
	--paper: #f2ead9;
	--paper-deep: #e9dfc8;
	--ink: #1c1712;
	--ink-soft: #4a4038;
	--ink-faint: #665b4c;  /* ≥ 5:1 на --paper (WCAG AA); було #8a7d6c = 3.3:1 */
	--rule: #cabb9c;
	--rule-strong: #1c1712;
	--accent: #7c2a1c;
	--accent-deep: #571a10;
	--gold: #7a5c17;       /* ≥ 4.7:1 на --paper-deep; було #9c7a2e = 3.0:1 */

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

	--wrap: 1180px;
}

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

html { background: var(--paper-deep); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

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); }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }

.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 {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 32px 64px;
	border-left: 1px solid var(--rule);
	border-right: 1px solid var(--rule);
}
main#main { display: block; }

/* ---------- Header: topbar, masthead, menu ---------- */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	padding: 4px 0;
}
.gnews-btn {
	display: inline-flex; align-items: center; gap: 7px;
	min-height: 40px;
	border: 1px solid var(--ink); padding: 0 12px;
	color: var(--ink); font-family: var(--f-label); font-weight: 600;
	font-size: 13px; letter-spacing: .04em;
}
.gnews-btn svg { width: 15px; height: 15px; flex: none; }
.gnews-btn:hover { background: var(--ink); color: var(--paper); }

/* Бургер — один елемент: три лінії малюються градієнтами */
.nav-toggle {
	width: 44px; height: 44px;
	margin: 0 -9px 0 auto;
	padding: 0; border: 0; cursor: pointer; flex: none;
	background:
		linear-gradient(var(--ink), var(--ink)) center 14px / 26px 2px no-repeat,
		linear-gradient(var(--ink), var(--ink)) center 21px / 26px 2px no-repeat,
		linear-gradient(var(--ink), var(--ink)) center 28px / 26px 2px no-repeat;
}

.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: 14px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.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: 13px 2px;
	font-family: var(--f-label);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink);
}
.site-nav a:hover,
.site-nav .current-menu-item > a { color: var(--accent); }

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

/* ---------- Breadcrumbs / page header ---------- */
.breadcrumbs {
	margin: 18px 0 0;
	font-family: var(--f-label);
	font-size: 13px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; }
.breadcrumbs a { display: inline-block; padding: 6px 0; color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { padding: 6px 0; }

.page-header {
	margin: 10px 0 26px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--rule);
}
.page-title {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.12;
	margin: 0;
	overflow-wrap: break-word;
}
.page-header .article-intro { margin: 16px 0 0; max-width: none; font-size: 18px; }
.page-header .article-intro > :last-child { margin-bottom: 0; }

/* ---------- Article header ---------- */
.article-header { margin: 8px 0 30px; text-align: center; }
.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 16px;
	overflow-wrap: break-word;
}
.article-meta {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px;
	margin: 0 0 22px;
	font-family: var(--f-label); font-size: 13px; letter-spacing: .05em;
	text-transform: uppercase; color: var(--ink-faint);
}
.article-meta a { color: var(--ink); font-weight: 600; }
.article-meta a:hover { color: var(--accent); }
.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>.
 * 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: 14px;
	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);
	overflow-wrap: break-word;
}
.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);
}

/* ---------- Текст статті ----------
 * H2–H4 у тексті НЕ стилізуємо (браузерні розміри, шрифт і колір тексту):
 * тема лише підлаштовує відступ під якір зі змісту й не дає заголовку
 * «обтікати» float-картинку. Відступи списків і посилання — нижче.
 */
:is(.article-body, .article-intro) :is(h2, h3, h4, h5, h6) {
	scroll-margin-top: 20px;
	clear: both;
	text-align: left !important; /* заголовок не успадковує justify від обгортки */
}
:is(.article-body, .article-intro) a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}
:is(.article-body, .article-intro) :is(ul, ol) { padding-left: 1.4em; }
:is(.article-body, .article-intro) hr { border: 0; border-top: 1px solid var(--rule); margin: 30px 0; }
:is(.article-body, .article-intro) :is(pre, code) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:is(.article-body, .article-intro) pre {
	max-width: 100%; overflow: auto;
	margin: 24px 0; padding: 14px 16px;
	background: var(--paper-deep); border: 1px solid var(--rule);
	font-size: 14px; line-height: 1.5;
}
:is(.article-body, .article-intro) :not(pre) > code { font-size: .88em; padding: 1px 5px; background: var(--paper-deep); }
:is(.article-body, .article-intro) blockquote {
	margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent);
	font-style: italic; color: var(--ink-soft);
}

/* ---------- Таблиці ----------
 * Контейнер: .table-wrap (PHP-обгортка для голих <table>) або figure
 * .wp-block-table (блок Gutenberg). Широка таблиця скролиться
 * всередині контейнера, а не розпирає сторінку.
 */
.table-wrap, .wp-block-table {
	max-width: 100%;
	margin: 26px 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
:is(.article-body, .article-intro) table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
	line-height: 1.45;
	color: var(--ink);
}
:is(.article-body, .article-intro) :is(th, td) {
	padding: 10px 14px;
	border: 1px solid var(--rule);
	text-align: left;
	vertical-align: top;
}
:is(.article-body, .article-intro) th {
	background: var(--paper-deep);
	border-color: var(--ink-faint);
	font-family: var(--f-label);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
}
:is(.article-body, .article-intro) tbody tr:nth-child(even) { background: rgba(28, 23, 18, .035); }
:is(.article-body, .article-intro) caption {
	caption-side: bottom;
	padding: 8px 0 0;
	font-family: var(--f-label);
	font-size: 14px;
	font-style: italic;
	text-align: left;
	color: var(--ink-faint);
}
.table-wrap:focus-visible { outline: 2px solid var(--accent); }

/* ---------- Зображення в тексті ----------
 * CSS для класів, які ставить WordPress (alignleft/right/center, wp-caption,
 * figcaption, gallery). Діє і на .article-intro (page.php).
 */
: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%; }
: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: 14px;
	line-height: 1.45;
	font-style: italic;
	color: var(--ink-faint);
	text-align: center;
}

: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%; }

: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>: 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;
}
.embed-responsive { margin: 24px 0; }
.embed-responsive iframe { margin: 0; }

/* YouTube-фасад: <a class="yt-embed"> (працює і без JS); по кліку site.js
   замінює його на <div class="yt-embed"> з iframe. Лишається ПІСЛЯ
   правил для img/iframe — однакова специфічність, виграє порядок. */
.yt-embed {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	width: 100%;
	margin: 24px 0;
	background: #000;
	overflow: hidden;
}
.yt-embed img {
	width: 100%; height: 100%;
	object-fit: cover;
	border: 0; margin: 0;
}
.yt-embed iframe {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	border: 0; margin: 0;
}
a.yt-embed::before {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 68px; height: 48px;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, .75);
	border-radius: 14px;
	transition: background-color .15s ease;
}
a.yt-embed::after {
	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;
}
a.yt-embed:hover::before,
a.yt-embed:focus-visible::before { background: #f00; }

/* ---------- Зміст статті (без нумерації; 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: 13px;
	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, .article-body .toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.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; }
.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: 15px; line-height: 1.4; }
.toc__item--h3 a { color: var(--ink-soft); }
.toc__item--h3 a:hover { color: var(--accent); }

/* ---------- Блок автора ---------- */
.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; flex: none; border-radius: 50%; border: 1px solid var(--rule-strong); }
.author-box__name { font-family: var(--f-display); font-weight: 700; font-size: 17px; margin: 0; }
.author-box__name a { color: var(--ink); }
.author-box__bio { font-size: 15px; color: var(--ink-soft); margin: 4px 0 0; }

/* ---------- Схожі записи ---------- */
.related { max-width: 720px; margin: 52px auto 0; }
.related__label {
	font-family: var(--f-label); font-weight: 700; font-size: 14px; 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: 17px; color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 52px auto 0; }
.faq__label {
	font-family: var(--f-label); font-weight: 700; font-size: 14px; 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 32px 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: 13px; 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; }

/* ---------- Головна: лід + свіжі матеріали ---------- */
.lead-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	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: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; }
.lead__eyebrow a { position: relative; z-index: 2; display: inline-block; padding: 4px 0; }
.lead__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.06; margin: 0 0 14px; overflow-wrap: break-word; }
.lead__title a { color: var(--ink); }
/* Одне посилання на запис: ::after розтягується на всю область, тож клік по картинці теж працює */
.lead__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lead__text { color: var(--ink-soft); font-size: 17px; margin: 0; }

/* Фото ліда — прямий елемент сітки, без кропу: висоту задає файл */
.lead__img { display: block; grid-column: 2; grid-row: 1 / 3; align-self: start; width: 100%; height: auto; filter: sepia(.15) contrast(1.03); border: 1px solid var(--rule-strong); }

.fresh { grid-column: 1; border-top: 1px solid var(--rule); padding-top: 20px; position: relative; z-index: 2; }
.fresh__heading { font-family: var(--f-display); font-weight: 700; font-size: 18px; margin: 0 0 8px; }
.fresh__list { list-style: none; margin: 0; padding: 0; }
.fresh__list li { border-top: 1px dotted var(--rule); }
.fresh__list li:first-child { border-top: 0; }
.fresh__list a { display: block; padding: 11px 0; color: var(--ink); font-size: 16px; line-height: 1.35; }
.fresh__list a:hover { color: var(--accent); }

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

.section-head { font-family: var(--f-display); font-weight: 700; font-size: 26px; margin: 44px 0 20px; }

/* ---------- Сітка карток (головна, архіви, пошук, автор) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px 34px; }
.card { position: relative; border-top: 1px solid var(--rule); padding-top: 14px; }
.card__img { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border: 1px solid var(--rule-strong); filter: grayscale(.4) sepia(.1); }
.card__cat { font-family: var(--f-label); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 4px; }
.card__cat a { position: relative; z-index: 1; display: inline-block; padding: 4px 0; color: var(--gold); }
.card__cat a:hover { color: var(--accent); }
.card__title { font-family: var(--f-display); font-weight: 700; font-size: 20px; line-height: 1.25; margin: 8px 0 0; overflow-wrap: break-word; }
.card__img + .card__title { margin-top: 12px; }
.card__title a { color: var(--ink); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__img { filter: none; }

/* ---------- Колонки: контент + сайдбар ---------- */
.content-columns { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; margin-top: 12px; }

.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: 18px; margin: 0 0 8px; border-bottom: 3px double var(--rule-strong); padding-bottom: 8px; }
.side-box__list { list-style: none; margin: 0; padding: 0; }
.side-box__list li { border-top: 1px dotted var(--rule); }
.side-box__list li:first-child { border-top: 0; }
.side-box__list a { display: block; padding: 10px 0; color: var(--ink); font-size: 15px; line-height: 1.35; }
.side-box__list a:hover { color: var(--accent); }

/* ---------- Пагінація (ядро: nav.navigation.pagination; головна: nav.pagination) ---------- */
.pagination { margin-top: 30px; font-family: var(--f-label); font-size: 14px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; min-height: 40px; padding: 0 12px;
	border: 1px solid var(--rule); color: var(--ink);
}
.pagination > .page-numbers { margin: 0 6px 6px 0; }
.pagination a.page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .page-numbers.dots { border-color: transparent; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 60px 0; }
.error-page .page-title { border: 0; margin: 0 0 14px; }
.error-search { margin: 26px auto 0; max-width: 360px; }

/* ---------- Коментарі ---------- */
.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-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.comment-meta .avatar { flex: none; border-radius: 50%; }
.comment-meta .fn { font-family: var(--f-label); font-weight: 700; font-style: normal; font-size: 15px; color: var(--ink); }
.comment-meta .fn a { color: var(--ink); }
.comment-date { font-family: var(--f-label); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.comment-date:hover { color: var(--accent); }
.comment-awaiting-moderation { font-style: italic; color: var(--ink-faint); font-size: 14px; }
.comment-content { overflow-wrap: break-word; }
.comment-content p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.comment-content > :last-child { margin-bottom: 0; }
.comment-reply { margin-top: 6px; }
.comment-reply-link { display: inline-block; padding: 8px 0; font-family: var(--f-label); font-size: 12px; 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-reply-title small { font-family: var(--f-label); font-size: 13px; font-weight: 400; margin-left: 10px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-family: var(--f-label); font-size: 13px; 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 textarea {
	width: 100%; border: 1px solid var(--rule); border-radius: 0; background: var(--paper);
	font-family: var(--f-body); font-size: 16px; color: var(--ink); padding: 10px 14px;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); outline: 2px solid var(--accent); outline-offset: 0; }
.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 {
	min-height: 44px;
	border: 0; border-radius: 0; background: var(--ink); color: var(--paper); cursor: pointer;
	font-family: var(--f-label); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
	padding: 0 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: 14px; }
.page-links__label { margin-right: 8px; color: var(--ink-faint); }
.page-links a, .page-links > span:not(.page-links__label) { display: inline-block; min-width: 40px; padding: 8px 12px; border: 1px solid var(--rule); margin-right: 4px; color: var(--ink); text-align: center; }

/* ---------- Футер ---------- */
.site-footer {
	margin-top: 60px; padding-top: 18px;
	border-top: 3px double var(--rule-strong);
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px;
	font-family: var(--f-label); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
}
.site-footer__copy { margin: 0; }
.site-footer__links ul { display: flex; flex-wrap: wrap; gap: 0 18px; list-style: none; margin: 0; padding: 0; }
.site-footer__links a { display: inline-block; padding: 10px 0; color: var(--ink-soft); }
.site-footer__links a:hover { color: var(--accent); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
	.content-columns { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.lead-grid { grid-template-columns: minmax(0, 1fr); }
	.lead__img { grid-column: 1; grid-row: auto; }
	.fresh { grid-column: 1; }
}

/* Вузькі екрани: обтікання не має сенсу — картинки окремими блоками */
@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)); }
	.article-intro, .article-body { font-size: 18px; }
	.toc { padding: 18px 18px; }
	.comment-list .children { padding-left: 16px; }
	.card-grid { grid-template-columns: minmax(0, 1fr); }
}

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

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Списки ядровых виджетів (Recent Posts, Archives, Categories…): зручна тап-зона */
.side-box :is(ul, ol) { list-style: none; margin: 0; padding: 0; }
.side-box li a { display: inline-block; padding: 7px 0; }
.side-box .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.side-box input[type="search"] { min-width: 0; min-height: 40px; border: 1px solid var(--rule); border-radius: 0; background: var(--paper); font: inherit; padding: 0 10px; }
.side-box button, .side-box .wp-element-button { min-height: 40px; border: 0; border-radius: 0; background: var(--ink); color: var(--paper); font-family: var(--f-label); font-weight: 700; padding: 0 14px; cursor: pointer; }
