/*
Theme Name: КровляГид
Theme URI: https://krovlyagid.ru/
Description: Тема-справочник для блога о кровле в духе каталога образцов: светлая оцинковка, тёмный шифер, винный RAL 3005 и мятная патина. Веер выкрасок RAL на главной, разделители-«профнастил», карточки-ярлыки со срезанным углом, плотный пронумерованный реестр на 100 статей, паспорт статьи с оглавлением и перелинковкой в боковой колонке.
Author: krovlyagid.ru
Author URI: https://krovlyagid.ru/
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kgd
Tags: blog, news, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   1. Tokens
   ============================================================ */

:root {
	/* galvanized steel surfaces */
	--zinc: #eceee9;
	--zinc-2: #e1e4de;
	--sheet: #f8f9f6;
	--line: #cdd2cb;
	--line-soft: #dde1da;

	/* slate (roof shale) */
	--slate: #18262a;
	--slate-2: #24363b;
	--slate-3: #33494f;
	--slate-soft: #4b5c60;
	--fog: #93a6a9;
	--fog-2: #c3d0d1;

	/* RAL 3005 wine red — primary accent */
	--wine: #7a2232;
	--wine-2: #962c40;
	--wine-deep: #5a1824;
	--wine-tint: #f1dfe2;

	/* copper patina */
	--mint: #a8d5c9;
	--mint-ink: #1f6b5e;
	--mint-tint: #dcefe9;

	/* copper */
	--copper: #c27a40;
	--copper-ink: #8a4a1c;

	/* RAL swatches used for decoration and thumbnail placeholders */
	--ral-3005: #5e2129;
	--ral-8017: #45322e;
	--ral-7024: #474a51;
	--ral-6005: #2f4538;
	--ral-9006: #a5a8a6;

	--ink: var(--slate);
	--ink-soft: var(--slate-soft);
	--on-dark: #eef2f0;
	--on-dark-soft: var(--fog-2);
	--focus: var(--wine-2);

	--veil-dark: rgba(24, 38, 42, .62);
	--veil-light: rgba(248, 249, 246, .16);
	--shade: 0 1px 0 rgba(24, 38, 42, .06), 0 14px 34px rgba(24, 38, 42, .09);
	--shade-strong: 0 22px 48px rgba(24, 38, 42, .18);

	--wrap: 1280px;
	--gut: 24px;
	--rail: 300px;
	--notch: 18px;
	--radius: 2px;

	--font-head: "Bitter", "Rockwell", Georgia, serif;
	--font-body: "Onest", "Segoe UI", Arial, sans-serif;
	--font-mono: "Roboto Mono", Consolas, "Courier New", monospace;

	/* corrugated sheet profile used as the section divider */
	--profile: repeating-linear-gradient(90deg, var(--slate-3) 0 7px, var(--slate) 7px 10px, var(--slate-2) 10px 22px, var(--slate) 22px 25px);
	--profile-wine: repeating-linear-gradient(90deg, var(--wine-2) 0 7px, var(--wine-deep) 7px 10px, var(--wine) 10px 22px, var(--wine-deep) 22px 25px);
	/* swatch-card dot grid */
	--dots: radial-gradient(circle at 1px 1px, rgba(75, 92, 96, .2) 1px, transparent 1.4px) 0 0 / 18px 18px;
}

/* ============================================================
   2. Reset and base
   ============================================================ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
}

body {
	margin: 0;
	background: var(--zinc);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--wine);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

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

h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.18;
	text-wrap: balance;
}

p,
ul,
ol,
dl,
figure {
	margin: 0;
}

button,
input {
	font: inherit;
	color: inherit;
}

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

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1 0 auto;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--gut);
}

.meta-mono {
	font-family: var(--font-mono);
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: .02em;
	color: var(--ink-soft);
}

.rib {
	display: block;
	height: 8px;
	background: var(--profile);
}

.rib--wine {
	background: var(--profile-wine);
}

/* ============================================================
   3. Topline and header
   ============================================================ */

.topline {
	background: var(--wine);
	color: var(--wine-tint);
	font-family: var(--font-mono);
	font-size: 12.5px;
}

.topline__inner {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 36px;
}

.topline__badge {
	padding: 2px 8px;
	background: var(--wine-deep);
	color: var(--sheet);
	letter-spacing: .08em;
	text-transform: uppercase;
}

.topline__item--addr {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.topline__phone {
	margin-left: auto;
	color: var(--sheet);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.topline__phone:hover {
	color: var(--mint);
}

.site-head {
	position: relative;
	background: var(--sheet);
}

.site-head__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: 84px;
}

.brand__link {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--ink);
	text-decoration: none;
}

.brand__link:hover {
	color: var(--ink);
}

.brand__mark {
	flex: none;
	color: var(--slate);
}

.brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.brand__name {
	font-family: var(--font-head);
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.01em;
}

.brand__accent {
	color: var(--wine);
}

.brand__sub {
	margin-top: 4px;
	font-family: var(--font-mono);
	font-size: 11.5px;
	color: var(--ink-soft);
	letter-spacing: .04em;
}

.custom-logo {
	max-height: 56px;
	width: auto;
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--zinc);
	cursor: pointer;
	font-family: var(--font-mono);
	font-size: 13px;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ink);
	transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle__bars {
	position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__bars::before {
	top: -6px;
}

.nav-toggle__bars::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
	margin-left: auto;
}

.nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 0;
	list-style: none;
}

.nav-list li {
	position: relative;
}

.nav-list a {
	display: block;
	padding: 8px 14px;
	color: var(--ink);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.nav-list a:hover,
.nav-list .current-menu-item > a,
.nav-list .current-cat > a {
	color: var(--wine);
	border-bottom-color: var(--wine);
}

.nav-list .sub-menu,
.nav-list .children {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	display: none;
	min-width: 220px;
	padding: 8px 0;
	background: var(--sheet);
	box-shadow: var(--shade-strong);
	list-style: none;
}

.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu,
.nav-list li:hover > .children,
.nav-list li:focus-within > .children {
	display: block;
}

/* ============================================================
   4. Lead block (hero)
   ============================================================ */

.lead {
	position: relative;
	overflow: hidden;
	background: var(--dots), var(--sheet);
	border-bottom: 1px solid var(--line);
}

.lead__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 48px;
	align-items: center;
	padding-top: 64px;
	padding-bottom: 64px;
}

.lead__kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	color: var(--wine);
	text-transform: uppercase;
	letter-spacing: .1em;
}

.lead__kicker::before {
	content: "";
	width: 28px;
	height: 10px;
	background: var(--profile-wine);
}

.lead__title {
	font-size: clamp(34px, 4.6vw, 58px);
	font-weight: 800;
	letter-spacing: -.02em;
}

.lead__title-accent {
	color: var(--wine);
	font-style: italic;
	font-weight: 600;
}

.lead__text {
	max-width: 600px;
	margin-top: 22px;
	color: var(--ink-soft);
	font-size: 18px;
}

.specs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 36px;
	border-top: 2px solid var(--slate);
}

.specs__item {
	padding: 14px 14px 0 0;
}

.specs__item + .specs__item {
	padding-left: 14px;
	border-left: 1px solid var(--line);
}

.specs__key {
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.specs__val {
	margin: 4px 0 0;
	font-family: var(--font-head);
	font-size: 30px;
	font-weight: 800;
	line-height: 1;
}

/* fan of RAL colour strips */
.fan {
	position: relative;
	height: 380px;
}

.fan__strip {
	position: absolute;
	bottom: 20px;
	left: 50%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 112px;
	height: 330px;
	margin-left: -56px;
	padding: 14px 12px 40px;
	border-radius: var(--radius);
	box-shadow: var(--shade-strong);
	color: var(--on-dark);
	transform-origin: 50% calc(100% - 22px);
}

.fan__strip::after {
	content: "";
	position: absolute;
	bottom: 14px;
	left: 50%;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	border-radius: 50%;
	background: var(--zinc);
	box-shadow: inset 0 0 0 3px var(--fog);
}

.fan__strip--1 {
	background: var(--ral-9006);
	color: var(--slate);
	transform: rotate(-32deg);
}

.fan__strip--2 {
	background: var(--ral-6005);
	transform: rotate(-16deg);
}

.fan__strip--3 {
	background: var(--ral-7024);
	transform: rotate(0deg);
}

.fan__strip--4 {
	background: var(--ral-8017);
	transform: rotate(16deg);
}

.fan__strip--5 {
	background: var(--ral-3005);
	transform: rotate(32deg);
}

.fan__code {
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
}

.fan__name {
	font-family: var(--font-head);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
}

/* rubric thumb index */
.index-tabs {
	background: var(--slate);
	color: var(--on-dark);
}

.index-tabs__inner {
	display: flex;
	align-items: stretch;
	gap: 20px;
}

.index-tabs__label {
	display: flex;
	align-items: center;
	flex: none;
	color: var(--mint);
	text-transform: uppercase;
	letter-spacing: .1em;
}

.index-tabs__list {
	display: flex;
	gap: 2px;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
}

.index-tabs__link {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 14px 16px;
	color: var(--on-dark);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
	border-top: 3px solid transparent;
}

.index-tabs__link:hover {
	color: var(--sheet);
	background: var(--slate-2);
	border-top-color: var(--mint);
}

.index-tabs__count {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--fog);
}

/* ============================================================
   5. Section heads
   ============================================================ */

.section {
	padding: 56px 0 8px;
}

.section-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px 18px;
	margin-bottom: 28px;
}

.section-head__num {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	background: var(--slate);
	color: var(--mint);
	font-size: 14px;
}

.section-head__kicker {
	flex-basis: 100%;
	color: var(--wine);
	text-transform: uppercase;
	letter-spacing: .1em;
}

.section-head__title {
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 800;
	letter-spacing: -.01em;
}

.section-head__rule {
	flex: 1 1 80px;
	height: 2px;
	background: var(--slate);
}

.section-head__note {
	white-space: nowrap;
}

.archive-desc {
	max-width: 760px;
	margin: -8px 0 28px;
	color: var(--ink-soft);
}

/* ============================================================
   6. Grid, cards and register rows
   ============================================================ */

.grid {
	display: grid;
	gap: 28px;
}

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

/* spotlight: one large card plus three stacked */
.spot {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	grid-template-rows: repeat(3, auto);
	gap: 24px 28px;
}

.spot > .card--lead {
	grid-row: 1 / span 3;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--sheet);
	border: 1px solid var(--line);
	clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
	transition: transform .2s ease, border-color .2s ease;
}

.card:hover {
	transform: translateY(-3px);
	border-color: var(--fog);
}

.card__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--zinc-2);
}

.card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.card:hover .card__img {
	transform: scale(1.04);
}

.card__index {
	position: absolute;
	top: 14px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 10px 5px 8px;
	background: var(--sheet);
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
}

.card__index::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 2px var(--wine);
}

.card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 18px;
	border-top: 4px solid var(--wine);
}

.card__cat {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--mint-ink);
}

.card__title {
	font-size: 21px;
	font-weight: 700;
}

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

.card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

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

.card__text {
	color: var(--ink-soft);
	font-size: 15.5px;
}

.card__foot {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px dashed var(--line);
}

.card__go {
	margin-left: auto;
	color: var(--wine);
	font-weight: 600;
	font-size: 14px;
}

.card__go::after {
	content: " →";
}

.card--lead .card__media {
	aspect-ratio: 16 / 10;
}

.card--lead .card__title {
	font-size: clamp(24px, 2.4vw, 32px);
}

.card--lead .card__text {
	font-size: 17px;
}

.card--side {
	flex-direction: row;
}

.card--side .card__media {
	flex: 0 0 42%;
	aspect-ratio: auto;
	min-height: 168px;
}

.card--side .card__body {
	border-top: 0;
	border-left: 4px solid var(--wine);
	padding: 16px 18px;
}

.card--side .card__title {
	font-size: 18px;
}

.card--side .card__text {
	display: none;
}

.card--compact .card__title {
	font-size: 19px;
}

.card--compact .card__text {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

/* thumbnail placeholder: a colour sample */
.thumb-blank {
	position: relative;
	display: flex;
	align-items: flex-end;
	width: 100%;
	height: 100%;
	min-height: 100%;
	padding: 12px 14px;
	background: var(--ral-7024);
	color: var(--on-dark);
}

.thumb-blank::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(90deg, transparent 0 22px, var(--veil-light) 22px 26px, transparent 26px 34px);
}

.thumb-blank__code {
	position: relative;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
}

.thumb-blank--c1 {
	background: var(--ral-3005);
}

.thumb-blank--c2 {
	background: var(--ral-8017);
}

.thumb-blank--c3 {
	background: var(--ral-7024);
}

.thumb-blank--c4 {
	background: var(--ral-6005);
}

.thumb-blank--c5 {
	background: var(--ral-9006);
	color: var(--slate);
}

/* register: the dense numbered list of the rest of the posts */
.register {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 40px;
	border-top: 2px solid var(--slate);
}

.row {
	position: relative;
	display: grid;
	grid-template-columns: 52px 84px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}

.row:hover {
	background: linear-gradient(90deg, var(--wine-tint), transparent 70%);
}

.row__num {
	align-self: start;
	padding-top: 4px;
	color: var(--wine);
	font-size: 13px;
	font-weight: 600;
}

.row__media {
	display: block;
	width: 84px;
	height: 84px;
	overflow: hidden;
	background: var(--zinc-2);
}

.row__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.row__media .thumb-blank {
	padding: 8px;
}

.row__media .thumb-blank__code {
	font-size: 10px;
}

.row__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.row__cat {
	color: var(--mint-ink);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.row__title {
	font-size: 17.5px;
	font-weight: 700;
	line-height: 1.28;
}

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

.row__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

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

.row__meta {
	font-size: 12px;
}

/* ============================================================
   7. Entry (single / page)
   ============================================================ */

.read-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	height: 4px;
	background: transparent;
}

.read-bar__fill {
	display: block;
	height: 100%;
	background: var(--wine);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.entry-head {
	background: var(--dots), var(--sheet);
	border-bottom: 1px solid var(--line);
}

.entry-head__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--rail);
	gap: 48px;
	align-items: end;
	padding-top: 36px;
	padding-bottom: 44px;
}

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin-bottom: 22px;
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--ink-soft);
}

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

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

.crumbs__sep {
	color: var(--fog);
}

.crumbs__now {
	max-width: 46ch;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--ink);
}

.entry-tag {
	display: inline-block;
	margin-bottom: 16px;
	padding: 4px 10px;
	background: var(--mint-tint);
	color: var(--mint-ink);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	text-decoration: none;
}

.entry-title {
	font-size: clamp(30px, 4vw, 48px);
	font-weight: 800;
	letter-spacing: -.015em;
}

.entry-lede {
	max-width: 760px;
	margin-top: 18px;
	color: var(--ink-soft);
	font-size: 19px;
}

/* spec sheet of the article */
.passport {
	background: var(--sheet);
	border: 1px solid var(--line);
	border-top: 6px solid var(--wine);
	box-shadow: var(--shade);
}

.passport__head {
	padding: 10px 16px;
	border-bottom: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--wine);
}

.passport__row {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 10px;
	padding: 9px 16px;
	border-bottom: 1px dashed var(--line);
}

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

.passport__key {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--ink-soft);
}

.passport__val {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
}

.passport__val a {
	color: var(--wine);
}

.entry-cover {
	padding-top: 36px;
}

.entry-cover__img {
	width: 100%;
	max-height: 620px;
	object-fit: cover;
}

.entry-cover__cap {
	margin-top: 10px;
}

.entry-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--rail);
	gap: 48px;
	align-items: start;
	padding-top: 44px;
	padding-bottom: 24px;
}

.entry-main {
	min-width: 0;
}

.entry-body {
	max-width: 780px;
	font-size: 18px;
	line-height: 1.72;
}

.entry-body > * + * {
	margin-top: 1.1em;
}

.entry-body h2 {
	position: relative;
	margin-top: 2em;
	padding-top: 18px;
	font-size: 29px;
}

.entry-body h2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 50px;
	height: 6px;
	background: var(--profile-wine);
}

.entry-body h3 {
	margin-top: 1.7em;
	font-size: 23px;
}

.entry-body h4 {
	margin-top: 1.5em;
	font-size: 19px;
}

.entry-body ul,
.entry-body ol {
	padding-left: 1.4em;
}

.entry-body li + li {
	margin-top: .4em;
}

.entry-body ul li::marker {
	color: var(--wine);
}

.entry-body ol li::marker {
	color: var(--wine);
	font-family: var(--font-mono);
	font-weight: 600;
}

.entry-body blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 20px 24px;
	background: var(--sheet);
	border-left: 6px solid var(--mint-ink);
	font-family: var(--font-head);
	font-size: 20px;
	font-style: italic;
}

.entry-body blockquote cite {
	display: block;
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: 13px;
	font-style: normal;
	color: var(--ink-soft);
}

.entry-body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15.5px;
	background: var(--sheet);
}

.entry-body th,
.entry-body td {
	padding: 10px 12px;
	border: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.entry-body th {
	background: var(--slate);
	color: var(--on-dark);
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
}

.entry-body tr:nth-child(even) td {
	background: var(--zinc);
}

.entry-body code,
.entry-body kbd {
	padding: 2px 6px;
	background: var(--zinc-2);
	font-family: var(--font-mono);
	font-size: .86em;
}

.entry-body pre {
	overflow-x: auto;
	padding: 18px 20px;
	background: var(--slate);
	color: var(--on-dark);
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 1.6;
}

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

.entry-body img {
	height: auto;
}

.entry-body figcaption,
.entry-body .wp-element-caption {
	margin-top: 8px;
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--ink-soft);
}

.entry-body hr {
	height: 8px;
	border: 0;
	background: var(--profile);
	margin: 2em 0;
}

/* in-text reading links */
.inset {
	margin: 2em 0;
	padding: 18px 22px 18px 20px;
	background: var(--sheet);
	border: 1px solid var(--line);
	border-left: 6px solid var(--wine);
}

.entry-body .inset {
	margin-top: 2em;
}

.inset__title {
	margin-bottom: 8px;
	color: var(--wine);
	text-transform: uppercase;
	letter-spacing: .08em;
}

.inset__list,
.entry-body .inset__list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 16.5px;
	line-height: 1.45;
}

.inset__list li + li {
	margin-top: 8px;
}

.inset__link {
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
	background: linear-gradient(var(--wine-tint), var(--wine-tint)) 0 100% / 100% 6px no-repeat;
}

.inset__link:hover {
	color: var(--wine);
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	max-width: 780px;
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.entry-tags__key {
	margin-right: 6px;
}

.chip {
	display: inline-block;
	padding: 5px 12px;
	background: var(--sheet);
	border: 1px solid var(--line);
	color: var(--ink);
	font-size: 14px;
	text-decoration: none;
}

.chip:hover {
	border-color: var(--wine);
	color: var(--wine);
}

/* previous / next */
.pager {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	max-width: 780px;
	margin-top: 36px;
}

.pager__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px;
	background: var(--sheet);
	border: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
}

.pager__link:hover {
	border-color: var(--wine);
	color: var(--wine);
}

.pager__link--next {
	grid-column: 2;
	text-align: right;
}

.pager__dir {
	color: var(--wine);
}

.pager__title {
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

/* sidebar */
.entry-aside {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.aside-block {
	background: var(--sheet);
	border: 1px solid var(--line);
}

.aside-title {
	padding: 10px 16px;
	background: var(--slate);
	color: var(--mint);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.toc__list {
	margin: 0;
	padding: 12px 16px 14px 36px;
	font-size: 14.5px;
	line-height: 1.4;
}

.toc__list li + li {
	margin-top: 8px;
}

.toc__list li::marker {
	color: var(--wine);
	font-family: var(--font-mono);
	font-size: 12px;
}

.toc__link {
	color: var(--ink);
	text-decoration: none;
}

.toc__link:hover,
.toc__link.is-active {
	color: var(--wine);
	text-decoration: underline;
}

.side-list {
	padding: 0;
	list-style: none;
}

.side-list__item + .side-list__item {
	border-top: 1px dashed var(--line);
}

.side-list__link {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr);
	gap: 12px;
	padding: 12px 16px;
	color: var(--ink);
	text-decoration: none;
}

.side-list__link:hover {
	background: var(--wine-tint);
	color: var(--wine);
}

.side-list__swatch {
	width: 14px;
	height: 14px;
	margin-top: 4px;
	background: var(--ral-7024);
}

.side-list__swatch.thumb-blank--c1 {
	background: var(--ral-3005);
}

.side-list__swatch.thumb-blank--c2 {
	background: var(--ral-8017);
}

.side-list__swatch.thumb-blank--c4 {
	background: var(--ral-6005);
}

.side-list__swatch.thumb-blank--c5 {
	background: var(--ral-9006);
}

.side-list__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.side-list__date {
	grid-column: 2;
	font-size: 11.5px;
}

.aside-block .searchform {
	padding: 14px 16px;
}

/* ============================================================
   8. Related block
   ============================================================ */

.related {
	margin-top: 48px;
	padding-bottom: 64px;
	background: var(--zinc-2);
}

.related .section-head {
	padding-top: 48px;
}

/* ============================================================
   9. Forms, buttons, pagination, states
   ============================================================ */

.searchform {
	display: flex;
	gap: 0;
	width: 100%;
	max-width: 520px;
}

.searchform__field {
	flex: 1;
	min-width: 0;
	padding: 11px 14px;
	border: 1px solid var(--line);
	border-right: 0;
	border-radius: 0;
	background: var(--sheet);
}

.searchform__field::placeholder {
	color: var(--ink-soft);
}

.searchform__btn,
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	border: 0;
	border-radius: 0;
	background: var(--wine);
	color: var(--sheet);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.searchform__btn:hover,
.btn:hover {
	background: var(--wine-deep);
	color: var(--sheet);
}

.search-panel {
	margin-bottom: 32px;
}

.pagination {
	margin-top: 40px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	background: var(--sheet);
	border: 1px solid var(--line);
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 14px;
	text-decoration: none;
}

.pagination .page-numbers:hover {
	border-color: var(--wine);
	color: var(--wine);
}

.pagination .page-numbers.current {
	background: var(--slate);
	border-color: var(--slate);
	color: var(--mint);
}

.empty {
	padding: 40px;
	background: var(--sheet);
	border: 1px dashed var(--line);
}

.empty__title {
	font-family: var(--font-head);
	font-size: 24px;
	font-weight: 700;
}

.empty__text {
	margin: 8px 0 20px;
	color: var(--ink-soft);
}

.notfound {
	max-width: 760px;
	padding-bottom: 24px;
}

.notfound__code {
	color: var(--wine);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.notfound__title {
	margin-top: 10px;
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 800;
}

.notfound__text {
	margin: 16px 0 28px;
	color: var(--ink-soft);
	font-size: 18px;
}

.notfound__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
}

.comments-area {
	max-width: 780px;
	margin-top: 40px;
}

/* ============================================================
   10. Footer
   ============================================================ */

.site-foot {
	background: var(--slate);
	color: var(--on-dark-soft);
	font-size: 15px;
}

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

.site-foot a:hover {
	color: var(--mint);
}

.site-foot__grid {
	display: grid;
	grid-template-columns: 1.4fr 1.2fr 1fr 1fr;
	gap: 40px;
	padding-top: 56px;
	padding-bottom: 48px;
}

.foot-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--on-dark);
}

.foot-brand__name {
	font-family: var(--font-head);
	font-size: 23px;
	font-weight: 800;
}

.foot-brand__accent {
	color: var(--mint);
}

.foot-text {
	margin-top: 16px;
	max-width: 360px;
}

.foot-title {
	margin-bottom: 16px;
	color: var(--mint);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.foot-facts {
	padding: 0;
	list-style: none;
}

.foot-facts li {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid var(--slate-3);
}

.foot-facts__key {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--fog);
}

.foot-menu {
	padding: 0;
	list-style: none;
}

.foot-menu li + li {
	margin-top: 8px;
}

.foot-menu a {
	text-decoration: none;
}

.foot-menu--pages {
	margin-top: 20px;
}

.site-foot .searchform__field {
	background: var(--slate-2);
	border-color: var(--slate-3);
	color: var(--on-dark);
}

.site-foot .searchform__field::placeholder {
	color: var(--fog);
}

.foot-bottom {
	border-top: 1px solid var(--slate-3);
	font-size: 13px;
}

.foot-bottom__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 18px;
	padding-bottom: 18px;
}

/* ============================================================
   11. Responsive
   ============================================================ */

@media (max-width: 1100px) {
	.lead__inner {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 24px;
	}

	.fan {
		height: 320px;
	}

	.fan__strip {
		width: 92px;
		height: 280px;
		margin-left: -46px;
	}

	.spot {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
	}

	.spot > .card--lead {
		grid-column: 1 / -1;
		grid-row: auto;
	}

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

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

	.site-head__inner {
		flex-wrap: wrap;
		gap: 16px;
		min-height: 72px;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.site-nav {
		display: none;
		flex-basis: 100%;
		margin-left: 0;
	}

	.site-nav.is-open {
		display: block;
	}

	.nav-list {
		flex-direction: column;
		gap: 0;
		border-top: 1px solid var(--line);
	}

	.nav-list a {
		padding: 12px 0;
		border-bottom: 1px solid var(--line-soft);
	}

	.nav-list .sub-menu,
	.nav-list .children {
		position: static;
		display: block;
		padding: 0 0 0 16px;
		box-shadow: none;
		background: none;
	}

	.entry-head__inner,
	.entry-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.passport {
		max-width: 520px;
	}

	.entry-aside {
		position: static;
	}

	.toc {
		display: none;
	}

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

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

@media (max-width: 760px) {
	:root {
		--gut: 16px;
	}

	body {
		font-size: 16px;
	}

	.topline__item {
		display: none;
	}

	.brand__sub {
		display: none;
	}

	.lead__inner {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.fan {
		display: none;
	}

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

	.specs__item:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.specs__item:nth-child(n + 3) {
		margin-top: 12px;
		border-top: 1px solid var(--line);
	}

	.section {
		padding-top: 40px;
	}

	.section-head__note {
		white-space: normal;
	}

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

	.card--side {
		flex-direction: column;
	}

	.card--side .card__media {
		flex: none;
		aspect-ratio: 3 / 2;
		min-height: 0;
	}

	.card--side .card__body {
		border-left: 0;
		border-top: 4px solid var(--wine);
	}

	.row {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 12px;
	}

	.row__num {
		position: absolute;
		top: 20px;
		left: 4px;
		z-index: 1;
		padding: 1px 4px;
		background: var(--sheet);
		font-size: 11px;
	}

	.row__media {
		width: 64px;
		height: 64px;
	}

	.row__title {
		font-size: 16px;
	}

	.entry-body {
		font-size: 17px;
	}

	.entry-body h2 {
		font-size: 24px;
	}

	.entry-body table {
		display: block;
		overflow-x: auto;
	}

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

	.pager__link--next {
		grid-column: auto;
	}

	.site-foot__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
}

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

/* ============================================================
   12. WordPress core classes
   ============================================================ */

.alignleft {
	float: left;
	margin: .3em 1.4em 1em 0;
}

.alignright {
	float: right;
	margin: .3em 0 1em 1.4em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide {
	max-width: none;
	margin-left: -40px;
	margin-right: -40px;
}

.alignfull {
	max-width: none;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	margin-top: 8px;
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--ink-soft);
}

.sticky .card__index {
	background: var(--wine);
	color: var(--sheet);
}

.bypostauthor {
	display: block;
}

.gallery-caption {
	font-size: 13px;
}

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

.screen-reader-text:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	white-space: normal;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--slate);
	color: var(--sheet);
	font-weight: 600;
}

.skip-link:focus {
	top: 12px;
	color: var(--sheet);
}

.page-links {
	margin-top: 28px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.page-links a,
.page-links > .post-page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	border: 1px solid var(--line);
	background: var(--sheet);
}

@media (max-width: 960px) {
	.alignwide {
		margin-left: 0;
		margin-right: 0;
	}
}
