/*
Theme Name: dds_bizinpoland.com
Theme URI: https://bizinpoland.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: bizdos
*/

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

/* ---------- Палитра ---------- */
:root {
    --board: #16202B;
    --board-deep: #0F171F;
    --board-head: #131C26;
    --board-side: #1C2834;
    --paper: #DDE3E6;
    --paper-soft: #E9EDEF;
    --sheet: #F2EFE8;
    --text: #F2EFE8;
    --text-muted: #8FA0AC;
    --ink: #1B2733;
    --ink-muted: #5C6B77;
    --brass: #B08D57;
    --brass-dark: #7F6236;
    --stamp: #8E3B32;
    --line: #3A4A57;
    --line-paper: #B9C3C9;
    --font-head: "Oswald", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", sans-serif;
    --font-body: "PT Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --step-shift: 3.4rem;
    --step-h: 4.7rem;
}

/* ---------- Состояния [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(--font-body);
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--board);
    background-image:
        url("images/cardboard.png"),
        repeating-linear-gradient(0deg, rgba(143, 160, 172, 0.045) 0 1px, transparent 1px 32px),
        repeating-linear-gradient(90deg, rgba(143, 160, 172, 0.045) 0 1px, transparent 1px 32px);
    background-size: 256px 256px, auto, auto;
}

p, li, dd, dt, h1, h2, h3, h4, h5, h6, blockquote, figcaption, td, th {
    overflow-wrap: break-word;
    hyphens: auto;
}

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 0.6em;
    letter-spacing: 0.02em;
}

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

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--brass);
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
a:hover { color: var(--brass); }

:focus-visible {
    outline: 2px dashed var(--brass);
    outline-offset: 3px;
}

.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: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--brass);
    color: var(--board);
    font-family: var(--font-head);
    text-transform: uppercase;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--board); }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.7rem 1.4rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: 1px solid var(--brass);
    border-radius: 0;
    box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(176, 141, 87, 0.45);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover,
.btn:focus-visible {
    background: var(--brass);
    color: var(--board);
    box-shadow: inset 0 0 0 3px var(--brass), inset 0 0 0 4px rgba(22, 32, 43, 0.55);
}
.btn:active { transform: translateY(1px); }
.btn-sm {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

/* ---------- Шапка ---------- */
.masthead {
    background: var(--board-head);
    border-bottom: 1px solid var(--brass);
}
.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 22rem;
    text-decoration: none;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-logo-box { flex: 0 0 auto; display: block; }
.brand-mark { display: block; width: 56px; height: auto; }
.brand-logo { max-height: 64px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    overflow-wrap: break-word;
}
.brand-desc {
    margin-top: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brass); color: var(--brass); }
.nav-toggle-bars {
    position: relative;
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { box-shadow: none; }

.site-nav { display: none; flex: 1 1 100%; }
.site-nav.is-open { display: block; }
.site-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav-list li { border-top: 1px solid var(--line); }
.site-nav-list a {
    display: block;
    padding: 0.75rem 0.2rem;
    font-family: var(--font-head);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}
.site-nav-list a:hover,
.site-nav-list .current-menu-item > a,
.site-nav-list .current_page_item > a { color: var(--brass); }

/* ---------- Секции главной ---------- */
.sheet {
    position: relative;
    overflow: hidden;
    padding: 3.2rem 0 3.6rem;
}
.sheet + .sheet { border-top: 1px solid var(--brass); }
.sheet-paper {
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        repeating-linear-gradient(0deg, rgba(185, 195, 201, 0.35) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(90deg, rgba(185, 195, 201, 0.35) 0 1px, transparent 1px 28px);
}
.sheet-paper a:hover { color: var(--brass-dark); }
.sheet-paper .btn { color: var(--ink); }
.sheet-paper .btn:hover { color: var(--board); }

.sec-head {
    position: relative;
    margin: 0 0 2rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.55rem, 3.6vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.sheet .sec-head::before {
    content: "";
    position: absolute;
    right: calc(100% + 0.9rem);
    top: 0.6em;
    width: 40rem;
    height: 2px;
    background: var(--brass);
}
.sec-num { letter-spacing: 0.02em; }
.sec-head, .entry-title, .card-title, .route-title, .brand-name { hyphens: manual; }
.sec-head-ruled {
    display: flex;
    align-items: center;
    gap: 0.4em;
}
.sec-head-ruled::after {
    content: "";
    flex: 1 1 auto;
    min-width: 2rem;
    height: 1px;
    margin-left: 0.6em;
    background: var(--line);
}

/* Блок 1: протокол */
.protocol { padding: 0; }
.protocol-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
.protocol-main {
    min-width: 0;
    padding: 3.2rem 0 2.6rem;
}
.route {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.2rem;
}
.route-step {
    position: relative;
    display: grid;
    grid-template-columns: 18px auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.9rem;
    padding: 0.6rem 0;
}
.route-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 2px;
    height: 100%;
    background: var(--brass);
}
.route-node {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    border: 2px solid var(--brass);
    background: linear-gradient(var(--brass), var(--brass)) center / 8px 8px no-repeat, var(--board);
}
.route-num {
    min-width: 3.4rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1;
    color: var(--brass);
}
.route-text { display: flex; flex-direction: column; min-width: 0; }
.route-title {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.route-note {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.protocol-memo {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.4rem 1.8rem;
    margin-bottom: 2.6rem;
    border: 1px solid var(--line);
    background-color: rgba(28, 40, 52, 0.6);
    background-image:
        repeating-linear-gradient(0deg, rgba(143, 160, 172, 0.12) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(90deg, rgba(143, 160, 172, 0.12) 0 1px, transparent 1px 22px);
}
.memo-quote {
    margin: 0 0 1rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.7rem, 2.7vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    hyphens: manual;
}
.memo-sign {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.memo-sign::before {
    content: "";
    display: inline-block;
    width: 1.6rem;
    height: 1px;
    margin-right: 0.6rem;
    vertical-align: middle;
    background: var(--brass);
}

/* Блок 2: досье */
.dossier-map {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.6rem 1.2rem;
    align-items: center;
}
.dossier-figure {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
    justify-self: center;
    width: min(100%, 30rem);
}
.dossier-figure img { width: 100%; }
.dossier-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}
.dossier-tags li {
    position: relative;
    padding-left: 1.2rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1.3;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink);
}
.dossier-tags li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 7px;
    height: 7px;
    background: var(--brass);
}

/* Блок 3: записи */
.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem 1.8rem;
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-top: 12px;
    padding: 14px 14px 18px;
    color: var(--ink);
    background: linear-gradient(225deg, transparent 22px, var(--sheet) 22px);
    transition: transform 0.18s ease;
}
.card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 31px;
    height: 31px;
    background: linear-gradient(45deg, #CFC8B8 0, #E2DCCF 50%, transparent 50%);
    filter: drop-shadow(-2px 2px 2px rgba(0, 0, 0, 0.28));
    pointer-events: none;
}
.card:hover { transform: translate(-3px, -3px); }
.card-clip {
    position: absolute;
    top: -16px;
    left: 26px;
    z-index: 2;
    width: 16px;
    height: 44px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 44'%3E%3Cpath d='M5 34V9a3.5 3.5 0 0 1 7 0v27a5 5 0 0 1-10 0V12' fill='none' stroke='%23B08D57' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.card-thumb {
    position: relative;
    overflow: hidden;
    background: #CFC8B8;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-pin {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 0.15rem 0.55rem;
    font-family: var(--font-head);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stamp);
    background: rgba(242, 239, 232, 0.92);
    border: 1.5px solid var(--stamp);
    transform: rotate(-3deg);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem 0.35rem 0;
}
.card-title {
    margin: 0 0 0.5rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
}
.card-title a { text-decoration: none; color: inherit; }
.card-title a:hover { color: var(--brass-dark); }
.card-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #2E3C48;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.card-date {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
}
.card .btn { color: var(--ink); }
.card .btn:hover { color: var(--board); }
.latest-more { margin: 2.4rem 0 0; }
.empty-note { color: var(--text-muted); }

/* Блок 4: календарь */
.cycle-scroll {
    overflow-x: auto;
    padding-bottom: 0.4rem;
}
.cycle-strip {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(3.3rem, 1fr));
    grid-template-rows: 3.4rem 3.2rem;
    min-width: 40rem;
    border: 1px solid var(--brass);
}
.cycle-month {
    grid-row: 1 / 3;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.6rem;
    border-left: 1px solid rgba(176, 141, 87, 0.55);
    background: repeating-linear-gradient(90deg, rgba(176, 141, 87, 0.75) 0 1px, transparent 1px 25%) left top / 100% 8px no-repeat;
}
.cycle-month:first-child { border-left: 0; }
.cycle-month-name {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.cycle-stamp {
    grid-row: 1;
    align-self: center;
    justify-self: center;
    z-index: 1;
    max-width: 96%;
    padding: 0.3rem 0.95rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.82rem;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-align: center;
    color: var(--sheet);
    background: var(--stamp);
    border-radius: 3px;
    box-shadow: inset 0 0 0 2px var(--stamp), inset 0 0 0 3px rgba(242, 239, 232, 0.4);
    transform: rotate(-1.5deg);
}
.cycle-caption {
    margin: 0.9rem 0 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.cycle-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem 2rem;
    font-size: 0.88rem;
    color: #C9D1D7;
}
.cycle-legend strong {
    font-family: var(--font-head);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brass);
}

/* Блок 5: словарь */
.glossary-list {
    margin: 0;
    max-width: 58rem;
}
.glossary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem 2rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line-paper);
}
.glossary-row:first-child { border-top: 1px solid var(--line-paper); }
.glossary-row dt {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
}
.glossary-row dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink);
}

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 1.6rem 0 4rem; }

.crumbs {
    margin: 0 0 1.8rem;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.crumbs a { color: var(--text-muted); text-decoration-color: var(--line); }
.crumbs a:hover { color: var(--brass); }
.crumbs-sep { margin: 0 0.35rem; color: var(--brass); }
.crumbs-current { color: var(--text); }

.layout-single { display: block; }
.layout-with-sidebar { display: block; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; }
.page-title {
    padding-left: 3rem;
    margin-bottom: 0.8rem;
    font-size: clamp(1.5rem, 3.2vw, 2.3rem);
}
.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 2.2rem;
    height: 2px;
    background: var(--brass);
}
.page-lead { color: #C9D1D7; max-width: 46rem; }

/* Лист записи / страницы */
.entry-sheet {
    position: relative;
    padding: 1.6rem 1.3rem 2rem;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        repeating-linear-gradient(0deg, rgba(185, 195, 201, 0.3) 0 1px, transparent 1px 28px);
    border-left: 4px solid var(--brass);
}
.entry-sheet a:hover { color: var(--brass-dark); }
.entry-sheet .btn { color: var(--ink); }
.entry-sheet .btn:hover { color: var(--board); }
.entry-head { margin-bottom: 1.4rem; }
.entry-title {
    margin: 0 0 0.8rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.6rem, 3.6vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    font-size: 0.88rem;
    color: var(--ink-muted);
}
.entry-stamp {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    color: var(--stamp);
    border: 1.5px solid var(--stamp);
    transform: rotate(-2deg);
}
.entry-cats { display: inline-flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
.entry-cats a { color: var(--ink); font-family: var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.82rem; }
.entry-cover { margin: 0 0 1.6rem; }
.entry-cover img { width: 100%; }

.entry-content { font-size: 1rem; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { font-size: 1.55rem; margin: 1.8em 0 0.6em; text-transform: uppercase; letter-spacing: 0.04em; }
.entry-content h3 { font-size: 1.3rem; margin: 1.6em 0 0.5em; }
.entry-content h4 { font-size: 1.1rem; margin: 1.4em 0 0.5em; }
.entry-content ul { list-style: none; padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content ul li { position: relative; margin-bottom: 0.4em; }
.entry-content ul li::before {
    content: "";
    position: absolute;
    left: -1.2rem;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--brass);
}
.entry-content ol { padding-left: 1.6rem; margin: 0 0 1.2em; }
.entry-content ol li { margin-bottom: 0.4em; }
.entry-content ol li::marker { color: var(--brass-dark); font-family: var(--font-head); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.1rem 1.4rem;
    background: var(--paper-soft);
    border-left: 4px solid var(--stamp);
    font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table {
    width: 100%;
    margin: 1.4em 0;
    border-collapse: collapse;
    border: 1px solid #8F9CA5;
    font-size: 0.93rem;
    background: var(--sheet);
}
.entry-content th,
.entry-content td {
    padding: 0.6rem 0.8rem;
    border: 1px solid #8F9CA5;
    text-align: left;
    vertical-align: top;
}
.entry-content th {
    font-family: var(--font-head);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--sheet);
    background: var(--ink);
}
.entry-content .wp-block-table { overflow-x: auto; margin: 1.4em 0; }
.entry-content .wp-block-table table { margin: 0; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption,
.wp-caption-text { font-size: 0.85rem; color: var(--ink-muted); margin-top: 0.4rem; }
.entry-content pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    color: var(--text);
    background: var(--board);
    font-size: 0.88rem;
}
.entry-content code { font-size: 0.9em; background: rgba(27, 39, 51, 0.08); padding: 0.1em 0.3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 1px solid var(--line-paper); margin: 2em 0; }
.alignleft { float: left; margin: 0.3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.4rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.page-links { margin-top: 1.4rem; font-family: var(--font-head); }

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line-paper);
}
.entry-tags a {
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--brass);
}
.entry-tags a:hover { background: var(--brass); color: var(--board); }

.entry-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.entry-nav-link {
    display: block;
    padding: 1rem 1.2rem;
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--line);
    background: var(--board-side);
}
.entry-nav-link span {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.entry-nav-link:hover { border-color: var(--brass); color: var(--brass); }
.entry-nav-next { text-align: right; }

/* Комментарии */
.remarks {
    margin-top: 2rem;
    padding: 1.6rem 1.3rem;
    color: var(--ink);
    background: var(--paper);
    border-top: 3px solid var(--brass);
}
.remarks a:hover { color: var(--brass-dark); }
.remarks-title,
.comment-reply-title {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 1.2rem;
}
.remarks-list,
.remarks-list .children { list-style: none; margin: 0; padding: 0; }
.remarks-list .children { padding-left: 1.4rem; border-left: 1px solid var(--line-paper); }
.note-body {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line-paper);
}
.note-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
    margin-bottom: 0.5rem;
}
.note-head img { border-radius: 0; }
.note-author { font-family: var(--font-head); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.note-date { font-size: 0.82rem; color: var(--ink-muted); }
.note-wait { font-size: 0.88rem; color: var(--stamp); }
.note-text p:last-child { margin-bottom: 0.4rem; }
.note-reply a {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}
.remarks-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title small { margin-left: 0.6rem; font-size: 0.8rem; }
.form-note { font-size: 0.88rem; color: var(--ink-muted); }
.form-row { margin: 0 0 1rem; }
.form-row label {
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="url"],
.form-row textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    font: inherit;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid #8F9CA5;
    border-radius: 0;
}
.form-row input:focus,
.form-row textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; }
.form-check label { margin: 0; font-family: var(--font-body); font-size: 0.88rem; letter-spacing: 0; text-transform: none; }
.form-check input { margin-top: 0.35rem; accent-color: var(--brass); }
.req { color: var(--stamp); }
.form-submit { margin: 0; }

/* Поиск */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}
.search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.65rem 0.8rem;
    font: inherit;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--brass);
    border-radius: 0;
}
.search-field:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.search-form .btn { flex: 0 0 auto; }
.empty-box { padding: 1.4rem; border: 1px solid var(--line); background: var(--board-side); }
.empty-box .empty-note { color: var(--text); }

/* 404 */
.missing { text-align: left; }
.missing-code {
    margin: 0 0 0.4rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(4.5rem, 14vw, 8rem);
    line-height: 1;
    color: var(--brass);
    letter-spacing: 0.04em;
}
.missing .search-form { max-width: 30rem; }
.missing-home { margin: 1.4rem 0 0; }

/* Пагинация (type => plain) */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.8rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: 0.5rem 0.8rem;
    font-family: var(--font-head);
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--line);
}
.pager a.page-numbers:hover { border-color: var(--brass); color: var(--brass); }
.pager .page-numbers.current { color: var(--board); background: var(--brass); border-color: var(--brass); }
.pager .page-numbers.dots { border-color: transparent; color: var(--text-muted); }

/* Сайдбар */
.sidebar {
    min-width: 0;
    margin-top: 2.6rem;
    padding: 1.6rem 1.5rem;
    color: var(--text);
    background: var(--board-side);
    border: 1px solid var(--line);
}
.sidebar .widget { margin-bottom: 2rem; color: var(--text); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 0.9rem;
    padding-left: 0.9rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    border-left: 3px solid var(--brass);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.55rem 0; border-bottom: 1px dashed var(--line); line-height: 1.45; color: var(--text); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--text); text-decoration: none; }
.sidebar a:hover { color: var(--brass); }
.sidebar .post-date { display: block; font-size: 0.8rem; color: var(--text-muted); }
.sidebar p { color: #C9D1D7; }

/* ---------- Подвал ---------- */
.colophon {
    padding: 3rem 0 1.6rem;
    color: #B7C2CA;
    background-color: var(--board-deep);
    background-image: url("images/cardboard.png");
    border-top: 2px solid var(--brass);
}
.colophon-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem 2.6rem;
}
.colophon-col { min-width: 0; }
.colophon .widget { color: #B7C2CA; font-size: 0.9rem; line-height: 1.6; }
.colophon .widget + .widget { margin-top: 1.6rem; }
.colophon .widget-title {
    margin: 0 0 0.7rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.98rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
}
.colophon p { margin: 0 0 0.6rem; color: #B7C2CA; }
.colophon a { color: var(--text); text-decoration-color: var(--brass); }
.colophon a:hover { color: var(--brass); }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: 0.35rem; color: #B7C2CA; }
.colophon-copy {
    margin: 2.4rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    text-align: center;
    color: var(--text-muted);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    max-width: 48rem;
    margin-inline: auto;
    padding: 1.1rem 1.3rem;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--brass);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.cookie-banner-text { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.cookie-banner .btn { color: var(--ink); flex: 0 0 auto; }
.cookie-banner .btn:hover { color: var(--board); }

/* ---------- Адаптив: от 600px ---------- */
@media (min-width: 600px) {
    .card-grid-2,
    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .glossary-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: baseline; }
    .cycle-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .entry-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entry-nav-next { grid-column: 2; }
    .colophon-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .colophon-col:nth-child(2) { text-align: center; }
    .entry-sheet { padding: 2.2rem 2.4rem 2.6rem; }
    .remarks { padding: 2rem 2.4rem; }
    .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; }
    .dossier-tags { gap: 1.1rem; }
}

/* ---------- Адаптив: от 960px ---------- */
@media (min-width: 960px) {
    .shell { width: min(85%, 1240px); }

    .nav-toggle { display: none; }
    .site-nav,
    .site-nav.is-open { display: block; flex: 0 1 auto; }
    .site-nav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; }
    .site-nav-list li { border-top: 0; }
    .site-nav-list li + li { border-left: 1px solid var(--line); }
    .site-nav-list a { padding: 0.25rem 1rem; font-size: 0.92rem; }
    .site-nav-list li:last-child a { padding-right: 0; }

    .protocol-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .protocol-main { padding: 3.4rem 2.5rem 3rem 0; }
    .protocol-memo {
        margin: 0;
        padding: 3rem 0 3rem 2.6rem;
        border: 0;
        border-left: 1px solid var(--brass);
        background-color: transparent;
    }
    .route { padding-left: 2.6rem; }
    .route-step {
        height: var(--step-h);
        padding: 0;
        margin-left: calc(var(--i) * var(--step-shift));
    }
    .route-step:not(:last-child)::after {
        left: 9px;
        top: 50%;
        width: var(--step-shift);
        height: var(--step-h);
        background: linear-gradient(to top right, transparent calc(50% - 1px), var(--brass) calc(50% - 1px), var(--brass) calc(50% + 1px), transparent calc(50% + 1px));
    }

    .dossier-map {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
        gap: 0 0.4rem;
    }
    .dossier-figure { grid-column: 2; grid-row: 1; width: 100%; }
    .dossier-tags { gap: 2.2rem; }
    .dossier-tags li { padding: 0; font-size: 0.95rem; }
    .dossier-tags li::before {
        top: 50%;
        width: 4rem;
        height: 1px;
        background: var(--brass);
    }
    .dossier-tags-left { grid-column: 1; grid-row: 1; text-align: right; }
    .dossier-tags-left li { padding-right: 5rem; }
    .dossier-tags-left li::before {
        left: auto;
        right: 0.4rem;
        transform-origin: left center;
        transform: rotate(var(--tilt));
    }
    .dossier-tags-right { grid-column: 3; grid-row: 1; text-align: left; }
    .dossier-tags-right li { padding-left: 5rem; }
    .dossier-tags-right li::before {
        left: 0.4rem;
        transform-origin: right center;
        transform: rotate(var(--tilt));
    }

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

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
    .layout-with-sidebar .sidebar { margin-top: 0; }

    .glossary-list { margin-left: 1.6rem; }
}

@media (max-width: 599px) {
    .sheet { padding: 2.4rem 0 2.8rem; }
    .protocol { padding: 0; }
    .protocol-main { padding: 2.4rem 0 2rem; }
    .protocol-memo { padding: 2rem 1.4rem; }
    .route-num { min-width: 2.6rem; }
    .card-foot { align-items: flex-start; }
    .entry-sheet { padding: 1.4rem 1.2rem 1.8rem; }
    .remarks { padding: 1.4rem 1.2rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
