/*
Theme Name: kitai-kitai-ru
Author: Максим Шниперсон
Description: Тема информационного сайта о Китае: свиток рисовой бумаги на тушевом фоне, клетки для прописей с киноварными печатями, карта тушью, бамбуковая линейка эпох и список вещей в дорогу.
Version: 1.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kitai
*/
/* ---------- Шрифты (OFL, файлы в /fonts) ---------- */
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-condensed-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: "Fira Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-condensed-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-condensed-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: "Fira Sans Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-condensed-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-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: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/fira-sans-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/fira-sans-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Neucha"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/neucha-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: "Neucha"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/neucha-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
/* ---------- Палитра (HEX из задания) ---------- */
:root {
	--ink-bg: #12171B;
	--ink-deep: #0C1013;
	--paper: #EFE8D8;
	--paper-light: #F6F1E6;
	--text: #1A1F22;
	--muted: #7A7566;
	--cinnabar: #C4342A;
	--cinnabar-dark: #9E271F;
	--jade: #2E6B58;
	--light: #EDE6D6;
	--light-muted: #A39D8E;
	--line-dark: #2A3238;
	--font-head: "Fira Sans", "Segoe UI", Arial, sans-serif;
	--font-body: "Fira Sans Condensed", "Arial Narrow", Arial, sans-serif;
	--font-hand: "Neucha", "Segoe Print", cursive;
	/* Клетка для прописей: рамка, крест и диагонали пунктиром */
	--grid-cell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23C4342A' stroke-opacity='.55' stroke-width='1' stroke-dasharray='5 4' vector-effect='non-scaling-stroke'%3E%3Cpath d='M50 0V100M0 50H100M0 0L100 100M100 0L0 100' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E");
	--grid-cell-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23EDE6D6' stroke-opacity='.25' stroke-width='1' stroke-dasharray='5 4'%3E%3Cpath d='M50 0V100M0 50H100M0 0L100 100M100 0L0 100' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- База ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	overflow-x: hidden;
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.6;
	color: var(--light);
	background-color: var(--ink-bg);
	/* Тушь на столе: мягкий свет сверху */
	background-image: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.04), transparent 60%);
	background-repeat: no-repeat;
	overflow-wrap: break-word;
}

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

p {
	margin: 0 0 1em;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.12;
	margin: 1.4em 0 0.5em;
	hyphens: auto;
	overflow-wrap: break-word;
}

a {
	color: var(--cinnabar);
	text-decoration: underline solid rgba(196, 52, 42, 0.5);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

a:hover,
a:focus-visible {
	color: var(--cinnabar-dark);
	text-decoration-color: currentColor;
}

:focus-visible {
	outline: 2px solid var(--cinnabar);
	outline-offset: 2px;
}

.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 !important;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	clip: auto;
	z-index: 1000;
	padding: 0.6em 1em;
	background: var(--cinnabar);
	color: #fff;
}

.shell {
	width: min(92%, 1440px);
	margin-left: auto;
	margin-right: auto;
}

@media (min-width: 960px) {
	.shell {
		width: 85%;
	}
}

/* ---------- Кнопка: киноварный контур, прямые углы ---------- */
.seal-btn,
.search-form button,
.form-submit input[type="submit"],
.cookie-banner button {
	display: inline-block;
	padding: 0.45em 0.95em 0.4em;
	font-family: var(--font-head);
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--cinnabar);
	background: var(--paper-light);
	border: 1.5px solid var(--cinnabar);
	border-radius: 0;
	outline: 1px solid rgba(196, 52, 42, 0.35);
	outline-offset: 3px;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.seal-btn:hover,
.seal-btn:focus-visible,
.search-form button:hover,
.form-submit input[type="submit"]:hover,
.cookie-banner button:hover {
	color: #fff;
	background: var(--cinnabar);
}

/* ---------- Шапка ---------- */
.site-header {
	padding: 2.2rem 0 0;
}

.header-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem 2rem;
	padding-bottom: 1.6rem;
	border-bottom: 3px solid var(--cinnabar);
	border-image: linear-gradient(90deg, transparent, var(--cinnabar) 4%, var(--cinnabar) 96%, transparent) 1;
}

.brand {
	display: flex;
	align-items: center;
	gap: 1.3rem;
	min-width: 0;
	text-decoration: none;
	color: var(--light);
}

.brand:hover {
	color: var(--light);
}

.brand-mark,
.brand-logo {
	flex: none;
	width: 96px;
	height: auto;
}

.brand-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.brand-name {
	font-family: var(--font-head);
	font-size: clamp(2rem, 4vw, 3.6rem);
	font-weight: 700;
	line-height: 1;
	color: var(--paper);
}

.brand-desc {
	margin-top: 0.4rem;
	font-size: clamp(1.05rem, 1.6vw, 1.5rem);
	line-height: 1.2;
	color: var(--light);
}

.nav-toggle {
	display: none;
	padding: 0.45em 0.9em;
	font: inherit;
	font-size: 1rem;
	color: var(--light);
	background: transparent;
	border: 1px solid var(--cinnabar);
	border-radius: 0;
	cursor: pointer;
}

.main-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-nav a {
	display: inline-block;
	padding: 0.2em 0;
	font-size: 1.5rem;
	line-height: 1.3;
	text-decoration: none;
	color: var(--light);
	border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a {
	color: var(--paper);
	border-bottom-color: var(--cinnabar);
}

/* ---------- Лист рисовой бумаги ---------- */
.scroll {
	width: min(96%, 1640px);
	margin: 2rem auto 0;
	padding: 1px clamp(1.2rem, 3.6vw, 3.4rem);
	color: var(--text);
	background-color: var(--paper);
	/* Волокна бумаги */
	background-image:
		repeating-linear-gradient(93deg, rgba(122, 117, 102, 0.035) 0 1px, transparent 1px 7px),
		repeating-linear-gradient(178deg, rgba(122, 117, 102, 0.03) 0 1px, transparent 1px 11px);
}

.scroll + .where,
.where + .scroll {
	margin-top: 0;
}

/* ---------- Заголовки секций: клетка для прописей ---------- */
.cell-title {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 1.2rem;
	text-align: center;
	background: var(--grid-cell) center / 100% 100% no-repeat;
	border: 2px solid var(--cinnabar);
	outline: 1px solid rgba(196, 52, 42, 0.45);
	outline-offset: 5px;
}

.cell-title h2 {
	position: relative;
	margin: 0;
	font-size: clamp(1.5rem, 2.2vw, 2.2rem);
	font-weight: 800;
	line-height: 1.08;
	text-transform: uppercase;
	color: var(--text);
	background: var(--paper);
	box-shadow: 0 0 0 0.25em var(--paper);
}

.cell-title--big h2 {
	font-size: clamp(2rem, 3.6vw, 3.6rem);
}

.cell-title--ink {
	background-color: var(--ink-bg);
	background-image: var(--grid-cell-light);
	border-color: var(--light-muted);
	outline-color: rgba(237, 230, 214, 0.35);
}

.cell-title--ink h2 {
	color: var(--paper);
	background: var(--ink-bg);
	box-shadow: 0 0 0 0.25em var(--ink-bg);
}

.seal-num {
	position: absolute;
	z-index: 2;
	top: 10%;
	right: 10%;
	display: grid;
	place-items: center;
	width: 1.9rem;
	height: 1.9rem;
	font-family: var(--font-head);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: var(--cinnabar);
	outline: 1px solid var(--paper);
	outline-offset: -4px;
}

.front section {
	display: grid;
	grid-template-columns: minmax(0, 22fr) minmax(0, 78fr);
	gap: 2rem clamp(1.6rem, 4vw, 4.5rem);
	align-items: start;
	padding: 2.6rem 0;
}

/* ---------- Блок 1: шесть дорог ---------- */
.roads-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
	border: 2px solid var(--cinnabar);
}

.road {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	gap: 0.3rem 0.9rem;
	min-height: 11.5rem;
	padding: 1.1rem 1.1rem 1rem;
	background: var(--grid-cell) center / 100% 100% no-repeat;
	border-right: 1.5px solid var(--cinnabar);
	border-bottom: 1.5px solid var(--cinnabar);
}

.road:nth-child(3n) {
	border-right: 0;
}

.road:nth-child(n + 4) {
	border-bottom: 0;
}

.road-num {
	grid-row: 1 / 3;
	font-family: var(--font-head);
	font-size: clamp(1.9rem, 2.6vw, 2.6rem);
	font-weight: 600;
	line-height: 1;
	color: var(--cinnabar);
}

.road-text {
	position: relative;
	z-index: 1;
}

.road-title {
	margin: 0 0 0.5rem;
	hyphens: manual;
	font-size: clamp(1.15rem, 1.5vw, 1.45rem);
	line-height: 1.15;
	color: var(--text);
}

.road-note {
	margin: 0;
	padding-right: 4.8rem;
	font-size: 1rem;
	line-height: 1.35;
	color: var(--muted);
}

.road-icon {
	position: absolute;
	right: 0.9rem;
	bottom: 0.8rem;
	width: auto;
	max-width: 5rem;
	max-height: 4.6rem;
}

/* ---------- Блок 2: карта тушью ---------- */
.where {
	padding: 0;
}

.front .where {
	display: block;
	padding: 2.8rem 0 3rem;
}

.where-row {
	display: grid;
	grid-template-columns: minmax(0, 22fr) minmax(0, 78fr);
	gap: 2rem clamp(1.6rem, 4vw, 4.5rem);
	align-items: center;
}

.where .cell-title {
	border-width: 3px;
	border-style: double;
	border-color: var(--light);
	background-image: none;
	outline: 0;
}

.where .cell-title h2 {
	font-size: clamp(2rem, 3.6vw, 3.4rem);
}

.map {
	position: relative;
	width: 100%;
	max-width: 1000px;
	aspect-ratio: 1000 / 460;
	margin: 0 auto;
}

.map > img {
	position: absolute;
	left: 24%;
	top: 6.1%;
	width: 51.2%;
	height: auto;
}

.map-lines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.map-lines line {
	stroke: var(--cinnabar);
	stroke-width: 1.2;
	vector-effect: non-scaling-stroke;
}

.city-seal {
	position: absolute;
	width: 18px;
	height: 18px;
	background: var(--cinnabar);
	outline: 1px solid rgba(239, 232, 216, 0.85);
	outline-offset: -4px;
	transform: translate(-50%, -50%);
}

.city {
	position: absolute;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 0.7rem;
	line-height: 1.2;
	white-space: nowrap;
	transform: translateY(-50%);
}

.city--l {
	right: 80%;
	align-items: flex-end;
	text-align: right;
	border-right: 3px solid var(--cinnabar);
}

.city--r {
	left: 80%;
	border-left: 3px solid var(--cinnabar);
}

.city b {
	font-family: var(--font-head);
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--paper);
}

.city span {
	font-size: 0.92rem;
	color: var(--light-muted);
}

/* ---------- Последние записи ---------- */
.feed {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 2.2rem;
}

.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1rem;
	color: var(--text);
	background: var(--paper-light);
	border: 1.5px solid var(--cinnabar);
	outline: 1px solid rgba(196, 52, 42, 0.3);
	outline-offset: -7px;
}

.card-thumb {
	display: block;
	aspect-ratio: 260 / 216;
	overflow: hidden;
	background:
		linear-gradient(rgba(196, 52, 42, 0.16) 1px, transparent 1px) 0 0 / 100% 12.5%,
		linear-gradient(90deg, rgba(196, 52, 42, 0.16) 1px, transparent 1px) 0 0 / 10% 100%,
		var(--paper-light);
	border: 1.5px solid var(--cinnabar);
}

.card-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-thumb .card-blank {
	object-fit: contain;
	mix-blend-mode: multiply;
}

.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 1rem 0.4rem 0.6rem;
}

.card-title {
	margin: 0 0 0.45rem;
	font-size: 1.35rem;
	line-height: 1.2;
}

.card-title a {
	color: var(--text);
	text-decoration: none;
}

.card-title a:hover {
	color: var(--cinnabar);
}

.card-excerpt {
	font-size: 1.02rem;
	line-height: 1.4;
	color: var(--muted);
}

.card-excerpt p {
	margin: 0 0 0.4rem;
}

.card-date {
	margin-bottom: 1rem;
	font-size: 0.95rem;
	color: var(--muted);
}

.card .seal-btn {
	margin-top: auto;
	align-self: center;
}

.feed-more {
	margin: 1.8rem 0 0;
	font-family: var(--font-head);
	font-weight: 600;
}

.feed-empty {
	color: var(--muted);
}

/* ---------- Блок 3: бамбуковая линейка ---------- */
.timeline-body {
	min-width: 0;
	align-self: center;
}

.timeline-lead {
	max-width: 46rem;
	margin: 0 0 0.4rem;
	color: var(--muted);
}

.ruler {
	position: relative;
	padding: 5.2rem 0 4.6rem;
}

.ruler > img {
	display: block;
	width: 100%;
}

.era {
	position: absolute;
	left: var(--x);
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	text-align: center;
	white-space: nowrap;
	transform: translateX(-50%);
}

.era b {
	font-family: var(--font-head);
	font-size: 1.3rem;
	line-height: 1.1;
}

.era span {
	font-size: 0.86rem;
	color: var(--muted);
}

.era::after {
	content: "";
	display: block;
	width: 2px;
	height: 1.1rem;
	margin-top: 0.15rem;
	background: var(--cinnabar);
}

.era--up {
	top: 1.4rem;
}

.era--down {
	bottom: 0.4rem;
	flex-direction: column-reverse;
}

.era--down::after {
	margin: 0 0 0.15rem;
}

/* ---------- Блок 4: что взять в поездку ---------- */
.front .trip {
	grid-template-columns: minmax(0, 22fr) minmax(0, 36fr) minmax(0, 42fr);
	align-items: center;
	padding-bottom: 3rem;
}

.trip-pic {
	position: relative;
	margin: 0;
}

.trip-pic img {
	display: block;
	width: 100%;
	mix-blend-mode: multiply;
}

.pic-num {
	position: absolute;
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	font-family: var(--font-head);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: var(--cinnabar);
	transform: translate(-50%, -50%);
}

.trip-list {
	position: relative;
	padding: 2.4rem 2.2rem 2.4rem 3rem;
	color: var(--paper);
	background: var(--ink-bg);
	/* Рваный край мазка кистью */
	clip-path: polygon(2% 6%, 18% 3%, 40% 5%, 63% 1%, 84% 4%, 100% 0, 99% 30%, 100% 62%, 98% 100%, 72% 96%, 50% 99%, 27% 95%, 6% 98%, 0 80%, 3% 52%, 0 26%);
}

.trip-list ol {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(4, auto);
	gap: 0.55rem 2.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.trip-list li {
	position: relative;
	padding-left: 2.6rem;
	font-family: var(--font-hand);
	font-size: clamp(1.45rem, 2.1vw, 2rem);
	line-height: 1.3;
}

.trip-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.4rem;
	height: 1.4rem;
	border: 2px solid var(--light-muted);
}

.trip-list li.is-done::after {
	content: "";
	position: absolute;
	left: 0.35rem;
	top: 0.05em;
	width: 0.65rem;
	height: 1.25rem;
	border-right: 3px solid var(--paper);
	border-bottom: 3px solid var(--paper);
	transform: rotate(40deg);
}

/* ---------- Внутренние страницы: тот же лист ---------- */
.page-head > .shell,
.site-main > .shell {
	width: min(96%, 1640px);
	color: var(--text);
	background-color: var(--paper);
	background-image:
		repeating-linear-gradient(93deg, rgba(122, 117, 102, 0.035) 0 1px, transparent 1px 7px),
		repeating-linear-gradient(178deg, rgba(122, 117, 102, 0.03) 0 1px, transparent 1px 11px);
	padding-left: clamp(1.2rem, 3.6vw, 3.4rem);
	padding-right: clamp(1.2rem, 3.6vw, 3.4rem);
}

.page-head {
	padding: 2rem 0 0;
}

.page-head > .shell {
	padding-top: 2rem;
	padding-bottom: 1.6rem;
}

.page-head h1 {
	display: inline-block;
	margin: 0.8rem 0 0;
	padding: 0.25em 0.45em;
	font-size: clamp(2rem, 4vw, 3.4rem);
	font-weight: 800;
	text-transform: uppercase;
	color: var(--text);
	background: var(--grid-cell) center / 100% 100% no-repeat;
	border: 2px solid var(--cinnabar);
}

.single .page-head h1,
.page .page-head h1 {
	display: block;
	padding: 0;
	font-size: clamp(1.9rem, 3.4vw, 3rem);
	text-transform: none;
	background: none;
	border: 0;
}

.page-head .entry-meta {
	margin-top: 0.8rem;
	color: var(--muted);
}

.breadcrumbs {
	font-size: 0.95rem;
	color: var(--muted);
}

.breadcrumbs a {
	color: var(--text);
}

.breadcrumbs .sep {
	margin: 0 0.4em;
	color: var(--cinnabar);
}

.site-main {
	padding: 0;
}

.site-main > .shell {
	padding-top: 0.6rem;
	padding-bottom: 4rem;
}

.layout-single {
	display: block;
}

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
	column-gap: 5%;
	align-items: start;
}

.content-area {
	min-width: 0;
}

.layout-single .sheet {
	max-width: 900px;
}

.sheet {
	position: relative;
	color: var(--text);
}

.entry-meta {
	font-size: 0.95rem;
	color: var(--muted);
}

.entry-meta a {
	color: inherit;
}

.entry-thumb {
	margin: 0 0 1.8rem;
	padding: 0.6rem;
	border: 1.5px solid var(--cinnabar);
}

.entry-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.entry-content {
	font-size: 1.12rem;
	line-height: 1.7;
	hyphens: auto;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2 {
	position: relative;
	padding-left: 1.4rem;
	font-size: 2rem;
}

.entry-content h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 0.65rem;
	height: 0.65rem;
	background: var(--cinnabar);
}

.entry-content h3 {
	font-size: 1.55rem;
}

.entry-content h4 {
	font-size: 1.3rem;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.2em;
	padding-left: 1.6em;
}

.entry-content ul {
	list-style: none;
	padding-left: 1.5em;
}

.entry-content ul > li {
	position: relative;
	margin-bottom: 0.35em;
}

.entry-content ul > li::before {
	content: "";
	position: absolute;
	left: -1.2em;
	top: 0.62em;
	width: 7px;
	height: 7px;
	background: var(--cinnabar);
}

.entry-content ol > li::marker {
	font-weight: 700;
	color: var(--cinnabar);
}

.entry-content blockquote {
	margin: 1.6em 0;
	padding: 1.2rem 1.5rem;
	font-family: var(--font-hand);
	font-size: 1.55rem;
	line-height: 1.35;
	color: var(--paper);
	background: var(--ink-bg);
	border-left: 6px solid var(--cinnabar);
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content table {
	width: 100%;
	margin: 1.4em 0;
	border-collapse: collapse;
	font-size: 1rem;
}

.entry-content th,
.entry-content td {
	padding: 0.55rem 0.75rem;
	text-align: left;
	border: 1px solid rgba(196, 52, 42, 0.45);
}

.entry-content th {
	font-family: var(--font-head);
	font-weight: 700;
	color: var(--paper);
	background: var(--ink-bg);
}

.entry-content figure {
	margin: 1.6em 0;
}

.entry-content figcaption {
	margin-top: 0.4rem;
	font-size: 0.9rem;
	color: var(--muted);
}

.entry-content img {
	display: block;
}

.entry-content pre,
.entry-content code {
	font-family: Consolas, "DejaVu Sans Mono", "Courier New", monospace;
	font-size: 0.88em;
	background: rgba(26, 31, 34, 0.07);
}

.entry-content pre {
	padding: 1rem 1.2rem;
	overflow-x: auto;
}

.entry-content hr {
	height: 0;
	margin: 2em 0;
	border: 0;
	border-top: 1px dashed var(--cinnabar);
}

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	font-size: 0.95rem;
	border-top: 1px dashed rgba(196, 52, 42, 0.5);
}

.post-nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.2rem;
	margin-top: 2.4rem;
	max-width: 900px;
}

.layout-with-sidebar .post-nav {
	max-width: none;
}

.post-nav a {
	display: block;
	padding: 1rem 1.2rem;
	text-decoration: none;
	color: var(--text);
	background: var(--paper-light);
	border: 1.5px solid var(--cinnabar);
}

.post-nav a:hover {
	background: #fff;
}

.post-nav .nav-next {
	text-align: right;
}

.post-nav small {
	display: block;
	font-size: 0.88rem;
	color: var(--muted);
}

.post-nav strong {
	font-family: var(--font-head);
	font-size: 1.2rem;
}

/* ---------- Пагинация (type => plain) ---------- */
.pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2.6rem;
}

.pager .page-numbers {
	display: inline-block;
	min-width: 2.6em;
	padding: 0.45em 0.8em;
	font-family: var(--font-head);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: var(--cinnabar);
	background: var(--paper-light);
	border: 1.5px solid var(--cinnabar);
}

.pager a.page-numbers:hover {
	background: #fff;
}

.pager .page-numbers.current {
	color: #fff;
	background: var(--cinnabar);
}

.pager .page-numbers.dots {
	min-width: 0;
	background: none;
	border-color: transparent;
}

/* ---------- Сайдбар ---------- */
.sidebar {
	min-width: 0;
	padding: 1.6rem 1.5rem;
	color: var(--paper);
	background: var(--ink-bg);
	border-top: 4px solid var(--cinnabar);
}

.sidebar .widget + .widget {
	margin-top: 2rem;
}

.sidebar .widget-title {
	margin: 0 0 0.9rem;
	font-size: 1.4rem;
	color: var(--paper);
}

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

.sidebar li {
	padding: 0.5rem 0;
	font-size: 1rem;
	line-height: 1.45;
	border-bottom: 1px solid var(--line-dark);
}

.sidebar a {
	color: var(--paper);
	text-decoration: none;
}

.sidebar a:hover {
	color: #F08A80;
}

.sidebar .post-date,
.sidebar .wp-block-latest-posts__post-date {
	display: block;
	font-size: 0.85rem;
	color: var(--light-muted);
}

/* ---------- Комментарии ---------- */
.comments {
	margin-top: 2.6rem;
	max-width: 900px;
}

.comments-title,
.comment-reply-title {
	font-size: 1.7rem;
	margin: 0 0 1rem;
}

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-left: 1.6rem;
}

.comment-body {
	margin-bottom: 1rem;
	padding: 1rem 1.2rem;
	background: var(--paper-light);
	border-left: 3px solid var(--cinnabar);
}

.comment-head {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1rem;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	color: var(--muted);
}

.comment-head b {
	color: var(--text);
}

.comment-wait {
	font-size: 0.92rem;
	color: var(--cinnabar);
}

.comment-reply-link {
	font-size: 0.9rem;
}

.comment-respond {
	margin-top: 1.8rem;
	padding: 1.6rem;
	background: var(--paper-light);
	border: 1.5px solid var(--cinnabar);
}

.comment-form label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.95rem;
	color: var(--muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"] {
	width: 100%;
	padding: 0.6rem 0.8rem;
	font: inherit;
	font-size: 1rem;
	color: var(--text);
	background: #fff;
	border: 1px solid var(--muted);
	border-radius: 0;
}

.comment-form .comment-form-cookies-consent label {
	display: inline;
}

.comment-notes,
.logged-in-as,
.must-log-in {
	font-size: 0.95rem;
	color: var(--muted);
}

/* ---------- Поиск и 404 ---------- */
.search-form {
	display: flex;
	gap: 0.6rem;
	max-width: 560px;
}

.search-form label {
	flex: 1;
	min-width: 0;
}

.lost {
	padding: 1rem 0 2rem;
}

.lost-code {
	display: flex;
	gap: 0.8rem;
	margin: 0 0 1.6rem;
	font-family: var(--font-head);
	font-size: clamp(4.5rem, 12vw, 8rem);
	font-weight: 800;
	line-height: 1;
}

.lost-code,
.lost-code span {
	color: var(--text);
}

.lost-code span {
	color: #fff;
	background: var(--cinnabar);
	padding: 0 0.15em;
}

.lost p {
	max-width: 620px;
}

.lost .seal-btn {
	margin-top: 1.4rem;
}

/* ---------- Подвал ---------- */
.site-footer {
	margin-top: 0;
	padding-top: 1.6rem;
	color: var(--light);
}

.footer-cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 3.5rem;
	padding: 2.2rem 0 2rem;
	border-top: 3px solid var(--cinnabar);
	border-image: linear-gradient(90deg, transparent, var(--cinnabar) 4%, var(--cinnabar) 96%, transparent) 1;
}

.footer-col {
	min-width: 0;
	font-size: 1.1rem;
	line-height: 1.5;
}

.footer-col .widget-title {
	margin: 0 0 0.6rem;
	font-size: 1.5rem;
	color: var(--paper);
}

.footer-col p {
	margin: 0 0 0.6em;
}

.footer-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-col li {
	margin-bottom: 0.1rem;
}

.footer-col a {
	color: var(--light);
	text-decoration: none;
}

.footer-col a:hover,
.footer-col a:focus-visible {
	color: #F08A80;
	text-decoration: underline;
}

.footer-col .textwidget a {
	color: var(--light-muted);
}

.copyright {
	margin: 0;
	padding: 1.2rem 0 2rem;
	font-size: 1rem;
	text-align: center;
	color: var(--light-muted);
	border-top: 3px solid var(--cinnabar);
	border-image: linear-gradient(90deg, transparent, var(--cinnabar) 4%, var(--cinnabar) 96%, transparent) 1;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] {
	display: none !important;
}

.cookie-banner {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 90;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem 1.5rem;
	max-width: 880px;
	margin-left: auto;
	margin-right: auto;
	padding: 1rem 1.3rem;
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--text);
	background: var(--paper);
	border: 2px solid var(--cinnabar);
}

.cookie-banner p {
	flex: 1 1 320px;
	min-width: 0;
	margin: 0;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
	.roads-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.road:nth-child(n) {
		border-right: 1.5px solid var(--cinnabar);
		border-bottom: 1.5px solid var(--cinnabar);
	}

	.road:nth-child(2n) {
		border-right: 0;
	}

	.road:nth-child(n + 5) {
		border-bottom: 0;
	}

	.front .trip {
		grid-template-columns: minmax(0, 22fr) minmax(0, 78fr);
	}

	.trip-list {
		grid-column: 1 / -1;
	}

	.main-nav a {
		font-size: 1.3rem;
	}
}

@media (max-width: 959px) {
	.nav-toggle {
		display: inline-block;
	}

	.main-nav {
		flex-basis: 100%;
	}

	.main-nav[data-open="false"] {
		display: none;
	}

	.main-nav ul {
		flex-direction: column;
		gap: 0;
	}

	.main-nav li + li {
		border-top: 1px solid var(--line-dark);
	}

	.main-nav a {
		display: block;
		padding: 0.5em 0;
	}

	.front section,
	.where-row,
	.front .trip {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.6rem;
	}

	.cell-title {
		aspect-ratio: auto;
		justify-content: flex-start;
		min-height: 0;
		padding: 1.4rem 4rem 1.4rem 1.4rem;
		text-align: left;
	}

	.cell-title h2,
	.cell-title--big h2,
	.where .cell-title h2 {
		font-size: clamp(1.7rem, 6vw, 2.4rem);
	}

	.seal-num {
		top: 50%;
		right: 1.2rem;
		transform: translateY(-50%);
	}

	.feed,
	.layout-with-sidebar .feed {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.layout-with-sidebar {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2.5rem;
	}

	.trip-pic {
		max-width: 480px;
		width: 100%;
		margin: 0 auto;
	}

	.footer-cols {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 600px) {
	body {
		font-size: 17px;
	}

	.site-header {
		padding-top: 1.4rem;
	}

	.brand {
		gap: 0.9rem;
	}

	.brand-mark,
	.brand-logo {
		width: 60px;
	}

	.scroll,
	.page-head > .shell,
	.site-main > .shell {
		width: 100%;
	}

	.roads-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.road:nth-child(n) {
		min-height: 0;
		border-right: 0;
		border-bottom: 1.5px solid var(--cinnabar);
	}

	.road:last-child {
		border-bottom: 0;
	}

	.map {
		display: flex;
		flex-wrap: wrap;
		gap: 0.8rem 1.2rem;
		aspect-ratio: auto;
	}

	.map > img {
		position: static;
		width: 100%;
		margin-bottom: 0.4rem;
	}

	.map-lines,
	.city-seal {
		display: none;
	}

	.city,
	.city--l,
	.city--r {
		position: static;
		align-items: flex-start;
		padding: 0 0.6rem;
		text-align: left;
		transform: none;
		border-right: 0;
		border-left: 3px solid var(--cinnabar);
	}

	.ruler {
		padding: 0;
	}

	.ruler > img {
		margin-bottom: 1rem;
	}

	.era,
	.era--up,
	.era--down {
		position: static;
		display: inline-flex;
		flex-direction: row;
		align-items: baseline;
		gap: 0.5rem;
		width: 50%;
		margin-bottom: 0.6rem;
		text-align: left;
		transform: none;
	}

	.era::after {
		display: none;
	}

	.trip-list {
		padding: 2rem 1.4rem 2rem 1.8rem;
	}

	.trip-list ol {
		gap: 0.4rem 1.2rem;
	}

	.trip-list li {
		padding-left: 2.1rem;
	}

	.feed,
	.layout-with-sidebar .feed {
		grid-template-columns: minmax(0, 1fr);
	}

	.sidebar {
		padding: 1.3rem 1.2rem;
	}

	.comment-respond {
		padding: 1.2rem 1.1rem;
	}

	.post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.search-form {
		flex-direction: column;
	}

	.cookie-banner {
		left: 0.6rem;
		right: 0.6rem;
		bottom: 0.6rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition: none !important;
	}
}
