/*
Theme Name: dds_technikaokienna.com
Theme URI: https://technikaokienna.com/
Author: Алексей Ковалёв
Description: Тема информационного портала-гида по выбору оконных и дверных конструкций: тёмный чертёжный лист с миллиметровой сеткой, кислотно-жёлтые и голубые акценты, справочные блоки главной.
Version: 1.1
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: tkokno
*/

/* ---------- Токены ---------- */
:root {
	--ink: #1B1F24;
	--ink-2: #23282E;
	--ink-3: #2A3037;
	--sheet: #1F242A;
	--side: #262C33;
	--night: #121417;
	--grid: #2E343B;
	--line: #4A525C;
	--kalka: #EDE9E1;
	--kalka-card: #F6F3EC;
	--kalka-grid: #DCD6CA;
	--acid: #E8FF3A;
	--cyan: #7FD1E8;
	--paper: #F2F0EB;
	--muted: #9AA3AD;
	--date: #8A939D;
	--ink-text: #1B1F24;
	--ink-muted: #4F5761;
	--f-head: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--f-text: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
	--f-mono: "IBM Plex Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
	--grid-bg:
		linear-gradient(rgba(46, 52, 59, .75) 1px, transparent 1px),
		linear-gradient(90deg, rgba(46, 52, 59, .75) 1px, transparent 1px),
		linear-gradient(rgba(46, 52, 59, .32) 1px, transparent 1px),
		linear-gradient(90deg, rgba(46, 52, 59, .32) 1px, transparent 1px);
	--grid-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

/* ---------- Скрытие через [hidden] (до основных блоков) ---------- */
.cookie-banner[hidden] { display: none !important; }
.head-nav[hidden] { display: none !important; }

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

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

body {
	margin: 0;
	overflow-x: hidden;
	background-color: var(--ink);
	background-image: var(--grid-bg);
	background-size: var(--grid-size);
	color: var(--paper);
	font-family: var(--f-text);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--cyan); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--acid); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 2px solid var(--acid);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-head);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: .02em;
	margin: 0 0 .6em;
	overflow-wrap: break-word;
	hyphens: manual;
}

p { margin: 0 0 1.1em; }

p, li, dd, td, th, .card-title, .card-excerpt, .widget { overflow-wrap: break-word; hyphens: auto; }

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	background: var(--acid);
	color: var(--ink);
	padding: .6rem 1rem;
	font-family: var(--f-mono);
	text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* единственный контейнер ширины */
.shell { width: min(92%, 1280px); margin-inline: auto; }

/* ---------- Кнопки ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	padding: .75rem 1.3rem;
	border: 1px solid var(--acid);
	border-radius: 0;
	background: transparent;
	color: var(--paper);
	font-family: var(--f-mono);
	font-size: .78rem;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--acid); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--cyan); }
.btn--fill { background: var(--acid); color: var(--ink); }
.btn--fill:hover { background: var(--paper); border-color: var(--paper); }
.btn--ink { border-color: var(--ink); color: var(--ink); }
.btn--ink:hover { background: var(--ink); color: var(--acid); box-shadow: 2px 2px 0 var(--acid); }

/* ---------- Шапка ---------- */
.site-head {
	background: var(--night);
	border-bottom: 1px solid var(--line);
	position: relative;
}
.head-top {
	display: flex;
	align-items: center;
	gap: 1.6rem;
	padding: 1.8rem 0 1.4rem;
}
.brand-mark {
	flex: 0 0 auto;
	display: block;
	width: 104px;
	height: 104px;
	padding: 8px;
	border: 1px solid var(--line);
	position: relative;
}
.brand-mark::before, .brand-mark::after {
	content: "";
	position: absolute;
	width: 10px; height: 10px;
	border-color: var(--acid);
	border-style: solid;
}
.brand-mark::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.brand-mark::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.brand-mark svg, .brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-text { min-width: 0; }
.brand-name {
	display: block;
	margin: 0 0 .5rem;
	max-width: 44ch;
	font-family: var(--f-head);
	font-size: clamp(1.15rem, 2.2vw, 1.85rem);
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: .03em;
	color: var(--paper);
	text-decoration: none;
}
a.brand-name:hover { color: var(--acid); }
.brand-desc {
	margin: 0;
	max-width: 80ch;
	font-family: var(--f-mono);
	font-size: .78rem;
	line-height: 1.55;
	color: var(--muted);
}

.head-navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-top: 1px solid var(--line);
}
.nav-toggle {
	display: none;
	align-items: center;
	gap: .6rem;
	margin: .7rem 0;
	padding: .55rem .9rem;
	background: transparent;
	color: var(--paper);
	border: 1px solid var(--line);
	border-radius: 0;
	font-family: var(--f-mono);
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 18px; height: 2px; background: var(--acid); }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--acid); }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.head-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.head-menu a {
	position: relative;
	display: block;
	padding: 1rem 0;
	color: var(--paper);
	font-family: var(--f-text);
	font-size: 1.02rem;
	text-decoration: none;
}
.head-menu a::after {
	content: "";
	position: absolute;
	left: 0; right: 100%;
	bottom: -1px;
	height: 4px;
	background: var(--acid);
	transition: right .2s;
}
.head-menu a:hover { color: var(--acid); }
.head-menu a:hover::after { right: 0; }
.head-menu .current-menu-item > a,
.head-menu .current_page_item > a,
.head-menu .current-menu-ancestor > a { color: var(--acid); }
.head-menu .current-menu-item > a::after,
.head-menu .current_page_item > a::after,
.head-menu .current-menu-ancestor > a::after { right: 0; }
.head-scale {
	font-family: var(--f-mono);
	font-size: .7rem;
	letter-spacing: .14em;
	color: var(--date);
	white-space: nowrap;
}

/* ---------- Подписи-штампы ---------- */
.sheet-label {
	display: flex;
	align-items: center;
	gap: .9rem;
	margin: 0 0 1.1rem;
	font-family: var(--f-mono);
	font-size: .72rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
}
.sheet-label b {
	font-weight: 500;
	color: var(--ink);
	background: var(--acid);
	padding: .15rem .5rem;
}
.sheet-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.band-title {
	margin: 0 0 .9rem;
	font-size: clamp(2rem, 4.6vw, 4rem);
	letter-spacing: .03em;
	color: var(--paper);
}
.band-lead {
	max-width: 62ch;
	margin: 0 0 2.2rem;
	color: var(--muted);
	font-size: 1.02rem;
}

/* ---------- Полосы главной ---------- */
.fs-band {
	position: relative;
	padding: 4.5rem 0;
	border-bottom: 1px solid var(--line);
}
.fs-band--dark { background-color: var(--ink); background-image: var(--grid-bg); background-size: var(--grid-size); }
.fs-band--alt { background-color: var(--ink-2); background-image: var(--grid-bg); background-size: var(--grid-size); }
.fs-band--kalka {
	background-color: var(--kalka);
	background-image:
		linear-gradient(rgba(180, 172, 156, .32) 1px, transparent 1px),
		linear-gradient(90deg, rgba(180, 172, 156, .32) 1px, transparent 1px);
	background-size: 20px 20px;
	color: var(--ink-text);
}
.fs-band--kalka .band-title { color: var(--ink-text); }
.fs-band--kalka .band-lead { color: var(--ink-muted); }
.fs-band--kalka .sheet-label { color: var(--ink-muted); }
.fs-band--kalka .sheet-label b { background: var(--ink); color: var(--acid); }
.fs-band--kalka .sheet-label::after { background: #B9B2A4; }

/* узкий холст главной — 85% */
.fs-wrap { width: 85%; margin-inline: auto; }

/* штамп листа в углу секции */
.sheet-stamp {
	position: absolute;
	right: 4%;
	bottom: 1rem;
	display: flex;
	font-family: var(--f-mono);
	font-size: .62rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--date);
	border: 1px solid var(--line);
}
.sheet-stamp span { padding: .2rem .55rem; }
.sheet-stamp span + span { border-left: 1px solid var(--line); }
.fs-band--kalka .sheet-stamp { color: var(--ink-muted); border-color: #B9B2A4; }
.fs-band--kalka .sheet-stamp span + span { border-color: #B9B2A4; }

/* ---------- Блок 1: разрез окна ---------- */
.anatomy-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: center;
}
.anatomy-figure { margin: 0; padding: 0 8.2rem; min-width: 0; }
.anatomy-canvas { position: relative; }
.anatomy-canvas img { display: block; width: 100%; height: auto; aspect-ratio: 354 / 523; }
.callout {
	position: absolute;
	display: flex;
	align-items: center;
	gap: .45rem;
	transform: translateY(-50%);
	font-family: var(--f-mono);
	font-size: .74rem;
	letter-spacing: .06em;
	color: var(--paper);
	white-space: nowrap;
}
.callout--l { right: calc(100% + .35rem); flex-direction: row-reverse; text-align: right; }
.callout--r { left: calc(100% + .35rem); }
.callout-num {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 22px; height: 22px;
	border: 1px solid var(--acid);
	background: var(--ink);
	color: var(--acid);
	font-size: .7rem;
}
.callout-text { border-bottom: 1px solid var(--cyan); padding-bottom: 2px; }

.chamber-scale { position: relative; padding-left: 2.2rem; min-width: 0; }
.chamber-scale::before {
	content: "";
	position: absolute;
	left: .5rem; top: .6rem; bottom: .6rem;
	width: 1px;
	background: var(--cyan);
}
.chamber-scale ol { margin: 0; padding: 0; list-style: none; }
.chamber-scale li { position: relative; padding: 1.1rem 0 1.3rem; border-bottom: 1px dashed var(--line); }
.chamber-scale li:last-child { border-bottom: 0; }
.chamber-scale li::before {
	content: "";
	position: absolute;
	left: -2.2rem; top: 1.85rem;
	width: 1.35rem; height: 1px;
	background: var(--cyan);
}
.chamber-scale li::after {
	content: "";
	position: absolute;
	left: calc(-1.7rem - 4px); top: calc(1.85rem - 4px);
	width: 9px; height: 9px;
	background: var(--acid);
}
.chamber-count {
	display: block;
	font-family: var(--f-head);
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	font-weight: 500;
	letter-spacing: .04em;
	line-height: 1.1;
	color: var(--paper);
}
.chamber-count small { font-size: .5em; letter-spacing: .14em; color: var(--cyan); text-transform: uppercase; margin-left: .3rem; }
.chamber-note { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }

.anatomy-legend {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0;
	margin: 3rem 0 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--line);
}
.anatomy-legend li { padding: 1.1rem 1.1rem 1.2rem; border-right: 1px solid var(--line); min-width: 0; }
.anatomy-legend li:last-child { border-right: 0; }
.anatomy-legend b {
	display: flex; align-items: center; gap: .5rem;
	margin-bottom: .45rem;
	font-family: var(--f-head);
	font-size: 1.12rem;
	font-weight: 500;
	letter-spacing: .04em;
	color: var(--paper);
}
.anatomy-legend b span { color: var(--acid); font-family: var(--f-mono); font-size: .75rem; }
.anatomy-legend p { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--muted); }

/* ---------- Блок 2: материалы ---------- */
.matrix-grid {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 2.3fr);
	gap: 3rem;
	align-items: start;
}
.matrix-side { min-width: 0; }
.matrix-side .band-title { font-size: clamp(1.9rem, 2.9vw, 2.7rem); }
.matrix-side p { color: var(--muted); }
.stamp-free {
	display: inline-block;
	margin-top: .6rem;
	padding: .7rem 1rem;
	border: 1px solid var(--acid);
	color: var(--acid);
	font-family: var(--f-mono);
	font-size: .74rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	transform: rotate(-2deg);
}
.matrix-scroll { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix-table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	border: 1px solid var(--cyan);
	background: rgba(18, 20, 23, .45);
}
.matrix-table th, .matrix-table td {
	border: 1px solid rgba(127, 209, 232, .55);
	padding: .9rem 1rem;
	text-align: left;
	vertical-align: middle;
}
.matrix-table thead th {
	font-family: var(--f-mono);
	font-size: .74rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cyan);
	background: rgba(127, 209, 232, .06);
}
.matrix-table tbody th {
	font-family: var(--f-head);
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: .03em;
	color: var(--acid);
	white-space: nowrap;
}
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { display: block; width: 10px; height: 10px; border: 1px solid var(--line); }
.dots i.on { background: var(--acid); border-color: var(--acid); }
.dot-word {
	display: block;
	margin-top: .35rem;
	font-family: var(--f-mono);
	font-size: .74rem;
	color: var(--muted);
}
.matrix-note {
	margin: 1rem 0 0;
	font-family: var(--f-mono);
	font-size: .74rem;
	line-height: 1.6;
	color: var(--date);
}

/* ---------- Последние записи ---------- */
.latest-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}
.latest-head .band-title { margin: 0; }
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.6rem;
}
.card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.empty-note {
	padding: 1.6rem 1.8rem;
	border: 1px dashed var(--line);
	font-family: var(--f-mono);
	font-size: .9rem;
	color: var(--muted);
}
.fs-band--kalka .empty-note { border-color: #9E978A; color: var(--ink-muted); }

/* ---------- Карточка записи ---------- */
.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--kalka-card);
	border: 1px solid var(--ink);
	color: var(--ink-text);
	transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--acid), 4px 4px 0 var(--ink); }
.card-thumb {
	display: block;
	border-bottom: 1px solid var(--ink);
	background: #E7E2D7;
	overflow: hidden;
}
.card-thumb img, .card-thumb svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.card-thumb img { filter: grayscale(.25) contrast(1.02); transition: filter .2s; }
.card:hover .card-thumb img { filter: none; }
.card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.2rem 1.25rem 1.3rem;
}
.card-cat {
	margin: 0 0 .5rem;
	font-family: var(--f-mono);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-muted);
}
.card-title {
	margin: 0 0 .6rem;
	font-family: var(--f-head);
	font-size: 1.3rem;
	font-weight: 500;
	line-height: 1.22;
	letter-spacing: .02em;
}
.card-title a { color: var(--ink-text); text-decoration: none; }
.card-title a:hover { color: var(--ink-text); text-decoration: underline; text-decoration-color: var(--ink); }
.card-excerpt { flex: 1; font-size: .92rem; line-height: 1.6; color: #3A4048; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: #1E6F87; }
.card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .8rem;
	flex-wrap: wrap;
	margin-top: 1rem;
	padding-top: .9rem;
	border-top: 1px dashed #B9B2A4;
}
.card-date { font-family: var(--f-mono); font-size: .74rem; color: #6B727B; }
.card-more {
	position: relative;
	font-family: var(--f-mono);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-text);
	text-decoration: none;
	padding-bottom: 4px;
}
.card-more::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 4px;
	background: var(--acid);
	box-shadow: 0 0 0 1px var(--ink);
	transition: height .15s;
}
.card-more:hover { color: var(--ink-text); }
.card-more:hover::after { height: 100%; z-index: -1; }
.card-more { z-index: 0; }

/* ---------- Блок 3: чек-лист ---------- */
.check-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 3.5rem;
	align-items: center;
}
.check-list { margin: 0; padding: 0; list-style: none; counter-reset: none; min-width: 0; }
.check-list li {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: start;
	padding: 1rem 0;
	border-bottom: 1px solid var(--line);
}
.check-list li:first-child { border-top: 1px solid var(--line); }
.check-box {
	display: grid;
	place-items: center;
	width: 28px; height: 28px;
	border: 1px solid var(--line);
	background: var(--night);
}
.check-box svg { width: 22px; height: 22px; display: block; }
.check-title {
	display: block;
	font-family: var(--f-head);
	font-size: 1.28rem;
	font-weight: 500;
	letter-spacing: .03em;
	line-height: 1.25;
	color: var(--paper);
}
.check-hint { display: block; margin-top: .2rem; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.check-zone {
	font-family: var(--f-mono);
	font-size: .7rem;
	letter-spacing: .1em;
	color: var(--cyan);
	border: 1px solid rgba(127, 209, 232, .5);
	padding: .15rem .45rem;
	white-space: nowrap;
}
.check-figure { margin: 0; min-width: 0; }
.check-canvas { position: relative; }
.check-canvas img { display: block; width: 100%; height: auto; aspect-ratio: 264 / 299; }
.zone-pin {
	position: absolute;
	display: grid;
	place-items: center;
	width: 30px; height: 30px;
	transform: translate(-50%, -50%);
	background: var(--acid);
	color: var(--ink);
	font-family: var(--f-mono);
	font-size: .8rem;
	font-weight: 500;
	box-shadow: 0 0 0 4px rgba(27, 31, 36, .85);
}
.check-figure figcaption {
	margin-top: .9rem;
	font-family: var(--f-mono);
	font-size: .74rem;
	color: var(--date);
}

/* ---------- Блок 4: словарь ---------- */
.gloss-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.2rem;
	margin: 0;
}
.gloss-item {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 1.5rem 1.4rem 1.4rem;
	border: 1px solid rgba(127, 209, 232, .6);
	background: rgba(18, 20, 23, .35);
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.gloss-item:hover { border-color: var(--acid); transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--acid); }
.gloss-item dt {
	margin: 0 0 .5rem;
	padding-right: 3rem;
	font-family: var(--f-head);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	font-weight: 500;
	letter-spacing: .04em;
	line-height: 1.1;
	color: var(--paper);
}
.gloss-item dd { margin: 0; font-family: var(--f-mono); font-size: .82rem; line-height: 1.6; color: var(--muted); }
.gloss-idx {
	position: absolute;
	top: 0; right: 0;
	padding: .2rem .45rem;
	border-left: 1px solid rgba(127, 209, 232, .6);
	border-bottom: 1px solid rgba(127, 209, 232, .6);
	font-family: var(--f-mono);
	font-size: .64rem;
	color: var(--cyan);
}

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 2.4rem 0 4rem; }
.breadcrumbs {
	margin: 0 0 1.6rem;
	font-family: var(--f-mono);
	font-size: .76rem;
	letter-spacing: .04em;
	color: var(--date);
}
.breadcrumbs a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(127, 209, 232, .4); }
.breadcrumbs a:hover { color: var(--acid); border-color: var(--acid); }
.breadcrumbs .sep { margin: 0 .45rem; color: var(--acid); }
.breadcrumbs span:last-child { color: var(--paper); }

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 67%) minmax(0, 27%);
	justify-content: space-between;
	align-items: start;
}
.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-title {
	margin: 0 0 1.4rem;
	font-size: clamp(2rem, 4.4vw, 3.6rem);
	letter-spacing: .03em;
	color: var(--paper);
}
.page-intro { margin: -.4rem 0 2rem; color: var(--muted); max-width: 64ch; }

.sheet {
	position: relative;
	background: var(--sheet);
	border: 1px solid var(--line);
	padding: 2.4rem 2.6rem;
}
.sheet::before {
	content: "";
	position: absolute;
	top: -1px; left: -1px;
	width: 64px; height: 4px;
	background: var(--acid);
}
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.2rem;
	margin: 0 0 1.6rem;
	font-family: var(--f-mono);
	font-size: .76rem;
	color: var(--date);
}
.entry-meta a { color: var(--cyan); }
.entry-thumb { margin: 0 0 2rem; border: 1px solid var(--line); }
.entry-thumb img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1.06rem; line-height: 1.78; color: var(--paper); }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.2rem 0 .9rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.entry-content h3 { font-size: 1.45rem; margin: 1.8rem 0 .7rem; color: var(--cyan); }
.entry-content h4 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.3em; padding-left: 1.6rem; }
.entry-content li { margin-bottom: .45em; }
.entry-content ul { list-style: none; padding-left: 1.4rem; }
.entry-content ul li { position: relative; }
.entry-content ul li::before {
	content: "";
	position: absolute;
	left: -1.25rem; top: .68em;
	width: 7px; height: 7px;
	background: var(--acid);
}
.entry-content ol li::marker { color: var(--acid); font-family: var(--f-mono); }
.entry-content blockquote {
	margin: 1.8rem 0;
	padding: 1.4rem 1.6rem 1.4rem 1.8rem;
	background: var(--ink-2);
	border-left: 4px solid var(--acid);
	font-family: var(--f-head);
	font-size: 1.3rem;
	line-height: 1.45;
	letter-spacing: .02em;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; margin: 0 0 1.6rem; border-collapse: collapse; border: 1px solid var(--line); font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; }
.entry-content th { background: var(--ink-3); color: var(--cyan); font-family: var(--f-mono); font-size: .8rem; font-weight: 500; letter-spacing: .06em; }
.entry-content code { font-family: var(--f-mono); font-size: .9em; background: var(--night); padding: .1rem .35rem; }
.entry-content pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--night); border: 1px solid var(--line); font-family: var(--f-mono); font-size: .88rem; }
.entry-content img { display: block; max-width: 100%; height: auto; }
.entry-content figure { margin: 0 0 1.6rem; max-width: 100%; }
.entry-content figcaption { margin-top: .5rem; font-family: var(--f-mono); font-size: .76rem; color: var(--date); }
.entry-content hr { border: 0; border-top: 1px dashed var(--line); margin: 2rem 0; }
.entry-content .alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.entry-content .alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }

.entry-tags { margin: 2rem 0 0; padding-top: 1.2rem; border-top: 1px dashed var(--line); font-family: var(--f-mono); font-size: .78rem; color: var(--date); }
.entry-tags a { display: inline-block; margin: .2rem .3rem 0 0; padding: .2rem .55rem; border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.entry-tags a:hover { border-color: var(--acid); color: var(--acid); }

/* ---------- Сайдбар ---------- */
.sidebar {
	min-width: 0;
	background: var(--side);
	border: 1px solid var(--line);
	border-top: 4px solid var(--acid);
	padding: 1.6rem 1.5rem;
	color: var(--paper);
}
.sidebar .widget { margin: 0 0 2rem; color: var(--paper); font-size: .95rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
	margin: 0 0 1rem;
	padding-bottom: .6rem;
	border-bottom: 1px solid var(--line);
	font-size: 1.3rem;
	color: var(--paper);
}
.sidebar .widget ul { margin: 0; padding: 0; list-style: none; }
.sidebar .widget li { padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--paper); text-decoration: none; }
.sidebar .widget a:hover { color: var(--acid); }
.sidebar .widget .post-date { display: block; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.sidebar .widget p { color: var(--paper); }

/* ---------- Пагинация ---------- */
.pager {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 2.6rem 0 0;
}
.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 .8rem;
	border: 1px solid var(--line);
	background: var(--sheet);
	color: var(--paper);
	font-family: var(--f-mono);
	font-size: .85rem;
	text-decoration: none;
	transition: border-color .15s, color .15s, background .15s;
}
.pager a.page-numbers:hover { border-color: var(--acid); color: var(--acid); }
.pager .page-numbers.current { background: var(--acid); border-color: var(--acid); color: var(--ink); font-weight: 500; }
.pager .page-numbers.dots { border-color: transparent; background: transparent; min-width: 24px; padding: 0; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 0; max-width: 560px; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: .8rem 1rem;
	border: 1px solid var(--line);
	border-right: 0;
	border-radius: 0;
	background: var(--night);
	color: var(--paper);
	font-family: var(--f-mono);
	font-size: .9rem;
}
.search-form input[type="search"]::placeholder { color: var(--date); }
.search-form button { border-radius: 0; }

/* ---------- 404 ---------- */
.nf-code {
	display: block;
	margin: 0 0 .5rem;
	font-family: var(--f-head);
	font-size: clamp(5rem, 16vw, 11rem);
	font-weight: 500;
	line-height: 1;
	letter-spacing: .06em;
	color: transparent;
	-webkit-text-stroke: 1px var(--cyan);
}
.nf-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.6rem; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 2.4rem; }
.comments-title { font-size: 1.7rem; margin: 0 0 1.2rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.6rem; border-left: 1px dashed var(--line); padding-left: 1.2rem; }
.comment-item { margin: 0 0 1rem; }
.comment-card { background: var(--sheet); border: 1px solid var(--line); padding: 1.1rem 1.3rem; }
.comment-head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; margin-bottom: .6rem; }
.comment-author { font-family: var(--f-head); font-size: 1.1rem; color: var(--paper); }
.comment-date { font-family: var(--f-mono); font-size: .72rem; color: var(--date); }
.comment-text { font-size: .96rem; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-wait { font-family: var(--f-mono); font-size: .78rem; color: var(--acid); margin: 0 0 .6rem; }
.comment-reply a { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.comment-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; font-family: var(--f-mono); font-size: .8rem; }
.comment-respond { margin-top: 2rem; background: var(--sheet); border: 1px solid var(--line); padding: 1.6rem 1.8rem; }
.comment-reply-title { font-size: 1.5rem; margin: 0 0 1rem; }
.comment-reply-title small { font-family: var(--f-mono); font-size: .75rem; margin-left: .8rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; margin-bottom: .35rem; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; color: var(--muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	padding: .75rem .9rem;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--night);
	color: var(--paper);
	font-family: var(--f-text);
	font-size: .95rem;
}
.comment-form textarea { min-height: 160px; resize: vertical; }
.comment-form .comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { margin: 0; text-transform: none; letter-spacing: 0; }
.comment-notes, .logged-in-as { font-family: var(--f-mono); font-size: .78rem; color: var(--date); }
.form-submit { margin-bottom: 0 !important; }

/* ---------- Подвал ---------- */
.site-foot {
	background: var(--night);
	border-top: 1px solid var(--line);
	color: var(--paper);
	padding: 3.6rem 0 0;
}
.foot-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.6rem;
}
.foot-col { min-width: 0; }
.foot-col .widget { margin: 0 0 1.6rem; color: #C9CDD2; font-size: .92rem; line-height: 1.7; }
.foot-col .widget-title {
	margin: 0 0 1rem;
	font-size: 1.3rem;
	letter-spacing: .04em;
	color: var(--paper);
}
.foot-col .widget-title::before {
	content: "";
	display: inline-block;
	width: 10px; height: 10px;
	margin-right: .6rem;
	background: var(--acid);
	vertical-align: .08em;
}
.foot-col .widget p { color: #C9CDD2; }
.foot-col .widget a { color: var(--cyan); }
.foot-col .widget a:hover { color: var(--acid); }
.foot-col .widget ul { margin: 0; padding: 0; list-style: none; }
.foot-col .widget li { margin: 0 0 .45rem; }
.foot-col .widget li a { text-decoration: none; border-bottom: 1px solid rgba(127, 209, 232, .35); }
.foot-col .widget li a:hover { border-color: var(--acid); }
.foot-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	padding: 1.3rem 0 1.6rem;
	border-top: 1px solid var(--line);
	font-family: var(--f-mono);
	font-size: .76rem;
	letter-spacing: .06em;
	color: var(--muted);
}
.foot-bottom p { margin: 0; }
.foot-ruler { display: block; width: 180px; height: 14px; flex: 0 0 auto; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.2rem 1.6rem;
	flex-wrap: wrap;
	padding: 1rem 1.4rem;
	background: var(--night);
	border-top: 2px solid var(--acid);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
}
.cookie-banner p { margin: 0; max-width: 80ch; font-family: var(--f-mono); font-size: .8rem; line-height: 1.6; color: #C9CDD2; }
.cookie-banner a { color: var(--cyan); }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
	.anatomy-figure { padding: 0 7rem; }
	.callout { font-size: .68rem; }
	.anatomy-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.anatomy-legend li { border-bottom: 1px solid var(--line); }
	.anatomy-legend li:nth-child(3n) { border-right: 0; }
}

@media (max-width: 960px) {
	.fs-wrap { width: 100%; }
	.fs-band { padding: 3.4rem 0 4rem; }
	.anatomy-grid, .matrix-grid, .check-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
	.anatomy-figure { padding: 0 1rem; max-width: 520px; justify-self: center; width: 100%; }
	.callout--l { right: auto; left: 0; transform: translate(-40%, -50%); }
	.callout--r { left: auto; right: 0; transform: translate(40%, -50%); }
	.callout-text { display: none; }
	.anatomy-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.anatomy-legend li:nth-child(3n) { border-right: 1px solid var(--line); }
	.anatomy-legend li:nth-child(2n) { border-right: 0; }
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gloss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.4rem; }
	.layout-single > .content-area { width: 100%; }
	.foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.check-figure { max-width: 520px; justify-self: center; width: 100%; }
	.head-scale { display: none; }

	.nav-toggle { display: inline-flex; }
	.head-navbar { flex-wrap: wrap; }
	.head-nav { width: 100%; }
	.js .head-nav:not(.is-open) { display: none; }
	.head-menu { flex-direction: column; gap: 0; padding-bottom: .8rem; }
	.head-menu li { border-top: 1px dashed var(--line); }
	.head-menu a { padding: .8rem 0; }
	.head-menu a::after { bottom: .4rem; height: 2px; }
}

@media (max-width: 600px) {
	.head-top { gap: 1rem; padding: 1.2rem 0 1rem; align-items: flex-start; }
	.brand-mark { width: 64px; height: 64px; padding: 5px; }
	.brand-name { font-size: 1.05rem; }
	.brand-desc { font-size: .72rem; }
	.fs-band { padding: 2.8rem 0 3.8rem; }
	.band-lead { margin-bottom: 1.6rem; }
	.anatomy-legend { grid-template-columns: minmax(0, 1fr); }
	.anatomy-legend li { border-right: 0 !important; }
	.card-grid, .card-grid--two, .gloss-grid, .foot-grid { grid-template-columns: minmax(0, 1fr); }
	.check-list li { grid-template-columns: 30px minmax(0, 1fr); }
	.check-zone { grid-column: 2; justify-self: start; }
	.sheet { padding: 1.6rem 1.3rem; }
	.sidebar { padding: 1.4rem 1.2rem; }
	.comment-respond { padding: 1.3rem 1.2rem; }
	.entry-content { font-size: 1rem; }
	.entry-content blockquote { padding: 1.1rem 1.2rem 1.1rem 1.3rem; font-size: 1.15rem; }
	.cookie-banner { justify-content: flex-start; padding: .9rem 1.1rem; }
	.sheet-stamp { right: 4%; bottom: .9rem; }
	.foot-bottom { flex-direction: column; align-items: flex-start; }
	.zone-pin { width: 24px; height: 24px; font-size: .7rem; }
}

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