/*
Theme Name: tonky-kot-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: tk
*/
/* ---------- Шрифты (локально, OFL) ---------- */
@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: 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, 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-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: 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/jetbrains-mono-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: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/jetbrains-mono-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/jetbrains-mono-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: "JetBrains Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/jetbrains-mono-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Caveat";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/caveat-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: "Caveat";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/caveat-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ---------- Основа: чертёжная сетка на тёмно-синем ---------- */
:root {
	--graphite: #0B141C;
	--grid-line: #142230;
	--grid-major: #1E2C38;
	--paper-sheet: #F2EFE9;
	--paper-ink: #16222C;
	--head: #111C25;
	--yellow: #4FD1FF;
	--yellow-2: #8FE2FF;
	--teal: #4FD1FF;
	--red: #FF5A5F;
	--amber: #FFB347;
	--alt: #111C25;
	--line-blue: #3E5F86;
	--text: #E8EEF2;
	--muted: #7E8F9B;
	--frame: #2A3B48;
	--rust: #4FD1FF;
	--navy: #0B141C;
	--blue: #45D9C0;
	--steel: #111C25;
	--steel-line: #2A3B48;
	/* имена, которые используют inner.css и tail.css */
	--ink: #E8EEF2;
	--ivory: #111C25;
	--ivory-2: #111C25;
	--line: #2A3B48;
	--brass: #4FD1FF;
	--brass-2: #E8EEF2;
	--brass-dark: #4FD1FF;
	--malachite: #111C25;
	--night: #111C25;
	--night-2: #111C25;
	--on-dark: #E8EEF2;
	--on-dark-2: #7E8F9B;
	--paper: #0B141C;
	--card: #111C25;
	--accent: #4FD1FF;
	--mahogany: #111C25;
	--brass-3: #2A3B48;
	--morocco: #4FD1FF;
	--morocco-2: #8FE2FF;
	--paper-0: #111C25;
	--grid: #2A3B48;
	--plum: #0B141C;
	--plum-2: #111C25;
	--plum-3: #16242F;
	--chalk: #E8EEF2;
	--wine: #4FD1FF;
	--wine-2: #8FE2FF;
	--wine-light: #4FD1FF;
	--shadow: none;
	--lime: #4FD1FF;
	--font-head: "Fira Sans Condensed", "Arial Narrow", sans-serif;
	--font-body: "JetBrains Mono", "Courier New", monospace;
	--font-hand: "Caveat", "Comic Sans MS", cursive;
	--font-mono: "JetBrains Mono", "Courier New", monospace;
}
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--text);
	background-color: var(--graphite);
	background-image:
		linear-gradient(var(--grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

img,
svg {
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--yellow);
	text-decoration: underline 1px;
	text-underline-offset: 4px;
}

a:hover {
	color: var(--yellow-2);
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--yellow);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-head);
	font-weight: 500;
	line-height: 1.12;
}

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

.skip-link:focus {
	position: fixed;
	top: 0.6rem;
	left: 0.6rem;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 0.6rem 1rem;
	margin: 0;
	clip: auto;
	color: #0B141C;
	background: var(--yellow);
}

.shell {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding-left: 32px;
	padding-right: 32px;
}

/* ---------- Шапка ---------- */
.site-header {
	color: var(--text);
	background: var(--graphite);
	border-bottom: 1px solid var(--frame);
}

.header-row {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
	align-items: center;
	gap: 1rem 2.4rem;
	padding-top: 2rem;
	padding-bottom: 2rem;
}

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

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

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

.brand-name {
	font-family: var(--font-mono);
	font-size: clamp(1.2rem, 1.9vw, 1.6rem);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0.02em;
	color: var(--text);
}

.brand-desc {
	max-width: 560px;
	margin-top: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.98rem;
	line-height: 1.45;
	color: var(--text);
}

.nav-toggle {
	display: none;
	padding: 0.4rem 1rem;
	font-family: var(--font-mono);
	font-size: 1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--yellow);
	background: transparent;
	border: 1px solid var(--yellow);
	border-radius: 0;
	cursor: pointer;
}

.main-nav {
	justify-self: end;
}

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

.main-nav a {
	display: inline-block;
	padding: 0.1rem 0;
	font-family: var(--font-head);
	font-size: 1.35rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	text-decoration: none;
	color: var(--text);
	border-bottom: 2px solid transparent;
}

.main-nav a:hover {
	color: var(--yellow);
}

.main-nav .current-menu-item > a,
.main-nav a[aria-current] {
	color: var(--yellow);
	border-bottom-color: var(--yellow);
}

/* ---------- Рамка страницы ---------- */
.tk-page {
	position: relative;
}

/* ---------- Главная: листы чертежа ---------- */
.front {
	overflow-x: clip;
	padding: 2rem 0 3rem;
}

.sheet-block {
	padding: 1.2rem 0;
}

.sheet-block--alt {
	background: var(--alt);
}

/* Рамка с угловыми засечками: линии выходят за углы */
.frame {
	position: relative;
	width: 88%;
	max-width: 1360px;
	margin: 0 auto;
	padding: 2.2rem 2.4rem 2.6rem;
	border: 1px solid var(--line-blue);
}

.frame::before,
.frame::after {
	content: "";
	position: absolute;
	inset: -10px -1px;
	border-left: 1px solid var(--line-blue);
	border-right: 1px solid var(--line-blue);
	pointer-events: none;
}

.frame::after {
	inset: -1px -10px;
	border: 0;
	border-top: 1px solid var(--line-blue);
	border-bottom: 1px solid var(--line-blue);
}

.block-title {
	margin: 0 0 2rem;
	font-family: var(--font-head);
	font-size: clamp(2rem, 4.2vw, 3.8rem);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #C9D6E2;
}

.more-wrap {
	margin: 2rem 0 0;
}

.more-link {
	font-family: var(--font-mono);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--teal);
}

/* 01 — путь проекта */
.path-line {
	--gap: 2.8rem;
	position: relative;
	padding-top: 160px;
	padding-bottom: 3rem;
}

.path-line::before {
	content: "";
	position: absolute;
	left: calc((100% - 5 * var(--gap)) / 12);
	right: calc((100% - 5 * var(--gap)) / 12);
	top: 122px;
	height: 1px;
	background: var(--line-blue);
}

.path-cat {
	position: absolute;
	left: calc(50% + 0.5 * var(--gap) + 3%);
	top: 0;
	z-index: 1;
	width: 150px;
	height: auto;
}

.steps {
	position: relative;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1rem var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.steps li {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.6rem;
	padding: 0.4rem 0.6rem;
	font-family: var(--font-head);
	font-size: clamp(0.95rem, 1.45vw, 1.3rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	color: var(--text);
	background: var(--graphite);
	border: 1px solid var(--line-blue);
}

.steps li + li::before {
	content: "";
	position: absolute;
	right: 100%;
	top: 50%;
	width: calc(var(--gap) - 14px);
	margin-right: 7px;
	height: 1px;
	background: var(--line-blue);
}

.steps li + li::after {
	content: "";
	position: absolute;
	right: calc(100% + 7px);
	top: calc(50% - 4px);
	width: 8px;
	height: 8px;
	border-top: 1px solid var(--line-blue);
	border-right: 1px solid var(--line-blue);
	transform: rotate(45deg);
}

.path-return {
	position: absolute;
	left: calc((100% - 5 * var(--gap)) / 12);
	right: calc((100% - 5 * var(--gap)) / 12);
	bottom: 1rem;
	height: 2rem;
	border: 1px dashed var(--line-blue);
	border-top: 0;
}

/* 02 — слои сайта */
.layers-figure {
	position: relative;
	max-width: 942px;
	margin: 0 auto;
	container-type: inline-size;
}

.layers-figure img {
	display: block;
	width: 100%;
}

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

.layers-list li {
	position: absolute;
	left: 36.1%;
	transform: translate(-50%, -50%);
	font-family: var(--font-head);
	font-size: 2.6cqw;
	white-space: nowrap;
	color: var(--text);
}

.layers-list b {
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* 03 — карточки */
.feed {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.6rem;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.6rem 1.6rem 1.5rem;
	border: 1px solid var(--line-blue);
}

.card .ticks,
.card .ticks::before {
	position: absolute;
	inset: -9px -1px;
	border-left: 1px solid var(--line-blue);
	border-right: 1px solid var(--line-blue);
	pointer-events: none;
}

.card .ticks::before {
	content: "";
	inset: 8px -10px;
	border: 0;
	border-top: 1px solid var(--line-blue);
	border-bottom: 1px solid var(--line-blue);
}

.card-thumb {
	display: block;
	margin: 0 0 1.2rem;
	aspect-ratio: 37 / 20;
	overflow: hidden;
	border: 1px solid var(--line-blue);
}

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

.card-title {
	margin: 0 0 0.6rem;
	font-family: var(--font-mono);
	font-size: 1.3rem;
	font-weight: 500;
	line-height: 1.3;
}

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

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

.card-excerpt {
	margin: 0 0 1.3rem;
	font-family: var(--font-head);
	font-size: 1.12rem;
	line-height: 1.4;
	color: #C9D6E2;
}

.card-excerpt p {
	margin: 0;
}

.card-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	margin-top: auto;
}

.card-date {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	color: var(--text);
}

.read-more {
	display: inline-block;
	padding: 0.35rem 0.6rem;
	font-family: var(--font-head);
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--teal);
	border: 1px solid var(--teal);
}

.read-more:hover {
	color: var(--graphite);
	background: var(--teal);
}

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

/* 04 — красная паста на бумаге */
.redpen {
	padding: 2.4rem 0;
}

.redpen-sheet {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: 1.5rem 2rem;
	align-items: center;
	width: 88%;
	max-width: 1360px;
	margin: 0 auto;
	padding: 2.6rem 15rem 2.6rem 2.6rem;
	color: var(--paper-ink);
	background-color: var(--paper-sheet);
	background-image:
		linear-gradient(115deg, rgba(0, 0, 0, 0.012) 0 30%, transparent 30% 62%, rgba(0, 0, 0, 0.01) 62%),
		linear-gradient(35deg, transparent 0 45%, rgba(0, 0, 0, 0.012) 45% 70%, transparent 70%);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.redpen .block-title {
	margin: 0;
	font-size: clamp(1.9rem, 3.3vw, 3rem);
	font-weight: 500;
	color: var(--paper-ink);
}

.mistakes {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mistakes li {
	position: relative;
	padding: 0.25rem 1.3rem 0.35rem;
	font-family: var(--font-hand);
	font-size: 2.1rem;
	font-weight: 500;
	line-height: 1.1;
	color: #1C1F24;
	transform: rotate(-3deg);
}

.mistakes li:nth-child(even) {
	transform: rotate(2deg);
}

.mistakes li::before,
.mistakes li::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 2px solid var(--red);
	border-radius: 50%;
	pointer-events: none;
}

.mistakes li::after {
	inset: 3px -5px -2px 4px;
	border-width: 1.5px;
	opacity: 0.7;
	transform: rotate(-2deg);
}

.redpen-cat {
	position: absolute;
	right: 1.4rem;
	bottom: 0;
	width: 200px;
	height: auto;
}

/* 05 — дерево выбора подрядчика */
.choose-frame {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
	gap: 1.5rem;
	align-items: center;
}

.choose .block-title {
	margin: 0;
	font-size: clamp(2rem, 3.3vw, 3.2rem);
}

.tree {
	display: grid;
	grid-template-columns: 174px minmax(0, 1fr) 200px;
	align-items: start;
}

.tree-lines {
	display: block;
	width: 174px;
	height: 262px;
	margin-top: 20px;
}

.tree-list {
	display: grid;
	grid-auto-rows: 54px;
	row-gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tree-list li {
	display: flex;
	align-items: center;
	padding: 0.2rem 1rem;
	font-family: var(--font-mono);
	font-size: 1rem;
	line-height: 1.3;
	color: var(--text);
	background: var(--graphite);
	border: 1px solid var(--line-blue);
}

.tree-cat {
	display: block;
	width: 200px;
	height: auto;
	margin-top: 70px;
	margin-left: -6px;
}

/* ---------- Подвал ---------- */
.footer-col .footer-name {
	margin: 0 0 1rem;
	font-family: var(--font-mono);
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: 0.02em;
	color: var(--text);
}

/* ---------- Внутренние страницы ---------- */
.page-head {
	padding: 2.2rem 0 1.4rem;
}

.page-head h1 {
	margin: 0.3rem 0 0.5rem;
	padding-bottom: 0.6rem;
	font-size: clamp(2rem, 4vw, 3.2rem);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border-bottom: 2px solid var(--accent);
}

.single .page-head h1 {
	max-width: 24em;
	font-size: clamp(1.8rem, 3.4vw, 2.7rem);
	text-transform: none;
}

.breadcrumbs {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

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

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

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

.entry-meta a {
	color: var(--accent);
}

.site-main {
	overflow-x: clip;
	padding: 0.6rem 0 4rem;
}

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 3rem;
}

.layout-single .content-area {
	max-width: 860px;
}

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

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

/* Лист записи — вырезка на миллиметровке */
.sheet {
	position: relative;
	padding: 2.4rem 2.6rem 2.6rem;
	color: var(--ink);
	background: var(--card);
	box-shadow: var(--shadow);
}

.sheet::before {
	content: "";
	position: absolute;
	inset: 8px;
	border: 1px solid rgba(198, 162, 74, 0.6);
	pointer-events: none;
}

.entry-thumb {
	margin: 0 0 1.8rem;
}

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

.entry-content {
	overflow-wrap: break-word;
}

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

.entry-content a {
	color: var(--accent);
	text-decoration: underline double;
}

.entry-content h2 {
	margin-top: 1.6em;
	padding-bottom: 0.3rem;
	font-size: 1.9rem;
	border-bottom: 2px solid var(--accent);
}

.entry-content h3 {
	margin-top: 1.4em;
	font-size: 1.45rem;
}

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

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

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

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

.entry-content ul > li::before {
	content: "";
	position: absolute;
	left: -1.5em;
	top: 0.45em;
	width: 0.75em;
	height: 0.75em;
	border: 2px solid var(--ink);
	background: var(--lime);
}

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

.entry-content blockquote {
	margin: 1.6em 0;
	padding: 1rem 1.4rem;
	font-family: var(--font-mono);
	font-size: 0.98rem;
	background: rgba(221, 242, 71, 0.35);
	border-left: 4px solid var(--accent);
}

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

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

.entry-content td,
.entry-content th {
	padding: 0.55em 0.75em;
	text-align: left;
	border: 1px solid var(--grid);
}

.entry-content th {
	font-family: var(--font-mono);
	font-weight: 700;
	background: var(--paper);
}

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

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

.entry-content img {
	height: auto;
}

.entry-content code {
	padding: 0.1em 0.35em;
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--paper);
}

.entry-content pre {
	overflow-x: auto;
	padding: 1rem;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--on-dark);
	background: var(--graphite);
}

.entry-content pre code {
	padding: 0;
	background: none;
}

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

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	border-top: 1px solid var(--grid);
}

.entry-footer a {
	margin-left: 0.4em;
	color: var(--accent);
}

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.2rem;
	margin-top: 2.2rem;
}

.post-nav a {
	display: block;
	padding: 1rem 1.2rem;
	text-decoration: none;
	color: var(--ink);
	background: var(--card);
	border: 2px solid var(--ink);
}

.post-nav a:hover {
	color: var(--on-dark);
	background: var(--ink);
}

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

.post-nav small {
	display: block;
	margin-bottom: 0.3rem;
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--accent);
}

.post-nav strong {
	font-family: var(--font-head);
	font-size: 1.2rem;
	font-weight: 400;
	line-height: 1.25;
}

.pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 2.6rem;
}

.pager .page-numbers {
	display: inline-block;
	min-width: 2.6rem;
	padding: 0.45rem 0.7rem;
	font-family: var(--font-mono);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: var(--ink);
	background: var(--card);
	border: 2px solid var(--ink);
}

.pager a.page-numbers:hover {
	color: var(--on-dark);
	background: var(--ink);
}

.pager .page-numbers.current {
	color: var(--on-dark);
	background: var(--accent);
	border-color: var(--accent);
}

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

/* ---------- Сайдбар: тёмная вставка ---------- */
.sidebar {
	min-width: 0;
	padding: 1.6rem 1.5rem;
	color: var(--on-dark);
	background-color: var(--graphite);
	background-image:
		linear-gradient(rgba(242, 245, 247, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(242, 245, 247, 0.07) 1px, transparent 1px);
	background-size: 28px 28px;
}

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

.sidebar .widget-title {
	margin: 0 0 0.9rem;
	padding-bottom: 0.5rem;
	font-size: 1.5rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border-bottom: 2px solid var(--accent);
}

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

.sidebar li {
	padding: 0.55rem 0;
	font-size: 0.95rem;
	line-height: 1.4;
	border-bottom: 1px dashed rgba(242, 245, 247, 0.22);
}

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

.sidebar a:hover {
	color: var(--lime);
}

.sidebar .wp-block-latest-posts__post-date,
.sidebar .post-date {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--on-dark-2);
}

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

.comments-title,
.comment-reply-title {
	margin: 0 0 1rem;
	font-size: 1.7rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

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

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

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

.comment-head {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin-bottom: 0.4rem;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

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

.comment-wait {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--accent);
}

.comment-reply-link {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--accent);
}

.comment-respond {
	margin-top: 1.8rem;
	padding: 1.6rem;
	background: var(--card);
	border: 2px solid var(--ink);
}

.comment-form label {
	display: block;
	margin-bottom: 0.3rem;
	font-family: var(--font-mono);
	font-size: 0.85rem;
}

.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(--ink);
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 0;
}

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

.comment-form input[type="submit"],
.search-form button,
.cut-btn,
.cookie-banner button {
	display: inline-block;
	padding: 0.65em 1.4em;
	font-family: var(--font-head);
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--on-dark);
	background: var(--accent);
	border: 0;
	border-radius: 0;
	cursor: pointer;
}

.comment-form input[type="submit"]:hover,
.search-form button:hover,
.cut-btn:hover,
.cookie-banner button:hover {
	color: var(--on-dark);
	background: var(--ink);
}

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

.search-form {
	display: flex;
	gap: 0.6rem;
	margin: 0 0 2rem;
}

.search-form label {
	flex: 1;
}

/* ---------- 404 ---------- */
.lost {
	padding: 1rem 0 2rem;
}

.lost-code {
	margin: 0;
	font-family: var(--font-head);
	font-size: clamp(6rem, 18vw, 12rem);
	font-weight: 600;
	line-height: 0.9;
}

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

.lost p {
	font-family: var(--font-mono);
}

/* ---------- Подвал: махагон и латунная линия ---------- */
.site-footer {
	color: var(--on-dark);
	background: var(--mahogany);
	border-top: 2px solid var(--brass);
}

.footer-cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 3rem;
	padding: 2.8rem 0 2rem;
}

.footer-col {
	min-width: 0;
}

.footer-col:nth-child(2) {
	text-align: center;
}

.footer-col .widget-title {
	margin: 0 0 0.6rem;
	font-size: 1.6rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--brass);
}

.footer-col p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--on-dark-2);
}

.footer-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1rem;
	line-height: 2;
}

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

.footer-col p a {
	color: var(--brass);
	text-decoration: underline;
}

.footer-col a:hover,
.footer-col a:focus-visible {
	color: var(--brass-2);
	text-decoration: underline;
}

.copyright {
	margin: 0;
	padding: 1rem 0 1.8rem;
	font-size: 1rem;
	text-align: center;
	color: var(--on-dark-2);
	border-top: 1px solid var(--brass-3);
}

/* ---------- Cookie ---------- */
.cookie-banner[hidden] {
	display: none;
}

.cookie-banner {
	position: fixed;
	right: 1.2rem;
	bottom: 1.2rem;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: 560px;
	padding: 1rem 1.3rem;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--on-dark);
	background: var(--graphite);
	border-left: 4px solid var(--accent);
	box-shadow: var(--shadow);
}

.cookie-banner p {
	margin: 0;
}
/* ---------- Внутренние страницы: тёмные слои ---------- */
.page-head h1 {
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink);
	border-bottom: 1px solid var(--line);
}

.breadcrumbs,
.entry-meta {
	color: var(--muted);
}

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

.breadcrumbs .sep,
.entry-meta a {
	color: var(--brass-dark);
}

.sheet {
	background: var(--ivory-2);
	border: 1px solid var(--line);
	box-shadow: none;
}

.sheet::before {
	border: 0;
}

.entry-content {
	font-size: 1.12rem;
}

.entry-content a {
	color: var(--brass-dark);
	text-decoration: underline;
}

.entry-content h2 {
	font-size: 2.1rem;
	font-weight: 400;
	border-bottom: 1px solid var(--line);
}

.entry-content h3 {
	font-size: 1.6rem;
	font-weight: 400;
}

.entry-content ul > li::before {
	top: 0.6em;
	width: 0.45em;
	height: 0.45em;
	border: 0;
	background: var(--brass);
	transform: rotate(45deg);
}

.entry-content ol > li::marker {
	color: var(--brass-dark);
}

.entry-content blockquote {
	font-size: 1.15rem;
	font-style: italic;
	background: var(--plum-3);
	border-left: 3px solid var(--wine);
}

.entry-content th {
	background: var(--plum-3);
}

.entry-content td,
.entry-content th {
	border-color: var(--line);
}

.sidebar {
	color: var(--on-dark);
	background: var(--plum-2);
	background-image: none;
	border: 1px solid var(--frame);
}

.sidebar .widget-title {
	font-size: 1.5rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--chalk);
	border-bottom: 1px solid var(--wine);
}

.sidebar li {
	border-bottom: 1px solid rgba(74, 53, 64, 0.8);
}

.sidebar a {
	color: var(--on-dark);
}

.sidebar a:hover {
	color: var(--wine-light);
}

.post-nav a,
.pager .page-numbers {
	background: var(--ivory-2);
	border: 1px solid var(--line);
	box-shadow: none;
}

.post-nav strong {
	font-family: var(--font-head);
	font-size: 1.3rem;
	font-weight: 400;
	text-transform: uppercase;
}

.post-nav small {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--brass-dark);
}

.post-nav a:hover,
.pager a.page-numbers:hover {
	color: var(--chalk);
	background: var(--plum-3);
}

.pager .page-numbers.current {
	color: var(--chalk);
	background: var(--brass);
	border-color: var(--brass);
}

.comment-respond {
	background: var(--ivory-2);
	border: 1px solid var(--line);
}

.comment-body {
	background: var(--ivory-2);
	border-left-color: var(--brass);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"] {
	color: var(--chalk);
	background: var(--plum);
	border: 1px solid var(--frame);
}

.comment-form input[type="submit"],
.search-form button,
.cut-btn,
.cookie-banner button {
	letter-spacing: 0.08em;
	font-family: var(--font-head);
	text-transform: uppercase;
	color: var(--chalk);
	background: var(--wine);
	border: 1px solid rgba(242, 236, 225, 0.7);
	box-shadow: none;
}

.comment-form input[type="submit"]:hover,
.search-form button:hover,
.cut-btn:hover,
.cookie-banner button:hover {
	color: var(--chalk);
	background: var(--wine-2);
}

.lost-code {
	font-family: var(--font-head);
	font-weight: 400;
	color: var(--ink);
}

.lost-code span {
	color: var(--brass-dark);
}

/* Подвал */
.site-footer {
	padding-top: 1rem;
	color: var(--on-dark);
	background: var(--plum);
	border-top: 0;
}

.footer-col .footer-name {
	margin: 0 0 1rem;
	font-family: var(--font-mono);
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.35;
	color: var(--chalk);
}

.footer-col .footer-desc {
	max-width: 22rem;
	font-size: 1.15rem;
	line-height: 1.35;
	color: var(--on-dark);
}

.footer-col .widget-title {
	margin: 0 0 0.9rem;
	font-family: var(--font-head);
	font-size: 1.7rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--chalk);
}

.footer-col:nth-child(2) {
	text-align: left;
}



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

.footer-col li {
	margin: 0;
	padding: 0;
	line-height: 1.45;
}

.footer-col ul a {
	font-size: 1.1rem;
	text-decoration: none;
	color: var(--chalk);
}

.footer-col ul a:hover,
.footer-col ul a:focus-visible {
	color: var(--wine-light);
	text-decoration: underline;
}

.footer-col p {
	font-size: 1.15rem;
	line-height: 1.4;
	color: var(--on-dark);
}

.footer-col p a {
	color: var(--wine-light);
}

.copyright {
	font-size: 1.05rem;
	text-align: center;
	color: var(--muted);
	border-top: 1px solid var(--frame);
}

.cookie-banner {
	color: var(--on-dark);
	background: var(--plum-2);
	border: 1px solid var(--frame);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ---------- Подвал и внутренние страницы: схема ---------- */
.site-footer {
	background-color: var(--head);
	background-image:
		linear-gradient(#1A2733 1px, transparent 1px),
		linear-gradient(90deg, #1A2733 1px, transparent 1px);
	background-size: 40px 40px;
	border-top: 1px solid var(--frame);
}

.footer-col:nth-child(2) {
	text-align: left;
}

.footer-col .widget-title {
	font-family: var(--font-mono);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text);
}

.footer-col ul {
	font-family: var(--font-mono);
	font-size: 0.98rem;
	line-height: 1.9;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.footer-col p {
	font-family: var(--font-mono);
	font-size: 0.98rem;
	color: var(--text);
}

.footer-col p a {
	color: var(--text);
	text-decoration: underline 1px;
	text-underline-offset: 4px;
}

.footer-col a:hover,
.footer-col p a:hover {
	color: var(--yellow);
}

.copyright {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	text-align: left;
	color: var(--text);
	border-top: 1px solid var(--frame);
}

.page-head h1 {
	font-weight: 500;
	letter-spacing: 0.03em;
}

.sheet,
.sidebar,
.comment-respond,
.post-nav a,
.pager .page-numbers {
	background: var(--steel);
	border: 1px solid var(--frame);
}

.sheet {
	border-top: 3px solid var(--teal);
}

.pager .page-numbers.current {
	color: #0B141C;
	background: var(--yellow);
	border-color: var(--yellow);
}

.comment-form input[type="submit"],
.search-form button,
.cut-btn,
.cookie-banner button {
	font-family: var(--font-mono);
	text-transform: uppercase;
	color: #0B141C;
	background: var(--yellow);
	border: 2px solid var(--yellow);
}

.comment-form input[type="submit"]:hover,
.search-form button:hover,
.cut-btn:hover,
.cookie-banner button:hover {
	color: #0B141C;
	background: var(--yellow-2);
}

.entry-content blockquote {
	font-style: normal;
	background: #16242F;
	border-left-color: var(--teal);
}

.sidebar .widget-title {
	border-bottom-color: var(--teal);
}

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
	.choose-frame {
		grid-template-columns: minmax(0, 1fr);
	}
	.redpen-sheet {
		grid-template-columns: minmax(0, 1fr);
		padding-right: 14rem;
	}
	.path-line {
		--gap: 1.8rem;
	}
}

@media (max-width: 959px) {
	.header-row {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.brand-mark,
	.brand-logo {
		width: 80px;
	}
	.nav-toggle {
		display: inline-block;
	}
	.main-nav {
		grid-column: 1 / -1;
		justify-self: stretch;
	}
	.main-nav[data-open="false"] {
		display: none;
	}
	.main-nav ul {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3rem;
	}
	.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;
	}
	.footer-cols {
		grid-template-columns: minmax(0, 1fr);
	}
	.path-line {
		padding-top: 0;
		padding-bottom: 0;
	}
	.path-line::before,
	.path-cat,
	.path-return {
		display: none;
	}
	.steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1rem;
		counter-reset: step;
	}
	.steps li + li::before,
	.steps li + li::after {
		content: none;
	}
	.tree {
		grid-template-columns: minmax(0, 1fr);
	}
	.tree-lines,
	.tree-cat {
		display: none;
	}
	.tree-list {
		grid-auto-rows: auto;
		row-gap: 0.8rem;
	}
	.tree-list li {
		padding: 0.6rem 1rem;
	}
	/* Слои: подписи списком под рисунком */
	.layers-list {
		display: grid;
		gap: 0.5rem;
		margin-top: 1.2rem;
	}
	.layers-list li {
		position: static;
		padding-left: 1.2rem;
		font-size: 1.05rem;
		white-space: normal;
		transform: none;
		border-left: 2px solid var(--teal);
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}
	.shell {
		padding-left: 16px;
		padding-right: 16px;
	}
	.header-row {
		padding-top: 1.2rem;
		padding-bottom: 1.2rem;
	}
	.brand {
		gap: 0.8rem;
		align-items: flex-start;
	}
	.brand-mark,
	.brand-logo {
		width: 56px;
	}
	.brand-name {
		font-size: 1.1rem;
	}
	.brand-desc {
		font-size: 0.8rem;
	}
	.frame,
	.redpen-sheet {
		width: calc(100% - 32px);
	}
	.frame {
		padding: 1.6rem 1.1rem 1.8rem;
	}
	.block-title {
		font-size: 1.8rem;
		letter-spacing: 0.05em;
	}
	.steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.feed,
	.layout-with-sidebar .feed {
		grid-template-columns: minmax(0, 1fr);
	}
	.card {
		padding: 1.2rem 1.1rem;
	}
	.redpen-sheet {
		padding: 1.8rem 1.1rem 13rem;
	}
	.mistakes li {
		font-size: 1.7rem;
	}
	.redpen-cat {
		right: 50%;
		width: 170px;
		transform: translateX(50%);
	}
	.sheet {
		padding: 1.6rem 1.1rem 1.8rem;
	}
	.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;
		flex-direction: column;
		align-items: flex-start;
	}
}

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