/*
Theme Name: dds_churilovocity.ru
Theme URI: https://churilovocity.ru/
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: chtoesli
*/

/* ---------- Шрифты ---------- */
@font-face {
    font-family: "Oswald";
    src: url("fonts/oswald.woff2") format("woff2");
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PT Sans";
    src: url("fonts/ptsans-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PT Sans";
    src: url("fonts/ptsans-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Caveat";
    src: url("fonts/caveat.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Переменные ---------- */
:root {
    --paper: #D9E0D4;
    --grid: #B7C2B0;
    --graphite-bar: #2E332F;
    --ink: #1F2A38;
    --text: #23272B;
    --muted: #6E7570;
    --mustard: #E8B23A;
    --brick: #C0503C;
    --pencil: #8C9489;
    --sheet: #FFFFFF;
    --tracing: #EEF2EA;
    --mustard-soft: #F6E7C2;
    --font-head: "Oswald", "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    --font-body: "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --torn: polygon(0% 1.6%, 6% 0%, 14% 1.3%, 23% .2%, 33% 1.5%, 44% .3%, 55% 1.4%, 66% .1%, 77% 1.3%, 88% .2%, 100% 1.1%, 99.2% 12%, 100% 25%, 99.1% 38%, 100% 52%, 99.3% 66%, 100% 80%, 99.1% 92%, 100% 99%, 91% 100%, 80% 98.8%, 68% 100%, 57% 98.9%, 45% 100%, 34% 98.7%, 22% 100%, 11% 98.9%, 0% 100%, .8% 88%, 0% 74%, .9% 60%, 0% 46%, .7% 32%, 0% 18%);
    --strip: polygon(0% 8%, 9% 0%, 30% 6%, 52% 0%, 74% 7%, 92% 0%, 100% 10%, 98.5% 50%, 100% 92%, 88% 100%, 66% 94%, 45% 100%, 24% 93%, 6% 100%, 0% 90%, 1.5% 48%);
}

/* ---------- Сброс и основа ---------- */
*,
*::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: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 18px 18px;
    overflow-wrap: break-word;
    hyphens: auto;
}

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

img {
    height: auto;
}

p {
    margin: 0 0 1em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.12;
    color: var(--text);
    margin: 0 0 .6em;
    overflow-wrap: break-word;
    hyphens: manual;
}

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: var(--brick);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color .15s ease, background-color .15s ease;
}

a:hover {
    color: var(--brick);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px dashed var(--brick);
    outline-offset: 3px;
}

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--mustard);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid var(--text);
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Клейкая лента ---------- */
.tape {
    position: absolute;
    display: block;
    width: 110px;
    height: 26px;
    background: rgba(232, 178, 58, .9);
    clip-path: polygon(0 10%, 4% 0, 96% 6%, 100% 0, 98% 50%, 100% 100%, 5% 92%, 0 100%, 2% 50%);
    pointer-events: none;
}

/* ---------- Кнопка из жёлтой бумаги ---------- */
.btn-paper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .5rem 1.2rem .55rem;
    font-family: var(--font-head);
    font-size: .98rem;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.2;
    color: var(--text);
    background: var(--mustard);
    border: 1.5px solid var(--text);
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
    clip-path: polygon(0 5%, 18% 0, 47% 4%, 76% 0, 100% 6%, 99% 48%, 100% 95%, 81% 100%, 52% 96%, 24% 100%, 0 96%, 1% 52%);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.btn-paper:hover,
.btn-paper:focus-visible {
    background: var(--text);
    color: var(--mustard);
    transform: translate(1px, 1px);
}

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
}

.masthead__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.3rem 0 1.4rem;
}

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

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

.brand__mark {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
    color: var(--text);
}

.brand__bulb {
    width: 46px;
    height: 58px;
    transform: rotate(-4deg);
}

.brand-logo {
    display: block;
    max-width: 72px;
    max-height: 72px;
    width: auto;
}

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

.brand__name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.2rem, 4.6vw, 1.85rem);
    line-height: 1.05;
    letter-spacing: .005em;
}

.brand__desc {
    margin-top: .3rem;
    max-width: 46ch;
    hyphens: manual;
    font-size: .86rem;
    line-height: 1.3;
    color: var(--text);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .9rem;
    font-family: var(--font-head);
    font-size: .95rem;
    color: var(--text);
    background: var(--sheet);
    border: 1.5px solid var(--text);
    border-radius: 0;
    cursor: pointer;
}

.nav-toggle__lines,
.nav-toggle__lines::before,
.nav-toggle__lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: transform .2s ease;
}

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

.nav-toggle__lines::before { top: -6px; }
.nav-toggle__lines::after { top: 6px; }

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

.topnav {
    display: none;
    width: 100%;
}

.topnav.is-open {
    display: block;
}

.topnav__list {
    list-style: none;
    margin: 0;
    padding: .6rem 0 0;
    border-top: 1px dashed var(--pencil);
}

.topnav__list li {
    position: relative;
}

.topnav__list a {
    position: relative;
    display: inline-block;
    padding: .5rem .8rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.topnav__list a:hover {
    color: var(--brick);
}

.topnav__list .current-menu-item > a::after,
.topnav__list .current_page_item > a::after {
    content: "";
    position: absolute;
    inset: -3px -6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44' preserveAspectRatio='none'%3E%3Cpath d='M14 24C10 10 40 4 64 4c28 0 52 6 52 19 0 13-28 18-56 18C32 41 6 35 7 23 8 14 26 8 46 6' fill='none' stroke='%23C0503C' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    pointer-events: none;
}

.masthead__band {
    position: relative;
    height: 28px;
    background: var(--graphite-bar);
}

.tape--band {
    left: 45%;
    top: -9px;
    width: 118px;
    height: 28px;
    transform: rotate(-2.5deg);
}

/* ---------- Главная: общее ---------- */
.front {
    padding: 2.4rem 0 1rem;
}

.front__wrap {
    width: 100%;
}

.zone {
    position: relative;
    margin: 0 0 3.6rem;
}

.zone__title {
    position: relative;
    margin: 0 0 1.8rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.75rem, 6.4vw, 3.3rem);
    line-height: 1.02;
    letter-spacing: .004em;
    text-transform: uppercase;
}

.marker {
    padding: 0 .12em;
    background-image: linear-gradient(176deg, transparent 0 55%, rgba(232, 178, 58, .92) 55% 91%, transparent 91%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.zone__title::after {
    content: "";
    display: inline-block;
    width: 64px;
    height: 24px;
    margin-left: .35em;
    vertical-align: .3em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 24'%3E%3Cpath d='M3 20C20 15 38 10 58 4M58 4l-9 1M58 4l-4 8' fill='none' stroke='%238C9489' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pencil-num {
    display: none;
    position: absolute;
    left: -3.3rem;
    top: -.2rem;
    width: 2.1rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    font-family: var(--font-hand);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--brick);
    border: 1.5px solid var(--brick);
    border-radius: 54% 46% 50% 50% / 50% 55% 45% 50%;
    transform: rotate(-8deg);
}

.empty-note {
    padding: 1.1rem 1.3rem;
    background: var(--sheet);
    border: 1px dashed var(--pencil);
    color: var(--muted);
}

/* ---------- Блок 1: словарь ---------- */
.lexicon {
    list-style: none;
    margin: 0;
    padding: 0 .75rem 0 .4rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem 1.8rem;
}

.lexicon__item {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: 1.05rem 1.25rem 1.1rem;
    filter: drop-shadow(0 3px 3px rgba(35, 39, 43, .18));
    transform: rotate(var(--tilt, -1deg));
    transition: transform .2s ease;
}

.lexicon__item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--sheet);
    clip-path: var(--torn);
}

.lexicon__item:nth-child(1) { --tilt: -1.6deg; }
.lexicon__item:nth-child(2) { --tilt: 1.1deg; }
.lexicon__item:nth-child(3) { --tilt: -.7deg; }
.lexicon__item:nth-child(4) { --tilt: .9deg; }
.lexicon__item:nth-child(5) { --tilt: -1.3deg; }
.lexicon__item:nth-child(6) { --tilt: 1.7deg; }

.lexicon__item:hover {
    transform: rotate(0deg) translateY(-3px);
}

.lexicon__item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.lexicon__item dfn {
    font-style: normal;
    font-weight: 700;
}

.lexicon__ring {
    position: absolute;
    inset: -14px -16px -12px -18px;
    width: calc(100% + 34px);
    height: calc(100% + 26px);
    max-width: none;
    pointer-events: none;
}

.lexicon__pin {
    position: absolute;
    right: -12px;
    top: -18px;
    width: 22px;
    height: 30px;
    background: var(--mustard);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(28deg);
    clip-path: polygon(50% 100%, 0 38%, 6% 12%, 30% 0, 70% 0, 94% 12%, 100% 38%);
}

/* ---------- Блок 2: разбор по частям ---------- */
.parts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.parts__figure {
    position: relative;
    margin: 0;
    min-width: 0;
}

.parts__figure img {
    display: block;
    width: 100%;
}

.parts__label {
    position: absolute;
    transform: translateY(-50%);
    font-family: var(--font-body);
    font-size: clamp(.68rem, 2.4vw, 1.02rem);
    font-weight: 400;
    line-height: 1.12;
    color: var(--text);
    white-space: nowrap;
    hyphens: none;
}

.parts__label--coil { left: 1.4%; top: 51.4%; }
.parts__label--thermo { left: 1.4%; top: 79.2%; }
.parts__label--steam { left: 78.4%; top: 55.2%; }
.parts__label--contact { left: 74.8%; top: 79.2%; }

.parts__list {
    list-style: none;
    counter-reset: part;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.parts__list li {
    position: relative;
    counter-increment: part;
    padding: 0 0 0 3.2rem;
    margin: 0 0 1.35rem;
}

.parts__list li:last-child {
    margin-bottom: 0;
}

.parts__list li::before {
    content: counter(part);
    position: absolute;
    left: 0;
    top: -.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    color: #FFFFFF;
    background: var(--brick);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(192, 80, 60, .22);
}

.parts__list h3 {
    margin: 0 0 .2rem;
    font-size: 1.22rem;
    font-weight: 600;
}

.parts__list p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.45;
    color: #4D5450;
}

/* ---------- Последние записи ---------- */
.zone__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1.5rem;
}

.zone__more {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 500;
}

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

.card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: .85rem .85rem 1.15rem;
    filter: drop-shadow(0 3px 3px rgba(35, 39, 43, .2));
    transform: rotate(var(--tilt, 0deg));
    transition: transform .2s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--sheet);
    clip-path: var(--torn);
}

.cards .card:nth-child(3n+1) { --tilt: -.8deg; }
.cards .card:nth-child(3n+2) { --tilt: .5deg; }
.cards .card:nth-child(3n) { --tilt: -.3deg; }

.card:hover {
    transform: rotate(0deg) translateY(-4px);
}

.card__tape {
    position: absolute;
    left: 50%;
    top: -11px;
    z-index: 2;
    width: 96px;
    height: 24px;
    background: rgba(232, 178, 58, .9);
    clip-path: polygon(0 10%, 4% 0, 96% 6%, 100% 0, 98% 50%, 100% 100%, 5% 92%, 0 100%, 2% 50%);
    transform: translateX(-50%) rotate(-2deg);
}

.card-thumb {
    display: block;
    overflow: hidden;
    background: var(--tracing);
}

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7.4;
    object-fit: cover;
    transition: transform .3s ease;
}

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

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: .9rem .2rem 0;
}

.card-title {
    margin: 0 0 .5rem;
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.14;
}

.card-title a {
    text-decoration: none;
}

.card-title a:hover {
    color: var(--text);
    text-decoration: underline wavy var(--brick) 1px;
    text-underline-offset: 4px;
}

.card-excerpt {
    font-size: .92rem;
    line-height: 1.42;
    color: var(--text);
}

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

.card-date {
    margin-top: auto;
    padding-top: .3rem;
    font-size: .82rem;
    color: var(--muted);
}

.card-more {
    align-self: flex-start;
    margin-top: .7rem;
}

/* ---------- Блок 3: ситуация на разбор ---------- */
.case {
    position: relative;
    padding: 2.4rem 1.4rem 1.8rem;
    color: #F2F0E8;
    background: var(--ink);
    box-shadow: 0 6px 0 rgba(31, 42, 56, .14);
}

.tape--case {
    left: 38%;
    top: -12px;
    width: 120px;
    transform: rotate(1.5deg);
}

.case__kicker {
    margin: 0 0 .3rem;
    font-family: var(--font-hand);
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--mustard);
}

.case__quote {
    max-width: 34ch;
    margin: 0 0 1.6rem;
    padding-right: 3.6rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.45rem, 5.2vw, 2.5rem);
    line-height: 1.12;
    color: #FFFFFF;
}

.case__check {
    position: absolute;
    right: 1rem;
    top: 2.2rem;
    width: clamp(56px, 11vw, 116px);
    height: auto;
}

.case__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.case__steps li {
    align-self: flex-start;
    padding: .45rem 1.1rem .5rem;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--text);
    background: var(--mustard);
    clip-path: var(--strip);
    transform: rotate(-.8deg);
}

.case__steps li:nth-child(2) { transform: rotate(.6deg); }
.case__steps li:nth-child(3) { transform: rotate(-.4deg); }

.case__steps span {
    margin-right: .2em;
}

.pencil-num--light {
    color: var(--brick);
}

/* ---------- Блок 4: куда смотреть дальше ---------- */
.next {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}

.ruler {
    position: relative;
    list-style: none;
    margin: 0;
    padding: .3rem 0 .3rem 3.4rem;
    min-width: 0;
}

.ruler::before {
    content: "";
    position: absolute;
    left: .9rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text);
}

.ruler::after {
    content: "";
    position: absolute;
    left: .9rem;
    top: 0;
    bottom: 0;
    width: 12px;
    background: repeating-linear-gradient(to bottom, var(--text) 0 1.5px, transparent 1.5px 13px);
}

.ruler li {
    position: relative;
    margin: 0 0 1.15rem;
}

.ruler li:last-child {
    margin-bottom: 0;
}

.ruler li::before {
    content: "";
    position: absolute;
    left: -2.5rem;
    top: .82rem;
    width: 1.9rem;
    height: 2px;
    background: var(--text);
}

.ruler a {
    font-family: var(--font-head);
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.ruler a:hover {
    color: var(--text);
    text-decoration: underline wavy var(--brick) 1px;
    text-underline-offset: 5px;
}

.ruler p {
    margin: .1rem 0 0;
    font-size: .9rem;
    line-height: 1.4;
    color: #4D5450;
}

.snaps {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    padding: .5rem .5rem 1rem;
    min-width: 0;
}

.snap {
    grid-row: 1;
    position: relative;
    margin: 0;
    padding: 7px 7px 28px;
    background: var(--sheet);
    border: 1px solid #D3D8CF;
    box-shadow: 0 5px 12px rgba(35, 39, 43, .22);
    transition: transform .2s ease;
}

.snap img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.06;
    object-fit: cover;
}

.snap--one {
    grid-column: 1 / 6;
    z-index: 3;
    margin-top: 2.6rem;
    transform: rotate(-6.5deg);
}

.snap--two {
    grid-column: 5 / 10;
    z-index: 2;
    transform: rotate(4.5deg);
}

.snap--three {
    grid-column: 9 / 13;
    z-index: 1;
    margin-top: 1.4rem;
    transform: rotate(8deg);
}

.snap:hover {
    z-index: 5;
    transform: rotate(0deg) scale(1.04);
}

/* ---------- Внутренние страницы ---------- */
.inner {
    padding: 0 0 1rem;
}

.crumbs {
    margin: 1.6rem 0 1.4rem;
    font-size: .88rem;
    color: var(--muted);
}

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

.crumbs__sep {
    margin: 0 .3rem;
    color: var(--brick);
}

.layout-single,
.layout-with-sidebar {
    display: block;
}

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

.page-head {
    margin: 0 0 2rem;
}

.page-head__title {
    margin: 0 0 .6rem;
    font-weight: 700;
    font-size: clamp(1.8rem, 6vw, 3rem);
    line-height: 1.04;
    text-transform: uppercase;
}

.page-head__lead {
    margin: 0;
    max-width: 60ch;
    color: var(--muted);
}

.page-head__lead p {
    margin: 0;
}

.empty-sheet .seek {
    margin-top: 1rem;
}

/* Лист записи */
.sheet {
    position: relative;
    padding: 2.2rem 1.3rem 1.8rem;
    background-color: var(--sheet);
    background-image: linear-gradient(90deg, transparent 0 .7rem, rgba(192, 80, 60, .35) .7rem calc(.7rem + 1px), transparent calc(.7rem + 1px));
    border: 1px solid #CBD2C6;
    box-shadow: 0 4px 0 rgba(35, 39, 43, .07), 0 10px 24px rgba(35, 39, 43, .08);
}

.sheet__tape {
    position: absolute;
    left: 50%;
    top: -12px;
    width: 116px;
    height: 26px;
    background: rgba(232, 178, 58, .9);
    clip-path: polygon(0 10%, 4% 0, 96% 6%, 100% 0, 98% 50%, 100% 100%, 5% 92%, 0 100%, 2% 50%);
    transform: translateX(-50%) rotate(-1.5deg);
}

.sheet__title {
    margin: 0 0 .7rem;
    font-weight: 700;
    font-size: clamp(1.7rem, 5.4vw, 2.7rem);
    line-height: 1.06;
}

.sheet__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.2rem;
    margin: 0 0 1.6rem;
    padding-bottom: .9rem;
    font-size: .88rem;
    color: var(--muted);
    border-bottom: 1px dashed var(--pencil);
}

.sheet__cover {
    margin: 0 0 1.6rem;
}

.sheet__cover img {
    display: block;
    width: 100%;
}

.sheet__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.8rem 0 0;
}

.sheet__tags a {
    padding: .2rem .6rem;
    font-size: .88rem;
    text-decoration: none;
    background: var(--tracing);
    border: 1px solid var(--pencil);
}

/* Типографика содержимого */
.entry {
    min-width: 0;
}

.entry > *:last-child {
    margin-bottom: 0;
}

.entry p {
    margin: 0 0 1.1em;
    background: none;
}

.entry h2 {
    position: relative;
    margin: 2.1rem 0 .9rem;
    padding-bottom: .35rem;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
}

.entry h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 4.5rem;
    height: 8px;
    background: rgba(232, 178, 58, .9);
    transform: skewX(-18deg) rotate(-1deg);
}

.entry h3 {
    margin: 1.8rem 0 .7rem;
    font-size: clamp(1.2rem, 3.4vw, 1.4rem);
}

.entry h4 {
    margin: 1.5rem 0 .6rem;
    font-size: 1.15rem;
}

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

.entry li {
    margin: 0 0 .45em;
}

.entry ul {
    list-style: none;
}

.entry ul > li {
    position: relative;
}

.entry ul > li::before {
    content: "";
    position: absolute;
    left: -1.2rem;
    top: .62em;
    width: 8px;
    height: 8px;
    background: var(--mustard);
    border: 1.5px solid var(--text);
    transform: rotate(12deg);
}

.entry ol > li::marker {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--brick);
}

.entry blockquote {
    position: relative;
    margin: 1.6rem 0;
    padding: 1.1rem 1.4rem 1.1rem 1.6rem;
    background: var(--mustard-soft);
    border-left: 5px solid var(--mustard);
    font-size: 1.08rem;
}

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

.entry blockquote cite {
    display: block;
    margin-top: .5rem;
    font-size: .9rem;
    font-style: normal;
    color: var(--muted);
}

.entry table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border: 1px solid var(--pencil);
    font-size: .95rem;
}

.entry th,
.entry td {
    padding: .55rem .75rem;
    border: 1px solid var(--pencil);
    text-align: left;
    vertical-align: top;
}

.entry th {
    font-family: var(--font-head);
    font-weight: 500;
    background: #E6ECE1;
}

.entry .wp-block-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

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

.entry figure {
    margin: 1.6rem 0;
}

.entry figcaption {
    margin-top: .45rem;
    font-size: .86rem;
    color: var(--muted);
}

.entry code {
    padding: .1em .35em;
    font-size: .92em;
    background: var(--tracing);
    border: 1px solid #D3D8CF;
}

.entry pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: var(--tracing);
    border: 1px solid #D3D8CF;
}

.entry pre code {
    padding: 0;
    border: 0;
}

.entry hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px dashed var(--pencil);
}

.entry__pages {
    margin-top: 1.4rem;
    font-family: var(--font-head);
}

.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* Соседние записи */
.sheet-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin: 2rem 0 0;
}

.sheet-nav__link {
    display: block;
    padding: 1rem 1.2rem;
    font-family: var(--font-head);
    font-size: 1.1rem;
    line-height: 1.2;
    text-decoration: none;
    background: var(--tracing);
    border: 1px solid var(--pencil);
    transition: transform .15s ease, background-color .15s ease;
}

.sheet-nav__link span {
    display: block;
    margin-bottom: .25rem;
    font-family: var(--font-body);
    font-size: .82rem;
    color: var(--muted);
}

.sheet-nav__link:hover {
    color: var(--text);
    background: var(--mustard-soft);
    transform: translate(1px, 1px);
}

.sheet-nav__link--next {
    text-align: right;
}

/* ---------- Сайдбар ---------- */
.sidebar {
    position: relative;
    min-width: 0;
    margin-top: 2.6rem;
    padding: 1.8rem 1.3rem 1.4rem;
    color: var(--text);
    background-color: var(--tracing);
    background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(140, 148, 137, .25) 27px 28px);
    border: 1px solid var(--pencil);
}

.sidebar::before {
    content: "";
    position: absolute;
    left: 1.4rem;
    top: -11px;
    width: 84px;
    height: 22px;
    background: rgba(232, 178, 58, .9);
    clip-path: polygon(0 10%, 4% 0, 96% 6%, 100% 0, 98% 50%, 100% 100%, 5% 92%, 0 100%, 2% 50%);
    transform: rotate(-3deg);
}

.sidebar .note-widget {
    margin: 0 0 1.8rem;
    color: var(--text);
}

.sidebar .note-widget:last-child {
    margin-bottom: 0;
}

.sidebar .note-widget__title {
    margin: 0 0 .9rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text);
}

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

.sidebar li {
    padding: .5rem 0;
    border-bottom: 1px dashed var(--pencil);
    line-height: 1.35;
}

.sidebar li:last-child {
    border-bottom: 0;
}

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

.sidebar a:hover {
    color: var(--brick);
    text-decoration: underline wavy var(--brick) 1px;
}

.sidebar .post-date,
.sidebar .rss-date {
    display: block;
    font-size: .82rem;
    color: var(--muted);
}

.sidebar p {
    color: var(--text);
}

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin: 2.6rem 0 0;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 .75rem;
    font-family: var(--font-head);
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    background: var(--sheet);
    border: 1.5px solid var(--text);
    transition: background-color .15s ease, transform .15s ease;
}

.pager a.page-numbers:hover {
    color: var(--text);
    background: var(--mustard);
    transform: translate(1px, 1px);
}

.pager .page-numbers.current {
    color: #FFFFFF;
    background: var(--ink);
    border-color: var(--ink);
}

.pager .page-numbers.dots {
    min-width: auto;
    padding: 0 .3rem;
    background: transparent;
    border: 0;
}

/* ---------- Поиск ---------- */
.seek {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    max-width: 520px;
}

.seek__field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .6rem .8rem;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--sheet);
    border: 1.5px solid var(--text);
    border-radius: 0;
}

/* ---------- 404 ---------- */
.lost {
    position: relative;
    max-width: 720px;
    margin: 1rem auto 0;
    padding: 2.6rem 1.4rem 2.2rem;
    text-align: left;
    background: var(--sheet);
    border: 1px solid #CBD2C6;
    box-shadow: 0 10px 24px rgba(35, 39, 43, .08);
}

.tape--lost {
    left: 50%;
    top: -12px;
    transform: translateX(-50%) rotate(2deg);
}

.lost__code {
    display: inline-block;
    margin: 0 0 .4rem;
    padding: 0 .5rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(4rem, 18vw, 7.5rem);
    line-height: 1;
    color: var(--text);
    border: 2px solid var(--brick);
    border-radius: 48% 52% 46% 54% / 55% 45% 55% 45%;
    transform: rotate(-3deg);
}

.lost__title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    text-transform: uppercase;
}

.lost__text {
    color: var(--muted);
}

.lost__home {
    margin-top: 1.4rem;
}

/* ---------- Комментарии ---------- */
.talk {
    margin: 2.6rem 0 0;
    padding: 1.8rem 1.3rem;
    background: var(--tracing);
    border: 1px solid var(--pencil);
}

.talk__title,
.comment-reply-title {
    margin: 0 0 1.2rem;
    font-size: 1.5rem;
    text-transform: uppercase;
}

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

.talk__list .children {
    margin-left: 1.2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--mustard);
}

.talk__card {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    background: var(--sheet);
    border: 1px solid #D3D8CF;
}

.talk__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .8rem;
    margin-bottom: .5rem;
}

.talk__meta img {
    display: block;
    border-radius: 50%;
}

.talk__author {
    font-weight: 700;
}

.talk__date {
    font-size: .82rem;
    color: var(--muted);
}

.talk__moderation {
    margin: 0 0 .5rem;
    font-size: .9rem;
    color: var(--brick);
}

.talk__text p:last-child {
    margin-bottom: 0;
}

.talk__reply {
    margin-top: .5rem;
    font-size: .9rem;
}

.talk__closed {
    color: var(--muted);
}

.comment-respond {
    margin-top: 1.6rem;
}

.comment-form p {
    margin: 0 0 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: .3rem;
    font-size: .9rem;
    font-weight: 700;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .75rem;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--sheet);
    border: 1.5px solid var(--text);
    border-radius: 0;
}

.comment-form-cookies-consent {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
}

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

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

/* ---------- Подвал ---------- */
.colophon {
    margin-top: 3.5rem;
    padding: 2.8rem 0 1.4rem;
    color: #CCD3C9;
    background: var(--ink);
}

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

.colophon__col {
    min-width: 0;
}

.colophon .note-widget {
    margin: 0 0 1.4rem;
    color: #CCD3C9;
}

.colophon .note-widget:last-child {
    margin-bottom: 0;
}

.colophon .note-widget__title {
    margin: 0 0 .7rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: #F4F2EA;
}

.colophon p,
.colophon .textwidget {
    font-size: .93rem;
    line-height: 1.5;
    color: #CCD3C9;
}

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

.colophon li {
    margin: 0 0 .35rem;
}

.colophon a {
    color: #EEF1EA;
    text-decoration: underline wavy rgba(224, 112, 92, .9) 1px;
    text-underline-offset: 4px;
    font-size: .93rem;
}

.colophon a:hover {
    color: var(--mustard);
}

.colophon__copy {
    margin: 2.2rem 0 0;
    padding-top: 1.1rem;
    font-size: .82rem;
    text-align: center;
    color: #A9B1AA;
    border-top: 1px solid rgba(204, 211, 201, .18);
}

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

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .8rem;
    max-width: 640px;
    margin-inline: auto;
    padding: 1.3rem 1.3rem 1.1rem;
    color: var(--text);
    background: #FFFDF6;
    border: 1px solid var(--pencil);
    box-shadow: 0 10px 28px rgba(31, 42, 56, .28);
    transform: rotate(-.5deg);
}

.tape--banner {
    left: 1.6rem;
    top: -11px;
    width: 90px;
    height: 22px;
    transform: rotate(-3deg);
}

.cookie-banner__text {
    margin: 0;
    font-size: .92rem;
    line-height: 1.45;
}

/* ---------- Планшет ---------- */
@media (min-width: 600px) {
    .lexicon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .case {
        padding: 2.8rem 2.4rem 2.2rem;
    }

    .case__steps {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem 1.4rem;
    }

    .sheet {
        padding: 2.6rem 2.2rem 2.2rem 3.4rem;
        background-image: linear-gradient(90deg, transparent 0 2.2rem, rgba(192, 80, 60, .35) 2.2rem calc(2.2rem + 1px), transparent calc(2.2rem + 1px));
    }

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

    .sheet-nav__link--next {
        grid-column: 2;
    }

    .lost {
        padding: 3rem 2.6rem 2.6rem;
    }

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

    .cookie-banner {
        flex-direction: row;
        align-items: center;
        gap: 1.2rem;
        padding: 1.2rem 1.4rem;
    }

    .cookie-banner__btn {
        flex: 0 0 auto;
    }

    .talk {
        padding: 2rem 2rem;
    }
}

/* ---------- Десктоп ---------- */
@media (min-width: 960px) {
    .nav-toggle {
        display: none;
    }

    .topnav,
    .topnav.is-open {
        display: block;
        width: auto;
    }

    .topnav__list {
        display: flex;
        align-items: center;
        padding: 0;
        border-top: 0;
    }

    .topnav__list li {
        display: flex;
        align-items: center;
    }

    .topnav__list li + li::before {
        content: "";
        display: block;
        width: 1.5rem;
        height: 1px;
        margin: 0 .1rem;
        background: var(--text);
        transform: rotate(-2deg);
    }

    .topnav__list a {
        padding: .45rem .55rem;
        font-size: .9rem;
    }

    .front {
        padding-top: 3rem;
    }

    .front__wrap {
        width: 85%;
        margin-left: auto;
        margin-right: auto;
    }

    .zone {
        margin-bottom: 4.4rem;
    }

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

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

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

    .case {
        padding: 3.2rem 3.4rem 2.6rem;
    }

    .case__check {
        right: 2.4rem;
        top: 2.4rem;
    }

    .next {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
        gap: 2.4rem;
    }

    .layout-single {
        display: block;
        width: 85%;
        margin-left: auto;
        margin-right: auto;
    }

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

    .layout-with-sidebar .sidebar {
        margin-top: 0;
    }

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

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

@media (min-width: 1180px) {
    .pencil-num {
        display: flex;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
