/*
Theme Name: dds_monosota.ru
Theme URI: https://monosota.ru/
Author: Белов Матвей Игоревич
Description: Тема для информационного сайта о строительстве и домашней автоматизации. Монтажная схема на тёмном графите: сетка, кабельные трассы, маркировка щита.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dsumom
*/

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

/* ---------- Палитра ---------- */
:root {
    --graphite: #1E2226;
    --graphite-deep: #171B1E;
    --grid: #3A4148;
    --head: #14171A;
    --foot: #14171A;
    --text: #EDEAE3;
    --muted: #8B949C;
    --amber: #F2A03D;
    --teal: #5FD3C4;
    --red: #D9514E;
    --frame: #4A525A;
    --panel: #2A2D30;
    --panel-2: #303336;
    --panel-3: #25292C;
    --wall-bg: #28282C;
    --side: #1A1D21;
    --f-head: "Tektur", "Arial Narrow", "Roboto Condensed", sans-serif;
    --f-body: "Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- Скрытие через hidden ---------- */
.cookie-banner[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-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--graphite);
    background-image:
        linear-gradient(rgba(58, 65, 72, .32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58, 65, 72, .32) 1px, transparent 1px),
        linear-gradient(rgba(58, 65, 72, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58, 65, 72, .12) 1px, transparent 1px);
    background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--amber); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
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 .6em; color: var(--text); letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
p, li, td, th, dd, dt, h1, h2, h3, h4, blockquote, figcaption { overflow-wrap: break-word; hyphens: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--amber); color: var(--head); padding: .6rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

.shell { width: 85%; max-width: 1180px; margin-left: auto; margin-right: auto; }

/* ---------- Кнопки ---------- */
.btn, .search-submit, .form-submit .submit, .cookie-accept {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 40px; padding: .55em 1.3em;
    font-family: var(--f-head); font-size: .82rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
    color: var(--teal); background: transparent; border: 1px solid var(--teal); border-radius: 0;
    cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.btn:hover, .search-submit:hover, .form-submit .submit:hover, .cookie-accept:hover { background: var(--teal); color: var(--head); transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--frame); }
.btn--amber { color: var(--amber); border-color: var(--amber); }
.btn--amber:hover { background: var(--amber); color: var(--head); }

/* ---------- Шапка ---------- */
.site-header { background: var(--head); border-bottom: 1px solid #262B30; position: relative; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--frame) 20%, var(--frame) 80%, transparent); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; }
.brand { flex: 1 1 auto; display: flex; align-items: center; gap: .9rem; min-width: 0; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--frame); background: #1B1F23; box-shadow: inset 0 0 0 4px var(--head), inset 0 0 0 5px #2D3338; }
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; display: block; }
.brand-text { min-width: 0; }
.brand-name { display: block; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.05rem, 1.8vw, 1.4rem); line-height: 1.15; text-transform: uppercase; letter-spacing: .03em; }
.brand-desc { display: block; margin-top: .25rem; font-size: .76rem; line-height: 1.35; color: var(--muted); max-width: 46ch; }

.nav-toggle { display: none; font-family: var(--f-head); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); background: transparent; border: 1px solid var(--frame); padding: .55rem .8rem; cursor: pointer; border-radius: 0; }
.nav-toggle-bars { display: inline-block; width: 16px; height: 2px; background: var(--amber); position: relative; vertical-align: middle; margin-right: .5rem; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--amber); }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.main-nav { flex: 0 0 auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: .2rem 1.6rem; }
.main-nav li { white-space: nowrap; }
.main-nav a { font-family: var(--f-head); font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text); text-decoration: none; padding: .35rem 0; border-bottom: 1px solid transparent; }
.main-nav a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--amber); }

/* ---------- Общие секции ---------- */
.site-main { padding: 2.2rem 0 3.5rem; }
.sec-head { position: relative; display: flex; align-items: baseline; gap: .7rem; margin: 0 0 1.5rem; padding-bottom: .45rem; max-width: 100%; }
.sec-head::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(100%, 520px); height: 1px; background: linear-gradient(90deg, var(--frame), var(--frame) 70%, transparent); }
.sec-num { font-family: var(--f-mono); font-size: .9rem; color: var(--muted); }
.sec-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); text-transform: uppercase; letter-spacing: .03em; }
.notch { position: relative; }
.notch::before, .notch::after { content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none; }
.notch::before { top: 6px; right: 6px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); }
.notch::after { bottom: 6px; left: 6px; border-bottom: 1px solid var(--frame); border-left: 1px solid var(--frame); }

/* ---------- Главная ---------- */
.front-flow { position: relative; padding: 2.5rem 0 1rem; }
.front-flow::before { content: ""; position: absolute; top: 4.2rem; bottom: 3rem; left: -34px; border-left: 1px dashed var(--frame); }
.front-sec { position: relative; margin-bottom: 3.6rem; }
.front-sec > .sec-head::before { content: ""; position: absolute; left: -34px; top: 50%; width: 30px; border-top: 1px dashed var(--frame); }

/* Блок 1 — щит сценариев */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 300px) 64px minmax(0, 1fr) 54px; align-items: center; }
.board-side { display: grid; gap: 2.3rem; min-width: 0; }
.board-side--left { text-align: right; }
.board-node { position: relative; min-width: 0; }
.board-node h3 { margin: 0 0 .25rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .05em; }
.board-node p { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.board-node::after { content: ""; position: absolute; top: .72rem; width: 64px; height: 1px; background: var(--teal); box-shadow: 0 0 6px rgba(95, 211, 196, .7); }
.board-node::before { content: ""; position: absolute; top: calc(.72rem - 4px); width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px rgba(95, 211, 196, .9); z-index: 1; }
.board-side--left .board-node::after { left: calc(100% + 0px); }
.board-side--left .board-node::before { left: calc(100% + 4px); }
.board-side--left .board-node { padding-right: 1.2rem; }
.board-side--right .board-node { padding-left: 1.2rem; }
.board-side--right .board-node::after { right: calc(100% + 0px); }
.board-side--right .board-node::before { right: calc(100% + 4px); }
.board-side--left { grid-column: 1; }
.board-core { grid-column: 3; margin: 0; position: relative; }
.board-core img { display: block; width: 100%; aspect-ratio: 504 / 414; object-fit: cover; border: 1px solid #3E474E; box-shadow: 0 0 0 1px rgba(95, 211, 196, .35), 0 0 28px rgba(95, 211, 196, .22); }
.board-core::before, .board-core::after { content: ""; position: absolute; left: 50%; width: 0; height: 2.2rem; border-left: 1px dashed var(--frame); }
.board-core::before { bottom: 100%; }
.board-core::after { top: 100%; }
.board-core figcaption { position: absolute; left: 0; right: 0; top: calc(100% + 2.6rem); font-family: var(--f-mono); font-size: .72rem; color: var(--muted); text-align: center; }
.board-side--right { grid-column: 5; }
.board-scale { grid-column: 6; justify-self: end; align-self: stretch; display: flex; flex-direction: column; justify-content: space-around; width: 44px; padding: .6rem 0 .6rem 14px; border-right: 1px solid var(--frame); background: repeating-linear-gradient(180deg, var(--frame) 0 1px, transparent 1px 12px) right top / 8px 100% no-repeat; margin-left: auto; }
.board-scale span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.board-scale span:nth-child(1) { color: var(--amber); }
.board-scale span:nth-child(2) { color: var(--teal); }
.board-scale span:nth-child(3) { color: var(--red); }

/* Блок 2 — разрез стены */
.wall { background: var(--panel); border: 1px solid var(--frame); padding: 1.6rem 1.8rem 1.4rem; }
.wall-lead { max-width: 70ch; margin: 0 0 1.3rem; font-size: .92rem; color: #C9CCCC; }
.wall-fig { position: relative; margin: 0; padding-left: 21%; }
.wall-fig img { display: block; width: 100%; aspect-ratio: 1296 / 423; object-fit: cover; background: var(--wall-bg); }
.wall-tags { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; top: 0; bottom: 0; width: 21%; }
.wall-tags li { position: absolute; left: 0; right: 0; transform: translateY(-50%); display: flex; align-items: center; gap: .5rem; font-family: var(--f-head); font-size: .82rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.wall-tags li::after { content: ""; flex: 1; min-width: 12px; height: 1px; background: #9AA2A9; margin-right: 2px; }
.wall-tags li::before { content: ""; order: 2; width: 0; height: 0; border-left: 6px solid #9AA2A9; border-top: 4px solid transparent; border-bottom: 4px solid transparent; position: absolute; right: 0; }
.wall-tags .t-roof { top: 9%; }
.wall-tags .t-ins { top: 23%; }
.wall-tags .t-load { top: 37%; }
.wall-tags .t-mem { top: 52%; }
.wall-tags .t-vent { top: 73%; }
.wall-tags .t-eng { top: 90%; }
.wall-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin: 1.2rem 0 0; padding: .9rem 0 0 21%; border-top: 1px dashed var(--frame); font-size: .8rem; color: var(--muted); }
.wall-legend li { display: flex; align-items: center; gap: .5rem; }
.wall-legend i { display: inline-block; width: 22px; height: 3px; }

/* Записи на главной */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--frame); overflow: hidden; padding: 1rem 1rem 1.15rem; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #7A848D; transform: translateY(-3px); }
.card-date { display: block; font-family: var(--f-mono); font-size: .75rem; color: var(--muted); margin-bottom: .55rem; }
.card-thumb { display: block; margin: 0 0 .9rem; border: 1px solid #3B4249; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-title { margin: 0 0 .5rem; font-size: 1.08rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .03em; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--amber); }
.card-excerpt { font-size: .86rem; line-height: 1.5; color: #C4C7C8; margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; width: 100%; }
.posts-grid .card:nth-child(3n+2) .card-more { color: var(--amber); border-color: var(--amber); }
.posts-grid .card:nth-child(3n+2) .card-more:hover { background: var(--amber); color: var(--head); }
.posts-all { margin: 1.4rem 0 0; text-align: right; font-family: var(--f-mono); font-size: .82rem; }
.empty-note { padding: 1.4rem 1.6rem; border: 1px dashed var(--frame); color: var(--muted); background: rgba(20, 23, 26, .5); }

/* Блок 3 — сравнение материалов */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--frame); background: var(--panel-3); }
.matrix { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .88rem; }
.matrix th, .matrix td { border: 1px solid var(--frame); padding: .75rem 1rem; text-align: center; vertical-align: middle; }
.matrix thead th { font-family: var(--f-head); font-weight: 500; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; background: #2C3034; }
.matrix tbody th { text-align: left; font-family: var(--f-head); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; background: #282C30; width: 22%; }
.matrix tbody tr:hover td { background: rgba(95, 211, 196, .05); }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); }
.dots i.on { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 5px rgba(95, 211, 196, .6); }
.matrix .word { display: block; margin-top: .3rem; font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.matrix-note { margin: .8rem 0 0; font-size: .78rem; color: var(--muted); }

/* Блок 4 — календарь этапов */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.stage-btn { position: relative; width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: center; padding: .9rem 1.3rem .7rem 1.1rem; font-family: var(--f-head); font-size: .78rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--text); background: var(--panel-2); border: 0; border-radius: 0; cursor: pointer; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); transition: background .15s, color .15s; }
.stages li:first-child .stage-btn { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.stage-btn small { position: absolute; top: 4px; left: 16px; font-family: var(--f-mono); font-size: .66rem; color: var(--muted); letter-spacing: 0; }
.stages li:first-child .stage-btn small { left: 6px; }
.stage-btn:hover { background: #3A3F44; }
.stage-btn.is-current { background: var(--amber); color: var(--head); box-shadow: 0 0 18px rgba(242, 160, 61, .5); }
.stage-btn.is-current small { color: #5A3B12; }
.stage-info { margin: 1rem 0 .8rem; padding: .8rem 1.1rem; border-left: 3px solid var(--amber); background: rgba(20, 23, 26, .55); font-size: .9rem; min-height: 3.2rem; }
.stage-info b { font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--amber); margin-right: .4rem; }
.stage-notes { list-style: none; margin: 0; padding: 0; font-size: .76rem; color: var(--muted); }
.stage-notes li::before { content: "* "; color: var(--amber); }

/* ---------- Внутренние страницы ---------- */
.breadcrumbs { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); margin: 0 0 1.6rem; padding: .55rem .9rem; border: 1px solid #2E3439; background: rgba(20, 23, 26, .6); }
.breadcrumbs a { color: var(--text); }
.breadcrumbs .sep { color: var(--amber); margin: 0 .35rem; }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); column-gap: 6%; align-items: start; }
.layout-single { display: block; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 1.6rem; }
.page-head h1 { margin: 0 0 .3rem; text-transform: uppercase; letter-spacing: .02em; }
.page-head .entry-meta { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.page-head .entry-meta a { color: var(--muted); }
.archive-desc { color: #C4C7C8; font-size: .92rem; }
.list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.layout-single .list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.entry { background: rgba(30, 34, 38, .92); border: 1px solid var(--frame); padding: 2rem 2.2rem; }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--frame); }
.entry-content { font-size: 1.02rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { text-transform: uppercase; font-size: 1.45rem; padding-bottom: .35rem; border-bottom: 1px solid var(--frame); }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
.entry-content ul li::marker { color: var(--teal); }
.entry-content ol li::marker { color: var(--amber); font-family: var(--f-mono); }
.entry-content blockquote { margin: 1.6em 0; padding: 1.1rem 1.4rem; border-left: 3px solid var(--amber); background: var(--panel); font-size: 1.05rem; color: var(--text); }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--frame); padding: .6rem .8rem; text-align: left; }
.entry-content th { background: var(--panel-2); font-family: var(--f-head); font-weight: 500; text-transform: uppercase; font-size: .82rem; letter-spacing: .05em; }
.entry-content img { display: block; border: 1px solid var(--frame); }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: .8rem; color: var(--muted); margin-top: .4rem; font-family: var(--f-mono); }
.entry-content pre, .entry-content code { font-family: var(--f-mono); font-size: .88rem; background: var(--head); }
.entry-content pre { padding: 1rem; overflow-x: auto; border: 1px solid var(--frame); }
.entry-content hr { border: 0; border-top: 1px dashed var(--frame); margin: 2em 0; }
.entry-tags { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px dashed var(--frame); font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.post-nav a { display: block; padding: .9rem 1.1rem; border: 1px solid var(--frame); background: var(--panel); text-decoration: none; color: var(--text); font-size: .9rem; }
.post-nav a:hover { border-color: var(--amber); color: var(--amber); }
.post-nav small { display: block; font-family: var(--f-mono); color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.post-nav .next { text-align: right; grid-column: 2; }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2.2rem 0 0; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 .8rem; font-family: var(--f-mono); font-size: .85rem; color: var(--text); text-decoration: none; background: var(--panel); border: 1px solid var(--frame); }
.pager a.page-numbers:hover { border-color: var(--teal); color: var(--teal); }
.pager .page-numbers.current { background: var(--amber); border-color: var(--amber); color: var(--head); font-weight: 500; }
.pager .page-numbers.dots { background: none; border: 0; min-width: 0; }

/* Сайдбар */
.sidebar { min-width: 0; background: var(--side); border: 1px solid var(--frame); padding: 1.4rem 1.4rem .6rem; color: var(--text); }
.sidebar .widget { margin-bottom: 1.6rem; }
.sidebar .widget-title { margin: 0 0 .9rem; padding-bottom: .4rem; border-bottom: 1px solid var(--frame); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0 .5rem 1rem; border-bottom: 1px dashed #343A40; position: relative; font-size: .9rem; color: var(--muted); }
.sidebar li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 6px; height: 6px; background: var(--teal); }
.sidebar a { color: var(--text); text-decoration: none; }
.sidebar a:hover { color: var(--amber); }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.sidebar p, .sidebar .textwidget { color: #C9CCCC; font-size: .9rem; }

/* Поиск */
.search-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-field { flex: 1 1 200px; min-width: 0; min-height: 42px; padding: .55rem .8rem; font: inherit; font-size: .92rem; color: var(--text); background: var(--head); border: 1px solid var(--frame); border-radius: 0; }
.search-field::placeholder { color: var(--muted); }
.search-field:focus { outline: none; border-color: var(--teal); }

/* 404 */
.not-found { text-align: left; }
.not-found .code { font-family: var(--f-head); font-size: clamp(4rem, 12vw, 8rem); line-height: 1; color: var(--red); text-shadow: 0 0 22px rgba(217, 81, 78, .35); margin: 0 0 .5rem; }
.not-found .search-form { max-width: 520px; margin: 1.4rem 0; }

/* Комментарии */
.comments { margin-top: 2rem; background: rgba(30, 34, 38, .92); border: 1px solid var(--frame); padding: 1.8rem 2rem; }
.comments-title, .comment-reply-title { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 1.2rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 1.6rem; border-left: 1px dashed var(--frame); }
.comment-body { padding: 1rem 0; border-bottom: 1px solid #343A40; }
.comment-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.comment-head img { display: block; border: 1px solid var(--frame); }
.comment-author-name { font-weight: 600; }
.comment-time { display: block; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.comment-await { font-size: .82rem; color: var(--amber); }
.comment-text p:last-child { margin-bottom: .4rem; }
.comment-reply-link { font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; }
.comment-form label { display: block; margin-bottom: .3rem; font-size: .85rem; color: var(--muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: .6rem .8rem; font: inherit; color: var(--text); background: var(--head); border: 1px solid var(--frame); border-radius: 0; }
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--teal); }
.comment-form p { margin-bottom: 1rem; }
.comment-form-cookies-consent label { display: inline; }
.comment-notes, .logged-in-as { font-size: .85rem; color: var(--muted); }
.comments-nav { display: flex; justify-content: space-between; margin: 1rem 0; font-size: .85rem; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--foot); border-top: 1px solid #262B30; padding: 3rem 0 0; color: var(--text); position: relative; }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--frame) 20%, var(--frame) 80%, transparent); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.footer-col { min-width: 0; color: #C9CCCC; font-size: .9rem; }
.footer-col .widget { margin-bottom: 1.4rem; }
.footer-col .widget-title { margin: 0 0 .8rem; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.footer-col p, .footer-col .textwidget { color: #C9CCCC; }
.footer-col a { color: #D9D6CF; text-decoration: none; }
.footer-col a:hover { color: var(--amber); text-decoration: underline; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .35rem; font-family: var(--f-head); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.footer-bottom { margin-top: 2rem; padding: 1.2rem 0 1.4rem; border-top: 1px solid #2A2F34; text-align: center; font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }

/* ---------- Cookie ---------- */
.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.5rem; flex-wrap: wrap; max-width: 860px; margin: 0 auto; padding: 1rem 1.4rem; background: var(--head); border: 1px solid var(--frame); border-left: 3px solid var(--amber); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); color: var(--text); font-size: .86rem; }
.cookie-banner p { margin: 0; flex: 1 1 320px; min-width: 0; }
.cookie-accept { color: var(--amber); border-color: var(--amber); }
.cookie-accept:hover { background: var(--amber); color: var(--head); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .board { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 250px) 44px minmax(0, 1fr) 44px; }
    .board-node::after { width: 44px; }
}
@media (max-width: 960px) {
    .shell { width: 90%; }
    .front-flow::before, .front-sec > .sec-head::before { display: none; }
    .nav-toggle { display: inline-flex; align-items: center; }
    .header-row { flex-wrap: wrap; }
    .main-nav { flex-basis: 100%; display: none; }
    .main-nav.is-open { display: block; }
    .main-nav li { white-space: normal; }
    .main-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--frame); padding-top: .4rem; }
    .main-nav a { display: block; padding: .6rem 0; }
    .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
    .board-core { grid-column: 1 / -1; grid-row: 1; width: min(100%, 420px); justify-self: center; margin-bottom: 1rem; }
    .board-core::before, .board-core::after { display: none; }
    .board-core figcaption { position: static; margin-top: .6rem; }
    .board-side { gap: 1.2rem; }
    .board-side--left { grid-column: 1; grid-row: 2; text-align: left; }
    .board-side--right { grid-column: 2; grid-row: 2; }
    .board-side--left .board-node, .board-side--right .board-node { padding: 0 0 0 1.1rem; border-left: 1px solid var(--teal); }
    .board-node::after, .board-node::before { display: none; }
    .board-scale { grid-column: 1 / -1; grid-row: 3; flex-direction: row; justify-content: space-between; width: 100%; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--frame); background: repeating-linear-gradient(90deg, var(--frame) 0 1px, transparent 1px 12px) left bottom / 100% 8px no-repeat; }
    .board-scale span { writing-mode: horizontal-tb; transform: none; }
    .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 2rem; }
    .list-grid, .layout-single .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stages li:nth-child(5) .stage-btn { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
    .stages li:nth-child(5) .stage-btn small { left: 6px; }
    .wall-fig { padding-left: 0; }
    .wall-tags { position: static; width: auto; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
    .wall-tags li { position: static; transform: none; padding: .3rem .6rem; border: 1px solid var(--frame); font-size: .72rem; }
    .wall-tags li::after, .wall-tags li::before { display: none; }
    .wall-legend { padding-left: 0; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 15px; }
    .shell { width: 92%; }
    .brand-desc { display: none; }
    .brand-mark { flex-basis: 44px; width: 44px; height: 44px; }
    .board { grid-template-columns: minmax(0, 1fr); }
    .board-side--left, .board-side--right { grid-column: 1; grid-row: auto; }
    .board-scale { grid-row: auto; }
    .posts-grid, .list-grid, .layout-single .list-grid { grid-template-columns: minmax(0, 1fr); }
    .wall { padding: 1.2rem 1.1rem; }
    .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stages li .stage-btn, .stages li:first-child .stage-btn, .stages li:nth-child(5) .stage-btn { clip-path: none; }
    .stage-btn small { left: 6px; }
    .entry { padding: 1.3rem 1.2rem; }
    .comments { padding: 1.3rem 1.2rem; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav .next { grid-column: 1; }
    .cookie-banner { padding: 1rem 1.1rem; }
}
