/*
Theme Name: dds_bearingpoint.ru
Theme URI: https://bearingpoint.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: svzg
*/

/* ===== Шрифты ===== */
@font-face { font-family: "Plex Mono Local"; src: url("fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono Local"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono Local"; src: url("fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono Local"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oswald Local"; src: url("fonts/oswald-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald Local"; src: url("fonts/oswald-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans Local"; src: url("fonts/pt-sans-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans Local"; src: url("fonts/pt-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans Local"; src: url("fonts/pt-sans-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans Local"; src: url("fonts/pt-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans Local"; src: url("fonts/pt-sans-cyrillic-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans Local"; src: url("fonts/pt-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Narrow Local"; src: url("fonts/pt-sans-narrow-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Narrow Local"; src: url("fonts/pt-sans-narrow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat Local"; src: url("fonts/caveat-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat Local"; src: url("fonts/caveat-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }

/* ===== Переменные ===== */
:root {
    --graphite: #23262B;
    --grid-line: #34383F;
    --paper: #F2EFE6;
    --paper-deep: #E6E1D3;
    --paper-edge: #C9C3B2;
    --ink: #1E2126;
    --muted: #6B6F76;
    --pencil: #D9653B;
    --pencil-dark: #B84F29;
    --navy: #2E4A6B;
    --sage: #8FA396;
    --sage-soft: #C7D1C9;
    --aside-bg: #2B2F35;
    --on-dark: #E9E5DA;
    --on-dark-muted: #A9AEB5;
    --f-mono: "Plex Mono Local", "IBM Plex Mono", "Roboto Mono", "Consolas", monospace;
    --f-head: "Oswald Local", "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
    --f-narrow: "PT Narrow Local", "PT Sans Narrow", "Arial Narrow", sans-serif;
    --f-text: "PT Sans Local", "PT Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --f-hand: "Caveat Local", "Caveat", "Segoe Print", cursive;
}

/* ===== Сброс и база ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-text);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--on-dark);
    background-color: var(--graphite);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(rgba(52, 56, 63, .45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 56, 63, .45) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
    background-position: -1px -1px;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: underline dashed 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--pencil); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--pencil); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 1.4em 0 .6em; line-height: 1.25; color: var(--ink); overflow-wrap: break-word; hyphens: auto; }
p, li, td, th, dd, figcaption, blockquote { overflow-wrap: break-word; hyphens: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-to { position: absolute; left: 1rem; top: -60px; z-index: 100; padding: .6rem 1rem; background: var(--pencil); color: #fff; font-weight: 700; text-decoration: none; }
.skip-to:focus { top: 1rem; color: #fff; }

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

/* ===== Кнопка-плашка ===== */
.btn-plate {
    display: inline-block;
    padding: .6rem 1.4rem;
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: .9rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 0;
    box-shadow: 5px 5px 0 var(--pencil);
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .12s;
}
.btn-plate:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--pencil); background: #fff; color: var(--ink); }
.btn-plate:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--pencil); }

.dash-link {
    font-family: var(--f-mono);
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 2px dashed currentColor;
    padding-bottom: 1px;
}
.dash-link:hover { color: var(--pencil); }

/* ===== Шапка ===== */
.topbar { padding: 2.4rem 0 2rem; background: var(--graphite); border-bottom: 1px solid var(--grid-line); }
.topbar-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: flex-start; gap: 1rem; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-logo { width: 64px; height: 64px; display: block; object-fit: contain; }
.brand-text { min-width: 0; max-width: 34rem; }
.brand-name {
    display: block;
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.25;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #F4F1E8;
    text-decoration: none;
}
.brand-name:hover { color: #F4F1E8; }
.brand-name-main { display: block; font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.1; letter-spacing: .07em; }
.brand-name-sub { display: block; margin-top: .3rem; font-size: clamp(.82rem, 1.4vw, 1rem); letter-spacing: .1em; color: #CFCBC0; }
.brand-name:hover .brand-name-main { color: var(--pencil); }
.brand-desc { margin: .5rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--on-dark-muted); }

.nav-toggle { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.nav-list a {
    display: inline-block;
    padding: .15rem 0;
    color: var(--on-dark);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px dashed transparent;
}
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--pencil); border-bottom-color: var(--pencil); }

/* ===== Листы-секции ===== */
.site-main { padding: 2.6rem 0 3.4rem; overflow-x: clip; }
.front-shell { width: 85%; margin-left: auto; margin-right: auto; }

.sheet {
    position: relative;
    isolation: isolate;
    margin: 0 0 2.4rem;
    padding: 2.2rem 2.4rem 2.4rem;
    color: var(--ink);
}
.sheet::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    clip-path: polygon(0 4px, 6px 0, 38% 0, 39% 2px, 100% 0, 100% calc(100% - 5px), calc(100% - 4px) 100%, 62% 100%, 61% calc(100% - 2px), 3px 100%, 0 calc(100% - 3px));
}
.sheet::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--paper-deep);
    border: 1px solid var(--paper-edge);
    transform: translate(7px, 6px) rotate(.35deg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.sheet-title {
    position: relative;
    margin: 0 0 1.6rem;
    padding-left: 2.1rem;
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--navy);
}
.sheet-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 1.35rem;
    height: 3px;
    background: var(--navy);
}
.sheet-footnote { margin: 1.6rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--paper-edge); font-size: .95rem; color: var(--muted); max-width: 46rem; }

/* ===== Блок 1: карта узкого места ===== */
.bn-map { position: relative; margin: 3.4rem 0 1.4rem; }
.bn-map-img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.bn-note { position: absolute; left: 66%; bottom: 100%; display: flex; align-items: flex-end; gap: .2rem; flex-direction: row-reverse; transform: translateY(18%); pointer-events: none; }
.bn-note-text { font-family: var(--f-hand); font-weight: 500; font-size: 1.45rem; line-height: 1; color: var(--ink); white-space: nowrap; transform: rotate(-7deg) translateY(-14px); }
.bn-note-arrow { width: 66px; height: 44px; flex: 0 0 auto; margin-bottom: -6px; }
.bn-facts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; text-align: center; }
.bn-facts li { min-width: 0; }
.bn-num { display: block; font-family: var(--f-mono); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05; color: var(--ink); }
.bn-facts li:nth-child(3) .bn-num { color: var(--pencil); }
.bn-cap { display: block; margin-top: .35rem; font-family: var(--f-narrow); font-weight: 700; font-size: 1.05rem; color: var(--ink); }

/* ===== Блок 2: разбор по частям ===== */
.parts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.6rem; align-items: center; }
.parts-figure { margin: 0; min-width: 0; }
.parts-figure img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.parts-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.parts-list li { display: flex; align-items: baseline; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--paper-edge); }
.parts-list li:last-child { border-bottom: 0; }
.parts-no { flex: 0 0 auto; font-family: var(--f-mono); font-size: 1.6rem; line-height: 1; color: var(--navy); }
.parts-list p { margin: 0; min-width: 0; font-size: 1.02rem; line-height: 1.45; }
.parts-list strong { font-family: var(--f-narrow); font-size: 1.12rem; }

/* ===== Последние записи ===== */
.fs-latest { padding-bottom: 0; margin-bottom: 4.4rem; }
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.latest-grid { margin-bottom: -2.4rem; padding-inline: .2rem; }
.empty-note { color: var(--muted); padding-bottom: 2rem; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--paper);
    border: 1.5px solid var(--paper-edge);
    border-radius: 8px 8px 0 8px;
    color: var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
    transition: transform .15s;
}
.card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #D8D2C2 0 50%, transparent 50%);
    box-shadow: -1px -1px 0 var(--paper-edge);
}
.card:hover { transform: translate(-2px, -3px); }
.card-thumb { display: block; margin: .7rem .7rem 0; overflow: hidden; border-radius: 4px; background: var(--paper-deep); }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; transition: transform .3s; }
.card-thumb img.is-fallback { mix-blend-mode: multiply; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { flex: 1; display: flex; flex-direction: column; padding: .9rem 1.2rem 1.5rem; min-width: 0; }
.card-date {
    align-self: flex-start;
    display: inline-block;
    padding: .05rem .5rem;
    font-family: var(--f-mono);
    font-size: .75rem;
    letter-spacing: .03em;
    color: #1E2126;
    background: var(--sage);
}
.card-title { margin: .6rem 0 .45rem; font-family: var(--f-narrow); font-weight: 700; font-size: 1.28rem; line-height: 1.2; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--pencil); }
.card-excerpt { flex: 1; font-size: .95rem; line-height: 1.5; color: #3A3E45; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: .6rem;
    font-family: var(--f-narrow);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
}
.card-more::after { content: " – –"; letter-spacing: .1em; color: var(--pencil); transition: letter-spacing .15s; }
.card-more:hover { color: var(--pencil); }
.card-more:hover::after { letter-spacing: .35em; }

/* ===== Блок 3: шкала решений ===== */
.scale { padding: 3.2rem .5rem .5rem; }
.scale-track { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.scale-track::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 2px; background: var(--ink); }
.scale-track li { position: relative; min-width: 0; padding-top: 1.1rem; text-align: center; }
.scale-track li::before { content: ""; position: absolute; left: 50%; top: -8px; width: 2px; height: 18px; background: var(--ink); transform: translateX(-50%); }
.scale-track span { display: block; padding-inline: .3rem; font-size: 1rem; line-height: 1.3; }
.scale-track .is-typical span { font-weight: 700; }
.scale-track .is-typical::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -26px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid var(--pencil);
    transform: translateX(-50%);
}
.scale-pin {
    position: absolute;
    left: calc(50% + 14px);
    top: -48px;
    font-family: var(--f-hand);
    font-style: normal;
    font-weight: 500;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--pencil);
    white-space: nowrap;
    transform: rotate(-3deg);
}

/* ===== Блок 4: полевой словарь ===== */
.glossary-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.glossary { width: 100%; border-collapse: collapse; background: #F7F5EE; }
.glossary th, .glossary td { padding: .6rem 1rem; border: 1px solid var(--paper-edge); text-align: left; vertical-align: top; line-height: 1.45; }
.glossary th { width: 24%; font-family: var(--f-narrow); font-weight: 700; font-size: 1.05rem; color: var(--ink); background: rgba(143, 163, 150, .18); }
.glossary-figure { margin: 0; min-width: 0; }
.glossary-figure img { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto; mix-blend-mode: multiply; }

/* ===== Внутренние страницы ===== */
.crumbs { margin: 0 0 1.6rem; font-family: var(--f-mono); font-size: .8rem; letter-spacing: .04em; color: var(--on-dark-muted); }
.crumbs a { color: var(--on-dark); }
.crumbs a:hover { color: var(--pencil); }
.crumbs-sep { margin: 0 .35rem; color: var(--pencil); }
.crumbs span:last-child { color: var(--on-dark-muted); }

.layout-single { display: block; }
.layout-single > .content-area { 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; }
.content-area { min-width: 0; }

.list-head { padding-bottom: 1.6rem; }
.page-h1 { margin-bottom: .4rem; }
.list-intro { margin-top: .8rem; color: #3A3E45; }
.content-area .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 2rem; }
.layout-single .content-area .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty-block { padding-bottom: 2rem; }

.entry-head { margin-bottom: 1.4rem; }
.entry-meta { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.entry-cat { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); }
.entry-title { margin: .7rem 0 0; font-family: var(--f-head); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: .01em; color: var(--ink); }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--paper-edge); }
.entry-content { color: var(--ink); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-family: var(--f-mono); font-weight: 500; font-size: 1.35rem; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); }
.entry-content h3 { font-family: var(--f-narrow); font-size: 1.35rem; }
.entry-content h4 { font-family: var(--f-narrow); font-size: 1.15rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content ul { list-style: none; padding-left: 1.4rem; }
.entry-content ul li { position: relative; }
.entry-content ul li::before { content: ""; position: absolute; left: -1.2rem; top: .8em; width: .7rem; height: 2px; background: var(--pencil); }
.entry-content ol li::marker { font-family: var(--f-mono); color: var(--navy); }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem;
    background: var(--graphite);
    color: var(--on-dark);
    border-left: 5px solid var(--pencil);
    font-size: 1.12rem;
    font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-style: normal; font-family: var(--f-mono); font-size: .8rem; color: var(--on-dark-muted); }
.entry-content table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: .95rem; background: #F7F5EE; }
.entry-content th, .entry-content td { padding: .55rem .8rem; border: 1px solid var(--paper-edge); text-align: left; }
.entry-content th { font-family: var(--f-narrow); background: rgba(143, 163, 150, .22); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .wp-caption-text { margin-top: .4rem; font-size: .85rem; color: var(--muted); }
.entry-content img { display: block; height: auto; }
.entry-content pre, .entry-content code { font-family: var(--f-mono); font-size: .88rem; background: var(--paper-deep); }
.entry-content pre { padding: 1rem 1.2rem; overflow-x: auto; border: 1px solid var(--paper-edge); }
.entry-content code { padding: .1em .3em; }
.entry-content pre code { padding: 0; background: none; }
.entry-content hr { border: 0; border-top: 2px dashed var(--paper-edge); margin: 2em 0; }
.entry-content mark { background: rgba(217, 101, 59, .25); }
.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; }
.entry-tags { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a { padding: .1rem .55rem; font-family: var(--f-mono); font-size: .8rem; color: var(--ink); background: var(--sage-soft); text-decoration: none; }
.entry-tags a:hover { background: var(--pencil); color: #fff; }

.post-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0 0 2.4rem; }
.post-step { display: block; min-width: 0; padding: 1rem 1.2rem; border: 1px dashed #4A4F57; color: var(--on-dark); text-decoration: none; line-height: 1.35; }
.post-step span { display: block; margin-bottom: .3rem; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }
.post-step:hover { border-color: var(--pencil); color: var(--pencil); }
.post-step.is-next { grid-column: 2; text-align: right; }

/* ===== Пагинация ===== */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 2.4rem; }
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: .45rem .8rem;
    font-family: var(--f-mono);
    font-size: .9rem;
    text-align: center;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--pencil);
    transition: transform .12s, box-shadow .12s;
}
.pager a.page-numbers:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pencil); color: var(--ink); }
.pager .page-numbers.current { background: var(--pencil); border-color: var(--pencil); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; color: var(--on-dark-muted); min-width: 0; }
.entry .pager { margin: 1.6rem 0 0; }

/* ===== Сайдбар ===== */
.sidebar { min-width: 0; padding: 1.6rem 1.5rem; background: var(--aside-bg); border: 1px solid var(--grid-line); border-top: 4px solid var(--pencil); color: var(--on-dark); }
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { margin: 0 0 .9rem; font-family: var(--f-mono); font-weight: 500; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: #F4F1E8; }
.sidebar .widget-title::before { content: "— "; color: var(--pencil); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px dashed #464B53; line-height: 1.4; color: var(--on-dark); }
.sidebar a { color: var(--on-dark); text-decoration: none; }
.sidebar a:hover { color: var(--pencil); }
.sidebar .post-date, .sidebar .rss-date { display: block; font-size: .8rem; color: var(--on-dark-muted); }
.sidebar p, .sidebar .textwidget { color: var(--on-dark); }
.sidebar .search-form { flex-direction: column; }

/* ===== Поиск ===== */
.search-form { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1rem 0; }
.search-field {
    flex: 1 1 14rem;
    min-width: 0;
    padding: .65rem .9rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #FBFAF6;
    border: 2px solid var(--ink);
    border-radius: 0;
}
.search-field::placeholder { color: var(--muted); }

/* ===== 404 ===== */
.nf-code { margin: 0; font-family: var(--f-mono); font-size: clamp(4rem, 12vw, 7rem); line-height: 1; color: var(--pencil); }
.nf-text { color: #3A3E45; max-width: 36rem; }
.nf-actions { margin: 1.6rem 0 0; }

/* ===== Комментарии ===== */
.comments-area { margin-top: 0; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.6rem; border-left: 2px dashed var(--paper-edge); padding-left: 1rem; }
.comment-sheet { margin: 0 0 1rem; padding: 1rem 1.2rem; background: #F8F6F0; border: 1px solid var(--paper-edge); }
.comment-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.comment-head img { border-radius: 50%; display: block; }
.comment-author { font-family: var(--f-narrow); font-weight: 700; font-size: 1.05rem; }
.comment-head time { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }
.comment-wait { font-style: italic; color: var(--pencil-dark); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-reply { margin-top: .5rem; }
.comment-reply a { font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-family: var(--f-mono); font-weight: 500; font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.comment-reply-title small { margin-left: .6rem; font-size: .8rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-family: var(--f-narrow); 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 .8rem;
    font: inherit;
    color: var(--ink);
    background: #FBFAF6;
    border: 2px solid var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-family: var(--f-text); font-weight: 400; font-size: .92rem; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }
.comments-closed { color: var(--muted); }

/* ===== Подвал ===== */
.site-foot { padding: 3rem 0 2rem; background: var(--graphite); border-top: 1px solid var(--grid-line); color: var(--on-dark); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 1.2rem; }
.site-foot .widget-title { margin: 0 0 .7rem; font-family: var(--f-mono); font-weight: 500; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: #F4F1E8; }
.site-foot p, .site-foot .textwidget { color: var(--on-dark-muted); font-size: .95rem; line-height: 1.55; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .3rem; color: var(--on-dark-muted); }
.site-foot a { color: var(--on-dark); text-decoration: none; font-size: .95rem; }
.site-foot a:hover { color: var(--pencil); text-decoration: underline dashed 1px; }
.site-foot .post-date { display: block; font-size: .8rem; color: var(--on-dark-muted); }
.foot-copy { margin: 2.2rem 0 0; padding-top: 1.2rem; border-top: 1px dashed #464B53; font-size: .88rem; color: var(--on-dark-muted); }

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.4rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--pencil);
    color: var(--ink);
}
.cookie-text { margin: 0; flex: 1; min-width: 0; font-size: .92rem; line-height: 1.45; }
.cookie-accept { flex: 0 0 auto; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .front-shell { width: 100%; }
    .sheet::before { transform: translate(5px, 5px) rotate(.15deg); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
    .layout-single > .content-area { width: 100%; }
    .card-grid, .layout-single .content-area .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .latest-grid .card:nth-child(3) { display: none; }
    .parts-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .parts-figure { max-width: 460px; justify-self: center; width: 100%; }
    .glossary-grid { grid-template-columns: minmax(0, 1fr) 160px; }

    .topbar-inner { flex-wrap: wrap; align-items: center; }
    .brand { flex: 1 1 0; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        padding: .5rem .9rem;
        font-family: var(--f-mono);
        font-size: .85rem;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--on-dark);
        background: transparent;
        border: 2px solid var(--on-dark);
        cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; 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; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .nav-list { padding: .8rem 0 0; border-top: 1px dashed #464B53; }
    .nav-list a { padding: .45rem 0; font-size: 1.05rem; }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .topbar { padding: 1.4rem 0; }
    .brand-logo { width: 48px; height: 48px; }
    .brand-desc { display: none; }
    .site-main { padding-top: 1.6rem; }
    .sheet { padding: 1.6rem 1.25rem 1.8rem; }
    .fs-latest { padding-bottom: 0; }
    .sheet::before { transform: translate(4px, 4px); }
    .front-shell .sheet::before, .sheet::before { rotate: 0deg; }
    .card-grid, .layout-single .content-area .card-grid, .content-area .card-grid { grid-template-columns: minmax(0, 1fr); }
    .latest-grid .card:nth-child(3) { display: flex; }
    .bn-map { margin-top: 3rem; overflow: visible; }
    .bn-note { left: auto; right: 0; }
    .bn-note-arrow { width: 44px; height: 30px; }
    .brand-name-main { font-size: 1.3rem; }
    .bn-note-text { font-size: 1.2rem; }
    .bn-facts { gap: .6rem; }
    .bn-cap { font-size: .9rem; }

    .scale { padding: .4rem 0 0 .6rem; }
    .scale-track { grid-template-columns: minmax(0, 1fr); }
    .scale-track::before { left: 0; right: auto; top: 6%; bottom: 6%; width: 2px; height: auto; }
    .scale-track li { padding: .75rem 0 .75rem 1.6rem; text-align: left; }
    .scale-track li::before { left: 0; top: 50%; width: 16px; height: 2px; transform: translate(-7px, -50%); }
    .scale-track .is-typical::after { left: -26px; top: 50%; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid var(--pencil); border-right: 0; transform: translateY(-50%); }
    .scale-pin { position: static; display: block; margin-bottom: .1rem; transform: none; font-size: 1.2rem; }

    .glossary-grid { grid-template-columns: minmax(0, 1fr); }
    .glossary th, .glossary td { display: block; width: 100%; border-bottom: 0; }
    .glossary tr:last-child td { border-bottom: 1px solid var(--paper-edge); }
    .glossary-figure img { max-width: 160px; }

    .post-steps { grid-template-columns: minmax(0, 1fr); }
    .post-step.is-next { grid-column: auto; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; gap: .8rem; padding: 1rem 1.2rem; }
    .alignleft, .alignright { float: none; margin: 1rem 0; }
}
