/*
Theme Name: dds_heydiduno.com
Theme URI: https://heydiduno.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: hdgen
*/

/* ---------- Шрифты ---------- */

@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+20BD, 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+20BD, 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+20BD, 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+20BD, 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+20BD, 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+20BD, 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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токены ---------- */

:root {
    --paper: #DDE3E6;
    --paper-2: #E7ECEE;
    --sheet: #EEF2F3;
    --grid: #B9C6CC;
    --ink: #12293F;
    --muted: #6B7A85;
    --orange: #E4581F;
    --teal: #2E8B8B;
    --line: #5A8FB5;
    --graphite: #1B1F24;
    --graphite-2: #23292F;
    --wash-sand: #F2C9A0;
    --wash-sky: #A8CDD9;
    --wash-rose: #E8B4B8;
    --on-dark: #E9EEF2;
    --on-dark-muted: #A9B9C6;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
    --f-text: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- Сброс и основа ---------- */

*,
*::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;
    font-family: var(--f-text);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(185, 198, 204, .62) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 198, 204, .62) 1px, transparent 1px),
        linear-gradient(rgba(185, 198, 204, .3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 198, 204, .3) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 500;
    line-height: 1.25;
    margin: 1.6em 0 .6em;
    color: var(--ink);
    overflow-wrap: break-word;
    hyphens: auto;
}

p { margin: 0 0 1em; }
p, li, dd, td, th, blockquote, figcaption { overflow-wrap: break-word; hyphens: auto; }

a {
    color: var(--teal);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover { color: var(--orange); text-decoration-color: var(--orange); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

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

.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--orange);
    color: #FFFFFF;
    font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #FFFFFF; }

/* ---------- Контейнер ---------- */

.shell { width: min(92%, 1200px); margin-inline: auto; }
.shell--front { width: min(85%, 1360px); }

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .9rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.3;
    text-align: center;
}
.btn--frame {
    padding: .55rem 1.6rem;
    color: var(--ink);
    background: transparent;
    border: 3px double var(--ink);
    border-radius: 0;
    transition: background-color .15s, color .15s, transform .15s;
}
.btn--frame:hover {
    background: var(--ink);
    color: #FFFFFF;
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 var(--orange);
}
.btn--light { color: #FFFFFF; border-color: #FFFFFF; }
.btn--light:hover { background: #FFFFFF; color: var(--ink); }

/* ---------- Шапка ---------- */

.masthead {
    position: relative;
    color: #FFFFFF;
    background-color: var(--ink);
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, #12293F 0, #12293F 30%, rgba(18, 41, 63, .35) 62%, rgba(18, 41, 63, .15) 100%),
        url("images/header-skyline.jpg");
    background-size: 24px 24px, 24px 24px, 100% 100%, auto 100%;
    background-position: 0 0, 0 0, 0 0, right center;
    background-repeat: repeat, repeat, no-repeat, no-repeat;
    border-bottom: 1px solid var(--line);
}

.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding: 1.2rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-width: 0;
    flex: 1 1 auto;
    color: #FFFFFF;
    text-decoration: none;
}
.brand:hover { color: #FFFFFF; }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-svg { display: block; width: 96px; height: auto; }
.brand-logo { display: block; max-height: 72px; width: auto; }
.brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1rem, .85rem + .4vw, 1.2rem);
    line-height: 1.3;
    letter-spacing: .03em;
    color: #FFFFFF;
    overflow-wrap: break-word;
}
.brand-desc {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--on-dark-muted);
    max-width: 58ch;
}

.site-nav { flex: 0 0 auto; }
.site-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: .2rem 1.8rem;
}
.site-nav-list li { white-space: nowrap; }
.site-nav-list a {
    position: relative;
    display: inline-block;
    padding: .35rem 0;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #FFFFFF;
    text-decoration: none;
}
.site-nav-list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s;
}
.site-nav-list a:hover { color: #FFFFFF; }
.site-nav-list a:hover::after { transform: scaleX(1); background: var(--orange); }
.site-nav-list .current-menu-item > a::after,
.site-nav-list .current_page_item > a::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .5rem .9rem;
    background: transparent;
    color: #FFFFFF;
    border: 3px double #FFFFFF;
    font-family: var(--f-head);
    font-size: .9rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #FFFFFF;
    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; background: var(--orange); }

/* ---------- Линейка под шапкой ---------- */

.ruler {
    background: rgba(238, 242, 243, .88);
    border-bottom: 1px solid var(--grid);
}
.ruler-row {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    min-height: 62px;
    padding: .6rem 0;
}
.ruler-label {
    flex: 0 0 auto;
    font-family: var(--f-text);
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
}
.ruler-scale {
    flex: 1 1 auto;
    min-width: 0;
    height: 22px;
    background:
        linear-gradient(var(--line), var(--line)) left center / 100% 1px no-repeat,
        linear-gradient(var(--line), var(--line)) left center / 1px 22px no-repeat,
        linear-gradient(var(--line), var(--line)) right center / 1px 22px no-repeat,
        repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 48px) left center / 100% 16px no-repeat,
        repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) left center / 100% 8px no-repeat;
}

.crumbs {
    flex: 0 1 auto;
    min-width: 0;
    font-size: .88rem;
    color: var(--muted);
}
.crumbs a { color: var(--ink); text-decoration-color: var(--teal); }
.crumbs a:hover { color: var(--orange); }
.crumbs .sep { color: var(--orange); margin: 0 .2rem; }
.crumbs-current { color: var(--muted); }

/* ---------- Секции главной ---------- */

.fs {
    padding: 2.6rem 0 3rem;
    border-bottom: 1px solid var(--grid);
}
.fs:last-child { border-bottom: 0; }

.sec-head {
    display: inline-flex;
    align-items: baseline;
    gap: 1.6rem;
    margin: 0 0 1.4rem;
    padding: 0 1.2rem .55rem 0;
    border-bottom: 1px solid var(--line);
}
.sec-num {
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--ink);
    letter-spacing: .08em;
}
.sec-title {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.25rem, 1.05rem + .8vw, 1.65rem);
    letter-spacing: .2em;
    text-transform: uppercase;
}
.sec-lead {
    max-width: 70ch;
    margin: -.4rem 0 1.6rem;
    color: var(--muted);
}

/* Блок 1 — карта */

.gp {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    border: 1px solid var(--line);
    background: rgba(238, 242, 243, .7);
}
.gp-map {
    position: relative;
    margin: 0;
    border-right: 1px solid var(--line);
    min-width: 0;
}
.gp-canvas { position: relative; }
.gp-map img { width: 100%; aspect-ratio: 2010 / 954; object-fit: cover; }
.gp-compass {
    position: absolute;
    left: 1.4%; top: 2.2%;
    width: 11%;
    height: auto;
    font-family: var(--f-mono);
    font-size: 11px;
    fill: var(--ink);
}
.gp-pin {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45em;
    padding: .2em .5em;
    font-family: var(--f-text);
    font-weight: 500;
    font-size: clamp(.6rem, .3rem + .55vw, .9rem);
    line-height: 1.2;
    white-space: nowrap;
    color: var(--ink);
    background: rgba(240, 244, 245, .96);
    border: 1px solid var(--line);
    box-shadow: 3px 3px 0 rgba(90, 143, 181, .25);
}
.gp-pin--north { left: 23.1%; top: 6.7%;  width: 23.6%; height: 8.2%; }
.gp-pin--river { left: 62.9%; top: 18.4%; width: 19.4%; height: 8.2%; }
.gp-pin--quay  { left: 63.8%; top: 49.1%; width: 19.7%; height: 7.6%; }
.gp-pin--plant { left: 36.7%; top: 81.8%; width: 22.4%; height: 8.2%; }
.gp-sq {
    flex: 0 0 auto;
    display: inline-block;
    width: .85em;
    height: .85em;
}
.gp-sq--orange { background: #F0963C; }
.gp-sq--teal { background: #22A5AE; }
.gp-sq--rose { background: var(--wash-rose); }
.gp-sq--line { background: transparent; border: 2px solid var(--line); }
.gp-caption {
    padding: .55rem 1rem;
    font-size: .8rem;
    color: var(--muted);
    border-top: 1px solid var(--grid);
}

.gp-legend {
    min-width: 0;
    padding: 1.8rem 1.6rem;
    display: flex;
    flex-direction: column;
}
.gp-keys {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0 0 1.5rem;
    border-bottom: 1px solid var(--grid);
}
.gp-keys li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .8rem;
    align-items: center;
    margin-bottom: .9rem;
    font-weight: 500;
    color: var(--ink);
}
.gp-keys .gp-sq { width: 16px; height: 16px; }
.gp-keys span {
    grid-column: 2;
    font-size: .8rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.4;
}
.gp-facts { margin: 0; display: grid; gap: 1rem; }
.gp-fact {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    align-items: center;
    gap: .8rem;
}
.gp-fact dt {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 3.4rem;
    line-height: 1;
    color: var(--ink);
}
.gp-fact dd {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.3;
    letter-spacing: .04em;
    color: var(--muted);
}

/* Блок 2 — разрез квартала */

.kv {
    position: relative;
    margin: 0;
    border: 1px solid var(--line);
    background: rgba(238, 242, 243, .7);
}
.kv img { width: 100%; aspect-ratio: 2700 / 544; object-fit: cover; }
.kv-tag {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45em;
    padding: 0 .5em;
    font-family: var(--f-text);
    font-weight: 500;
    font-size: clamp(.6rem, .3rem + .55vw, .9rem);
    white-space: nowrap;
    color: var(--ink);
    background: rgba(240, 244, 245, .97);
    border: 1px solid var(--line);
}
.kv-tag b {
    display: none;
    font-family: var(--f-mono);
    font-weight: 500;
    color: var(--orange);
}
.kv-tag--1 { left: 23.3%; top: 5.4%;  width: 13.0%; height: 13.6%; }
.kv-tag--2 { left: 38.2%; top: 19.1%; width: 12.8%; height: 13.6%; }
.kv-tag--3 { left: 57.9%; top: 19.1%; width: 12.6%; height: 13.6%; }
.kv-tag--4 { left: 83.4%; top: 22.8%; width: 15.0%; height: 13.8%; }
.kv-lead { position: absolute; background: var(--ink); }
.kv-lead::after {
    content: "";
    position: absolute;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--ink);
    border: 1px solid #FFFFFF;
}
.kv-lead--h1 { left: 21.6%; top: 12.1%; width: 1.8%; height: 1px; }
.kv-lead--h1::after { left: -4px; top: -3px; }
.kv-lead--v2 { left: 43.6%; top: 32.6%; width: 1px; height: 40%; }
.kv-lead--v3 { left: 63.6%; top: 32.6%; width: 1px; height: 15.5%; }
.kv-lead--v4 { left: 89.2%; top: 36.4%; width: 1px; height: 46.5%; }
.kv-lead--v2::after,
.kv-lead--v3::after,
.kv-lead--v4::after { left: -3px; bottom: -4px; }

.kv-notes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-top: 0;
    background: rgba(238, 242, 243, .78);
}
.kv-notes li {
    position: relative;
    padding: 1.2rem 1.3rem 1.3rem 3.4rem;
    border-right: 1px solid var(--grid);
    min-width: 0;
}
.kv-notes li:last-child { border-right: 0; }
.kv-notes-num {
    position: absolute;
    left: 1.2rem; top: 1.15rem;
    width: 1.5rem; height: 1.5rem;
    display: grid;
    place-items: center;
    font-family: var(--f-mono);
    font-size: .8rem;
    color: #FFFFFF;
    background: var(--orange);
}
.kv-notes h3 {
    margin: 0 0 .4rem;
    font-size: 1rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.kv-notes p { margin: 0; font-size: .88rem; line-height: 1.6; color: #34495B; }

/* Блок 3 — карточки записей */

.card-grid {
    display: grid;
    gap: 1.4rem;
}
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.card-grid--4 .card { padding-left: 1.1rem; padding-right: 1.1rem; }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 2.6rem 1.3rem 1.4rem;
    background: rgba(238, 242, 243, .86);
    border: 1px solid var(--line);
    transition: transform .15s, box-shadow .15s;
}
.card::before {
    content: "";
    position: absolute;
    left: 6px; top: 6px; right: 6px; bottom: 6px;
    border: 1px solid rgba(90, 143, 181, .28);
    pointer-events: none;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--line); }
.card-thumb {
    position: relative;
    margin: 0 0 1.1rem;
}
.card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(90, 143, 181, .14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 143, 181, .14) 1px, transparent 1px);
    background-size: 12px 12px;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-stamp {
    position: absolute;
    right: 1.3rem; top: .8rem;
    font-family: var(--f-mono);
    font-size: .85rem;
    letter-spacing: .04em;
    color: var(--muted);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card-flag {
    align-self: flex-start;
    margin-bottom: .5rem;
    padding: .1rem .5rem;
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: var(--orange);
}
.card-title {
    margin: 0 0 .5rem;
    font-family: var(--f-text);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--orange); }
.card-excerpt {
    flex: 1;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 1rem;
}
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-excerpt a { color: var(--teal); }
.card-btn { align-self: flex-start; }

.fs-more { margin: 1.8rem 0 0; text-align: center; }
.empty-state {
    padding: 1.4rem 1.6rem;
    background: rgba(238, 242, 243, .86);
    border: 1px dashed var(--line);
    color: var(--muted);
}

/* Блок 4 — хроника */

.chron {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 1.4rem 0 0;
    border: 1px solid var(--line);
    background: rgba(238, 242, 243, .7);
}
.chron::before {
    content: "";
    position: absolute;
    left: 28px; top: 0; bottom: 0;
    width: 2px;
    background: var(--line);
}
.chron-item {
    position: relative;
    display: grid;
    grid-template-columns: 7.5rem 11rem minmax(0, 1fr) minmax(0, 16.5rem);
    align-items: center;
    gap: 1.2rem 1.6rem;
    margin-left: 80px;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--grid);
}
.chron-item:last-child { border-bottom: 0; }
.chron-item::before {
    content: "";
    position: absolute;
    left: -58px; top: 50%;
    width: 14px; height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 3px var(--paper);
}
.chron-mark {
    font-family: var(--f-mono);
    font-size: .9rem;
    color: var(--muted);
}
.chron-type {
    font-family: var(--f-text);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
}
.chron-text {
    margin: 0;
    font-size: .92rem;
    line-height: 1.6;
    color: #2D4356;
}
.chron-img {
    display: block;
    min-width: 0;
    border: 1px solid var(--grid);
    background: #FFFFFF;
    padding: 3px;
}
.chron-img img { width: 100%; aspect-ratio: 10 / 3; object-fit: cover; }

/* Блок 5 — аналитика */

.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
    color: #FFFFFF;
    background-color: var(--ink);
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 24px 24px;
    border: 1px solid var(--ink);
}
.board-cell {
    min-width: 0;
    padding: 2.2rem 2rem 2.2rem 2.4rem;
}
.board-label {
    margin: 0 0 1rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--on-dark);
}
.board-num {
    margin: 0 0 .5rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.7rem);
    line-height: 1.1;
    color: #FFFFFF;
}
.board-note {
    margin: 0;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--on-dark-muted);
}
.board-quote {
    min-width: 0;
    padding: 2.2rem 2.2rem;
    border-left: 1px solid rgba(168, 205, 217, .45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.board-skyline { width: min(100%, 260px); height: auto; margin-bottom: .6rem; }
.board-quote p {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
    line-height: 1.25;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #FFFFFF;
}

/* ---------- Внутренние страницы ---------- */

.page-wrap { padding: 2.4rem 0 3.4rem; }

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

.list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .4rem 1.2rem;
    margin: 0 0 1.6rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--line);
}
.list-title {
    margin: 0;
    font-weight: 600;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.list-lead {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
}
.list-lead p { margin: 0; }

.sheet {
    position: relative;
    padding: 2.4rem 2.6rem;
    background: rgba(238, 242, 243, .9);
    border: 1px solid var(--line);
}
.sheet::after {
    content: "";
    position: absolute;
    right: 10px; bottom: 10px;
    width: 92px; height: 34px;
    border: 1px solid rgba(90, 143, 181, .45);
    background:
        linear-gradient(rgba(90, 143, 181, .45), rgba(90, 143, 181, .45)) 0 50% / 100% 1px no-repeat,
        linear-gradient(rgba(90, 143, 181, .45), rgba(90, 143, 181, .45)) 40% 0 / 1px 100% no-repeat;
    pointer-events: none;
}
.sheet-head { margin-bottom: 1.4rem; }
.sheet-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: .8rem;
}
.stamp {
    display: inline-block;
    padding: .15rem .55rem;
    font-family: var(--f-mono);
    font-size: .82rem;
    color: var(--ink);
    border: 1px solid var(--line);
}
.meta-cat {
    font-family: var(--f-head);
    font-size: .85rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--teal);
}
.sheet-title {
    margin: 0;
    font-weight: 600;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: .03em;
}
.sheet-cover {
    position: relative;
    margin: 0 0 1.8rem;
    border: 1px solid var(--line);
    padding: 4px;
    background: #FFFFFF;
}
.sheet-cover img { width: 100%; height: auto; }
.sheet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--grid);
}
.sheet-tags a {
    padding: .15rem .6rem;
    font-family: var(--f-mono);
    font-size: .8rem;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--grid);
    background: var(--paper-2);
}
.sheet-tags a:hover { border-color: var(--orange); color: var(--orange); }

/* Текст записи */

.entry { font-size: 1.04rem; }
.entry > *:first-child { margin-top: 0; }
.entry h2 {
    font-size: 1.55rem;
    letter-spacing: .06em;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--grid);
}
.entry h3 { font-size: 1.25rem; letter-spacing: .04em; }
.entry h4 { font-size: 1.08rem; }
.entry ul, .entry ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.entry li { margin-bottom: .4em; }
.entry ul { list-style: none; padding-left: 1.4em; }
.entry ul > li { position: relative; }
.entry ul > li::before {
    content: "";
    position: absolute;
    left: -1.2em; top: .7em;
    width: 7px; height: 7px;
    background: var(--orange);
}
.entry ol > li::marker { font-family: var(--f-mono); color: var(--teal); }
.entry blockquote {
    margin: 1.8em 0;
    padding: 1.2rem 1.6rem 1.2rem 1.8rem;
    font-size: 1.12rem;
    color: var(--ink);
    background: rgba(168, 205, 217, .28);
    border-left: 4px solid var(--teal);
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry blockquote cite { display: block; margin-top: .6rem; font-size: .85rem; font-style: normal; color: var(--muted); }
.entry img { max-width: 100%; height: auto; }
.entry figure { margin: 1.6em 0; }
.entry figcaption, .wp-element-caption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.entry table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: .93rem;
    border: 1px solid var(--line);
}
.entry th, .entry td {
    padding: .6rem .8rem;
    text-align: left;
    border: 1px solid var(--line);
}
.entry th {
    font-family: var(--f-head);
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: var(--ink);
}
.entry tr:nth-child(even) td { background: rgba(185, 198, 204, .2); }
.entry .wp-block-table { overflow-x: auto; }
.entry pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    font-family: var(--f-mono);
    font-size: .88rem;
    color: var(--on-dark);
    background: var(--graphite);
}
.entry code { font-family: var(--f-mono); font-size: .9em; }
.entry hr { border: 0; border-top: 1px dashed var(--line); margin: 2em 0; }
.page-links { margin-top: 1.5rem; font-family: var(--f-mono); }
.page-links a, .page-links > span { margin-left: .5rem; }
.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; }

/* 404 */

.sheet--404 { text-align: center; }
.err-code {
    margin: 0 0 .4rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(4.5rem, 3rem + 6vw, 8rem);
    line-height: 1;
    letter-spacing: .12em;
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
}
.sheet--404 .sheet-title { margin-bottom: 1rem; }
.sheet--404 .search-form { max-width: 520px; margin: 1.6rem auto 1.2rem; }
.err-home { margin: 0; }

/* Поиск */

.search-form {
    display: flex;
    gap: .6rem;
    min-width: 0;
}
.search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6rem .8rem;
    font-family: var(--f-text);
    font-size: .95rem;
    color: var(--ink);
    background: #F6F8F9;
    border: 1px solid var(--line);
    border-radius: 0;
}
.search-submit { flex: 0 0 auto; padding: .45rem 1.1rem; }

/* Пагинация */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 2.2rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .8rem;
    font-family: var(--f-mono);
    font-size: .9rem;
    color: var(--ink);
    text-decoration: none;
    background: rgba(238, 242, 243, .9);
    border: 1px solid var(--line);
}
.pager a.page-numbers:hover { background: var(--ink); color: #FFFFFF; }
.pager .page-numbers.current {
    color: #FFFFFF;
    background: var(--orange);
    border-color: var(--orange);
}
.pager .page-numbers.dots { background: none; border: 0; min-width: 1.5rem; }

/* Сайдбар */

.sidebar {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    color: var(--ink);
    background: rgba(214, 224, 229, .92);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink);
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 1rem;
    padding-bottom: .45rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.sidebar .widget-title::before {
    content: "";
    display: inline-block;
    width: 8px; height: 8px;
    margin-right: .6rem;
    background: var(--orange);
    vertical-align: middle;
}
.sidebar, .sidebar p, .sidebar li { color: var(--ink); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    padding: .55rem 0;
    border-bottom: 1px dashed rgba(90, 143, 181, .55);
    font-size: .93rem;
    line-height: 1.45;
}
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--orange); text-decoration: underline; }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: .78rem; color: #4F5F6B; }
.sidebar .search-form { flex-wrap: wrap; }

/* Комментарии */

.comments {
    margin-top: 2rem;
    padding: 2rem 2.6rem;
    background: rgba(238, 242, 243, .9);
    border: 1px solid var(--line);
}
.comments-title,
.comment-reply-title {
    margin: 0 0 1.2rem;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.comment-reply-title small { display: block; margin-top: .3rem; font-size: .8rem; letter-spacing: .04em; text-transform: none; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 2rem; border-left: 2px solid var(--grid); }
.note-body {
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    background: #F6F8F9;
    border: 1px solid var(--grid);
}
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .5rem; }
.note-avatar { border-radius: 0; border: 1px solid var(--line); }
.note-author { font-weight: 600; }
.note-date { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.note-moderation { font-size: .85rem; color: var(--orange); }
.note-text p:last-child { margin-bottom: 0; }
.note-reply { margin-top: .5rem; }
.note-reply a {
    font-family: var(--f-head);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.comment-form label { display: block; margin-bottom: .3rem; font-weight: 500; font-size: .9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    font-family: var(--f-text);
    font-size: .95rem;
    color: var(--ink);
    background: #F6F8F9;
    border: 1px solid var(--line);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-notes, .logged-in-as, .must-log-in, .comments-closed { font-size: .88rem; color: var(--muted); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }

/* ---------- Подвал ---------- */

.site-foot {
    color: #C9D3DA;
    background: var(--graphite);
    border-top: 2px solid var(--line);
}
.foot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 2.4rem 0 2rem;
}
.foot-col {
    min-width: 0;
    padding: 0 2.2rem;
    border-left: 1px solid rgba(90, 143, 181, .4);
}
.foot-col:first-child { padding-left: 0; border-left: 0; }
.site-foot .widget { margin-bottom: 1.4rem; }
.site-foot .widget:last-child { margin-bottom: 0; }
.site-foot .widget-title {
    margin: 0 0 .8rem;
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #FFFFFF;
}
.site-foot p,
.site-foot li,
.site-foot .textwidget { font-size: .88rem; line-height: 1.65; color: #C9D3DA; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .35rem; }
.site-foot a { color: var(--wash-sky); text-decoration-color: rgba(168, 205, 217, .6); }
.site-foot a:hover { color: #FFFFFF; text-decoration-color: var(--orange); }
.site-foot .post-date { color: var(--on-dark-muted); }
.foot-copy {
    border-top: 1px solid rgba(90, 143, 181, .35);
    background: #171A1F;
}
.foot-copy p {
    margin: 0;
    padding: 1.2rem 0;
    font-size: .82rem;
    text-align: center;
    color: var(--on-dark-muted);
}

/* ---------- Cookie-баннер ---------- */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    max-width: 980px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    color: var(--on-dark);
    background-color: var(--ink);
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 16px 16px;
    border: 1px solid var(--line);
    box-shadow: 6px 6px 0 rgba(18, 41, 63, .25);
}
.cookie-text { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--on-dark); }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */

@media (max-width: 1180px) {
    .chron-item { grid-template-columns: 6.5rem 9rem minmax(0, 1fr) minmax(0, 13rem); gap: 1rem 1.2rem; }
    .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .board-quote { grid-column: 1 / -1; border-left: 0; border-top: 1px solid rgba(168, 205, 217, .45); flex-direction: row; gap: 1.6rem; }
    .board-skyline { width: 180px; margin: 0; }
    .gp { grid-template-columns: minmax(0, 1fr); }
    .gp-map { border-right: 0; border-bottom: 1px solid var(--line); }
    .gp-legend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; }
    .gp-keys { margin: 0; padding: 0 1.4rem 0 0; border-bottom: 0; border-right: 1px solid var(--grid); }
}

@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; flex: 0 0 100%; }
    .site-nav-list li { white-space: normal; }
    .site-nav.is-open { display: block; }
    .site-nav-list { flex-direction: column; gap: 0; border-top: 1px solid rgba(90, 143, 181, .5); }
    .site-nav-list li { border-bottom: 1px solid rgba(90, 143, 181, .3); }
    .site-nav-list a { display: block; padding: .75rem 0; }
    .site-nav-list a::after { display: none; }
    .site-nav-list .current-menu-item > a { color: var(--wash-sky); }


    .kv-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kv-notes li:nth-child(2) { border-right: 0; }
    .kv-notes li:nth-child(-n+2) { border-bottom: 1px solid var(--grid); }

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

    .chron-item { grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 12rem); }
    .chron-text { grid-column: 2 / 4; grid-row: 2; }
    .chron-img { grid-column: 3; grid-row: 1; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }
    .layout-single { width: 100%; }

    .foot-grid { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
    .foot-col, .foot-col:first-child { padding: 0 0 1.4rem; border-left: 0; border-bottom: 1px solid rgba(90, 143, 181, .3); }
    .foot-col:last-child { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 760px) {
    .gp-pin { width: auto; height: auto; padding: .15rem .3rem; box-shadow: none; }
    .gp-pin-name { display: none; }
    .gp-pin .gp-sq { width: 12px; height: 12px; }
    .kv-tag { width: auto; height: auto; padding: .1rem .35rem; }
    .kv-tag b { display: inline; }
    .kv-tag-name { display: none; }
    .kv-lead--h1 { display: none; }
}

@media (max-width: 600px) {
    .shell--front { width: min(92%, 1360px); }
    .brand-svg { width: 70px; }
    .brand-desc { display: none; }
    .ruler-row { flex-wrap: wrap; gap: .4rem 1rem; min-height: 0; }
    .ruler-scale { flex-basis: 100%; height: 16px; }

    .fs { padding: 2rem 0 2.4rem; }
    .sec-head { gap: 1rem; padding-right: .4rem; }
    .sec-title { letter-spacing: .12em; }

    .gp-legend { grid-template-columns: minmax(0, 1fr); padding: 1.3rem 1.2rem; }
    .gp-keys { padding: 0 0 1.2rem; border-right: 0; border-bottom: 1px solid var(--grid); }
    .gp-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gp-fact { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
    .gp-fact dt { font-size: 2.4rem; }
    .gp-fact dd { font-size: .9rem; }
    .gp-compass { width: 16%; }

    .kv-notes { grid-template-columns: minmax(0, 1fr); }
    .kv-notes li, .kv-notes li:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--grid); }
    .kv-notes li:last-child { border-bottom: 0; }

    .card-grid--3,
    .card-grid--4,
    .card-grid--2 { grid-template-columns: minmax(0, 1fr); }

    .chron { padding: 0 1rem 0 0; }
    .chron::before { left: 18px; }
    .chron-item { margin-left: 46px; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
    .chron-item::before { left: -35px; top: 1.45rem; margin-top: 0; }
    .chron-text, .chron-img { grid-column: 1; grid-row: auto; }

    .board { grid-template-columns: minmax(0, 1fr); }
    .board-cell { padding: 1.5rem 1.4rem; border-bottom: 1px solid rgba(168, 205, 217, .3); }
    .board-quote { flex-direction: column; padding: 1.6rem 1.4rem; }

    .sheet { padding: 1.6rem 1.3rem 3.6rem; }
    .comments { padding: 1.5rem 1.3rem; }
    .search-form { flex-wrap: wrap; }
    .search-submit { flex: 1 1 100%; }

    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.2rem; }
}
