/*
Theme Name: dds_eftornadosafehome.com
Author: Алексей Каменев
Description: Тема информационно-аналитического портала о строительной экспертизе и жилищной политике. Стилистика рабочего чертежа: миллиметровка, штампы, выноски, оранжевые сигнальные акценты.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: smetadom
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------- Шрифты ---------- */
@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: 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: 500; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --paper: #E8EEF2;
    --grid: #B9CBD6;
    --grid-strong: #8FA9B8;
    --head: #16324A;
    --foot: #1E2A33;
    --ink: #12222E;
    --muted: #6B8494;
    --hot: #E8622B;
    --hot-deep: #C9501E;
    --blue: #1F5D8C;
    --sheet: #F7FAFB;
    --tint: #DCE6EC;
    --foot-text: #DDE6EC;
    --foot-muted: #A7B8C4;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-text: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
}

/* ---------- Правила скрытия ([hidden] — до основных блоков) ---------- */
.cookie-banner[hidden] { display: none !important; }
[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::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: 16px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(143, 169, 184, 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 169, 184, 0.55) 1px, transparent 1px),
        linear-gradient(rgba(185, 203, 214, 0.75) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 203, 214, 0.75) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    background-position: -1px -1px;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 600;
    line-height: 1.2;
    margin: 1.4em 0 0.6em;
    color: var(--ink);
    overflow-wrap: break-word;
    hyphens: auto;
}
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hot-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--hot);
    outline-offset: 2px;
}
p, li, td, th, dd, figcaption, blockquote { overflow-wrap: break-word; hyphens: 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-to {
    position: absolute;
    left: 1rem; top: -60px;
    z-index: 100;
    background: var(--hot);
    color: var(--ink);
    padding: 0.6rem 1rem;
    font-family: var(--f-head);
    text-transform: uppercase;
    text-decoration: none;
}
.skip-to:focus { top: 1rem; }

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

/* ---------- Кнопка со скошенным углом ---------- */
.btn-cut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.62rem 1.5rem 0.62rem 1.15rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background-color: var(--hot);
    background-image: linear-gradient(315deg, transparent 0 8px, var(--ink) 8px 9.6px, transparent 9.6px);
    border: 1.5px solid var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.btn-cut:hover, .btn-cut:focus-visible {
    background-color: var(--head);
    background-image: linear-gradient(315deg, transparent 0 8px, var(--hot) 8px 9.6px, transparent 9.6px);
    color: #fff;
    transform: translate(-2px, -2px);
}
.btn-cut--ghost { background-color: transparent; }
.btn-cut--small { font-size: 0.9rem; padding: 0.45rem 1.2rem 0.45rem 0.9rem; }

/* ---------- Шапка ---------- */
.masthead {
    background: var(--head);
    color: #fff;
    border-bottom: 4px solid var(--ink);
    box-shadow: 0 3px 0 var(--blue);
}
.masthead-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.2rem 2rem;
    padding: 2rem 0 1.8rem;
}
.brand {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    flex: 1 1 640px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-mark { flex: 0 0 auto; width: 104px; color: #fff; }
.brand-mark svg, .brand-logo { width: 104px; height: auto; }
.brand-text { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.1rem, 1.9vw, 1.75rem);
    line-height: 1.22;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    overflow-wrap: break-word;
    hyphens: auto;
}
.brand-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #D3DFE8;
    max-width: 82ch;
}
.nav-toggle { display: none; }
.primary-nav { flex: 1 0 100%; padding-left: calc(104px + 1.6rem); }
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0.15rem 0.4rem;
    display: inline-flex;
    flex-wrap: wrap;
    border: 2px solid #E8EEF2;
    box-shadow: inset 0 0 0 3px var(--head), inset 0 0 0 4px rgba(232, 238, 242, 0.7);
}
.nav-list li { display: flex; align-items: center; }
.nav-list li + li::before {
    content: "";
    width: 2px;
    height: 1.2em;
    background: #E8EEF2;
}
.nav-list a {
    display: block;
    padding: 0.55rem 1.1rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1.12rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
}
.nav-list a:hover, .nav-list .current-menu-item > a, .nav-list a[aria-current="page"] {
    color: var(--hot);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* ---------- Лист (рабочее поле) ---------- */
.sheet { padding: 2.2rem 0 3rem; }
.sheet-main {
    position: relative;
    display: block;
    padding: 2.2rem 0 2.6rem;
    border: 1px solid var(--head);
    box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--blue);
    background:
        repeating-linear-gradient(90deg, var(--head) 0 1px, transparent 1px 24px) top left / 100% 6px no-repeat,
        repeating-linear-gradient(90deg, var(--head) 0 1px, transparent 1px 120px) top left / 100% 12px no-repeat;
}
.sheet-main::before {
    content: "";
    position: absolute;
    left: -46px;
    top: 120px;
    width: 26px;
    height: 460px;
    border: 1.5px solid var(--blue);
    background:
        repeating-linear-gradient(180deg, transparent 0 56px, var(--blue) 56px 57.5px),
        linear-gradient(90deg, transparent 12px, var(--blue) 12px 13.5px, transparent 13.5px);
    opacity: 0.8;
    display: none;
}

/* ---------- Хлебные крошки ---------- */
.crumbs {
    margin: 0 auto 1.6rem;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}
.no-aside .crumbs { width: 85%; }
.has-aside .crumbs { width: 94%; }
.crumbs a { color: var(--blue); }
.crumbs-sep { margin: 0 0.35rem; color: var(--hot); }
.crumbs-current { color: var(--ink); }

/* ---------- Раскладки ---------- */
.front-wrap { width: 85%; margin: 0 auto; }
.layout-single { width: 85%; margin: 0 auto; }
.layout-with-sidebar {
    width: 94%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.content-area { min-width: 0; }

/* ---------- Секции главной (плашки с угловыми метками) ---------- */
.plate {
    position: relative;
    padding: 2.4rem 2.4rem 2.6rem;
    margin: 0 0 1.8rem;
    background:
        linear-gradient(var(--head), var(--head)) top left / 26px 2px no-repeat,
        linear-gradient(var(--head), var(--head)) top left / 2px 26px no-repeat,
        linear-gradient(var(--head), var(--head)) top right / 26px 2px no-repeat,
        linear-gradient(var(--head), var(--head)) top right / 2px 26px no-repeat,
        linear-gradient(var(--head), var(--head)) bottom left / 26px 2px no-repeat,
        linear-gradient(var(--head), var(--head)) bottom left / 2px 26px no-repeat,
        linear-gradient(var(--head), var(--head)) bottom right / 26px 2px no-repeat,
        linear-gradient(var(--head), var(--head)) bottom right / 2px 26px no-repeat,
        linear-gradient(135deg, rgba(31, 93, 140, 0.45) 50%, transparent 50%) 5px 5px / 14px 14px no-repeat,
        linear-gradient(225deg, rgba(31, 93, 140, 0.45) 50%, transparent 50%) calc(100% - 5px) 5px / 14px 14px no-repeat,
        linear-gradient(45deg, rgba(31, 93, 140, 0.45) 50%, transparent 50%) 5px calc(100% - 5px) / 14px 14px no-repeat,
        linear-gradient(315deg, rgba(31, 93, 140, 0.45) 50%, transparent 50%) calc(100% - 5px) calc(100% - 5px) / 14px 14px no-repeat;
}
.plate-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1.6rem;
    font-weight: 600;
    font-size: clamp(1.6rem, 3.3vw, 2.75rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
}
.plate-title span { min-width: 0; }
.plate-title::before, .plate-title::after {
    content: "";
    flex: 0 0 auto;
    width: 46px;
    height: 22px;
    margin-top: 22px;
    border-top: 2px solid var(--ink);
}
.plate-title::before { border-left: 2px solid var(--ink); }
.plate-title::after { border-right: 2px solid var(--ink); }
.plate-title--long::after { width: 22px; }
.plate-lead { max-width: 72ch; color: var(--ink); margin-bottom: 1.4rem; }
.empty-note { color: var(--muted); font-style: italic; }

/* Блок 1: шкала изменений */
.scale-track { padding: 215px 22px 78px 6px; }
.scale-rail { position: relative; margin-right: 18px; }
.scale-bar {
    position: relative;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    height: 20px;
    border: 2px solid var(--head);
    background:
        repeating-linear-gradient(90deg, transparent 0 11px, rgba(22, 50, 74, 0.35) 11px 12px),
        #C9D7E1;
}
.scale-bar::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -2px;
    width: 18px;
    height: 20px;
    background: var(--head);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.scale-cell { border-right: 2px solid var(--head); }
.scale-cell:last-child { border-right: 0; }
.scale-years { position: relative; height: 0; }
.scale-year {
    position: absolute;
    left: var(--pos);
    top: 22px;
    font-family: var(--f-mono);
    font-size: 0.85rem;
    color: var(--ink);
    transform: translateX(-50%) rotate(-35deg);
    white-space: nowrap;
}
.scale-flag {
    position: absolute;
    left: var(--pos);
    bottom: 100%;
    width: 2px;
    margin-bottom: 2px;
    background: var(--head);
}
.scale-flag::after {
    content: "";
    position: absolute;
    left: -5px;
    bottom: -2px;
    width: 12px;
    height: 8px;
    background: var(--head);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.scale-flag--low { height: 48px; }
.scale-flag--high { height: 104px; }
.scale-flag-text {
    position: absolute;
    left: 0;
    bottom: 100%;
    padding: 0.3rem 1.3rem 0.3rem 0.65rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: var(--ink);
    background:
        linear-gradient(90deg, var(--head) 0 2px, transparent 2px),
        var(--sheet);
    border-top: 1.5px solid var(--head);
    border-bottom: 1.5px solid var(--head);
    transform-origin: left bottom;
    transform: rotate(-38deg);
    clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 50%, 100% 100%, 0 100%);
}
.scale-flag--accent .scale-flag-text {
    background:
        linear-gradient(90deg, var(--head) 0 2px, transparent 2px),
        var(--hot);
}
.scale-notes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}
.scale-note {
    position: relative;
    min-width: 0;
    padding: 1.1rem 1.1rem 0.9rem;
    background: rgba(247, 250, 251, 0.92);
    border: 1px solid var(--head);
    border-top: 4px solid var(--blue);
}
.scale-note:nth-child(3) { border-top-color: var(--hot); }
.scale-note-year {
    display: block;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--blue);
}
.scale-note-tag {
    display: inline-block;
    margin: 0.5rem 0 0.6rem;
    padding: 0.1rem 0.5rem;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--ink);
    color: var(--ink);
}
.scale-note p { margin: 0; font-size: 0.9rem; line-height: 1.5; }

/* Блок 2: смета */
.estimate-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2.2rem;
    align-items: start;
}
.estimate-figure { margin: 0; min-width: 0; }
.estimate-drawing {
    position: relative;
    border: 1px solid rgba(22, 50, 74, 0.5);
    background: rgba(247, 250, 251, 0.35);
}
.estimate-drawing img { width: 100%; aspect-ratio: 1368 / 768; object-fit: cover; mix-blend-mode: multiply; }
.callout {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-width: 22%;
    padding: 0.2rem 0.3rem;
    background: rgba(232, 238, 242, 0.85);
    line-height: 1.25;
}
.callout strong {
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.35vw, 1.25rem);
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 0.15rem;
}
.callout em { font-style: normal; font-size: clamp(0.66rem, 0.85vw, 0.8rem); color: var(--ink); }
.callout--roof { left: 77.5%; top: 10%; }
.callout--floor { left: 77%; top: 45%; }
.callout--base { left: 1%; top: 77%; max-width: 17%; }
.estimate-caption { margin-top: 0.7rem; font-size: 0.85rem; color: var(--muted); }
.spec-wrap { min-width: 0; }
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    background: var(--sheet);
    border: 2px solid var(--head);
}
.spec-table caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 0.5rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.spec-table th, .spec-table td { border: 1px solid var(--head); padding: 0.32rem 0.55rem; text-align: left; vertical-align: top; }
.spec-table thead th { background: var(--head); color: #fff; font-family: var(--f-head); font-weight: 500; letter-spacing: 0.04em; }
.spec-table td:first-child { width: 2.4rem; font-family: var(--f-mono); color: var(--muted); text-align: center; }
.spec-table td:last-child { font-family: var(--f-mono); text-align: right; white-space: nowrap; }
.spec-table .spec-group td {
    background: var(--hot);
    color: var(--ink);
    font-family: var(--f-head);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    font-size: 0.9rem;
}
.spec-table tfoot td { font-weight: 600; background: var(--tint); }
.spec-table tfoot td:first-child { width: auto; text-align: left; font-family: var(--f-text); color: var(--ink); }
.spec-note {
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    background: rgba(247, 250, 251, 0.9);
    border-left: 4px solid var(--hot);
}

/* Карточки записей */
.cards { display: grid; gap: 1.7rem; }
.cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 16px;
    border: 2px solid var(--head);
    box-shadow: inset 0 0 0 5px var(--sheet), inset 0 0 0 6px var(--head);
    background:
        linear-gradient(135deg, var(--head) 0 6px, transparent 6px) 7px 7px / 18px 18px no-repeat,
        linear-gradient(225deg, var(--head) 0 6px, transparent 6px) calc(100% - 7px) 7px / 18px 18px no-repeat,
        repeating-linear-gradient(135deg, transparent 0 3px, rgba(22, 50, 74, 0.55) 3px 4px) 7px 7px / 18px 18px no-repeat,
        repeating-linear-gradient(45deg, transparent 0 3px, rgba(22, 50, 74, 0.55) 3px 4px) calc(100% - 7px) 7px / 18px 18px no-repeat,
        var(--sheet);
    transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: inset 0 0 0 5px var(--sheet), inset 0 0 0 6px var(--head), 6px 6px 0 var(--blue); }
.card-thumb { margin: 10px 10px 0; border: 1px solid var(--head); background: var(--paper); overflow: hidden; }
.card-thumb a { display: block; }
.card-thumb img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1rem 10px 8px; }
.card-pin {
    align-self: flex-start;
    margin-bottom: 0.5rem;
    padding: 0.05rem 0.5rem;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--hot);
    border: 1px solid var(--ink);
}
.card-title { margin: 0 0 0.5rem; font-weight: 500; font-size: 1.3rem; line-height: 1.25; letter-spacing: 0.01em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue); text-decoration: underline; }
.card-excerpt { font-size: 0.92rem; line-height: 1.5; color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.card-date { font-family: var(--f-mono); font-size: 0.85rem; color: var(--muted); }
.latest-more { margin: 1.6rem 0 0; text-align: right; }

/* Блок 3: паспорт ипотечных программ */
.passport {
    position: relative;
    padding: 0.4rem 0;
}
.passport-stamp {
    position: absolute;
    right: 0;
    top: -3.1rem;
    display: flex;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1.5px solid var(--head);
    background: var(--sheet);
}
.passport-stamp span { padding: 0.25rem 0.6rem; }
.passport-stamp span + span { border-left: 1.5px solid var(--head); color: var(--hot-deep); }
.passport-ruler {
    height: 14px;
    background:
        repeating-linear-gradient(90deg, var(--head) 0 1px, transparent 1px 8px) left bottom / 100% 7px no-repeat,
        repeating-linear-gradient(90deg, var(--head) 0 1.5px, transparent 1.5px 40px) left bottom / 100% 14px no-repeat;
    border-bottom: 1.5px solid var(--head);
}
.passport-ruler:last-child { border-bottom: 0; border-top: 1.5px solid var(--head); background-position: left top, left top; }
.passport-scroll { overflow-x: auto; margin: 0.7rem 0; }
.passport-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: rgba(247, 250, 251, 0.94);
    border: 2px solid var(--head);
    font-size: 0.9rem;
}
.passport-table caption { caption-side: top; }
.passport-table th, .passport-table td { border: 1px solid var(--head); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.passport-table thead th {
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--tint);
    border-bottom: 2px solid var(--head);
}
.passport-table tbody th { font-family: var(--f-head); font-weight: 500; font-size: 1.02rem; color: var(--blue); width: 17%; }
.passport-table tbody tr:nth-child(even) td, .passport-table tbody tr:nth-child(even) th { background: rgba(220, 230, 236, 0.45); }
.passport-table tfoot th, .passport-table tfoot td { border-top: 2px solid var(--head); background: var(--head); color: #fff; }
.passport-table tfoot th { font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--hot); }

/* Блок 4: практикум */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.6rem;
}
.step { position: relative; min-width: 0; }
.step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -2.05rem;
    top: 1.2rem;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink);
}
.step-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; min-height: 5.4rem; }
.step-num {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(3rem, 5vw, 4.4rem);
    line-height: 0.9;
    letter-spacing: -0.01em;
}
.step-num--hot { color: var(--hot); }
.step-num--cold { color: var(--blue); }
.step-scheme { width: 52%; max-width: 130px; height: auto; mix-blend-mode: multiply; }
.step-title { margin: 0 0 0.4rem; font-weight: 500; font-size: 1.18rem; letter-spacing: 0.02em; }
.step p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.steps-cta { margin: 2rem 0 0; }

/* ---------- Заголовки страниц и документы ---------- */
.page-head { margin-bottom: 1.8rem; }
.page-heading {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.page-sub { color: var(--muted); max-width: 70ch; margin: 0; }
.doc {
    padding: 2rem 2.2rem 2.2rem;
    background: var(--sheet);
    border: 2px solid var(--head);
    box-shadow: inset 0 0 0 5px var(--sheet), inset 0 0 0 6px var(--head);
}
.doc-head { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1.5px dashed var(--grid-strong); }
.doc-head .page-heading { text-transform: none; letter-spacing: 0.02em; }
.doc-meta { font-family: var(--f-mono); font-size: 0.82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem; }
.doc-cover { margin: 0 0 1.6rem; border: 1px solid var(--head); }
.doc-cover img { width: 100%; height: auto; }
.doc-tags { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.doc-tags a { font-family: var(--f-mono); font-size: 0.8rem; padding: 0.15rem 0.55rem; border: 1px solid var(--blue); text-decoration: none; }
.doc-tags a:hover { background: var(--hot); color: var(--ink); border-color: var(--ink); }
.doc-pages { margin-top: 1rem; font-family: var(--f-mono); }
.doc-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.doc-nav-link {
    display: block;
    padding: 0.9rem 1.1rem;
    background: rgba(247, 250, 251, 0.92);
    border: 1px solid var(--head);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1.05rem;
    min-width: 0;
}
.doc-nav-link span { display: block; font-family: var(--f-mono); font-weight: 500; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; text-transform: uppercase; }
.doc-nav-next { text-align: right; grid-column: 2; }
.doc-nav-link:hover { border-color: var(--hot); box-shadow: 4px 4px 0 var(--hot); color: var(--ink); }

/* ---------- Типографика содержимого ---------- */
.entry-content { font-size: 1.02rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.7rem; font-weight: 500; letter-spacing: 0.02em; padding-left: 0.8rem; border-left: 4px solid var(--hot); }
.entry-content h3 { font-size: 1.35rem; font-weight: 500; }
.entry-content h4 { font-size: 1.15rem; font-weight: 500; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content ul li::marker { color: var(--hot); }
.entry-content ol li::marker { font-family: var(--f-mono); color: var(--blue); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.1rem 1.4rem;
    background: var(--tint);
    border-left: 5px solid var(--hot);
    font-size: 1.05rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--head); padding: 0.5rem 0.7rem; text-align: left; }
.entry-content th { background: var(--head); color: #fff; font-family: var(--f-head); font-weight: 500; }
.entry-content img { height: auto; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.entry-content pre { overflow-x: auto; padding: 1rem; background: var(--foot); color: #E3EAEF; font-family: var(--f-mono); font-size: 0.88rem; }
.entry-content code { font-family: var(--f-mono); font-size: 0.9em; background: var(--tint); padding: 0.05em 0.3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 1.5px dashed var(--grid-strong); margin: 2em 0; }
.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.5rem 1.4rem;
    background: var(--tint);
    border: 2px solid var(--head);
    box-shadow: inset 0 0 0 4px var(--tint), inset 0 0 0 5px var(--blue);
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 1.8rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 0.9rem;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: 0.4rem;
    background: linear-gradient(var(--hot), var(--hot)) left bottom / 48px 3px no-repeat;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.5rem 0; border-bottom: 1px dashed var(--grid-strong); font-size: 0.93rem; line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--blue); text-decoration: underline; }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); }
.sidebar p { color: var(--ink); }

/* ---------- Поиск ---------- */
.seek { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.seek-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    font: inherit;
    color: var(--ink);
    background: var(--sheet);
    border: 1.5px solid var(--head);
    border-radius: 0;
}
.seek-field::placeholder { color: var(--muted); }

/* ---------- Пагинация ---------- */
.sheet-pager { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 2.2rem 0 0; align-items: center; }
.sheet-pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: 0.4rem 0.75rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
    background: var(--sheet);
    border: 1.5px solid var(--head);
}
.sheet-pager a.page-numbers:hover { background: var(--hot); border-color: var(--ink); color: var(--ink); }
.sheet-pager .page-numbers.current { background: var(--head); color: #fff; }
.sheet-pager .page-numbers.dots { border: 0; background: none; min-width: auto; }

/* ---------- 404 ---------- */
.lost {
    padding: 2.4rem 2.4rem 2.6rem;
    background: rgba(247, 250, 251, 0.92);
    border: 2px solid var(--head);
}
.lost-code {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--blue);
    letter-spacing: 0.06em;
}
.lost-text { max-width: 60ch; }
.lost-home { margin: 1.4rem 0 0; }
.empty-box { padding: 1.4rem 1.6rem; background: rgba(247, 250, 251, 0.92); border: 1px solid var(--head); }

/* ---------- Комментарии ---------- */
.remarks { margin-top: 2rem; padding: 1.8rem 2rem; background: rgba(247, 250, 251, 0.94); border: 1px solid var(--head); }
.remarks-title, .comment-reply-title { margin-top: 0; font-size: 1.4rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.remark-list, .remark-list .children { list-style: none; margin: 0; padding: 0; }
.remark-list .children { padding-left: 1.6rem; border-left: 2px solid var(--grid); }
.remark-body { padding: 1rem 0; border-bottom: 1px dashed var(--grid-strong); }
.remark-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.remark-avatar { border: 1px solid var(--head); }
.remark-author { font-family: var(--f-head); font-weight: 500; font-size: 1.05rem; }
.remark-date { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); }
.remark-wait { font-size: 0.85rem; color: var(--hot-deep); }
.remark-reply a { font-family: var(--f-mono); font-size: 0.8rem; text-transform: uppercase; }
.comment-respond { margin-top: 1.6rem; }
.comment-form p { margin-bottom: 0.9rem; }
.comment-form label { display: block; font-family: var(--f-head); font-weight: 500; font-size: 0.95rem; margin-bottom: 0.25rem; }
.comment-form-cookies-consent label { display: inline; font-family: var(--f-text); font-size: 0.85rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--head);
    border-radius: 0;
}
.comment-form .submit {
    display: inline-block;
    padding: 0.62rem 1.6rem 0.62rem 1.2rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--hot);
    border: 1.5px solid var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--head); color: #fff; }
.req { color: var(--hot-deep); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; font-family: var(--f-mono); font-size: 0.85rem; }

/* ---------- Подвал ---------- */
.basement {
    background: var(--foot);
    color: var(--foot-text);
    border-top: 4px solid var(--ink);
    box-shadow: inset 0 3px 0 var(--blue);
}
.basement-inner { padding: 2.8rem 0 1.6rem; }
.basement-cols {
    width: 85%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}
.basement-col { min-width: 0; }
.basement .widget { margin-bottom: 1.4rem; color: var(--foot-text); }
.basement .widget-title {
    margin: 0 0 0.8rem;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
}
.basement p, .basement .textwidget { color: var(--foot-text); font-size: 0.95rem; line-height: 1.55; }
.basement a { color: #fff; text-decoration-color: var(--hot); }
.basement a:hover { color: var(--hot); }
.basement ul { list-style: none; margin: 0; padding: 0; }
.basement .widget_nav_menu li { margin-bottom: 0.15rem; }
.basement .widget_nav_menu a {
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1.08rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--foot-text);
}
.basement .widget_nav_menu a:hover { color: var(--hot); text-decoration: underline; }
.basement .post-date { color: var(--foot-muted); font-family: var(--f-mono); font-size: 0.78rem; display: block; }
.basement-copy {
    width: 85%;
    margin: 1.4rem auto 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(221, 230, 236, 0.22);
    text-align: center;
    font-size: 0.86rem;
    color: var(--foot-muted);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    max-width: 820px;
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.4rem;
    padding: 1rem 1.4rem;
    background: var(--head);
    color: #fff;
    border: 2px solid var(--hot);
    box-shadow: 6px 6px 0 var(--ink);
}
.cookie-text { margin: 0; flex: 1 1 320px; min-width: 0; font-size: 0.9rem; line-height: 1.45; color: #fff; }

/* ---------- Адаптив ---------- */
@media (min-width: 1440px) {
    .sheet-main::before { display: block; }
}

@media (max-width: 1180px) {
    .estimate-grid { grid-template-columns: minmax(0, 1fr); }
    .scale-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.4rem; }
    .step:nth-child(2)::after { display: none; }
}

@media (max-width: 960px) {
    .masthead-inner { padding: 1.4rem 0; align-items: center; }
    .brand { flex: 1 1 0; gap: 1rem; }
    .brand-mark, .brand-mark svg, .brand-logo { width: 64px; }
    .brand-desc { font-size: 0.85rem; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0.9rem;
        font-family: var(--f-head);
        font-weight: 500;
        font-size: 1rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #fff;
        background: transparent;
        border: 2px solid #E8EEF2;
        cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
        display: block;
        width: 20px;
        height: 2px;
        background: #fff;
        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; }
    .primary-nav { display: none; padding-left: 0; }
    .primary-nav.is-open { display: block; }
    .nav-list { display: flex; flex-direction: column; width: 100%; }
    .nav-list li + li::before { display: none; }
    .nav-list li + li { border-top: 1px solid rgba(232, 238, 242, 0.3); }
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 2rem; }
    .cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .basement-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plate { padding: 2rem 1.6rem 2.2rem; }
    .scale-track { padding-top: 200px; }
    .scale-flag-text { font-size: 0.85rem; }
}

@media (max-width: 760px) {
    .scale-track { display: none; }
    .scale-notes { grid-template-columns: minmax(0, 1fr); gap: 0; border-left: 3px solid var(--head); padding-left: 1.2rem; }
    .scale-note { margin-bottom: 1rem; }
    .scale-note::before {
        content: "";
        position: absolute;
        left: calc(-1.2rem - 9px);
        top: 1.1rem;
        width: 14px;
        height: 14px;
        background: var(--hot);
        border: 2px solid var(--head);
    }
    .callout { position: static; max-width: none; background: none; padding: 0; }
    .estimate-drawing { display: flex; flex-direction: column; }
    .estimate-drawing img { order: -1; }
    .callout { padding: 0.5rem 0.8rem; border-top: 1px dashed var(--grid-strong); }
    .callout strong { border-bottom: 0; }
    .callout em { font-size: 0.85rem; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    .shell { width: 94%; }
    .sheet { padding: 1.2rem 0 2rem; }
    .sheet-main { padding: 1.6rem 0 2rem; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--blue); }
    .front-wrap, .layout-single, .layout-with-sidebar { width: auto; margin: 0 0.9rem; }
    .no-aside .crumbs, .has-aside .crumbs { width: auto; margin: 0 0.9rem 1.2rem; }
    .brand-desc { display: none; }
    .plate { padding: 1.8rem 1.1rem 2rem; }
    .plate-title { gap: 0.5rem; }
    .plate-title::before, .plate-title::after { width: 20px; height: 14px; margin-top: 14px; }
    .cards--three, .cards--two { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .step::after { display: none; }
    .basement-cols { grid-template-columns: minmax(0, 1fr); width: auto; margin: 0 0.9rem; gap: 1rem; }
    .basement-copy { width: auto; margin: 1rem 0.9rem 0; }
    .doc { padding: 1.4rem 1.1rem 1.6rem; }
    .lost { padding: 1.8rem 1.2rem 2rem; }
    .remarks { padding: 1.4rem 1.1rem; }
    .sidebar { padding: 1.3rem 1.1rem; }
    .doc-nav { grid-template-columns: minmax(0, 1fr); }
    .doc-nav-next { grid-column: auto; }
    .passport-stamp { position: static; display: inline-flex; margin-bottom: 0.6rem; }
    .cookie-banner { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; padding: 0.9rem 1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}

/* ---------- Доработки адаптива ---------- */
@media (max-width: 960px) {
    .masthead-inner { gap: 1rem; }
    .brand { flex: 1 1 100%; }
    .nav-toggle { order: 2; }
    .primary-nav { order: 3; }
}
@media (max-width: 760px) {
    .passport-scroll { overflow: visible; }
    .passport-table { min-width: 0; border: 0; background: none; }
    .passport-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .passport-table, .passport-table tbody, .passport-table tfoot, .passport-table tr, .passport-table th, .passport-table td { display: block; width: auto; }
    .passport-table tr { margin-bottom: 1rem; border: 2px solid var(--head); background: rgba(247, 250, 251, 0.96); }
    .passport-table tbody tr:nth-child(even) td, .passport-table tbody tr:nth-child(even) th { background: none; }
    .passport-table th, .passport-table td { border: 0; border-bottom: 1px dashed var(--grid-strong); padding: 0.55rem 0.85rem; }
    .passport-table tbody th { width: auto; background: var(--tint) !important; border-bottom: 2px solid var(--head); }
    .passport-table td::before {
        content: attr(data-label);
        display: block;
        font-family: var(--f-mono);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--muted);
        margin-bottom: 0.15rem;
    }
    .passport-table td:last-child { border-bottom: 0; }
    .passport-table tfoot tr { background: var(--head); }
    .passport-table tfoot th, .passport-table tfoot td { border: 0; }
}
@media (max-width: 600px) {
    .brand-mark, .brand-mark svg, .brand-logo { width: 46px; }
    .brand { gap: 0.8rem; }
    .brand-name { font-size: 0.92rem; letter-spacing: 0.02em; hyphens: manual; overflow-wrap: break-word; }
    .step-head { gap: 1rem; }
    .step-scheme { width: 40%; }
}
