/*
Theme Name: electroshop-sam-ru
Author: Иван Королёв
Description: Тема информационного проекта о гаджетах в виде инженерного руководства по разборке: графитовый стол с миллиметровой сеткой и медными дорожками, панели datasheet со срезанными углами, разобранный смартфон с выносками, шкалы приоритетов, карта разъёмов на чертёжном листе и осциллограмма.
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: sam
*/
/* ---------- Шрифты (OFL, файлы в /fonts) ---------- */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/golos-text-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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-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: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/ibm-plex-mono-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 {
	--bg: #0B0F12;
	--grid: #1A232A;
	--panel: #131A1F;
	--panel-2: #182128;
	--sheet: #E9E3D6;
	--ink: #1C2226;
	--ink-2: #5E6266;
	--paper: #E9EEF1;
	--text: #E9EEF1;
	--muted: #7B8A93;
	--lime: #B4FF3A;
	--copper: #C87A46;
	--amber: #FFC24A;
	--yellow: #FFC24A;
	--line: #26343C;
	--footer: #070A0C;
	--cut: 16px;
	--font-head: "Golos Text", "Segoe UI", Arial, sans-serif;
	--font-body: "IBM Plex Mono", Consolas, "DejaVu Sans Mono", monospace;
	--font-mono: "IBM Plex Mono", Consolas, "DejaVu Sans Mono", monospace;
}

/* ---------- База ---------- */
*,
*::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: 16px;
	line-height: 1.6;
	color: var(--text);
	background-color: var(--bg);
	/* Миллиметровая сетка рабочего стола */
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px),
		linear-gradient(rgba(26, 35, 42, 0.45) 1px, transparent 1px),
		linear-gradient(90deg, rgba(26, 35, 42, 0.45) 1px, transparent 1px);
	background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
	overflow-wrap: break-word;
}

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

p {
	margin: 0 0 1em;
}

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

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

a:hover,
a:focus-visible {
	color: var(--lime);
}

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

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

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	clip: auto;
	z-index: 1000;
	padding: 0.6em 1em;
	background: var(--lime);
	color: var(--bg);
}

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

/* ---------- Кнопки: прямоугольные, рамка и стрелка ---------- */
.chip-btn,
.cut-btn,
.key-btn,
.search-form button,
.form-submit input[type="submit"],
.cookie-banner button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.6em 1.1em;
	font-family: var(--font-mono);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--lime);
	background: transparent;
	border: 1.5px solid var(--lime);
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.chip-btn::after,
.cut-btn::after,
.key-btn::after {
	content: "→";
}

.chip-btn--on,
.cut-btn,
.key-btn,
.search-form button,
.form-submit input[type="submit"],
.cookie-banner button {
	color: var(--bg);
	background: var(--lime);
}

.chip-btn:hover,
.chip-btn:focus-visible {
	color: var(--bg);
	background: var(--lime);
}

.chip-btn--on:hover,
.chip-btn--on:focus-visible,
.cut-btn:hover,
.key-btn:hover,
.search-form button:hover,
.form-submit input[type="submit"]:hover,
.cookie-banner button:hover {
	color: var(--lime);
	background: transparent;
}

.chip-btn--sm {
	padding: 0.45em 0.8em;
	font-size: 0.78rem;
}

/* Ссылка со стрелкой */
.arrow-link {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--lime);
	text-decoration: underline solid var(--copper);
	text-underline-offset: 5px;
}

.arrow-link::after {
	content: " →";
}

.arrow-link:hover {
	color: var(--text);
}

/* ---------- Шапка: панель со срезанными углами ---------- */
.site-header {
	padding: 1.2rem 0 0.4rem;
}

.header-row {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding: 0.9rem 1.4rem;
	background: var(--panel);
	clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
	box-shadow: inset 0 0 0 1px var(--line);
}

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

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

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

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

.brand-name {
	font-family: var(--font-mono);
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.brand-desc {
	max-width: 22rem;
	margin-top: 0.3rem;
	font-size: 0.8rem;
	line-height: 1.35;
	color: var(--muted);
}

.nav-toggle {
	display: none;
	padding: 0.45em 0.9em;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	text-transform: uppercase;
	color: var(--lime);
	background: transparent;
	border: 1.5px solid var(--lime);
	border-radius: 0;
	cursor: pointer;
}

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

.main-nav a {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.98rem;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--text);
}

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

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
	text-decoration: underline solid var(--lime);
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}

/* ---------- Заголовки секций: номер, «//» и медная дорожка ---------- */
.front section {
	padding: 1.4rem 0;
}

.trace-title {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin: 0 0 1.4rem;
	font-family: var(--font-mono);
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text);
}

.trace-title .num {
	color: var(--text);
}

.trace-title .sl {
	color: var(--amber);
	letter-spacing: -0.08em;
}

.trace-title::after {
	content: "";
	flex: 1;
	min-width: 2rem;
	height: 1px;
	margin-left: 0.6rem;
	background: linear-gradient(90deg, var(--copper), rgba(200, 122, 70, 0.25));
}

.trace-title--paper,
.trace-title--paper .num {
	color: var(--ink);
}

.trace-title--paper .sl {
	color: #B9771A;
}

.trace-title--paper::after {
	background: rgba(28, 34, 38, 0.5);
}

/* Панель datasheet: медная рамка и срезанный угол */
.board {
	position: relative;
	padding: 1.4rem 1.5rem 1.6rem;
	background: rgba(11, 15, 18, 0.72);
	clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
	box-shadow: inset 0 0 0 1.5px var(--copper);
}

.board::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 40px;
	height: 40px;
	background: linear-gradient(225deg, transparent 19px, var(--copper) 19px, var(--copper) 21px, transparent 21px);
	pointer-events: none;
}

/* ---------- Блок 1: разобранный смартфон ---------- */
.front .hero {
	position: relative;
	padding: 1.6rem 0 0.6rem;
	overflow: hidden;
}

/* Медные дорожки платы по правому краю */
.front .hero::after {
	content: "";
	position: absolute;
	top: 18%;
	right: 0;
	width: 9%;
	height: 82%;
	background:
		repeating-linear-gradient(90deg, rgba(200, 122, 70, 0.75) 0 1.5px, transparent 1.5px 12px) right top / 100% 100% no-repeat;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent);
	mask-image: linear-gradient(180deg, #000, transparent);
	pointer-events: none;
}

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

.hero-title {
	margin: 0 0 1.2rem;
	font-family: var(--font-head);
	font-size: clamp(2.6rem, 5.6vw, 5.2rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	color: #F3F6F8;
}

.hero-lead {
	max-width: 32rem;
	font-size: clamp(0.98rem, 1.3vw, 1.12rem);
	line-height: 1.5;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1rem;
	margin: 1.6rem 0 0;
}

.hero-pic {
	position: relative;
	margin: 0 0 0 auto;
	width: min(100%, 560px);
}

.hero-pic img {
	display: block;
	width: 100%;
	-webkit-mask-image: radial-gradient(ellipse 72% 74% at 50% 50%, #000 62%, transparent 100%);
	mask-image: radial-gradient(ellipse 72% 74% at 50% 50%, #000 62%, transparent 100%);
}

.callout {
	position: absolute;
	font-family: var(--font-mono);
	font-size: clamp(0.72rem, 1.05vw, 0.95rem);
	font-weight: 500;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--text);
}

/* Подписи стоят на концах медных выносок рисунка */
.callout--screen {
	top: 15%;
	right: 100%;
	margin-right: 0.3rem;
}

.callout--board {
	top: 61%;
	right: 100%;
	margin-right: 0.3rem;
}

.callout--camera {
	top: 4.6%;
	left: 100%;
	margin-left: 0.3rem;
}

.callout--battery {
	top: 80%;
	left: 83%;
	padding: 0.25em 0.4em;
	background: rgba(11, 15, 18, 0.85);
}

/* ---------- Блок 2: шкала приоритетов ---------- */
.scale-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.scale {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 0.3rem 1rem;
	padding: 0.9rem 1rem 1rem;
	background: var(--panel);
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.scale-name {
	font-family: var(--font-mono);
	font-size: clamp(1rem, 1.6vw, 1.25rem);
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.scale-bar {
	display: flex;
	justify-content: flex-end;
	gap: 4px;
}

.seg {
	flex: 0 1 22px;
	height: 14px;
	background: #2A3640;
	transform: skewX(-20deg);
}

.seg--on {
	background: var(--lime);
}

.seg--cu {
	background: var(--copper);
}

.scale-tip {
	grid-column: 1 / -1;
	font-size: 0.95rem;
	color: #C9D3D8;
}

/* ---------- Последние разборы ---------- */
.feed {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.4rem;
	align-items: stretch;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 0.7rem 0.7rem 0.9rem;
	background: var(--panel);
	clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
	box-shadow: inset 0 0 0 1.5px var(--copper);
}

.card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 32px;
	height: 32px;
	background: linear-gradient(225deg, transparent 14.5px, var(--copper) 14.5px, var(--copper) 16.5px, transparent 16.5px);
	pointer-events: none;
}

.card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	text-decoration: none;
	background: var(--bg);
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.card-thumb img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.card:hover .card-thumb img {
	transform: scale(1.04);
}

.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 0.9rem 0.2rem 0;
}

.card-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-head);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

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

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

.card-excerpt {
	font-size: 0.88rem;
	line-height: 1.5;
	color: #C9D3D8;
}

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

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

.card-date {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.feed-more {
	margin: 1.4rem 0 0;
}

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

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

/* ---------- Блок 3: карта разъёмов на чертёжном листе ---------- */
.sheet-paper {
	position: relative;
	padding: 1.4rem 1.5rem 1.8rem;
	color: var(--ink);
	background-color: var(--sheet);
	background-image:
		linear-gradient(rgba(28, 34, 38, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(28, 34, 38, 0.06) 1px, transparent 1px);
	background-size: 20px 20px;
	outline: 1px solid rgba(28, 34, 38, 0.45);
	outline-offset: -10px;
}

.port-list {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.4rem 1rem;
	margin: 0;
	padding: 0.4rem 0 0;
	list-style: none;
	text-align: center;
}

.port-list li {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.port-pic {
	width: min(120px, 100%);
	height: auto;
	margin-bottom: 0.6rem;
}

.port-pic g {
	fill: none;
	stroke: var(--ink);
	stroke-width: 2.2;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.port-name {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.port-text {
	font-size: 0.86rem;
	color: var(--ink-2);
}

/* ---------- Блок 4: осциллограмма и вопросы ---------- */
.explain-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.6rem 2.4rem;
	align-items: center;
}

.scope {
	aspect-ratio: 480 / 220;
	padding: 6px;
	background-color: #0E1A12;
	background-image:
		linear-gradient(rgba(180, 255, 58, 0.12) 1px, transparent 1px),
		linear-gradient(90deg, rgba(180, 255, 58, 0.12) 1px, transparent 1px);
	background-size: 10% 20%;
	border: 1.5px solid var(--line);
	box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.scope svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.wave,
.wave-glow {
	fill: none;
	stroke: var(--lime);
	stroke-linecap: round;
}

.wave {
	stroke-width: 3;
}

.wave-glow {
	stroke-width: 10;
	opacity: 0.18;
}

.faq {
	margin: 0;
}

.faq dt {
	margin: 0 0 0.2rem;
	font-family: var(--font-head);
	font-size: clamp(1.15rem, 1.8vw, 1.4rem);
	font-weight: 700;
	text-transform: uppercase;
}

.faq dd {
	margin: 0 0 1.2rem;
	font-size: 0.95rem;
	color: #C9D3D8;
}

.faq dd:last-child {
	margin-bottom: 0;
}
/* ---------- Внутренние страницы ---------- */
.page-head {
	padding: 2.6rem 0 1.4rem;
}

.page-head h1 {
	display: inline-block;
	margin: 0.8rem 0 0;
	padding-bottom: 0.25rem;
	font-size: clamp(1.9rem, 4vw, 3.2rem);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border-bottom: 3px solid var(--lime);
	color: var(--paper);
}

.single .page-head h1 {
	font-size: clamp(2rem, 3.6vw, 3rem);
	letter-spacing: 0.02em;
}

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

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

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

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

.site-main {
	padding: 0.6rem 0 4.5rem;
}

.layout-single {
	display: block;
}

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

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

.sheet {
	position: relative;
	padding: 2.4rem 2.6rem 2.6rem;
	background: var(--panel);
	border: 1.5px solid var(--line);
}

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

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

.entry-meta a {
	color: inherit;
}

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

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

.entry-content {
	font-size: 1.1rem;
	line-height: 1.75;
	hyphens: auto;
}

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

.entry-content a {
	color: #D9FF7A;
}

.entry-content h2 {
	font-size: 2.1rem;
	letter-spacing: 0.02em;
	color: var(--lime);
}

.entry-content h3 {
	font-size: 1.65rem;
	color: var(--lime);
}

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

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

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

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

.entry-content ul > li::before {
	content: "";
	position: absolute;
	left: -1.25em;
	top: 0.6em;
	width: 0.6em;
	height: 0.6em;
	background: var(--lime);
}

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

.entry-content blockquote {
	margin: 1.6em 0;
	padding: 1.2rem 1.5rem;
	font-family: var(--font-head);
	font-size: 1.5rem;
	line-height: 1.35;
	background: var(--bg);
	border-left: 4px solid var(--line);
}

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

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

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

.entry-content th {
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--lime);
}

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

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

.entry-content img {
	display: block;
}

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

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

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

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	font-size: 0.95rem;
	border-top: 1px solid var(--line);
}

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

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

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

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

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

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

.post-nav strong {
	font-family: var(--font-head);
	font-size: 1.35rem;
	font-weight: 400;
	color: var(--paper);
}

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

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

.pager a.page-numbers:hover {
	color: #D9FF7A;
}

.pager .page-numbers.current {
	color: var(--bg);
	background: var(--lime);
}

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

/* ---------- Сайдбар ---------- */
.sidebar {
	min-width: 0;
	padding: 1.6rem 1.5rem;
	background: var(--panel);
	border: 1px solid var(--line);
}

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

.sidebar .widget-title {
	margin: 0 0 0.9rem;
	font-size: 1.6rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--lime);
}

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

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

.sidebar a {
	text-decoration: none;
}

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

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

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

.comments-title,
.comment-reply-title {
	font-size: 1.9rem;
	margin: 0 0 1rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--lime);
}

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

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

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

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

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

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

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

.comment-respond {
	margin-top: 1.8rem;
	padding: 1.6rem;
	background: var(--panel);
	border: 1px solid var(--line);
}

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

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

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

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

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

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

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

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

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

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

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

/* ---------- Подвал ---------- */
.site-footer {
	color: var(--paper);
	background: var(--footer);
	border-top: 3px solid var(--lime);
}

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

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

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

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

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

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

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

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

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

.copyright {
	margin: 0;
	padding: 0.6rem 0 2rem;
	font-size: 1rem;
	text-align: center;
	color: var(--paper);
}

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

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

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

/* ---------- Внутренние страницы: панели со срезанным углом ---------- */
.sheet,
.sidebar {
	border: 0;
	clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
	box-shadow: inset 0 0 0 1.5px var(--line);
}

.sidebar {
	background: var(--panel-2);
}

.sidebar .widget-title {
	font-family: var(--font-mono);
	font-size: 1.1rem;
	font-weight: 600;
}

/* ---------- Подвал ---------- */
.site-footer {
	margin-top: 2.4rem;
	background: var(--footer);
	border-top: 1px solid var(--line);
}

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

.footer-col {
	font-family: var(--font-mono);
	font-size: 0.92rem;
	color: #C9D3D8;
}

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

.footer-col a {
	text-decoration: none;
}

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

.footer-col a:hover {
	color: var(--lime);
	text-decoration: underline solid var(--lime);
}

.copyright {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	text-align: left;
	text-transform: uppercase;
	color: var(--muted);
	border-top: 1px solid var(--line);
	padding-top: 1.2rem;
}

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

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

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

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

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

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

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

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

	.hero-pic {
		width: min(76%, 480px);
		margin: 0 auto;
	}

	.front .hero::after {
		display: none;
	}

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

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

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

	.header-row {
		padding: 0.8rem 1rem;
	}

	.brand {
		gap: 0.7rem;
	}

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

	.brand-desc {
		display: none;
	}

	.hero-pic {
		width: 70%;
	}

	.callout {
		font-size: 0.66rem;
	}

	.board,
	.sheet-paper {
		padding: 1.1rem 1rem 1.3rem;
	}

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

	.scale-bar {
		justify-content: flex-start;
	}

	.port-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.sheet {
		padding: 1.6rem 1.2rem 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;
	}
}

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

	* {
		transition: none !important;
	}
}
