/*
Theme Name: Industrial News
Theme URI: https://industrial-news.ru/
Description: Новостная тема для industrial-news.ru: тёмная «стальная» шапка, сигнальный жёлтый акцент, лента с главной новостью, страница новости с колонкой последних материалов, рубрики с группировкой по дням. Работает в паре с плагином Industrial News Kit. Шрифт Geologica (OFL) подключён локально.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Author: Igor
License: GPL-2.0-or-later
Text Domain: industrial-news
*/

/* ==========================================================================
   Токены
   ========================================================================== */

:root {
	--bg:        oklch(0.985 0.003 250);
	--surface:   oklch(0.955 0.006 250);
	--ink:       oklch(0.21 0.02 258);
	--ink-2:     oklch(0.38 0.02 258);
	--ink-3:     oklch(0.48 0.016 258);
	--line:      oklch(0.885 0.008 250);
	--line-2:    oklch(0.80 0.01 250);

	--steel:     oklch(0.235 0.022 258);
	--steel-2:   oklch(0.29 0.024 258);
	--on-steel:  oklch(0.97 0.004 250);
	--on-steel-2: oklch(0.80 0.012 250);
	--on-steel-3: oklch(0.70 0.014 250);
	--steel-line: oklch(1 0 0 / 0.1);

	--signal:    oklch(0.87 0.165 94);   /* сигнальный жёлтый: разметка цеха, погрузчик */
	--signal-ink: oklch(0.21 0.02 258);

	--max: 1280px;
	--gutter: clamp(16px, 4vw, 40px);
	--pad-x: max(var(--gutter), calc((100% - var(--max)) / 2));

	--font: "Geologica", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

	--z-sticky: 10;
	--z-nav: 20;
	--z-skip: 30;

	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg:       oklch(0.17 0.014 258);
		--surface:  oklch(0.21 0.016 258);
		--ink:      oklch(0.95 0.004 250);
		--ink-2:    oklch(0.81 0.01 250);
		--ink-3:    oklch(0.69 0.012 250);
		--line:     oklch(0.29 0.016 258);
		--line-2:   oklch(0.38 0.016 258);
		--steel:    oklch(0.13 0.014 258);
		--steel-2:  oklch(0.18 0.016 258);
	}
}

/* ==========================================================================
   База
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html body {
	margin: 0;
	padding: 0; /* WordPress добавляет отступ через глобальные стили — убираем */
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
	margin: 0;
	overflow-wrap: break-word;
	font-weight: 750;
	line-height: 1.15;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

img { max-width: 100%; height: auto; }

time { font-variant-numeric: tabular-nums; }

:focus-visible {
	outline: 3px solid var(--signal);
	outline-offset: 2px;
	border-radius: 2px;
}

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

.wrap {
	width: 100%;
	max-width: calc(var(--max) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: var(--z-skip);
	padding: 10px 16px;
	background: var(--signal);
	color: var(--signal-ink);
	font-weight: 650;
	text-decoration: none;
}
.skip:focus { top: 8px; }

/* Подчёркивание заголовков-ссылок: растёт слева направо */
.ink-title a,
.row__title a,
.mini__title a,
.lead-story__title a,
.rail__link {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0% 1.5px;
	transition: background-size 220ms var(--ease-out);
	padding-bottom: 1px;
}

@media (hover: hover) and (pointer: fine) {
	.ink-title a:hover,
	.row__title a:hover,
	.mini__title a:hover,
	.lead-story__title a:hover,
	.rail__link:hover {
		background-size: 100% 1.5px;
	}
}

/* Метка рубрики: текст с толстым сигнальным подчёркиванием */
.cat-label,
.ink-cat {
	display: inline-block;
	color: var(--ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--signal);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
	transition: text-decoration-thickness 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
	.cat-label:hover,
	.ink-cat:hover { text-decoration-thickness: 6px; }
}

/* ==========================================================================
   Шапка
   ========================================================================== */

.masthead {
	position: relative;
	z-index: var(--z-nav);
	background: var(--steel);
	color: var(--on-steel);
}

.masthead__strip {
	border-bottom: 1px solid var(--steel-line);
	font-size: 0.8125rem;
	color: var(--on-steel-3);
}

.masthead__strip-in {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	min-height: 36px;
	align-items: center;
}

.masthead__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 76px;
}

.logo {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3em;
	color: var(--on-steel);
	text-decoration: none;
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	line-height: 1;
	font-variation-settings: "SHRP" 60;
}

.logo__b {
	background: var(--signal);
	color: var(--signal-ink);
	padding: 0.2em 0.32em 0.16em;
}

.nav .menu {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav a {
	display: block;
	padding: 10px 14px;
	color: var(--on-steel-2);
	font-weight: 550;
	font-size: 0.975rem;
	text-decoration: none;
	transition: color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.nav a:hover { color: var(--on-steel); }
}

.nav .current-menu-item > a,
.nav a[aria-current="page"] {
	color: var(--on-steel);
	text-decoration: underline;
	text-decoration-color: var(--signal);
	text-decoration-thickness: 3px;
	text-underline-offset: 10px;
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--steel-line);
	border-radius: 4px;
	background: transparent;
	color: var(--on-steel);
	font: inherit;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.menu-toggle:active { transform: scale(0.97); }

.menu-toggle__icon {
	position: relative;
	width: 18px;
	height: 12px;
}
.menu-toggle__icon span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
	transition: transform 200ms var(--ease-out), top 200ms var(--ease-out);
}
.menu-toggle__icon span:first-child { top: 1px; }
.menu-toggle__icon span:last-child  { top: 9px; }

.nav-open .menu-toggle__icon span:first-child { top: 5px; transform: rotate(45deg); }
.nav-open .menu-toggle__icon span:last-child  { top: 5px; transform: rotate(-45deg); }

@media (max-width: 859px) {
	.masthead__tagline { display: none; }
	.masthead__bar { min-height: 64px; }
	.menu-toggle { display: inline-flex; }

	.nav {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		padding: 8px var(--gutter) 20px;
		background: var(--steel);
		border-top: 1px solid var(--steel-line);
		box-shadow: 0 24px 48px -24px oklch(0.1 0.02 258 / 0.6);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
	}
	.nav-open .nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s;
	}
	.nav .menu { flex-direction: column; gap: 0; }
	.nav a {
		padding: 14px 0;
		font-size: 1.2rem;
		border-bottom: 1px solid var(--steel-line);
	}
	.nav .current-menu-item > a,
	.nav a[aria-current="page"] { text-underline-offset: 6px; }
}

/* ==========================================================================
   Главная: шапка с H1
   ========================================================================== */

.home__content > .ink-hero,
.home__content > .ink-latest,
.home__content > .ink-seo {
	padding-inline: var(--pad-x);
}

.ink-hero {
	background:
		radial-gradient(120% 140% at 100% 0%, var(--steel-2) 0%, transparent 60%),
		var(--steel);
	color: var(--on-steel);
	padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px);
	border-top: 1px solid var(--steel-line);
}

.ink-h1 {
	max-width: 19ch;
	font-size: clamp(2.1rem, 1.1rem + 3.6vw, 4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	font-variation-settings: "SHRP" 40;
}

.ink-lead {
	max-width: 60ch;
	margin-top: clamp(20px, 2.5vw, 32px);
	color: var(--on-steel-2);
	font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
	line-height: 1.6;
}

/* ==========================================================================
   Главная: лента
   ========================================================================== */

.ink-latest {
	padding-block: clamp(40px, 5vw, 64px) clamp(48px, 6vw, 80px);
}

.ink-news-heading {
	padding-top: 14px;
	border-top: 3px solid var(--ink);
	margin-bottom: clamp(20px, 3vw, 32px);
	font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.65rem);
}

.ink-feed {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

.ink-card {
	padding-block: 18px 20px;
	border-bottom: 1px solid var(--line);
}

.ink-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	margin-bottom: 8px;
	font-size: 0.85rem;
	color: var(--ink-3);
}

.ink-meta .ink-cat { font-size: 0.85rem; }

.ink-title {
	font-size: 1.2rem;
	font-weight: 650;
	line-height: 1.28;
	letter-spacing: -0.01em;
}

.ink-excerpt {
	margin-top: 8px;
	color: var(--ink-2);
	font-size: 0.98rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Главная новость */
.ink-card--lead {
	padding: clamp(22px, 3vw, 36px);
	background: var(--surface);
	border-bottom: 0;
	border-top: 6px solid var(--signal);
	margin-bottom: 8px;
}
.ink-card--lead .ink-title {
	font-size: clamp(1.4rem, 1rem + 2vw, 2.45rem);
	font-weight: 750;
	line-height: 1.1;
	letter-spacing: -0.022em;
	font-variation-settings: "SHRP" 30;
}
.ink-card--lead .ink-excerpt {
	margin-top: 16px;
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
	-webkit-line-clamp: 5;
	max-width: 58ch;
}

.ink-more { margin-top: clamp(24px, 3vw, 36px); }

.ink-more a,
.section-head__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	background: var(--ink);
	color: var(--bg);
	font-weight: 650;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: 4px;
	transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.ink-more a:active,
.section-head__link:active { transform: scale(0.97); }

@media (min-width: 680px) and (max-width: 1023px) {
	.ink-feed {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 32px;
	}
	.ink-card--lead { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
	.ink-feed {
		grid-template-columns: repeat(12, 1fr);
		column-gap: 40px;
	}
	.ink-card--lead {
		grid-column: 1 / span 7;
		grid-row: 1 / span 4;
		align-self: stretch;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		margin-bottom: 0;
		min-height: 100%;
	}
	.ink-card--lead .ink-meta { margin-bottom: auto; padding-bottom: 32px; }
	/* Справа от главной — 4 заголовка без анонса */
	.ink-card:nth-child(n + 2):nth-child(-n + 5) {
		grid-column: 8 / span 5;
		padding-block: 16px;
	}
	.ink-card:nth-child(2) { padding-top: 0; }
	.ink-card:nth-child(n + 2):nth-child(-n + 5) .ink-excerpt { display: none; }
	.ink-card:nth-child(n + 2):nth-child(-n + 5) .ink-title { font-size: 1.12rem; }

	/* Нижний ряд — по 4 */
	.ink-card:nth-child(n + 6) {
		grid-column: span 3;
		margin-top: 40px;
		padding-top: 14px;
		border-top: 2px solid var(--ink);
		border-bottom: 0;
	}
	.ink-card:nth-child(n + 6) .ink-title { font-size: 1.08rem; }
}

/* ==========================================================================
   Главная: SEO-текст
   ========================================================================== */

.ink-seo {
	background: var(--surface);
	padding-block: clamp(48px, 7vw, 96px);
	color: var(--ink-2);
	line-height: 1.72;
}

.ink-seo > * {
	max-width: 68ch;
}

@media (min-width: 1024px) {
	.ink-seo > * {
		margin-left: 25%;
	}
}

.ink-seo h2 {
	margin-top: 2.2em;
	margin-bottom: 0.6em;
	color: var(--ink);
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem);
	letter-spacing: -0.02em;
}
.ink-seo h2:first-child { margin-top: 0; }

.ink-seo h3 {
	margin-top: 1.8em;
	margin-bottom: 0.4em;
	color: var(--ink);
	font-size: 1.2rem;
	font-weight: 700;
}

.ink-seo p + p { margin-top: 1em; }

.ink-seo a {
	color: var(--ink);
	font-weight: 600;
	text-decoration-color: var(--signal);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

/* ==========================================================================
   Страница новости
   ========================================================================== */

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin-bottom: clamp(16px, 2vw, 24px);
	font-size: 0.875rem;
	color: var(--ink-3);
}
.crumbs a {
	color: inherit;
	text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
	.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}
.crumbs__sep { color: var(--line-2); }

.story-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 56px;
	padding-block: clamp(28px, 4vw, 56px) clamp(48px, 6vw, 80px);
}

@media (min-width: 1024px) {
	.story-layout {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 72px;
	}
}

.story__title {
	max-width: 24ch;
	font-size: clamp(1.7rem, 1.05rem + 2.7vw, 3rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.028em;
	font-variation-settings: "SHRP" 40;
}

.story__standfirst {
	max-width: 52ch;
	margin-top: clamp(16px, 2vw, 24px);
	color: var(--ink-2);
	font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
	line-height: 1.5;
	font-weight: 420;
}

.story__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 20px;
	margin-top: clamp(20px, 2.5vw, 28px);
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
	color: var(--ink-3);
	font-size: 0.9rem;
}

.story__body { margin-top: clamp(24px, 3vw, 36px); }

.prose {
	max-width: 68ch;
	font-size: 1.125rem;
	line-height: 1.75;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose strong, .prose b { font-weight: 650; }
.prose a {
	text-decoration-color: var(--signal);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose ul li::marker { color: var(--ink-3); }

@media (max-width: 679px) {
	.prose p,
	.ink-card--lead .ink-title,
	.story__title,
	.ink-h1,
	.section-hero__title,
	.lead-story__title { hyphens: auto; }
}

/* Блок «Источник» из плагина */
.prose .ink-source,
.ink-source {
	margin-top: 2.2em;
	padding: 16px 20px;
	background: var(--surface);
	border-radius: 4px;
	color: var(--ink-2);
	font-size: 0.95rem;
	line-height: 1.5;
}
.ink-source a {
	color: var(--ink);
	font-weight: 600;
}

/* Колонка «Последние новости» */
.rail__in {
	position: sticky;
	top: 24px;
}

.rail__title {
	padding-top: 12px;
	border-top: 3px solid var(--ink);
	font-size: 1.1rem;
	font-weight: 750;
}

.rail__list {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.rail__item {
	display: grid;
	grid-template-columns: 52px 1fr;
	gap: 12px;
	padding-block: 14px;
	border-bottom: 1px solid var(--line);
}

.rail__time {
	color: var(--ink-3);
	font-size: 0.875rem;
	line-height: 1.5;
}

.rail__link {
	color: var(--ink);
	font-weight: 550;
	font-size: 0.98rem;
	line-height: 1.4;
}

@media (max-width: 1023px) {
	.rail__in { position: static; }
}

/* «Ещё в разделе» */
.related {
	padding-bottom: clamp(56px, 7vw, 96px);
}

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 14px;
	border-top: 3px solid var(--ink);
	margin-bottom: 24px;
}

.section-head__title { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.55rem); }

.related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 8px 40px;
}

.mini {
	padding-block: 16px;
	border-bottom: 1px solid var(--line);
}

.mini__time {
	display: block;
	margin-bottom: 6px;
	color: var(--ink-3);
	font-size: 0.85rem;
}

.mini__title {
	font-size: 1.08rem;
	font-weight: 650;
	line-height: 1.3;
}

/* ==========================================================================
   Рубрика
   ========================================================================== */

.section-hero {
	background:
		radial-gradient(120% 140% at 100% 0%, var(--steel-2) 0%, transparent 60%),
		var(--steel);
	color: var(--on-steel);
	padding-block: clamp(28px, 4vw, 48px) clamp(40px, 5vw, 64px);
	border-top: 1px solid var(--steel-line);
}

.section-hero .crumbs { color: var(--on-steel-3); }
.section-hero .crumbs__sep { color: var(--steel-line); }
@media (hover: hover) and (pointer: fine) {
	.section-hero .crumbs a:hover { color: var(--on-steel); }
}

.section-hero__title {
	font-size: clamp(2rem, 1.1rem + 3.4vw, 3.75rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	font-variation-settings: "SHRP" 40;
}

.section-hero__text {
	max-width: 62ch;
	margin-top: 18px;
	color: var(--on-steel-2);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
}
.section-hero__text p + p { margin-top: 0.8em; }

.timeline {
	padding-block: clamp(32px, 4vw, 56px) clamp(56px, 7vw, 96px);
}

.lead-story {
	padding: clamp(22px, 3vw, 40px);
	background: var(--surface);
	border-top: 6px solid var(--signal);
	margin-bottom: clamp(32px, 4vw, 56px);
}

.lead-story__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	color: var(--ink-3);
	font-size: 0.9rem;
	margin-bottom: 12px;
}

.lead-story__title {
	max-width: 26ch;
	font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
	font-weight: 750;
	line-height: 1.1;
	letter-spacing: -0.024em;
	font-variation-settings: "SHRP" 30;
}

.lead-story__text {
	max-width: 62ch;
	margin-top: 16px;
	color: var(--ink-2);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
}

.day {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}
.day + .day { margin-top: clamp(32px, 4vw, 48px); }

.day__label {
	padding-top: 12px;
	border-top: 3px solid var(--ink);
	font-size: 1.3rem;
	font-weight: 750;
}

.day__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.row {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 16px;
	padding-block: 18px;
	border-bottom: 1px solid var(--line);
}

.row__time {
	padding-top: 3px;
	color: var(--ink-3);
	font-size: 0.9rem;
}

.row__title {
	font-size: 1.2rem;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.row__text {
	max-width: 70ch;
	margin-top: 6px;
	color: var(--ink-2);
	font-size: 0.98rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (min-width: 1024px) {
	.day {
		grid-template-columns: 220px minmax(0, 1fr);
		gap: 40px;
	}
	.day__label {
		position: sticky;
		top: 24px;
		align-self: start;
	}
	.day__list { border-top: 3px solid var(--ink); }
	.row:first-child { padding-top: 16px; }
}

/* Пагинация */
.pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: clamp(32px, 4vw, 48px);
}
.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line-2);
	border-radius: 4px;
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
	transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.pager a.page-numbers:active { transform: scale(0.97); }
.pager .current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--bg);
}
.pager .dots { border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
	.pager a.page-numbers:hover { background: var(--surface); }
}

/* Пустая рубрика */
.empty {
	padding: clamp(32px, 5vw, 64px) 0;
	max-width: 52ch;
}
.empty__title {
	font-size: 1.5rem;
	font-weight: 750;
}
.empty__text {
	margin-top: 10px;
	color: var(--ink-2);
}
.empty a,
.ink-empty a {
	text-decoration-color: var(--signal);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}
.ink-empty {
	padding: 24px;
	background: var(--surface);
	color: var(--ink-2);
}

/* ==========================================================================
   Обычная страница, 404
   ========================================================================== */

.page-plain {
	padding-block: clamp(28px, 4vw, 56px) clamp(56px, 7vw, 96px);
}
.page-plain__title {
	max-width: 22ch;
	margin-bottom: 28px;
	font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.028em;
}

.notfound {
	padding-block: clamp(48px, 7vw, 96px);
}
.notfound > * { max-width: 760px; }
.notfound__code {
	display: inline-block;
	padding: 0.05em 0.18em;
	background: var(--signal);
	color: var(--signal-ink);
	font-size: clamp(3rem, 2rem + 4vw, 5.5rem);
	font-weight: 850;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}
.notfound__title {
	margin-top: 24px;
	font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem);
	font-weight: 800;
	letter-spacing: -0.025em;
}
.notfound__text {
	max-width: 56ch;
	margin-top: 14px;
	color: var(--ink-2);
	font-size: 1.1rem;
}
.notfound__text a {
	color: var(--ink);
	text-decoration-color: var(--signal);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}
.notfound__list { margin-top: 32px; }

/* ==========================================================================
   Подвал
   ========================================================================== */

.footer {
	background: var(--steel);
	color: var(--on-steel-2);
	font-size: 0.95rem;
}

.footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	padding-block: clamp(40px, 5vw, 64px);
}

@media (min-width: 860px) {
	.footer__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 80px; }
}

.logo--footer { font-size: 1.15rem; }

.footer__about {
	max-width: 52ch;
	margin-top: 18px;
	line-height: 1.6;
}

.footer__title {
	margin-bottom: 10px;
	color: var(--on-steel);
	font-size: 1rem;
	font-weight: 700;
}

.footer__nav .menu {
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer__nav a {
	display: inline-block;
	padding-block: 6px;
	color: var(--on-steel-2);
	text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
	.footer__nav a:hover {
		color: var(--on-steel);
		text-decoration: underline;
		text-decoration-color: var(--signal);
		text-decoration-thickness: 2px;
		text-underline-offset: 4px;
	}
}

.footer__base {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 18px 24px;
	color: var(--on-steel-3);
	font-size: 0.85rem;
}

.footer__base::before {
	content: "";
	position: absolute;
	top: 0;
	left: var(--gutter);
	right: var(--gutter);
	border-top: 1px solid var(--steel-line);
}

/* ==========================================================================
   Движение: только при загрузке и только если пользователь не против
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
	@keyframes inkt-rise {
		from { opacity: 0; transform: translateY(10px); }
	}

	.ink-hero > *,
	.section-hero .wrap > *,
	.story__head > * {
		animation: inkt-rise 520ms var(--ease-out) both;
	}
	.ink-hero > :nth-child(2),
	.section-hero .wrap > :nth-child(2),
	.story__head > :nth-child(2) { animation-delay: 60ms; }
	.ink-hero > :nth-child(3),
	.section-hero .wrap > :nth-child(3),
	.story__head > :nth-child(3) { animation-delay: 120ms; }
	.story__head > :nth-child(4) { animation-delay: 160ms; }

	.ink-feed > .ink-card {
		animation: inkt-rise 460ms var(--ease-out) both;
		animation-delay: 140ms;
	}
	.ink-feed > .ink-card:nth-child(2) { animation-delay: 180ms; }
	.ink-feed > .ink-card:nth-child(3) { animation-delay: 220ms; }
	.ink-feed > .ink-card:nth-child(4) { animation-delay: 260ms; }
	.ink-feed > .ink-card:nth-child(5) { animation-delay: 300ms; }
	.ink-feed > .ink-card:nth-child(n + 6) { animation-delay: 340ms; }
}

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

/* ==========================================================================
   Служебное WordPress
   ========================================================================== */

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

.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text { color: var(--ink-3); font-size: 0.9rem; }

.notfound__list .rail__item { grid-template-columns: 92px 1fr; }

/* ==========================================================================
   1.1 — доводка: меню в одну строку, новости выше на первом экране
   ========================================================================== */

.nav a { white-space: nowrap; }

@media (min-width: 860px) {
  .nav .menu { gap: 2px; }
  .nav a { padding: 10px 12px; font-size: 0.95rem; }
}
@media (min-width: 860px) and (max-width: 1023px) {
  .masthead__bar { gap: 16px; }
  .nav a { padding: 10px 8px; font-size: 0.9rem; }
}

/* H1 на главной и в рубриках — спокойнее, чтобы лента попадала в первый экран */
.ink-hero { padding-block: clamp(32px, 4.5vw, 56px) clamp(36px, 5vw, 64px); }
.ink-h1 {
  max-width: 24ch;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: -0.026em;
}
.ink-lead { max-width: 64ch; margin-top: clamp(16px, 2vw, 24px); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem); }
.ink-latest { padding-top: clamp(32px, 4vw, 52px); }

.section-hero__title { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.15rem); letter-spacing: -0.026em; }

/* Главная новость: меньше пустоты между датой и заголовком */
@media (min-width: 1024px) {
  .ink-card--lead { justify-content: flex-start; }
  .ink-card--lead .ink-meta { margin-bottom: 0; padding-bottom: clamp(20px, 2.4vw, 28px); }
  .ink-card--lead .ink-title { max-width: 22ch; }
}

/* Карточки и строки ленты: вся площадь заголовка реагирует на наведение */
.ink-title a, .row__title a, .mini__title a, .lead-story__title a, .rail__link {
  transition: background-size 220ms var(--ease-out), color 160ms ease;
}

/* Источник: чётче и с рамкой вместо плоской плашки */
.prose .ink-source, .ink-source {
  max-width: 68ch;
  border: 1px solid var(--line);
  background: transparent;
}

/* Подвал: разделы в две колонки */
@media (min-width: 480px) {
  .footer__nav .menu { columns: 2; column-gap: 32px; }
  .footer__nav li { break-inside: avoid; }
}

/* Появление при загрузке — короче, новости не должны «ждать» */
@media (prefers-reduced-motion: no-preference) {
  .ink-hero > *, .section-hero .wrap > *, .story__head > * { animation-duration: 380ms; }
  .ink-feed > .ink-card { animation-duration: 340ms; animation-delay: 60ms; }
  .ink-feed > .ink-card:nth-child(2) { animation-delay: 100ms; }
  .ink-feed > .ink-card:nth-child(3) { animation-delay: 140ms; }
  .ink-feed > .ink-card:nth-child(4) { animation-delay: 180ms; }
  .ink-feed > .ink-card:nth-child(5) { animation-delay: 220ms; }
  .ink-feed > .ink-card:nth-child(n + 6) { animation-delay: 240ms; }
}
