/*
Theme Name: bookevery-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: bkv
*/
/* ---------- Шрифты (локально, OFL) ---------- */
@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/cormorant-garamond-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: "Cormorant Garamond";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/cormorant-garamond-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: "Cormorant Garamond";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/cormorant-garamond-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: "Cormorant Garamond";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/cormorant-garamond-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+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: "PT Serif";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/pt-serif-cyrillic-400-italic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "PT Serif";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/pt-serif-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: "PT Serif";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/pt-serif-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: "PT Serif";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/pt-serif-latin-400-italic.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: "PT Serif";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/pt-serif-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: "PT Serif";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/pt-serif-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ---------- Палитра (HEX из задания) ---------- */
:root {
	--bottle: #16211C;
	--bottle-2: #1B2822;
	--mahogany: #24170F;
	--mahogany-2: #2E1D13;
	--night: #191A16;
	--paper-0: #EFE4CE;
	--ink: #221A12;
	--muted: #7C6B54;
	--brass: #C6A24A;
	--brass-2: #E6CD84;
	--brass-3: #8A6A26;
	--morocco: #8C2B2B;
	--morocco-2: #6F1F1F;
	--fox: #B08A5A;
	--on-dark: #EFE4CE;
	--on-dark-2: #B9A98B;
	/* имена, которые используют шаблоны внутренних страниц */
	--accent: #8C2B2B;
	--card: #EFE4CE;
	--paper: #E5D7BA;
	--grid: #CDBB98;
	--graphite: #24170F;
	--lime: #C6A24A;
	--tape: rgba(198, 162, 74, 0.55);
	--shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
	--font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--font-body: "PT Serif", Georgia, "Times New Roman", serif;
	--font-mono: "PT Serif", Georgia, serif;
	--font-hand: "PT Serif", Georgia, serif;
}

/* ---------- База ---------- */
*,
*::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: 17px;
	line-height: 1.6;
	color: var(--on-dark);
	background-color: var(--bottle);
	/* еле заметная сетка книжных корешков */
	background-image:
		repeating-linear-gradient(90deg, rgba(198, 162, 74, 0.05) 0 1px, transparent 1px 26px, rgba(0, 0, 0, 0.12) 26px 27px, transparent 27px 44px),
		repeating-linear-gradient(180deg, transparent 0 239px, rgba(198, 162, 74, 0.06) 239px 241px);
}

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

a {
	color: var(--brass);
	text-underline-offset: 3px;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--brass);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.6em;
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.12;
}

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

.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 !important;
	top: 10px;
	left: 10px;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 0.6em 1em;
	clip: auto;
	color: var(--ink);
	background: var(--paper-0);
}

/* Полоса мраморной бумаги */
.marble-band {
	height: 24px;
	background: #7A3A26 url("images/marble-band.jpg") repeat-x left center / auto 100%;
	border-top: 1px solid var(--brass-3);
	border-bottom: 1px solid var(--brass-3);
}

/* ---------- Шапка ---------- */
.site-header {
	padding: 10px 0;
	background: var(--bottle);
	border-top: 1px solid var(--brass);
	border-bottom: 1px solid var(--brass);
	box-shadow: inset 0 4px 0 var(--bottle), inset 0 5px 0 var(--brass), inset 0 -4px 0 var(--bottle), inset 0 -5px 0 var(--brass);
}

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

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

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

.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-head);
	font-size: clamp(2rem, 3.6vw, 3.1rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.brand-desc {
	max-width: 34em;
	margin-top: 0.55rem;
	font-size: 0.82rem;
	line-height: 1.45;
	letter-spacing: 0.06em;
	color: var(--on-dark-2);
}

.nav-toggle {
	display: none;
	justify-self: end;
	padding: 0.45em 1.1em;
	font-family: var(--font-head);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--brass);
	background: transparent;
	border: 1px solid var(--brass);
	cursor: pointer;
}

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

.main-nav ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-nav li + li::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 0.9rem;
	vertical-align: middle;
	background: var(--brass);
	border-radius: 50%;
}

.main-nav a {
	font-family: var(--font-head);
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--brass);
}

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

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a {
	color: var(--paper-0);
	text-decoration: underline;
	text-decoration-color: var(--brass);
	text-underline-offset: 6px;
}

/* Латунная пластина с девизом */
.motto {
	justify-self: end;
	margin: 0;
	padding: 0.55rem 2rem;
	font-style: italic;
	font-size: 1.12rem;
	color: #2A1E0E;
	background: linear-gradient(180deg, #E9D489 0%, #C6A24A 45%, #A9862F 70%, #D9BE6C 100%);
	border: 1px solid #6E5420;
	box-shadow: inset 0 0 0 3px rgba(255, 244, 200, 0.35), 0 2px 0 rgba(0, 0, 0, 0.4);
	clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

/* ---------- Заголовки секций ---------- */
.sec-title {
	margin: 0 0 2rem;
	font-size: clamp(2rem, 4vw, 3.6rem);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--brass);
}

.more-link {
	font-family: var(--font-head);
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--brass);
}

/* Кнопка: узкий прямоугольник марокена с латунной рамкой внутри */
.btn-morocco,
.cut-btn {
	display: inline-block;
	padding: 0.5em 1.5em;
	font-family: var(--font-head);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--paper-0);
	background: var(--morocco);
	box-shadow: inset 0 0 0 3px var(--morocco), inset 0 0 0 4px var(--brass);
	transition: background 0.15s ease;
}

.btn-morocco:hover,
.cut-btn:hover {
	color: var(--paper-0);
	background: var(--morocco-2);
	box-shadow: inset 0 0 0 3px var(--morocco-2), inset 0 0 0 4px var(--brass-2);
}

/* ---------- Главная ---------- */
.front {
	overflow-x: clip;
}

.front > section {
	padding: 3.4rem 0 3.6rem;
}

/* Бумага с фоксингами */
.anatomy {
	color: var(--ink);
	background-color: var(--paper-0);
	background-image:
		radial-gradient(circle at 8% 14%, rgba(176, 138, 90, 0.35) 0 4px, transparent 10px),
		radial-gradient(circle at 92% 9%, rgba(176, 138, 90, 0.3) 0 6px, transparent 16px),
		radial-gradient(circle at 87% 62%, rgba(176, 138, 90, 0.25) 0 3px, transparent 9px),
		radial-gradient(circle at 4% 78%, rgba(176, 138, 90, 0.28) 0 5px, transparent 13px),
		radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(176, 138, 90, 0.22) 100%);
}

.anatomy .sec-title {
	font-size: clamp(2.2rem, 5vw, 4.4rem);
	font-weight: 500;
	color: var(--ink);
}

.anatomy-grid {
	display: grid;
	grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
	align-items: center;
	gap: 2.4rem;
}

.anatomy-plate {
	position: relative;
	margin: 0;
	padding-right: 22%;
}

.anatomy-plate img {
	display: block;
	width: 100%;
	mix-blend-mode: multiply;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 100%), linear-gradient(180deg, transparent, #000 5%, #000 95%, transparent);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(90deg, transparent, #000 4%, #000 100%), linear-gradient(180deg, transparent, #000 5%, #000 95%, transparent);
	mask-composite: intersect;
}

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

.callout {
	position: absolute;
	right: 0;
	width: 21.5%;
	font-size: 1.08rem;
	line-height: 1.25;
	transform: translateY(-50%);
}

.callout--cover {
	top: 9%;
}

.callout--spine {
	top: 29%;
}

.callout--endpaper {
	top: 50%;
}

.callout--foxing {
	top: 70%;
}

.callout--notes {
	top: 88%;
}

.parts {
	display: grid;
	gap: 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.parts h3 {
	margin: 0 0 0.35rem;
	font-size: 1.75rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ink);
}

.parts h3 span {
	margin-right: 0.3em;
	color: var(--muted);
}

.parts p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #4A3C2C;
}

/* Цепочка провенанса */
.provenance {
	background: var(--bottle);
}

.prov-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 640px) minmax(0, 1fr);
	align-items: end;
	gap: 2.4rem;
}

.ledger {
	position: relative;
	grid-column: 2;
	padding: 1.6rem 2rem 1.8rem 5.2rem;
	color: var(--ink);
	background: var(--paper-0);
	box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}

.chain {
	position: absolute;
	top: -12px;
	bottom: -12px;
	left: 14px;
	width: 26px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='44' viewBox='0 0 26 44'%3E%3Crect x='5' y='1' width='16' height='26' rx='8' fill='none' stroke='%237A5A1E' stroke-width='5'/%3E%3Crect x='5' y='1' width='16' height='26' rx='8' fill='none' stroke='%23D9B85E' stroke-width='3'/%3E%3Crect x='10' y='22' width='6' height='22' rx='3' fill='%23B48E3A' stroke='%237A5A1E' stroke-width='1.2'/%3E%3C/svg%3E") repeat-y center top / 26px 44px;
	filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35));
}

.ledger-cap {
	margin: 0 0 0.6rem;
	font-size: 0.88rem;
	font-style: italic;
	color: var(--muted);
}

.ledger ol {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ledger ol::before {
	content: "";
	position: absolute;
	top: 1rem;
	bottom: 1rem;
	left: 5.05rem;
	width: 2px;
	background: var(--ink);
}

.ledger li {
	display: grid;
	grid-template-columns: 4rem minmax(0, 1fr);
	align-items: center;
	gap: 2.2rem;
	padding: 0.55rem 0;
	font-size: 1.3rem;
	border-bottom: 1px solid #CDBFA2;
}

.ledger li b {
	font-weight: 400;
	text-align: right;
}

.ledger li > span {
	position: relative;
}

.ledger li > span::before {
	content: "";
	position: absolute;
	left: -1.6rem;
	top: 50%;
	width: 9px;
	height: 9px;
	margin-top: -4px;
	background: var(--ink);
	border-radius: 50%;
}

.tick {
	width: 30px;
	height: 26px;
	margin-left: 0.5rem;
	vertical-align: -3px;
}

.tick path {
	fill: none;
	stroke: var(--morocco);
	stroke-width: 3.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.prov-note {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.45;
	color: var(--brass-2);
}

/* Последние записи: карточки с латунным зажимом */
.front > .latest {
	background: var(--night);
	padding-top: 4rem;
}

.latest-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2.8fr);
	gap: 2.4rem;
}

.latest-head .sec-title {
	margin-bottom: 1rem;
	font-size: clamp(2rem, 3vw, 2.9rem);
	letter-spacing: 0.04em;
	text-align: left;
}

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

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.4rem 1.1rem 1.3rem;
	color: var(--ink);
	text-align: center;
	background: var(--paper-0);
	background-image: radial-gradient(ellipse at 50% 40%, transparent 60%, rgba(176, 138, 90, 0.18) 100%);
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}

.feed .card:nth-child(3n + 1) {
	transform: rotate(-1.2deg);
}

.feed .card:nth-child(3n + 2) {
	transform: rotate(0.8deg);
}

.feed .card:nth-child(3n) {
	transform: rotate(-0.6deg);
}

.feed .card:hover {
	transform: rotate(0) translateY(-3px);
}

.clip {
	position: absolute;
	top: -26px;
	left: 50%;
	width: 44px;
	height: 44px;
	margin-left: -22px;
	background: url("images/clip.png") center / 100% 100% no-repeat;
	clip-path: inset(0 0 26% 0);
}

.card-thumb {
	display: block;
	aspect-ratio: 48 / 22;
	overflow: hidden;
	background: var(--paper);
	outline: 1px solid rgba(124, 107, 84, 0.4);
}

.card-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: sepia(0.35);
}

.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding-top: 1rem;
}

.card-title {
	margin: 0 0 0.4rem;
	font-size: 1.55rem;
	font-weight: 600;
	line-height: 1.15;
}

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

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

.card-excerpt {
	font-size: 0.92rem;
	line-height: 1.45;
	color: #4A3C2C;
}

.card-excerpt p {
	margin: 0 0 0.5em;
}

.card-foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.7rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

.card-date {
	font-size: 0.9rem;
	color: var(--muted);
}

.feed-empty {
	color: var(--on-dark-2);
}

/* Паспорт хранения: махагон */
.storage {
	background-color: var(--mahogany);
	background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 7px, rgba(0, 0, 0, 0.08) 7px 9px, transparent 9px 15px);
}

.storage-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr) minmax(0, 1fr);
	align-items: start;
	gap: 2.6rem;
}

.storage .sec-title {
	margin: 0;
	font-size: clamp(2rem, 3vw, 2.9rem);
	letter-spacing: 0.04em;
	text-align: left;
}

.dials {
	display: flex;
	justify-content: space-around;
	gap: 1rem;
	margin: 0 0 1.6rem;
	padding: 0;
	list-style: none;
}

.dials li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.dial {
	position: relative;
	display: grid;
	place-items: center;
	width: 118px;
	height: 118px;
	border-radius: 50%;
	background:
		repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.08) 0 2deg, rgba(0, 0, 0, 0.05) 2deg 4deg),
		radial-gradient(circle at 38% 32%, #F4E2A2 0%, #D6B45D 35%, #A9862F 70%, #6E5420 100%);
	box-shadow: 0 0 0 3px #5A431A, 0 0 0 5px #C6A24A, 0 6px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 8px rgba(110, 84, 32, 0.35);
}

/* дуга-шкала и стрелка показывают значение */
.dial::before {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: 50%;
	background: conic-gradient(from 225deg, rgba(140, 43, 43, 0.75) 0 calc(var(--v) * 270deg), transparent 0);
	-webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 66%, transparent 67%);
	mask: radial-gradient(circle, transparent 60%, #000 61%, #000 66%, transparent 67%);
}

.dial b {
	position: relative;
	font-family: var(--font-head);
	font-size: 1.75rem;
	font-weight: 600;
	color: #2A1E0E;
	text-shadow: 0 1px 0 rgba(255, 240, 190, 0.6);
}

.dial-label {
	font-size: 1.05rem;
	color: var(--on-dark);
}

.rules {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
	border-top: 1px solid var(--brass);
	border-bottom: 1px solid var(--brass);
}

.rules div {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 0.35em;
	padding: 0.65rem 0.6rem;
	font-size: 1.02rem;
	text-align: center;
}

.rules div + div {
	border-left: 1px solid var(--brass);
}

.rules dt::after {
	content: " —";
}

.rules dd {
	margin: 0;
}

.storage-note {
	margin: 0;
	font-family: var(--font-head);
	font-size: 1.9rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--brass-2);
}

/* Соседние полки кабинета: каталожные ящики */
.front > .shelves {
	padding: 2.4rem 0 0;
	background-color: #1E130D;
	background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 3px, transparent 3px 11px);
	border-top: 6px solid #120B07;
	border-bottom: 2px solid var(--brass);
}

.shelves .sec-title {
	margin-bottom: 1.6rem;
}

.drawers {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 14px 14px;
	list-style: none;
	background: #120B07;
}

.drawer {
	position: relative;
	aspect-ratio: 560 / 426;
	background: url("images/drawer.jpg") center / cover no-repeat;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.drawer-label {
	position: absolute;
	left: 16.4%;
	top: 15.5%;
	width: 67.1%;
	height: 25.8%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.3em;
	font-family: var(--font-head);
	font-size: clamp(0.8rem, 1.45vw, 1.45rem);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
	color: var(--ink);
	background: linear-gradient(180deg, #F3E9D3, #E4D4B2);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ---------- Внутренние страницы ---------- */
.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: 600;
	letter-spacing: 0.05em;
	color: var(--brass);
	border-bottom: 1px solid var(--brass);
	box-shadow: 0 4px 0 -3px var(--brass);
}

.single .page-head h1 {
	color: var(--paper-0);
}

.breadcrumbs,
.entry-meta {
	color: var(--on-dark-2);
}

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

.breadcrumbs .sep {
	color: var(--brass);
}

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

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

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

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

.entry-content a {
	text-decoration: underline;
}

.entry-content blockquote {
	font-style: italic;
	background: rgba(176, 138, 90, 0.18);
	border-left-color: var(--brass);
}

.sidebar {
	background-color: var(--mahogany);
	background-image: none;
	border: 1px solid var(--brass-3);
	box-shadow: inset 0 0 0 4px var(--mahogany), inset 0 0 0 5px rgba(198, 162, 74, 0.45);
}

.sidebar .widget-title {
	font-size: 1.6rem;
	color: var(--brass);
	border-bottom: 1px solid var(--brass);
}

.sidebar li {
	border-bottom: 1px dashed rgba(198, 162, 74, 0.3);
}

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

.post-nav a {
	border: 1px solid var(--brass);
}

.post-nav a:hover {
	color: var(--paper-0);
	background: var(--mahogany);
}

.post-nav strong {
	font-weight: 600;
	font-size: 1.35rem;
}

.pager .page-numbers {
	border: 1px solid var(--brass);
}

.pager a.page-numbers:hover {
	background: var(--mahogany);
}

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

.comments-title,
.comment-reply-title {
	color: var(--brass);
}

.comment-respond {
	color: var(--ink);
	border: 1px solid var(--brass);
}

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"] {
	background: #FBF6EA;
	border: 1px solid var(--brass-3);
}

.comment-form input[type="submit"],
.search-form button,
.cookie-banner button {
	font-weight: 600;
	color: var(--paper-0);
	background: var(--morocco);
	box-shadow: inset 0 0 0 3px var(--morocco), inset 0 0 0 4px var(--brass);
}

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

.lost-code {
	font-weight: 500;
	color: var(--brass);
}

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

.cookie-banner {
	background: var(--mahogany);
	border: 1px solid var(--brass);
	border-left-width: 4px;
}

.layout-with-sidebar .feed {
	gap: 3rem 2rem;
	padding-top: 1rem;
}

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

	.parts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.6rem;
	}

	.prov-grid {
		grid-template-columns: minmax(0, 640px);
		justify-content: center;
		align-items: start;
	}

	.ledger,
	.prov-note {
		grid-column: 1;
	}

	.latest-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.2rem;
	}

	.latest-head {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: space-between;
		gap: 0 2rem;
	}

	.storage-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.8rem;
	}

	.storage .sec-title {
		text-align: center;
	}

	.storage-note {
		text-align: center;
	}
}

@media (max-width: 959px) {
	.header-row {
		grid-template-columns: minmax(0, 1fr);
	}

	.brand {
		grid-row: auto;
	}

	.nav-toggle {
		display: inline-block;
		justify-self: start;
	}

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

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

	.main-nav ul {
		flex-direction: column;
		align-items: flex-start;
	}

	.main-nav li + li::before {
		display: none;
	}

	.main-nav li {
		padding: 0.35rem 0;
	}

	.motto {
		justify-self: start;
	}

	.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);
	}

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

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

	.drawer-label {
		font-size: clamp(0.72rem, 2.4vw, 1.2rem);
	}

	/* Гравюра: подписи уходят в нумерованный список под рисунком */
	.anatomy-plate {
		padding-right: 0;
	}

	.callouts {
		display: flex;
		flex-wrap: wrap;
		gap: 0.2rem 1.6rem;
		margin-top: 1rem;
		counter-reset: co;
	}

	.callout {
		position: static;
		width: auto;
		transform: none;
		font-size: 1rem;
	}

	.callout::before {
		content: "— ";
		color: var(--morocco);
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}

	.shell {
		padding-left: 16px;
		padding-right: 16px;
	}

	.brand {
		gap: 0.8rem;
		align-items: flex-start;
	}

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

	.brand-name {
		font-size: 1.75rem;
	}

	.brand-desc {
		font-size: 0.78rem;
		letter-spacing: 0.02em;
	}

	.motto {
		padding: 0.45rem 1.2rem;
		font-size: 0.98rem;
	}

	.sec-title {
		font-size: 1.9rem;
	}

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

	.ledger {
		padding: 1.2rem 1rem 1.3rem 3.4rem;
	}

	.chain {
		left: 8px;
		width: 20px;
		background-size: 20px 34px;
	}

	.ledger ol::before {
		left: 3.6rem;
	}

	.ledger li {
		grid-template-columns: 2.8rem minmax(0, 1fr);
		gap: 1.6rem;
		font-size: 1.02rem;
		line-height: 1.3;
	}

	.ledger li > span::before {
		left: -1.15rem;
	}

	.tick {
		width: 22px;
		height: 19px;
	}

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

	.dials {
		gap: 0.6rem;
	}

	.dial {
		width: 88px;
		height: 88px;
	}

	.dial b {
		font-size: 1.3rem;
	}

	.dial-label {
		font-size: 0.92rem;
	}

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

	.rules div + div {
		border-left: 0;
		border-top: 1px solid var(--brass);
	}

	.storage-note {
		font-size: 1.5rem;
	}

	.drawers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
		padding: 10px;
	}

	.drawer-label {
		font-size: 0.78rem;
	}

	.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;
	}
}
