/*
Theme Name: dds_joshischoolbgm.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: jsbplan
*/

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

/* ---------- Переменные ---------- */
:root {
    --c-board: #23303A;
    --c-grid: #3A4A56;
    --c-bar: #1A242C;
    --c-paper: #E9E4D8;
    --c-paper-2: #DDD7C8;
    --c-ink: #16191C;
    --c-muted: #7C8B96;
    --c-muted-ink: #5A6670;
    --c-orange: #E8642C;
    --c-orange-dark: #C9501D;
    --c-teal: #4FA3A5;
    --c-teal-deep: #2F7476;
    --c-line: #2B3138;
    --c-aside: #2A3843;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-text: "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
}

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

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--c-paper);
    background-color: var(--c-board);
    background-image:
        linear-gradient(rgba(124, 139, 150, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 139, 150, .22) 1px, transparent 1px),
        linear-gradient(var(--c-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-grid) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -1px -1px;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 .6em;
    overflow-wrap: break-word;
    hyphens: auto;
}
p, li, td, th, dd, figcaption, blockquote { overflow-wrap: break-word; hyphens: auto; }
a { color: var(--c-teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--c-orange); }
:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; }
th, td { border: 1px solid var(--c-line); padding: .55em .75em; text-align: start; vertical-align: top; }
th { font-family: var(--f-head); font-weight: 500; letter-spacing: .03em; background: var(--c-paper-2); }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
    position: absolute; top: -100px; left: 1rem; z-index: 100;
    background: var(--c-orange); color: var(--c-ink); padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Единственный контейнер ширины */
.shell { width: min(85%, 1180px); margin-inline: auto; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    padding: .55em 1.2em;
    border: 2px solid var(--c-ink);
    border-radius: 0;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background-color .12s;
}
.btn-orange { background: var(--c-orange); color: var(--c-ink); }
.btn-orange:hover, .btn-orange:focus-visible { color: var(--c-ink); background: #F07A45; transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--c-ink); }
.btn-orange:active { transform: none; box-shadow: none; }

/* ---------- Шапка ---------- */
.topbar { background: var(--c-bar); border-bottom: 1px solid #000; position: relative; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--c-paper); min-width: 0; flex: 1 1 26rem; }
.brand:hover { color: var(--c-paper); }
.brand-mark { flex: 0 0 auto; }
.brand-svg { width: 56px; height: 56px; display: block; }
.brand-logo { width: auto; max-height: 64px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--f-head); font-weight: 500; font-size: 1.3rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; }
.brand-desc { font-size: .82rem; line-height: 1.35; color: #A7B3BC; margin-top: .3rem; max-width: 34rem; }

.nav-toggle { display: none; }
.site-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; }
.site-nav-list a {
    font-family: var(--f-head); font-size: .98rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--c-paper); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; display: inline-block;
}
.site-nav-list a:hover, .site-nav-list .current-menu-item > a, .site-nav-list .current_page_item > a { color: var(--c-orange); border-bottom-color: var(--c-orange); }

/* ---------- Общий лист-подложка ---------- */
.sheet {
    position: relative;
    background: var(--c-paper);
    color: var(--c-ink);
    border: 2px solid var(--c-ink);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 14px 26px -18px rgba(0, 0, 0, .8);
    padding: 2rem 2.2rem;
}
.sheet a { color: #22777A; }
.sheet a:hover { color: var(--c-orange-dark); }

.sec-title {
    font-family: var(--f-head);
    font-weight: 400;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin: 0 0 1.4rem;
    padding-bottom: .5rem;
    position: relative;
}
.sec-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.6rem; height: 3px; background: var(--c-orange); }
.sec-title-light { color: var(--c-paper); }
.sec-title-dark { color: var(--c-ink); }

/* ---------- Главная ---------- */
.front { padding: 2rem 0 3rem; display: flex; flex-direction: column; gap: 1.6rem; }
.front > * { min-width: 0; }

/* Блок 1. Анатомия объявления */
.anatomy { padding: 2.4rem 2.6rem 2.6rem; }
.anatomy::before {
    content: ""; position: absolute; inset: 10px; border: 1px solid var(--c-line); pointer-events: none;
}
.sheet-tick { position: absolute; width: 14px; height: 14px; border-color: var(--c-line); border-style: solid; pointer-events: none; }
.sheet-tick-tl { top: 4px; right: 4px; border-width: 0 1px 1px 0; }
.sheet-tick-br { bottom: 4px; left: 4px; border-width: 1px 0 0 1px; }
.anatomy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; position: relative; }
.anatomy-title { font-weight: 500; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.1rem); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .5rem; }
.stamp {
    flex: 0 0 auto; margin: .2rem 0 0;
    font-family: var(--f-head); font-weight: 600; font-size: .78rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .08em; text-align: center;
    color: var(--c-line); padding: .45rem .7rem; border: 2px solid var(--c-line); outline: 1px solid var(--c-line); outline-offset: 3px;
    transform: rotate(-8deg); opacity: .85;
}
.anatomy-lead { max-width: 40rem; color: var(--c-muted-ink); margin-bottom: 1.6rem; position: relative; }
.anatomy-scheme { list-style: none; margin: 0 auto; padding: 0; max-width: 46rem; position: relative; }
.anatomy-scheme li { display: grid; grid-template-columns: 10.5rem 4.5rem minmax(0, 1fr); align-items: center; }
.anatomy-field {
    font-weight: 700; padding: .38rem .7rem; border: 2px solid var(--c-ink); border-top-width: 0; background: rgba(255, 255, 255, .25);
}
.anatomy-scheme li:first-child .anatomy-field { border-top-width: 2px; }
.anatomy-lead-line { height: 2px; background: var(--c-orange); position: relative; margin: 0 .5rem 0 0; }
.anatomy-lead-line::before {
    content: ""; position: absolute; left: -1px; top: 50%; width: 0; height: 0; transform: translateY(-50%);
    border-style: solid; border-width: 5px 9px 5px 0; border-color: transparent var(--c-orange) transparent transparent;
}
.anatomy-lead-line::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-orange); }
.anatomy-note { font-weight: 700; padding: .38rem 0 .38rem .6rem; line-height: 1.3; }

/* Блок 2. Этапы сделки */
.stages {
    position: relative;
    padding: 1.6rem 1.4rem 1.4rem;
    background: linear-gradient(180deg, var(--c-teal) 0, var(--c-teal) 62%, transparent 62%);
    border-top: 2px solid var(--c-ink);
}
.stages-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; }
.stage {
    display: flex; flex-direction: column; gap: .2rem; min-width: 0;
    background: var(--c-teal); color: var(--c-ink); border: 2px solid var(--c-ink);
    padding: .5rem .7rem .9rem; box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .7);
    transition: transform .15s;
}
.stage:hover { transform: translateY(-3px); }
.stage-num { font-family: var(--f-head); font-weight: 500; font-size: clamp(2.4rem, 1.5rem + 2.4vw, 3.6rem); line-height: 1; color: var(--c-orange); letter-spacing: -.01em; text-shadow: 1px 1px 0 rgba(22, 25, 28, .35); }
.stage-name { font-weight: 700; font-size: 1rem; line-height: 1.15; margin-top: .3rem; }
.stage-text { font-size: .84rem; line-height: 1.3; }
.dim-line { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; margin-top: 1rem; position: relative; height: 14px; }
.dim-line::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--c-orange); }
.dim-line span { position: relative; }
.dim-line span::before, .dim-line span:last-child::after {
    content: ""; position: absolute; top: 0; width: 2px; height: 14px; background: var(--c-orange); transform: skewX(-30deg);
}
.dim-line span::before { left: -.3rem; }
.dim-line span:first-child::before { left: 0; }
.dim-line span:last-child::after { right: 0; }

/* Блок записей */
.latest { padding: 2rem 2.2rem 2.2rem; }
.latest-all { margin: 1.4rem 0 0; text-align: end; font-family: var(--f-head); letter-spacing: .04em; text-transform: uppercase; }

/* Блок 3. Красные флаги */
.flags {
    background: var(--c-bar); color: var(--c-paper);
    border: 2px solid #0E1418; padding: 2rem 2.2rem 2.2rem;
    box-shadow: 0 14px 26px -18px rgba(0, 0, 0, .9);
}
.flags-lead { color: #A7B3BC; font-size: .95rem; margin-top: -.6rem; }
.flags-table { margin: 0; table-layout: fixed; }
.flags-table th, .flags-table td { border: 1px solid rgba(233, 228, 216, .55); padding: .5rem .8rem; vertical-align: middle; }
.flags-table th { width: 38%; background: transparent; color: var(--c-paper); font-family: var(--f-text); font-weight: 700; letter-spacing: 0; }
.flags-table td { color: #C3CCD2; font-size: .95rem; }
.flags-table .flags-icon { width: 4.5rem; text-align: center; }
.flags-table tr:hover th, .flags-table tr:hover td { background: rgba(79, 163, 165, .08); }
.flag-mark { font-weight: 700; font-size: 1.25rem; line-height: 1; }
.flag-bad { color: var(--c-orange); }
.flag-ok { color: var(--c-teal); }

/* Блок 4. Подготовка к показу */
.showing { padding: 2rem 2.2rem 2.4rem 3rem; }
.showing-rule { position: absolute; left: 1.3rem; top: 10px; bottom: 10px; right: 10px; border-left: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); pointer-events: none; }
.showing-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.4rem; align-items: center; }
.showing-photo { margin: 0; border: 3px solid var(--c-ink); background: var(--c-ink); }
.showing-photo img { width: 100%; aspect-ratio: 240 / 124; object-fit: cover; }
.showing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.showing-list li { display: flex; align-items: center; gap: .9rem; font-size: 1.2rem; line-height: 1.25; }
.showing-list li::before { content: ""; flex: 0 0 auto; width: 1.05rem; height: 1.05rem; background: var(--c-orange); border: 2px solid var(--c-ink); }

/* ---------- Карточки записей ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; counter-reset: card; }
.post-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    background: var(--c-paper); color: var(--c-ink);
    border: 2px solid var(--c-ink); padding: .7rem;
    counter-increment: card;
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--c-ink); }
.card-thumb { position: relative; border: 2px solid var(--c-ink); background: var(--c-ink); margin: .45rem 0 0 .45rem; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-stamp {
    position: absolute; top: -.6rem; left: -.6rem; z-index: 2;
    min-width: 2.1rem; height: 2.1rem; padding: 0 .3rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--c-paper); border: 2px solid var(--c-ink);
    font-family: var(--f-head); font-weight: 500; font-size: 1rem;
}
.card-stamp::before { content: counter(card, decimal-leading-zero); }
.card-body { flex: 1; display: flex; flex-direction: column; padding: .9rem .2rem .2rem; min-width: 0; }
.card-title { font-family: var(--f-text); font-weight: 700; font-size: 1.12rem; line-height: 1.25; margin: 0 0 .4rem; }
.card-title a { color: var(--c-ink); text-decoration: none; }
.card-title a:hover { color: var(--c-orange-dark); }
.card-excerpt { font-size: .93rem; line-height: 1.45; color: #3C454D; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-date { font-size: .85rem; color: var(--c-muted-ink); margin: .1rem 0 .8rem; }
.card-more { align-self: flex-start; margin-top: auto; font-size: .85rem; }
.sticky .card-stamp { background: var(--c-orange); }

/* ---------- Внутренние страницы ---------- */
.crumbs { font-size: .9rem; color: #A7B3BC; padding: 1.3rem 0 1rem; }
.crumbs a { color: var(--c-teal); }
.crumbs-sep { color: var(--c-orange); margin: 0 .35rem; }

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

.page-head { padding: 1.6rem 2rem; }
.page-title { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.page-intro { margin: .7rem 0 0; color: var(--c-muted-ink); }
.page-intro p:last-child { margin-bottom: 0; }

.entry { padding: 2.2rem 2.4rem; }
.entry-title { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.1; margin: 0 0 .6rem; }
.entry-meta { font-size: .9rem; color: var(--c-muted-ink); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.entry-cat a { font-family: var(--f-head); letter-spacing: .05em; text-transform: uppercase; }
.entry-cover { margin: 0 0 1.6rem; border: 2px solid var(--c-ink); }
.entry-cover img { width: 100%; height: auto; }
.entry-content { font-size: 1.07rem; }
.entry-content h2 { font-size: 1.7rem; margin-top: 1.6em; padding-bottom: .3rem; border-bottom: 2px solid var(--c-orange); display: inline-block; }
.entry-content h3 { font-size: 1.35rem; margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4rem; margin: 0 0 1.2em; }
.entry-content ul { list-style: none; padding-inline-start: 1.3rem; }
.entry-content ul li { position: relative; margin-bottom: .35em; }
.entry-content ul li::before { content: ""; position: absolute; left: -1.2rem; top: .55em; width: .55rem; height: .55rem; background: var(--c-orange); border: 1px solid var(--c-ink); }
.entry-content ol li::marker { font-family: var(--f-head); color: var(--c-orange-dark); }
.entry-content blockquote {
    margin: 1.6em 0; padding: 1rem 1.4rem 1rem 1.6rem; background: var(--c-bar); color: var(--c-paper);
    border-left: 6px solid var(--c-orange); font-size: 1.12rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { height: auto; border: 2px solid var(--c-ink); }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-size: .88rem; color: var(--c-muted-ink); margin-top: .4rem; }
.entry-content pre { overflow-x: auto; background: var(--c-bar); color: var(--c-paper); padding: 1rem; }
.entry-content table { font-size: .97rem; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 0; }
.entry-tags a { border: 1px solid var(--c-ink); padding: .15rem .6rem; text-decoration: none; font-size: .9rem; color: var(--c-ink); }
.entry-tags a:hover { background: var(--c-orange); color: var(--c-ink); }

.empty-sheet { padding: 1.6rem 2rem; }
.empty-note { color: var(--c-muted-ink); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0; background: var(--c-aside); color: var(--c-paper);
    border: 2px solid #0E1418; border-top: 4px solid var(--c-orange); padding: 1.5rem 1.4rem;
}
.sidebar .widget + .widget { margin-top: 1.8rem; }
.sidebar .widget-title { color: var(--c-paper); font-weight: 400; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; padding-bottom: .4rem; border-bottom: 1px solid var(--c-grid); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px dashed var(--c-grid); line-height: 1.35; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: #7FC6C8; }
.sidebar a:hover { color: var(--c-orange); }
.sidebar .post-date { display: block; font-size: .82rem; color: #A7B3BC; }
.sidebar p, .sidebar .textwidget { color: #D5D9D6; }

/* ---------- Пагинация (type => plain) ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.pager .page-numbers {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .7rem;
    font-family: var(--f-head); font-size: 1rem; text-decoration: none;
    background: var(--c-paper); color: var(--c-ink); border: 2px solid var(--c-ink);
    transition: transform .12s, box-shadow .12s;
}
.pager a.page-numbers:hover { color: var(--c-ink); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 #0E1418; }
.pager .page-numbers.current { background: var(--c-orange); }
.pager .page-numbers.dots { background: none; border: 0; color: var(--c-paper); min-width: 1rem; }

/* ---------- Поиск ---------- */
.find { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.find-field {
    flex: 1 1 14rem; min-width: 0; font: inherit; padding: .5rem .8rem;
    border: 2px solid var(--c-ink); border-radius: 0; background: #F6F2EA; color: var(--c-ink);
}
.find-btn { flex: 0 0 auto; }
.sidebar .find-field { border-color: #0E1418; }

/* ---------- 404 ---------- */
.nf { padding: 2.4rem; }
.nf-code { font-family: var(--f-head); font-weight: 600; font-size: clamp(4rem, 3rem + 6vw, 8rem); line-height: 1; color: var(--c-orange); margin: 0 0 .4rem; -webkit-text-stroke: 2px var(--c-ink); }

/* ---------- Комментарии ---------- */
.notes { padding: 2rem 2.2rem; }
.note-list, .note-list .children { list-style: none; margin: 0; padding: 0; }
.note-list .children { padding-inline-start: 1.6rem; border-left: 2px solid var(--c-orange); margin-top: 1rem; }
.note-item { margin-bottom: 1rem; }
.note-body { border: 1px solid var(--c-line); background: #F3EFE6; padding: 1rem 1.2rem; }
.note-head { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .5rem; }
.note-head img { border: 1px solid var(--c-ink); }
.note-author { font-weight: 700; }
.note-date { font-size: .85rem; color: var(--c-muted-ink); }
.note-wait { color: var(--c-orange-dark); font-style: italic; }
.note-reply a { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.comment-respond { margin-top: 1.4rem; }
.comment-reply-title { font-size: 1.4rem; text-transform: uppercase; letter-spacing: .06em; }
.comment-form label { display: block; font-weight: 700; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; font: inherit; padding: .55rem .75rem; border: 2px solid var(--c-ink); border-radius: 0; background: #F6F2EA; color: var(--c-ink);
}
.comment-form .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; display: inline; }
.comment-form .submit {
    font-family: var(--f-head); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 1rem;
    background: var(--c-orange); color: var(--c-ink); border: 2px solid var(--c-ink); border-radius: 0; padding: .55em 1.4em; cursor: pointer;
}
.comment-form .submit:hover { background: #F07A45; }
.form-hint { font-size: .9rem; color: var(--c-muted-ink); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; }

/* ---------- Подвал ---------- */
.basebar { background: var(--c-bar); color: #C9CFCC; border-top: 1px solid #000; padding: 2.4rem 0 1.4rem; }
.basebar-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.basebar-col { min-width: 0; }
.basebar .widget + .widget { margin-top: 1.4rem; }
.basebar .widget-title { color: var(--c-paper); font-weight: 400; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; }
.basebar p, .basebar .textwidget { color: #C9CFCC; font-size: .93rem; line-height: 1.5; }
.basebar ul { list-style: none; margin: 0; padding: 0; }
.basebar li { margin: 0 0 .35rem; font-size: .93rem; }
.basebar a { color: #6FBFC1; }
.basebar a:hover { color: var(--c-orange); }
.basebar .post-date { color: #A7B3BC; font-size: .82rem; display: block; }
.basebar-copy { margin: 2rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--c-grid); text-align: center; font-size: .86rem; color: #A7B3BC; }

/* ---------- Cookie-баннер ---------- */
.cookie-note {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
    max-width: 760px; margin: 0 auto;
    display: flex; align-items: center; gap: 1.2rem;
    background: var(--c-paper); color: var(--c-ink);
    border: 2px solid var(--c-ink); box-shadow: 6px 6px 0 var(--c-orange);
    padding: 1rem 1.3rem;
}
.cookie-note-text { margin: 0; font-size: .93rem; line-height: 1.45; flex: 1; min-width: 0; }
.cookie-note-btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .shell { width: 92%; }
    .topbar-in { position: relative; }
    .nav-toggle {
        display: inline-flex; align-items: center; gap: .6rem;
        background: transparent; color: var(--c-paper); border: 2px solid var(--c-paper); border-radius: 0;
        font-family: var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: .4rem .8rem; cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--c-orange); position: relative; content: ""; }
    .nav-toggle-bars::before { position: absolute; top: -6px; }
    .nav-toggle-bars::after { position: absolute; top: 6px; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav-list { flex-direction: column; gap: 0; border-top: 1px solid var(--c-grid); }
    .site-nav-list a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--c-grid); }
    .stages-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stages { background: linear-gradient(180deg, var(--c-teal) 0, var(--c-teal) 80%, transparent 80%); }
    .dim-line { display: none; }
    .post-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
    .layout-single .content-area { width: 100%; }
    .showing-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .basebar-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .brand { flex-basis: auto; }
    .brand-svg { width: 44px; height: 44px; }
    .brand-name { font-size: 1.05rem; }
    .brand-desc { display: none; }
    .sheet, .anatomy, .latest, .flags, .entry, .notes, .nf { padding: 1.4rem 1.1rem; }
    .showing { padding: 1.4rem 1.1rem 1.6rem 1.9rem; }
    .showing-rule { left: .8rem; }
    .page-head, .empty-sheet { padding: 1.2rem 1.1rem; }
    .stages { padding: 1.2rem .9rem; background: var(--c-teal); border-bottom: 2px solid var(--c-ink); }
    .anatomy::before { inset: 6px; }
    .anatomy-head { flex-direction: column-reverse; gap: .6rem; }
    .stamp { align-self: flex-end; }
    .anatomy-scheme li { grid-template-columns: minmax(0, 1fr); margin-bottom: .6rem; }
    .anatomy-field { border-top-width: 2px; }
    .anatomy-lead-line { display: none; }
    .anatomy-note { padding: .35rem .7rem; border-left: 3px solid var(--c-orange); margin-top: .25rem; font-weight: 400; }
    .stages-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-grid, .post-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .flags-table, .flags-table tbody, .flags-table tr, .flags-table th, .flags-table td { display: block; width: auto; }
    .flags-table tr { display: grid; grid-template-columns: minmax(0, 1fr) 2.6rem; border: 1px solid rgba(233, 228, 216, .55); margin-bottom: .5rem; }
    .flags-table th, .flags-table td { border: 0; }
    .flags-table .flags-icon { width: auto; grid-column: 2; grid-row: 1; }
    .flags-table td:last-child { grid-column: 1 / -1; padding-top: 0; }
    .basebar-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .cookie-note { flex-direction: column; align-items: stretch; left: .6rem; right: .6rem; bottom: .6rem; padding: 1rem 1.1rem; }
    .cookie-note-btn { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
