/*
Theme Name: dds_michaelnkw.com
Theme URI: https://michaelnkw.com/
Author: Майкл Н. К. В.
Description: Тема экспертного блога о земельных участках в стиле землеустроительного атласа-планшета: тёмная картографическая основа, координатная сетка, контуры участков и «вклеенные» бумажные листы.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mezh
*/

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

/* ---------- Токены ---------- */
:root {
    --bg: #10261C;
    --grid: #2E4A3A;
    --contour: #3E6B4F;
    --head: #0B1A13;
    --head-line: #4C8C63;
    --foot: #071009;
    --panel: #132D21;
    --panel-2: #183729;
    --panel-line: #2C4A3A;
    --aside: #0D2018;
    --cream: #F2EDDC;
    --muted: #8FA898;
    --lime: #B7E23A;
    --lime-dark: #9CC425;
    --rust: #D2622B;
    --sand: #E8E1CC;
    --sand-card: #F1EBDA;
    --sand-line: #CFC6AC;
    --ink: #1E2A22;
    --ink-muted: #6B7259;
    --font-head: "Oswald", "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
    --font-text: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
    --grid-bg:
        linear-gradient(to right, rgba(46, 74, 58, .55) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(46, 74, 58, .55) 1px, transparent 1px);
    --contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='1100' viewBox='0 0 1200 1100'%3E%3Cg fill='none' stroke='%233E6B4F' stroke-width='1.4' stroke-opacity='.55'%3E%3Cpath d='M80 120 L340 60 L470 210 L390 420 L140 380 Z'/%3E%3Cpath d='M520 90 L800 140 L760 360 L560 330 Z' stroke-dasharray='8 6'/%3E%3Cpath d='M860 60 L1150 110 L1120 330 L900 300 Z'/%3E%3Cpath d='M40 520 L300 470 L360 720 L120 800 Z' stroke-dasharray='8 6'/%3E%3Cpath d='M430 520 L700 470 L780 700 L520 790 Z'/%3E%3Cpath d='M850 470 L1160 520 L1100 800 L820 760 Z'/%3E%3Cpath d='M160 880 L460 860 L500 1060 L190 1080 Z'/%3E%3Cpath d='M620 880 L960 860 L1000 1060 L640 1070 Z' stroke-dasharray='8 6'/%3E%3Cpath d='M0 450 Q 300 430 600 455 T 1200 445' stroke-opacity='.35'/%3E%3Cpath d='M600 0 Q 585 300 610 560 T 600 1100' stroke-opacity='.3'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--cream);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.7;
    background-color: var(--bg);
    background-image: var(--contours), var(--grid-bg);
    background-size: 1200px 1100px, 40px 40px, 40px 40px;
    background-position: center top, 0 0, 0 0;
}

img, svg { max-width: 100%; height: auto; }
img { display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 .6em;
    overflow-wrap: break-word;
    hyphens: manual;
}
p, li, td, th, dd, figcaption, blockquote, .cat-title, .legend-name { overflow-wrap: break-word; hyphens: auto; }
a { color: var(--lime); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--panel-line); padding: .5em .75em; text-align: left; vertical-align: top; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--lime); color: var(--bg); padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Контейнер ---------- */
.shell { width: min(92%, 1280px); margin-left: auto; margin-right: auto; }
.front-inner { width: 85%; margin-left: auto; margin-right: auto; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .78em 1.6em;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    border: 2px solid var(--lime);
    border-radius: 0;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-fill { background: var(--lime); color: var(--bg); }
.btn-fill:hover { background: var(--cream); border-color: var(--cream); color: var(--bg); transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--lime); }
.btn-ghost { background: transparent; color: var(--cream); }
.btn-ghost:hover { background: var(--lime); color: var(--bg); transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--cream); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.btn-ink:hover { background: var(--lime); border-color: var(--ink); color: var(--ink); transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.btn-line-ink { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line-ink:hover { background: var(--ink); color: var(--sand); }
.btn-sm { padding: .45em .95em; font-size: .85rem; letter-spacing: .03em; text-transform: none; }

/* ---------- Шапка ---------- */
.topbar {
    position: relative;
    background-color: var(--head);
    border-bottom: 2px solid var(--head-line);
    box-shadow: 0 1px 0 rgba(183, 226, 58, .25);
}
.topbar-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 1.4rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 760px;
    color: var(--cream);
    text-decoration: none;
}
.brand:hover { color: var(--cream); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-svg { width: 92px; height: auto; display: block; transition: transform .2s ease; }
.brand:hover .brand-svg { transform: rotate(-4deg); }
.brand-logo { max-height: 72px; width: auto; }
.brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.3;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--cream);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: .8rem;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-nav { flex: 0 0 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 2.2rem; }
.nav-list a {
    position: relative;
    display: inline-block;
    padding: .35rem 0;
    font-family: var(--font-head);
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--cream);
}
.nav-list a::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.nav-list a:hover, .nav-list a.is-active, .nav-list .current-menu-item > a { color: var(--cream); }
.nav-list a:hover::after, .nav-list a.is-active::after, .nav-list .current-menu-item > a::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    background: transparent;
    color: var(--cream);
    border: 1px solid var(--lime);
    font-family: var(--font-head);
    font-size: .9rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px; height: 2px;
    background: var(--lime);
    position: relative;
    transition: transform .2s ease, background-color .2s ease;
}
.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); }

/* ---------- Заголовки секций ---------- */
.sec-title {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 0 0 2rem;
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--cream);
}
.sec-title::before {
    content: "";
    flex: 0 0 auto;
    width: 13px; height: 13px;
    background: var(--lime);
}
.sec-title::after {
    content: "";
    flex: 1 1 auto;
    min-width: 2rem;
    height: 1px;
    background: var(--muted);
    opacity: .6;
}
.sec-num { color: var(--muted); margin-right: .1em; }

/* ---------- Главная: hero ---------- */
.hero {
    padding: 4rem 0 3.5rem;
    border-bottom: 1px solid var(--grid);
    background: linear-gradient(180deg, rgba(11, 26, 19, .55), rgba(16, 38, 28, 0) 70%);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: center;
}
.hero-copy { min-width: 0; }
.hero-title {
    font-size: clamp(2.4rem, 4.6vw, 4.2rem);
    line-height: 1.04;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .01em;
    color: var(--cream);
    margin-bottom: 1.6rem;
    padding-bottom: 1.6rem;
    position: relative;
}
.hero-title::after {
    content: "";
    position: absolute; left: 0; bottom: 0;
    width: 140px; height: 3px;
    background: var(--lime);
}
.hero-lead { font-size: 1.15rem; max-width: 34em; color: var(--cream); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.plan { margin: 0; min-width: 0; }
.plan-frame { position: relative; border: 1px solid var(--panel-line); background: #0E2219; }
.plan-img { width: 100%; height: auto; aspect-ratio: 1246 / 924; object-fit: cover; }
.plan-pin, .parts-pin {
    position: absolute;
    left: var(--x); top: var(--y);
    transform: translate(-50%, calc(-100% - 10px));
    min-width: 1.6em;
    padding: 0 .35em;
    font-family: var(--font-mono);
    font-size: .8rem;
    line-height: 1.6;
    text-align: center;
    color: var(--bg);
    background: var(--lime);
    pointer-events: none;
}
.plan-compass { position: absolute; top: 5%; right: 3.5%; width: 9%; min-width: 34px; max-width: 56px; }
.plan-north {
    position: absolute; top: 1.2%; right: 3.5%;
    width: 9%; min-width: 34px; max-width: 56px;
    text-align: center;
    font-family: var(--font-head);
    font-size: .75rem;
    color: var(--muted);
}
.plan-scale { position: absolute; left: 6%; bottom: 6%; width: 34%; }
.plan-scale-bar {
    display: block;
    height: 7px;
    border: 1px solid var(--cream);
    background: linear-gradient(to right, var(--cream) 0 25%, transparent 25% 50%, var(--cream) 50% 100%);
    opacity: .8;
}
.plan-scale-marks {
    display: flex;
    justify-content: space-between;
    margin-top: .25rem;
    font-family: var(--font-mono);
    font-size: .7rem;
    color: var(--muted);
}

.plan-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 1rem;
    margin-top: 1rem;
}
.plan-stamp {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .2rem;
    padding: .9rem 1.1rem;
    border: 2px solid var(--rust);
    color: var(--rust);
    font-family: var(--font-head);
    position: relative;
}
.plan-stamp::after {
    content: "";
    position: absolute; right: .7rem; bottom: .7rem;
    width: 34px; height: 34px;
    border: 2px solid var(--rust);
    border-radius: 50%;
    box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 7px var(--rust);
    opacity: .7;
}
.plan-stamp-label { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.plan-stamp-num { font-family: var(--font-mono); font-size: 1.05rem; color: var(--cream); }
.plan-stamp-note { font-family: var(--font-text); font-size: .78rem; color: var(--muted); padding-right: 3rem; }
.coords { font-family: var(--font-mono); font-size: .78rem; color: var(--cream); background: rgba(11, 26, 19, .6); }
.coords th { font-weight: 400; color: var(--muted); }
.coords th, .coords td { border-color: var(--panel-line); padding: .25em .6em; }

/* ---------- Главная: секции ---------- */
.fsec { padding: 3rem 0; }
.fsec.sand { padding: 4rem 0 4.2rem; margin: 1.5rem 0; }

/* Блок 1 — категории */
.cats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    align-items: end;
    padding-top: 1.4rem;
}
.cat {
    position: relative;
    min-width: 0;
    padding: 1.6rem 1.3rem 1.5rem;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--panel-line);
    transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.cat::before {
    content: "";
    position: absolute;
    left: -1px; top: -13px;
    width: 42%; height: 13px;
    background: var(--panel-2);
    border: 1px solid var(--panel-line);
    border-bottom: 0;
    clip-path: polygon(0 0, 82% 0, 100% 100%, 0 100%);
}
.cat:nth-child(1) { min-height: 15.5rem; }
.cat:nth-child(2) { min-height: 14rem; }
.cat:nth-child(3) { min-height: 13.2rem; }
.cat:nth-child(4) { min-height: 12.6rem; }
.cat:nth-child(5) { min-height: 13.6rem; }
.cat.is-lead {
    border: 2px solid var(--lime);
    transform: translateY(-14px);
    background: linear-gradient(180deg, #1C3D2C, var(--panel-2));
    box-shadow: 0 0 0 1px rgba(183, 226, 58, .15), 0 10px 24px rgba(0, 0, 0, .35);
}
.cat.is-lead::before { background: var(--lime); border-color: var(--lime); top: -14px; }
.cat:not(.is-lead):hover { border-color: var(--lime); transform: translateY(-8px); }
.cat-num { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--cream); margin-bottom: .35rem; }
.cat.is-lead .cat-num { color: var(--lime); }
.cat-title { font-size: 1.15rem; line-height: 1.25; text-transform: uppercase; color: var(--cream); margin-bottom: .7rem; }
.cat-text { font-size: .86rem; line-height: 1.5; color: var(--muted); margin: 0; }
.cats-note { margin: 1.4rem 0 0; font-size: .9rem; color: var(--muted); max-width: 52em; }

/* Блок 2 — ограничения */
.limits {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 120px minmax(0, 1fr);
    gap: 0 2.5rem;
    align-items: stretch;
    padding: 1.6rem 2.2rem;
    background: rgba(13, 32, 24, .82);
    border: 1px solid var(--panel-line);
}
.limits-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.limit {
    flex: 1 1 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 1rem;
    align-content: center;
    padding: .75rem 0;
    border-bottom: 1px solid var(--panel-line);
}
.limit:last-child { border-bottom: 0; }
.limit-box {
    grid-row: 1 / span 2;
    align-self: center;
    width: 20px; height: 20px;
    border: 2px solid var(--muted);
    position: relative;
}
.limit.is-done .limit-box { background: var(--lime); border-color: var(--lime); }
.limit.is-done .limit-box::after {
    content: "";
    position: absolute; left: 5px; top: 1px;
    width: 6px; height: 11px;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.limit-name { font-family: var(--font-head); font-size: 1.08rem; letter-spacing: .02em; color: var(--cream); line-height: 1.3; }
.limit-hint { font-size: .84rem; color: var(--muted); line-height: 1.4; }

.ruler {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 34px;
    background:
        repeating-linear-gradient(to bottom, var(--muted) 0 1px, transparent 1px 9px) 6px 0 / 14px 100% no-repeat,
        linear-gradient(var(--muted), var(--muted)) 4px 0 / 1px 100% no-repeat,
        linear-gradient(var(--muted), var(--muted)) 22px 0 / 1px 100% no-repeat;
}
.ruler-mark {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--muted);
    position: relative;
}
.ruler-mark::before {
    content: "";
    position: absolute; left: -30px; top: 50%;
    width: 22px; height: 2px;
    background: var(--muted);
}
.ruler-mark.is-current { color: var(--rust); font-weight: 600; font-size: 1.15rem; }
.ruler-mark.is-current::after {
    content: "";
    position: absolute; left: -16px; top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 9px 14px 9px 0;
    border-color: transparent var(--rust) transparent transparent;
}
.limits-summary { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.limits-count { font-family: var(--font-head); font-size: 1.7rem; line-height: 1.2; color: var(--cream); margin-bottom: .8rem; }
.limits-text { font-size: .92rem; color: var(--muted); margin: 0; }

/* Последние записи — песочный лист */
.sand {
    background-color: var(--sand);
    background-image:
        linear-gradient(to right, rgba(30, 42, 34, .045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 42, 34, .045) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--ink);
    border-top: 1px solid var(--sand-line);
    border-bottom: 1px solid var(--sand-line);
    box-shadow: 0 -10px 0 -4px rgba(232, 225, 204, .12), 0 10px 0 -4px rgba(232, 225, 204, .12);
}
.sand .sec-title { color: var(--ink); }
.sand .sec-title::after { background: var(--ink); opacity: .55; }
.sand-more { margin: 2.8rem 0 0; text-align: center; }
.empty-note { color: var(--ink-muted); font-size: 1rem; }

/* Карточки записей */
.cards { display: grid; gap: 2rem; }
.cards-front { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: start; }
.cards-front .card:nth-child(2) { margin-top: 1.1rem; }
.cards-front .card:nth-child(3) { margin-top: .45rem; }
.cards-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: .9rem;
    background: var(--sand-card);
    border: 1px solid var(--ink);
    color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--ink); }
.card-thumb { display: block; overflow: hidden; border: 1px solid rgba(30, 42, 34, .35); }
.card-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1.05;
    object-fit: cover;
    filter: sepia(.12) saturate(.9);
    transition: transform .35s ease, filter .35s ease;
}
.card:hover .card-img { transform: scale(1.04); filter: none; }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1rem .3rem .2rem; }
.card-flag {
    align-self: flex-start;
    margin-bottom: .5rem;
    padding: .1em .55em;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--ink);
    background: var(--lime);
}
.card-title { hyphens: manual; font-size: 1.28rem; line-height: 1.25; font-weight: 500; margin: 0 0 .6rem; color: var(--ink); }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime-dark); text-decoration-thickness: 2px; }
.card-excerpt { flex: 1; font-size: .92rem; line-height: 1.55; color: #3A463D; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--ink); }
.card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.card-date { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-muted); }
.card .btn-fill { border-color: var(--lime); }
.card .btn-fill:hover { background: var(--ink); border-color: var(--ink); color: var(--lime); box-shadow: 3px 3px 0 var(--lime); }

/* Блок 3 — маршрут */
.route {
    list-style: none;
    margin: 0;
    padding: 2.6rem 2.2rem 2.2rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: relative;
    border: 1px solid var(--panel-line);
    background:
        linear-gradient(rgba(13, 32, 24, .78), rgba(13, 32, 24, .78)),
        var(--contours) center / 900px auto;
}
.route::before {
    content: "";
    position: absolute;
    left: calc(2.2rem + 10%); right: calc(2.2rem + 10%);
    top: calc(2.6rem + 23px);
    height: 2px;
    background: repeating-linear-gradient(to right, var(--lime) 0 22px, transparent 22px 30px);
    opacity: .75;
}
.route-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: 0 .5rem; }
.route-node {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 2px solid var(--lime);
    background: var(--bg);
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--lime);
    margin-bottom: .8rem;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.route-step:not(.is-first):not(.is-final) .route-node { width: 34px; height: 34px; margin-top: 6px; margin-bottom: 1.2rem; font-size: .9rem; background: var(--lime); color: var(--bg); }
.route-step.is-first .route-node { box-shadow: 0 0 0 5px rgba(183, 226, 58, .18); }
.route-step:hover .route-node { transform: scale(1.12); }
.route-name { font-family: var(--font-head); font-size: 1.05rem; color: var(--cream); line-height: 1.3; }
.route-step:not(.is-first) .route-name { color: var(--muted); }
.route-step.is-final .route-name { color: var(--cream); }
.route-hint { font-size: .82rem; line-height: 1.45; color: var(--muted); margin-top: .3rem; max-width: 14em; }
.route-step.is-final .route-node {
    width: 70px; height: 70px;
    margin-top: -12px;
    margin-bottom: .6rem;
    border: 3px solid var(--rust);
    background: var(--bg);
    color: var(--lime);
    font-size: 1.6rem;
    box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--rust);
}
.route-term { font-size: .85rem; color: var(--rust); margin-top: .25rem; font-family: var(--font-head); letter-spacing: .02em; }

/* Блок 4 — разбор участка */
.parts {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0 4.5rem;
    align-items: center;
    padding: 1.6rem 2.2rem;
    border: 1px solid var(--panel-line);
    background: rgba(13, 32, 24, .82);
}
.parts-draw { position: relative; margin: 0; }
.parts-draw img { width: 100%; height: auto; aspect-ratio: 1100 / 584; object-fit: cover; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.15rem; }
.legend li {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 1rem;
    align-items: center;
}
.legend li::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 16px;
    width: 3.4rem;
    margin-right: .6rem;
    height: 1px;
    background: var(--lime);
    opacity: .55;
}
.legend-num {
    grid-row: 1 / span 2;
    align-self: start;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--bg);
    font-family: var(--font-head);
    font-weight: 600;
}
.legend li:first-child .legend-num { background: transparent; color: var(--lime); border: 2px solid var(--lime); }
.legend-name { font-family: var(--font-head); font-size: 1.08rem; color: var(--cream); line-height: 1.3; }
.legend-hint { font-size: .84rem; color: var(--muted); line-height: 1.4; }

/* ---------- Внутренние страницы ---------- */
.inner { padding: 2rem 0 4rem; }
.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem .45rem;
    margin-bottom: 1.6rem;
    font-family: var(--font-head);
    font-size: .88rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}
.crumbs a { color: var(--cream); text-decoration: none; }
.crumbs a:hover { color: var(--lime); }
.crumbs-sep { color: var(--lime); }
.crumbs-current { color: var(--muted); }

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

.sheet {
    position: relative;
    padding: 2.6rem 2.8rem 2.8rem;
    background-color: var(--sand);
    background-image:
        linear-gradient(to right, rgba(30, 42, 34, .04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 42, 34, .04) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--ink);
    border: 1px solid var(--sand-line);
    box-shadow: 8px 8px 0 rgba(7, 16, 9, .55);
}
.sheet::before {
    content: "";
    position: absolute; top: 0; left: 2.8rem;
    width: 56px; height: 5px;
    background: var(--lime);
}
.sheet a { color: var(--ink); text-decoration-color: var(--lime-dark); text-decoration-thickness: 2px; }
.sheet a:hover { color: var(--ink); background: rgba(183, 226, 58, .35); }
.sheet .btn { text-decoration: none; }
.sheet .btn:hover { background-color: var(--lime); }
.sheet .btn-ink:hover { color: var(--ink); }
.sheet .btn-fill:hover { background: var(--ink); color: var(--lime); }
.sheet .btn-line-ink:hover { background: var(--ink); color: var(--sand); }
.sheet-head { margin-bottom: 2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--sand-line); }
.sheet-kicker {
    margin: 0 0 .6rem;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.sheet-kicker a { color: var(--ink-muted); text-decoration: none; }
.sheet-title { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.12; color: var(--ink); margin: 0 0 .6rem; }
.sheet-lead { color: #3A463D; max-width: 44em; margin: .8rem 0 0; }
.sheet-search { margin-top: 1.2rem; max-width: 520px; }
.entry-meta { margin: 0; font-family: var(--font-mono); font-size: .85rem; color: var(--ink-muted); }
.entry-meta-sep { margin: 0 .45rem; }
.entry-cover { margin: 0 0 2rem; border: 1px solid var(--ink); }
.entry-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* Типографика текста */
.entry-content { font-size: 1.07rem; line-height: 1.75; color: #24302A; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 { font-size: 1.75rem; margin: 2em 0 .7em; color: var(--ink); padding-left: 1rem; border-left: 4px solid var(--lime-dark); }
.entry-content h3 { font-size: 1.35rem; margin: 1.7em 0 .6em; color: var(--ink); }
.entry-content h4 { font-size: 1.15rem; margin: 1.5em 0 .5em; color: var(--ink); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .45em; }
.entry-content ul { list-style: none; padding-left: 1.5em; }
.entry-content ul > li { position: relative; }
.entry-content ul > li::before {
    content: "";
    position: absolute; left: -1.25em; top: .62em;
    width: 8px; height: 8px;
    background: var(--ink);
    box-shadow: 2px 2px 0 var(--lime-dark);
}
.entry-content ol > li::marker { font-family: var(--font-head); color: var(--ink-muted); }
.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.3rem 1.6rem 1.3rem 1.8rem;
    background: rgba(30, 42, 34, .07);
    border-left: 5px solid var(--lime-dark);
    font-size: 1.1rem;
    color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-size: .85rem; font-style: normal; color: var(--ink-muted); }
.entry-content table { margin: 1.6em 0; font-size: .95rem; background: rgba(241, 235, 218, .7); display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid #9C977F; padding: .55em .8em; }
.entry-content th { background: var(--ink); color: var(--sand); font-family: var(--font-head); font-weight: 400; letter-spacing: .03em; border-color: var(--ink); }
.entry-content img { height: auto; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--ink-muted); margin-top: .5rem; }
.entry-content pre, .entry-content code { font-family: var(--font-mono); font-size: .9em; background: rgba(30, 42, 34, .08); }
.entry-content pre { padding: 1rem 1.2rem; overflow-x: auto; }
.entry-content code { padding: .1em .35em; }
.entry-content hr { border: 0; height: 1px; background: var(--sand-line); margin: 2.4em 0; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }

.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.entry-tags a { padding: .2em .65em; border: 1px solid var(--ink); font-size: .85rem; text-decoration: none; }
.entry-tags a:hover { background: var(--lime); }

.entry-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2.4rem; }
.entry-nav-link {
    display: flex; flex-direction: column; gap: .3rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--ink);
    text-decoration: none;
    background: var(--sand-card);
    transition: transform .15s ease, box-shadow .15s ease;
}
.sheet .entry-nav-link:hover { background: var(--sand-card); transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.entry-nav-link.is-next { grid-column: 2; text-align: right; }
.entry-nav-label { font-family: var(--font-head); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.entry-nav-title { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); line-height: 1.3; }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: 2.6rem; }
.pager .page-numbers,
.pager > a, .pager > span.post-page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .85rem;
    font-family: var(--font-head);
    font-size: .95rem;
    color: var(--ink);
    background: var(--sand-card);
    border: 1px solid var(--ink);
    text-decoration: none;
}
.sheet .pager a.page-numbers:hover, .sheet .pager > a:hover { background: var(--ink); color: var(--lime); }
.pager .page-numbers.current, .pager .post-page-numbers.current { background: var(--lime); color: var(--ink); border-color: var(--ink); font-weight: 600; }
.pager .page-numbers.dots { border: 0; background: transparent; min-width: 1.6rem; padding: 0; }

/* Поиск */
.search-form { display: flex; gap: 0; width: 100%; }
.search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: .7rem .9rem;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: #FBF8EE;
    border: 1px solid var(--ink);
    border-right: 0;
    border-radius: 0;
}
.search-submit {
    flex: 0 0 auto;
    padding: .7rem 1.2rem;
    font-family: var(--font-head);
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--lime);
    border: 1px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
}
.search-submit:hover { background: var(--ink); color: var(--lime); }
.sidebar .search-field, .footer .search-field { background: var(--bg); color: var(--cream); border-color: var(--panel-line); }
.sidebar .search-field::placeholder, .footer .search-field::placeholder { color: var(--muted); }
.sidebar .search-submit, .footer .search-submit { border-color: var(--lime); }
.sidebar .search-submit:hover, .footer .search-submit:hover { background: var(--cream); color: var(--bg); }

/* 404 */
.notfound { text-align: left; }
.notfound-code {
    margin: 0 0 .2rem;
    font-family: var(--font-head);
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
    letter-spacing: .04em;
}
.notfound-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 0; }

/* Комментарии */
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--sand-line); }
.comments-title, .comment-reply-title { font-size: 1.45rem; color: var(--ink); }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 2rem; }
.cmt-body { padding: 1.1rem 1.3rem; margin-bottom: 1rem; background: var(--sand-card); border: 1px solid var(--sand-line); border-left: 3px solid var(--ink); }
.cmt-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .6rem; }
.cmt-avatar { width: 44px; height: 44px; border: 1px solid var(--ink); }
.cmt-author { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.cmt-date { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-muted); }
.cmt-moderation { font-size: .88rem; color: var(--rust); }
.cmt-text p { margin-bottom: .6em; }
.cmt-reply a { font-family: var(--font-head); font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; }
.comment-respond { margin-top: 2rem; }
.comment-notes, .logged-in-as, .must-log-in { font-size: .9rem; color: var(--ink-muted); }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-family: var(--font-head); font-size: .95rem; color: var(--ink); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .85rem;
    font: inherit;
    font-size: .98rem;
    color: var(--ink);
    background: #FBF8EE;
    border: 1px solid var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent input { margin-top: .35rem; }
.comment-form-cookies-consent label { font-family: var(--font-text); font-size: .88rem; color: var(--ink-muted); }
.req { color: var(--rust); }
.comment-reply-title small { margin-left: .8rem; font-size: .85rem; }
.form-submit .btn { border-color: var(--ink); }
.comments-closed { color: var(--ink-muted); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Сайдбар ---------- */
.sidebar {
    padding: 1.8rem 1.6rem;
    background-color: var(--aside);
    background-image: var(--grid-bg);
    background-size: 40px 40px;
    border: 1px solid var(--panel-line);
    border-top: 3px solid var(--lime);
    color: var(--cream);
}
.sidebar .wdg + .wdg { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px dashed var(--panel-line); }
.wdg-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.wdg-title::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; background: var(--lime); }
.wdg ul { list-style: none; margin: 0; padding: 0; }
.wdg li { padding: .55rem 0; border-bottom: 1px solid rgba(143, 168, 152, .2); line-height: 1.45; }
.wdg li:last-child { border-bottom: 0; }
.sidebar .wdg-title { color: var(--cream); }
.sidebar .wdg, .sidebar .wdg p, .sidebar .textwidget { color: var(--cream); font-size: .95rem; }
.sidebar .wdg a { color: var(--cream); text-decoration: none; }
.sidebar .wdg a:hover { color: var(--lime); }
.sidebar .wdg .post-date, .sidebar .wdg .rss-date, .sidebar .wdg time { display: block; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.sidebar .widget_recent_entries a { font-family: var(--font-head); font-size: 1rem; }

/* ---------- Подвал ---------- */
.footer {
    background-color: var(--foot);
    background-image: var(--grid-bg);
    background-size: 40px 40px;
    border-top: 1px solid var(--grid);
    color: var(--cream);
    padding: 3.5rem 0 2rem;
}
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 4rem; }
.footer-col { min-width: 0; }
.footer .wdg-title { color: var(--cream); }
.footer .wdg-title::after { content: ""; flex: 1 1 auto; max-width: 140px; height: 1px; background: var(--muted); opacity: .5; }
.footer .wdg, .footer .wdg p, .footer .textwidget { color: #D9D4C3; font-size: .93rem; line-height: 1.6; }
.footer .wdg a { color: var(--cream); text-decoration: none; }
.footer .wdg a:hover { color: var(--lime); }
.footer .textwidget a[href^="mailto:"] { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.footer .textwidget a[href^="mailto:"]:hover { color: var(--cream); }
.footer .wdg li { padding: .3rem 0; border-bottom: 0; }
.footer .wdg .post-date { display: block; font-size: .78rem; color: var(--muted); }
.footer-copy {
    margin: 3rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(46, 74, 58, .8);
    font-size: .84rem;
    color: var(--muted);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    padding: 1rem 0;
    background: rgba(7, 16, 9, .97);
    border-top: 2px solid var(--lime);
    color: var(--cream);
}
.cookie-in {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: min(92%, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding: 0 .4rem;
}
.cookie-mark { flex: 0 0 auto; width: 12px; height: 12px; background: var(--lime); }
.cookie-text { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .9rem; line-height: 1.5; color: var(--cream); }
.cookie-text a { color: var(--lime); }
.cookie-accept { flex: 0 0 auto; }

/* WordPress служебные */
.sticky { position: relative; }
.bypostauthor > .cmt-body { border-left-color: var(--lime-dark); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.wp-block-image img { height: auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
    .shell.front-inner { width: min(92%, 1280px); }
    .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.2rem; }
    .cat:nth-child(n) { min-height: 0; }
    .cat.is-lead { transform: none; }
}

@media (max-width: 960px) {
    .topbar-in { flex-wrap: wrap; padding: 1.1rem 0; }
    .brand { flex: 1 1 0; }
    .brand-svg { width: 64px; }
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; flex-basis: 100%; }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; padding: .5rem 0; border-top: 1px solid var(--panel-line); }
    .nav-list a { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(46, 74, 58, .6); }
    .nav-list a::after { width: 40px; right: auto; bottom: -1px; }

    .shell.front-inner { width: min(92%, 1280px); }
    .hero { padding: 2.6rem 0; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .limits { grid-template-columns: minmax(0, 1fr) 90px; gap: 1.6rem 1.6rem; padding: 1.4rem 1.6rem; }
    .limits-summary { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid var(--panel-line); }
    .cards-front { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards-front .card:nth-child(n) { margin-top: 0; }
    .route { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding: 1.8rem 1.6rem; }
    .route::before { left: calc(1.6rem + 34px); right: auto; top: 2.6rem; bottom: 2.6rem; width: 2px; height: auto; background: repeating-linear-gradient(to bottom, var(--lime) 0 18px, transparent 18px 26px); }
    .route-step { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; text-align: left; padding: 0; column-gap: 1.2rem; }
    .route-step .route-node { grid-row: 1 / span 2; justify-self: center; margin: 0 !important; }
    .route-hint, .route-term { grid-column: 2; max-width: none; margin-top: 0; }
    .route-name { grid-column: 2; }
    .parts { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 1.4rem 1.6rem; }
    .legend li::before { display: none; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .layout-single > .content-area { width: 100%; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 1rem; background-size: 900px 825px, 32px 32px, 32px 32px; }
    .brand { gap: .8rem; }
    .brand-svg { width: 52px; }
    .brand-name { font-size: .9rem; -webkit-line-clamp: 4; }
    .brand-desc { display: none; }
    .nav-toggle-text { display: none; }
    .hero-title { font-size: 2.3rem; }
    .hero-lead { font-size: 1.02rem; }
    .hero-actions .btn { flex: 1 1 100%; }
    .plan-sheet { grid-template-columns: minmax(0, 1fr); }
    .plan-pin, .parts-pin { font-size: .7rem; }
    .sec-title { font-size: 1.1rem; gap: .6rem; }
    .fsec { padding: 2.6rem 0; }
    .fsec.sand { padding: 2.8rem 0 3rem; }
    .cats { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
    .cat { padding: 1.3rem 1.2rem 1.2rem; }
    .limits { grid-template-columns: minmax(0, 1fr); padding: 1.2rem 1.2rem; }
    .ruler { display: none; }
    .cards-front { grid-template-columns: minmax(0, 1fr); }
    .route { padding: 1.4rem 1.2rem; }
    .route::before { left: calc(1.2rem + 34px); }
    .parts { padding: 1.2rem 1.2rem; }
    .inner { padding: 1.4rem 0 3rem; }
    .sheet { padding: 1.8rem 1.3rem 2rem; box-shadow: 5px 5px 0 rgba(7, 16, 9, .55); }
    .sheet::before { left: 1.3rem; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .entry-nav-link.is-next { grid-column: auto; text-align: left; }
    .sidebar { padding: 1.4rem 1.2rem; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .cookie-in { flex-wrap: wrap; }
    .cookie-accept { width: 100%; }
    .comment-list .children { margin-left: 1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}
