/*
Theme Name: dds_wilker-dev.com
Theme URI: https://wilker-dev.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: wlkdev
*/

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

/* ---------- Переменные ---------- */
:root {
    --paper: #E8ECEF;
    --grid: #C3CDD6;
    --navy: #1B2A38;
    --navy-2: #22344A;
    --sheet: #FFFFFF;
    --blue: #2B5D8C;
    --orange: #E8622C;
    --ink: #22303C;
    --muted: #7A8B99;
    --green: #9DBFA8;
    --tracing: rgba(244, 247, 250, 0.82);
    --line: rgba(43, 93, 140, 0.28);
    --aside: #F3F6F8;
    --mono: "JetBrains Mono", "DejaVu Sans Mono", "Liberation Mono", Consolas, monospace;
    --sans: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --fold: 42px;
}

/* ---------- Скрытие по атрибуту hidden (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
.q-pane[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px),
        linear-gradient(rgba(195, 205, 214, 0.42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(195, 205, 214, 0.42) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--mono);
    font-weight: 800;
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    color: var(--ink);
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
p, li, dd, td, th, figcaption { overflow-wrap: break-word; hyphens: auto; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--orange); text-decoration-style: solid; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.visually-hidden {
    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 {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--orange); color: #fff; padding: 0.6rem 1rem;
    font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.shell { width: min(92%, 1220px); margin-inline: auto; position: relative; z-index: 1; }

/* Боковые размерные линейки (декор) */
.sheet-rulers { display: none; }
@media (min-width: 1360px) {
    .sheet-rulers {
        display: block; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    }
    .sheet-rulers::before, .sheet-rulers::after {
        content: ""; position: absolute; top: 0; bottom: 0; width: 14px;
        background:
            linear-gradient(var(--blue), var(--blue)) center / 1px 100% no-repeat,
            repeating-linear-gradient(to bottom, transparent 0 158px, var(--blue) 158px 160px) center / 14px 100% no-repeat;
        opacity: 0.45;
    }
    .sheet-rulers::before { left: calc(50% - 670px); }
    .sheet-rulers::after { right: calc(50% - 670px); }
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.4em;
    padding: 0.6em 1.1em;
    font-family: var(--mono); font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    text-decoration: none;
    border: 3px double var(--blue);
    border-radius: 0;
    background: var(--sheet); color: var(--blue);
    box-shadow: 4px 4px 0 var(--orange);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s, color 0.12s;
}
.btn:hover { background: var(--blue); color: #fff; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--orange); }
.btn-solid { background: var(--orange); border-color: #fff; color: #fff; box-shadow: 4px 4px 0 var(--navy); outline: 1px solid var(--orange); }
.btn-solid:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(232, 236, 239, 0.8); }
.btn-ghost-light:hover { background: var(--orange); color: #fff; }

/* ---------- Штамп ---------- */
.stamp {
    display: inline-block;
    font-family: var(--mono); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--orange);
    border: 3px solid var(--orange);
    outline: 1px solid var(--orange); outline-offset: 2px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.25em 0.7em;
    line-height: 1.2;
    transform: rotate(-9deg);
    pointer-events: none;
    white-space: nowrap;
}
.stamp-big { font-size: clamp(1rem, 2vw, 1.55rem); }
.stamp-card { position: absolute; top: 14px; right: 18px; font-size: 0.78rem; transform: rotate(12deg); }

/* ---------- Листы ---------- */
.sheet {
    background: var(--sheet);
    border: 1px solid var(--line);
    box-shadow: 0 2px 0 rgba(27, 42, 56, 0.06), 0 12px 24px -16px rgba(27, 42, 56, 0.35);
}
.sheet-tracing {
    background-color: var(--tracing);
    background-image:
        linear-gradient(rgba(43, 93, 140, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 93, 140, 0.07) 1px, transparent 1px);
    background-size: 16px 16px;
    border: 1px solid rgba(43, 93, 140, 0.18);
}
.sheet-fold {
    position: relative;
    clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
}
.sheet-fold::after {
    content: "";
    position: absolute; top: 0; right: 0;
    width: var(--fold); height: var(--fold);
    background: linear-gradient(225deg, transparent 50%, #C9D3DC 50%, #F7F9FB 78%, #E2E8ED 100%);
    box-shadow: -3px 3px 6px -2px rgba(27, 42, 56, 0.25);
    pointer-events: none;
}

/* ---------- Шапка ---------- */
.masthead { padding-top: 28px; }
.masthead-sheet {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem 2rem;
    background: var(--sheet);
    border-bottom: 2px solid var(--blue);
    box-shadow: 0 12px 24px -18px rgba(27, 42, 56, 0.4);
    padding: 1.1rem 1.4rem;
}
.brand { display: flex; align-items: center; gap: 0.9rem; flex: 1 1 380px; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-svg, .brand-logo { width: 58px; height: 58px; display: block; object-fit: contain; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 800; font-size: clamp(0.82rem, 1.2vw, 1.02rem); line-height: 1.3;
    color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
    overflow-wrap: break-word;
}
.brand-name:hover { color: var(--blue); }
.brand-desc {
    margin: 0.3rem 0 0;
    font-size: 0.72rem; line-height: 1.45; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.nav-toggle {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-family: var(--mono); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
    background: transparent; color: var(--ink);
    border: 3px double var(--blue); border-radius: 0;
    padding: 0.5rem 0.8rem; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: none; width: 100%; }
.site-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.nav-list li { border-bottom: 1px dashed var(--line); }
.nav-list a {
    display: block; padding: 0.7rem 0.2rem;
    font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink); text-decoration: none;
}
.nav-list a:hover { color: var(--orange); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { color: var(--orange); }

@media (min-width: 961px) {
    .nav-toggle { display: none; }
    .site-nav { display: block; width: auto; flex: 0 1 auto; }
    .nav-list { flex-direction: row; flex-wrap: wrap; gap: 0.3rem 1.6rem; border: 0; }
    .nav-list li { border: 0; }
    .nav-list a { padding: 0.35rem 0; border-bottom: 3px solid transparent; font-size: 0.82rem; }
    .nav-list a:hover { border-bottom-color: var(--blue); color: var(--ink); }
    .nav-list .current-menu-item > a, .nav-list .current_page_item > a { border-bottom-color: var(--orange); color: var(--ink); }
}

/* ---------- Заголовки секций ---------- */
.sec-title {
    display: table;
    margin: 0 0 1.4rem;
    padding-bottom: 0.45rem;
    font-size: clamp(1.15rem, 2.3vw, 1.75rem);
    text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 1px solid var(--blue);
    max-width: calc(100% - 3rem);
}
.sec-num { color: var(--orange); margin-right: 0.35em; }
.sec-title-light { color: #fff; border-bottom-color: rgba(232, 236, 239, 0.45); }

/* ---------- Главная ---------- */
.front { padding: 2.2rem 0 3rem; display: flex; flex-direction: column; gap: 2.4rem; }
.fs { position: relative; }

/* 01 Смета */
.fs-estimate { padding: 2rem 1.4rem 1.6rem; }
.fs-estimate .stamp-big { position: static; margin-top: 1.2rem; }
.estimate-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.estimate-table-wrap { min-width: 0; overflow-x: auto; }
.estimate-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 460px; }
.estimate-table th, .estimate-table td { border: 1px solid #C9D3DC; padding: 0.6rem 0.8rem; }
.estimate-table thead th {
    background: #D9E1E8; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; text-align: left;
    border-bottom: 2px solid var(--blue);
}
.estimate-table thead th:not(:first-child), .estimate-table td { text-align: right; }
.estimate-table tbody th { text-align: left; font-weight: 400; }
.estimate-table td { font-variant-numeric: tabular-nums; position: relative; }
.estimate-table td::before {
    content: "↗"; position: absolute; left: 0.6rem; color: #6FA07F; font-size: 0.8rem;
}
.estimate-table td.is-minus::before { content: "↘"; color: var(--orange); }
.estimate-table td.is-plus::before { color: #6FA07F; }
.estimate-table tfoot th, .estimate-table tfoot td {
    background: #E3E9EE; font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--blue);
}
.estimate-table tfoot th { text-align: left; }
.estimate-table tfoot td::before { content: none; }
.total-new { color: var(--blue); }
.total-old { color: var(--orange); }
.estimate-note { margin: 0.8rem 0 0; font-size: 0.74rem; color: var(--muted); }

.estimate-chart { margin: 0; min-width: 0; max-width: 300px; justify-self: center; width: 100%; }
.estimate-chart img { display: block; width: 100%; height: auto; aspect-ratio: 756 / 768; object-fit: cover; }
.estimate-chart figcaption { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.chart-axis { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 0.35rem 0; border-top: 1px solid #9FB0BF; }
.chart-legend { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.3rem; }
.key { display: inline-block; width: 12px; height: 12px; }
.key-old { background: var(--orange); }
.key-new { background: var(--blue); margin-left: 0.6rem; }

@media (min-width: 961px) {
    .fs-estimate { padding: 2.4rem 2.4rem 2rem; }
    .estimate-grid { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 2.4rem; }
    .fs-estimate .stamp-big { position: absolute; top: 2.4rem; right: 3.4rem; margin: 0; }
    .fs-estimate .sec-title { max-width: 66%; }
    .estimate-chart { margin-top: 4.2rem; }
}

/* 02 План */
.fs-plan { padding: 2rem 1.4rem 1.8rem; }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; align-items: center; }
.plan-figure { margin: 0; position: relative; min-width: 0; border: 1px solid rgba(43, 93, 140, 0.25); }
.plan-figure img { display: block; width: 100%; height: auto; aspect-ratio: 1536 / 951; object-fit: cover; }
.plan-tag {
    position: absolute; transform: translate(-50%, -50%);
    font-family: var(--mono); font-weight: 800; text-transform: uppercase; text-align: center;
    font-size: clamp(0.5rem, 1vw, 0.78rem); line-height: 1.25; letter-spacing: 0.03em;
    color: var(--navy);
    background: rgba(244, 247, 250, 0.82);
    padding: 0.15em 0.4em;
    white-space: nowrap;
}
.plan-tag-warn { color: var(--orange); border: 1px dashed var(--orange); }
.plan-tag-wet { color: var(--blue); border: 1px dashed var(--blue); }

.plan-legend { min-width: 0; }
.dim-list { list-style: none; margin: 0 0 1rem; padding: 0; font-size: 0.85rem; }
.dim-list li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(43, 93, 140, 0.25);
    position: relative; padding-left: 1.1rem;
}
.dim-list li::before { content: ""; position: absolute; left: 0; top: 50%; width: 0.7rem; height: 1px; background: var(--blue); }
.dim-list li::after { content: ""; position: absolute; left: 0; top: calc(50% - 3px); width: 1px; height: 7px; background: var(--blue); }
.dim-list b { color: var(--blue); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dim-total { font-weight: 800; border-bottom: 2px solid var(--blue) !important; }
.dim-total b { color: var(--orange); }
.dim-muted { color: var(--muted); font-size: 0.78rem; }
.plan-hint { font-size: 0.78rem; color: var(--ink); margin: 0; padding: 0.8rem 0.9rem; background: rgba(255, 255, 255, 0.75); border-left: 3px solid var(--orange); }

@media (max-width: 520px) {
    .plan-tag { display: none; }
}
@media (min-width: 961px) {
    .fs-plan { padding: 2.4rem 2.4rem 2.2rem; }
    .plan-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 2rem; }
}

/* 03 Последние расчёты */
.fs-latest {
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(232, 236, 239, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 236, 239, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    padding: 2rem 1.4rem 2.2rem;
    color: #E8ECEF;
}
.latest-more { margin: 1.8rem 0 0; text-align: right; }
.empty-state-light { color: #C9D3DC; }
@media (min-width: 961px) { .fs-latest { padding: 2.4rem 2.4rem 2.6rem; } }

/* Карточки */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 961px) { .fs-latest .card-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } }

.card {
    display: flex; flex-direction: column;
    background: var(--sheet);
    border: 1px solid var(--blue);
    padding: 16px;
    overflow: hidden;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
    min-width: 0;
    transition: transform 0.15s;
}
.card::after {
    content: ""; position: absolute; top: 0; right: 0; width: 34px; height: 34px;
    background: linear-gradient(225deg, transparent 50%, #BFCAD4 50%, #F4F7F9 80%);
    pointer-events: none;
}
.card:hover { transform: translateY(-3px); }
.card-thumb { position: relative; flex: none; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(0.85); }
.card-body { flex: 1; display: flex; flex-direction: column; padding-top: 1rem; min-width: 0; }
.card-title {
    margin: 0 0 0.6rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.3;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue); }
.card-excerpt { font-size: 0.8rem; color: var(--ink); flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem;
    margin-top: 1rem;
}
.stamp-date { font-size: 0.78rem; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.card-foot .btn { font-size: 0.74rem; padding: 0.5em 0.9em; }

/* 04 Карта */
.fs-map { padding: 0.4rem 0 0; }
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 0.8rem; align-items: stretch; }
.map-figure { margin: 0; position: relative; min-width: 0; border: 1px solid var(--blue); background: #A9BBCD; }
.map-figure img { display: block; width: 100%; height: auto; aspect-ratio: 2129 / 774; object-fit: cover; }
.map-pin {
    position: absolute; transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; gap: 0.35em;
    font-weight: 800; font-size: clamp(0.5rem, 0.95vw, 0.76rem); text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--navy);
    padding: 0.2em 0.5em 0.2em 0.35em;
    white-space: nowrap;
}
.map-pin::before {
    content: ""; width: 0.9em; height: 0.9em; border-radius: 50%;
    border: 2px solid var(--navy); background: var(--pin, var(--green)); flex: none;
}
.map-pin small { font-weight: 400; color: var(--muted); font-size: 0.92em; text-transform: none; }
.lvl-1 { --pin: #9DBFA8; }
.lvl-2 { --pin: #C3C89B; }
.lvl-3 { --pin: #E6BB75; }
.lvl-4 { --pin: #E8904E; }
.lvl-5 { --pin: #E8622C; }
.map-scale {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
}
.map-scale-top, .map-scale-bottom { writing-mode: vertical-rl; transform: rotate(180deg); }
.map-scale-bar {
    flex: 1; width: 14px; min-height: 40px;
    background: linear-gradient(to bottom, #E8622C, #E8B66F 50%, #9DBFA8);
    border: 1px solid var(--navy);
}
.map-note { margin: 1rem 0 0; font-size: 0.78rem; color: var(--ink); max-width: 860px; }
@media (max-width: 600px) {
    .map-pin small { display: none; }
    .map-pin { font-size: 0.48rem; padding: 0.15em 0.35em 0.15em 0.25em; }
    .map-grid { grid-template-columns: minmax(0, 1fr) 24px; gap: 0.5rem; }
}
@media (max-width: 420px) {
    .map-pin { font-size: 0; padding: 0; border: 0; background: transparent; }
    .map-pin::before { width: 10px; height: 10px; }
}

/* 05 Вопросы */
.fs-questions { padding: 2rem 1.4rem 1.8rem; }
.q-strip {
    display: grid; grid-template-columns: minmax(0, 1fr);
    gap: 1px; background: var(--blue); border: 1px solid var(--blue);
}
.q-cell {
    display: flex; flex-direction: row; align-items: baseline; gap: 0.8rem;
    text-align: left;
    font-family: var(--mono);
    background: var(--sheet); color: var(--ink);
    border: 0; border-radius: 0;
    padding: 0.9rem 1rem;
    cursor: pointer; min-width: 0;
    transition: background 0.12s, color 0.12s;
}
.q-cell:hover { background: #EEF2F6; }
.q-num { font-size: 1.6rem; font-weight: 800; line-height: 1; flex: none; }
.q-text { font-size: 0.86rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.3; }
.q-cell.is-open { background: var(--orange); color: #fff; }
.q-panes { margin-top: 1.2rem; }
.q-pane {
    border: 1px dashed var(--blue);
    padding: 1.1rem 1.3rem;
    background: #F6F8FA;
    font-size: 0.88rem;
}
.q-pane p { margin: 0; }
@media (min-width: 600px) { .q-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 961px) {
    .fs-questions { padding: 2.4rem 2.4rem 2.2rem; }
    .q-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .q-cell { flex-direction: column; gap: 0.6rem; padding: 1.1rem 1.1rem 1.3rem; min-height: 150px; }
    .q-num { font-size: 2.3rem; }
}

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 1.6rem 0 3rem; }
.crumbs {
    font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em;
    margin: 0 0 1.4rem; color: var(--muted);
    overflow-wrap: break-word;
}
.crumbs a { color: var(--blue); }
.crumbs-sep { margin: 0 0.35em; color: var(--orange); }
.crumbs-now { color: var(--ink); }

.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar { display: block; }
.content-area { min-width: 0; }
@media (max-width: 960px) { .layout-single { width: 100%; } }
@media (min-width: 961px) {
    .layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67%) minmax(0, 27%); justify-content: space-between; align-items: start; }
}

.page-head { padding: 1.6rem 1.6rem 1.2rem; margin-bottom: 1.8rem; border-left: 6px solid var(--orange); }
.page-title { margin: 0 0 0.4rem; font-size: clamp(1.3rem, 3vw, 2rem); text-transform: uppercase; letter-spacing: 0.04em; }
.page-lead { margin: 0; font-size: 0.86rem; color: var(--muted); }
.page-lead p { margin: 0; }
.empty-state { font-size: 0.9rem; }
.empty-box { padding: 1.6rem; }

.entry { padding: 1.8rem 1.4rem 2rem; margin-bottom: 2rem; }
@media (min-width: 600px) { .entry { padding: 2.4rem 2.6rem 2.6rem; } }
.entry-head { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--blue); }
.entry-title { margin: 0 0 0.6rem; font-size: clamp(1.35rem, 3vw, 2.1rem); text-transform: uppercase; letter-spacing: 0.03em; padding-right: 2rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.78rem; }
.entry-cat a { text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.entry-cover { margin: 0 0 1.6rem; }
.entry-cover img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }

.entry-content { font-family: var(--sans); font-size: 1.05rem; line-height: 1.75; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.03em; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.entry-content h3 { font-size: 1.15rem; }
.entry-content h4 { font-size: 1rem; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content ul { list-style: none; padding-left: 1.4em; }
.entry-content ul li { position: relative; }
.entry-content ul li::before { content: ""; position: absolute; left: -1.1em; top: 0.65em; width: 0.5em; height: 0.5em; background: var(--orange); }
.entry-content ol li::marker { font-family: var(--mono); font-weight: 800; color: var(--blue); }
.entry-content blockquote {
    margin: 1.6em 0; padding: 1.1rem 1.4rem;
    background: #F1F4F7; border-left: 4px solid var(--orange);
    font-family: var(--mono); font-size: 0.95rem;
}
.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 #B9C6D2; padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
.entry-content th { background: #E3E9EE; font-family: var(--mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.entry-content tr:nth-child(even) td { background: #F7F9FB; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.6em 0; max-width: 100%; }
.entry-content figcaption { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-top: 0.4rem; }
.entry-content pre { font-family: var(--mono); background: var(--navy); color: #E8ECEF; padding: 1rem; overflow-x: auto; font-size: 0.85rem; }
.entry-content code { font-family: var(--mono); font-size: 0.9em; background: #EEF2F6; padding: 0.1em 0.3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 1px dashed var(--blue); margin: 2em 0; }
.entry-content .alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.78rem; }
.entry-tags a { border: 1px solid var(--line); padding: 0.2rem 0.55rem; text-decoration: none; }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 600px) { .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-nav-link {
    display: block; padding: 1rem 1.2rem;
    background: var(--sheet); border: 1px solid var(--blue);
    color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.86rem;
}
.post-nav-link span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange); margin-bottom: 0.3rem; }
.post-nav-link:hover { background: var(--navy); color: #fff; }
.post-nav-next { text-align: right; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 2rem 0 0; align-items: center; }
.pager .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.4rem; height: 2.4rem; padding: 0 0.7rem;
    border: 1px solid var(--blue); background: var(--sheet);
    color: var(--blue); font-weight: 700; font-size: 0.85rem; text-decoration: none;
}
.pager a.page-numbers:hover { background: var(--blue); color: #fff; }
.pager .page-numbers.current { background: var(--orange); border-color: var(--orange); color: #fff; }
.pager .page-numbers.dots { border: 0; background: transparent; min-width: auto; }

/* ---------- Сайдбар ---------- */
.sidebar {
    margin-top: 2rem;
    background: var(--aside);
    border: 1px solid var(--line);
    border-top: 4px solid var(--blue);
    padding: 1.4rem 1.3rem;
    color: var(--ink);
}
@media (min-width: 961px) { .sidebar { margin-top: 0; } }
.sidebar .widget { margin-bottom: 1.8rem; font-size: 0.84rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 0.9rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink); padding-bottom: 0.4rem; border-bottom: 1px solid var(--blue);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.5rem 0; border-bottom: 1px dashed var(--line); }
.sidebar a { color: var(--blue); }
.sidebar a:hover { color: var(--orange); }
.sidebar .post-date { display: block; color: var(--muted); font-size: 0.74rem; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0; }
.search-field {
    flex: 1 1 220px; min-width: 0;
    font-family: var(--mono); font-size: 0.9rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--blue); border-radius: 0;
    background: #fff; color: var(--ink);
}

/* ---------- 404 ---------- */
.nf { padding: 2.4rem 1.6rem; position: relative; }
.nf-code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; line-height: 1; margin: 0 0 0.5rem; color: var(--blue); letter-spacing: 0.04em; }
.nf-home { margin: 1.4rem 0 0; }
.nf .stamp-big { position: absolute; top: 3rem; right: 3rem; }
@media (max-width: 600px) { .nf .stamp-big { position: static; margin-top: 1.4rem; } }

/* ---------- Комментарии ---------- */
.comments { padding: 1.6rem 1.4rem; margin-bottom: 2rem; }
@media (min-width: 600px) { .comments { padding: 2rem 2.4rem; } }
.comments-title, .comment-reply-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 1rem; }
.note-list, .note-list .children { list-style: none; margin: 0; padding: 0; }
.note-list .children { padding-left: 1.4rem; border-left: 1px dashed var(--line); }
.note-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.note-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.note-head img { display: block; width: 44px; height: 44px; object-fit: cover; overflow: hidden; font-size: 0; flex: none; border: 1px solid var(--line); background: #E3E9EE; }
.note-author { display: block; font-weight: 800; font-size: 0.86rem; }
.note-meta time { font-size: 0.72rem; color: var(--muted); }
.note-text { font-family: var(--sans); font-size: 0.98rem; }
.note-wait { font-size: 0.8rem; color: var(--orange); }
.note-reply a { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.comment-respond { margin-top: 1.6rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; font-family: var(--mono); font-size: 0.9rem;
    padding: 0.6rem 0.75rem; border: 1px solid var(--blue); border-radius: 0; background: #fff; color: var(--ink);
}
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { text-transform: none; font-weight: 400; letter-spacing: 0; }
.form-note { font-size: 0.78rem; color: var(--muted); }
.req { color: var(--orange); }

/* ---------- Подвал ---------- */
.site-foot {
    margin-top: 1rem;
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(232, 236, 239, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 236, 239, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
    color: #DCE3E9;
    padding: 2.6rem 0 1.4rem;
    position: relative; z-index: 1;
}
.foot-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 600px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 961px) { .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; } }
.site-foot .widget { font-size: 0.82rem; color: #DCE3E9; margin-bottom: 1.4rem; }
.site-foot .widget-title {
    margin: 0 0 0.9rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: #FFFFFF;
}
.site-foot .widget p { color: #DCE3E9; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.45rem; }
.site-foot a { color: #E8ECEF; text-decoration-color: rgba(232, 236, 239, 0.5); }
.site-foot a:hover { color: var(--orange); }
.foot-bottom { border-top: 1px solid rgba(232, 236, 239, 0.22); margin-top: 1.4rem; padding-top: 1.2rem; text-align: center; }
.copy { margin: 0; font-size: 0.78rem; color: #B8C5D0; overflow-wrap: break-word; }

/* ---------- Cookie ---------- */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--navy); color: #E8ECEF;
    border-top: 3px solid var(--orange);
    padding: 1rem 0;
}
.cookie-inner {
    width: min(92%, 1220px); margin-inline: auto;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.6rem;
}
.cookie-text { margin: 0; font-size: 0.8rem; flex: 1 1 360px; min-width: 0; color: #E8ECEF; }
.cookie-accept { flex: none; }

/* ---------- WordPress ---------- */
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.sticky .card-title::before { content: "★ "; color: var(--orange); }
.bypostauthor > .note-body .note-author::after { content: " · автор"; color: var(--orange); font-weight: 400; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 600px) {
    body { font-size: 14px; }
    .masthead { padding-top: 14px; }
    .masthead-sheet { padding: 0.9rem 1rem; }
    .brand { flex-basis: 100%; }
    .brand-svg, .brand-logo { width: 46px; height: 46px; }
    .brand-desc { -webkit-line-clamp: 2; }
    .fs-estimate, .fs-plan, .fs-questions { padding: 1.6rem 1rem 1.4rem; }
    .fs-latest { padding: 1.6rem 1rem 1.8rem; }
    .page-head { padding: 1.2rem 1rem 1rem; }
    .stamp-card { font-size: 0.68rem; }
    .estimate-table { min-width: 0; font-size: 0.76rem; }
    .estimate-table th, .estimate-table td { padding: 0.5rem 0.4rem; }
    .estimate-table thead th { font-size: 0.66rem; letter-spacing: 0.02em; }
    .estimate-table td::before { content: none; }
    .estimate-table tfoot th, .estimate-table tfoot td { font-size: 0.9rem; }
}
