/*
Theme Name: dds_voodoo4ranch.com
Theme URI: https://voodoo4ranch.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: vdranch
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Oranienbaum"; src: url("fonts/oranienbaum-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oranienbaum"; src: url("fonts/oranienbaum-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; 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: "PT Serif"; src: url("fonts/pt-serif-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; src: url("fonts/pt-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; 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: "PT Serif"; src: url("fonts/pt-serif-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; src: url("fonts/pt-serif-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; 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: "PT Serif"; src: url("fonts/pt-serif-cyrillic-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ---------- Переменные ---------- */
:root {
    --ink-green: #16211D;
    --ink-deep: #121B18;
    --envelope: #D8CDB4;
    --envelope-hi: #E6DCC4;
    --charcoal: #232323;
    --foot: #101614;
    --text-light: #F2E9D8;
    --text-ink: #1E2A24;
    --muted-dark: #8C9A8C;
    --muted-light: #7A6A52;
    --rust: #B4643C;
    --rust-deep: #8F4A2A;
    --moss: #7F8B4E;
    --brass: #A98B4B;
    --brass-soft: rgba(169, 139, 75, 0.45);
    --black: #0C0F0E;
    --font-display: "Oranienbaum", "Didot", "Bodoni MT", "Times New Roman", serif;
    --font-text: "PT Serif", "Georgia", "Times New Roman", serif;
    --torn-card: polygon(0.00% 1.6px, 5.56% 0.8px, 11.11% 3.3px, 16.67% 0.4px, 22.22% 2.7px, 27.78% 1.8px, 33.33% 0.3px, 38.89% 2.5px, 44.44% 0.2px, 50.00% 2.2px, 55.56% 0.3px, 61.11% 0.5px, 66.67% 2.1px, 72.22% 4.1px, 77.78% 0.6px, 83.33% 1.1px, 88.89% 3.1px, 94.44% 4.7px, 100.00% 2.9px, calc(100% - 2.0px) 16.7%, calc(100% - 4.9px) 33.3%, calc(100% - 0.2px) 50.0%, calc(100% - 4.3px) 66.7%, calc(100% - 1.4px) 83.3%, 100.00% calc(100% - 0.7px), 94.44% calc(100% - 0.6px), 88.89% calc(100% - 1.5px), 83.33% calc(100% - 4.1px), 77.78% calc(100% - 0.9px), 72.22% calc(100% - 2.9px), 66.67% calc(100% - 3.2px), 61.11% calc(100% - 1.9px), 55.56% calc(100% - 2.7px), 50.00% calc(100% - 0.3px), 44.44% calc(100% - 0.3px), 38.89% calc(100% - 1.0px), 33.33% calc(100% - 3.4px), 27.78% calc(100% - 2.1px), 22.22% calc(100% - 1.6px), 16.67% calc(100% - 2.9px), 11.11% calc(100% - 2.3px), 5.56% calc(100% - 1.5px), 0.00% calc(100% - 4.0px), 3.5px 83.3%, 1.2px 66.7%, 2.9px 50.0%, 2.6px 33.3%, 4.4px 16.7%);
    --torn-band: polygon(0.00% 6.6px, 2.50% 2.6px, 5.00% 8.8px, 7.50% 1.1px, 10.00% 3.8px, 12.50% 6.8px, 15.00% 1.4px, 17.50% 4.4px, 20.00% 0.4px, 22.50% 6.0px, 25.00% 6.9px, 27.50% 5.2px, 30.00% 7.9px, 32.50% 2.8px, 35.00% 6.3px, 37.50% 5.3px, 40.00% 5.2px, 42.50% 4.1px, 45.00% 7.6px, 47.50% 8.5px, 50.00% 4.3px, 52.50% 6.0px, 55.00% 0.5px, 57.50% 6.3px, 60.00% 5.8px, 62.50% 8.9px, 65.00% 7.4px, 67.50% 2.6px, 70.00% 3.5px, 72.50% 6.0px, 75.00% 0.2px, 77.50% 4.2px, 80.00% 1.5px, 82.50% 1.1px, 85.00% 0.5px, 87.50% 6.9px, 90.00% 1.2px, 92.50% 2.2px, 95.00% 3.5px, 97.50% 7.8px, 100.00% 0.7px, 100.00% calc(100% - 4.0px), 97.50% calc(100% - 4.9px), 95.00% calc(100% - 8.0px), 92.50% calc(100% - 7.4px), 90.00% calc(100% - 7.8px), 87.50% calc(100% - 2.5px), 85.00% calc(100% - 3.7px), 82.50% calc(100% - 3.2px), 80.00% calc(100% - 8.0px), 77.50% calc(100% - 8.6px), 75.00% calc(100% - 1.4px), 72.50% calc(100% - 1.6px), 70.00% calc(100% - 2.1px), 67.50% calc(100% - 2.1px), 65.00% calc(100% - 4.4px), 62.50% calc(100% - 5.3px), 60.00% calc(100% - 2.4px), 57.50% calc(100% - 0.0px), 55.00% calc(100% - 3.8px), 52.50% calc(100% - 3.3px), 50.00% calc(100% - 5.1px), 47.50% calc(100% - 8.6px), 45.00% calc(100% - 6.2px), 42.50% calc(100% - 4.6px), 40.00% calc(100% - 5.6px), 37.50% calc(100% - 6.1px), 35.00% calc(100% - 0.5px), 32.50% calc(100% - 8.1px), 30.00% calc(100% - 7.0px), 27.50% calc(100% - 7.9px), 25.00% calc(100% - 7.2px), 22.50% calc(100% - 3.5px), 20.00% calc(100% - 3.6px), 17.50% calc(100% - 0.9px), 15.00% calc(100% - 5.7px), 12.50% calc(100% - 0.6px), 10.00% calc(100% - 0.6px), 7.50% calc(100% - 1.9px), 5.00% calc(100% - 1.5px), 2.50% calc(100% - 3.1px), 0.00% calc(100% - 0.5px));
}

/* ---------- Скрытие по атрибуту hidden ---------- */
.cookie-banner[hidden] { display: none !important; }
[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-light);
    background-color: var(--ink-green);
    background-image: url("images/paper-dark.jpg");
    background-size: 472px 240px;
    overflow-x: hidden;
    overflow-wrap: break-word;
    hyphens: auto;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 0.6em;
    letter-spacing: 0.06em;
    overflow-wrap: break-word;
    hyphens: manual;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }
a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--brass);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--rust); text-decoration-color: var(--rust); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--brass);
    outline-offset: 3px;
}
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
blockquote { margin: 1.5em 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
th, td { border: 1px solid var(--brass-soft); padding: 0.55em 0.8em; text-align: left; vertical-align: top; }
th { font-family: var(--font-display); letter-spacing: 0.08em; font-weight: 400; background: rgba(169, 139, 75, 0.12); }
hr { border: 0; height: 3px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); margin: 2em 0; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 100;
    background: var(--rust); color: var(--black); padding: 0.6rem 1rem; border: 2px solid var(--brass);
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Контейнеры ---------- */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.fp-wrap { width: 85%; max-width: 1320px; margin-inline: auto; }

/* ---------- Кнопки ---------- */
.btn, .search-submit, .form-submit .submit, .comment-form input[type="submit"] {
    display: inline-block;
    font-family: var(--font-text);
    font-size: 0.95rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--black);
    background: var(--rust);
    border: 2px solid var(--brass);
    border-radius: 0;
    padding: 0.6em 1.5em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 3px 3px 0 var(--black);
    transition: transform .15s, box-shadow .15s, background-color .15s;
    white-space: normal;
    text-align: center;
}
.btn:hover, .search-submit:hover, .form-submit .submit:hover, .comment-form input[type="submit"]:hover {
    color: var(--text-light);
    background: var(--rust-deep);
    transform: translate(2px, 2px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 1px 1px 0 var(--black);
}
.btn-small { font-size: 0.85rem; padding: 0.45em 1.2em; }

/* ---------- Шапка ---------- */
.masthead { position: relative; padding: 1.6rem 0 0; }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-decoration: none;
    color: var(--text-light);
    min-width: 0;
    flex: 1 1 auto;
    max-width: 720px;
}
.brand:hover { color: var(--text-light); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-key { width: 52px; height: 98px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.brand-logo { max-height: 96px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    hyphens: manual;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.2;
    letter-spacing: 0.08em;
    color: var(--text-light);
}
.brand-tagline {
    margin-top: 0.45rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--muted-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site-nav { flex: 0 0 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav-list li { position: relative; }
.nav-list li + li::before {
    content: "";
    position: absolute;
    left: 0; top: 18%; bottom: 18%;
    width: 1px;
    background: var(--brass);
}
.nav-list a {
    display: block;
    padding: 0.5rem 1.15rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-light);
}
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--brass); }
.nav-list .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--rust); }
.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--brass);
    padding: 0.5rem 0.9rem;
    font-family: var(--font-display);
    letter-spacing: 0.12em;
    font-size: 1rem;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--brass); position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.masthead-rule {
    margin-top: 1.4rem;
    height: 5px;
    border-top: 1px solid var(--brass);
    border-bottom: 1px solid var(--brass);
    opacity: 0.85;
}

/* ---------- Заголовки секций ---------- */
.sec-head { margin-bottom: 2rem; }
.sec-head::after {
    content: "";
    display: block;
    width: 58px;
    height: 2px;
    margin-top: 0.9rem;
    background: var(--brass);
}
.sec-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    font-size: clamp(1.5rem, 2.8vw, 2.25rem);
    letter-spacing: 0.16em;
    font-variant: small-caps;
    text-transform: none;
}
.sec-title span { min-width: 0; }
.sec-title::before {
    content: "";
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    border: 1.5px solid var(--rust);
    outline: 1px solid var(--rust);
    outline-offset: 2px;
    transform: rotate(45deg);
    opacity: 0.85;
}
.sec-title::after {
    content: "";
    flex: 0 1 140px;
    min-width: 40px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}
.short-rule { display: block; width: 58px; height: 2px; background: var(--brass); }

/* ---------- Главная: общие секции ---------- */
.fp { position: relative; padding: 4.5rem 1rem; }

/* Блок 1: атлас */
.atlas { padding-top: 3.2rem; }
.atlas-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto;
    gap: 2rem 2.5rem;
    align-items: center;
}
.atlas-head { min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.atlas-title {
    font-size: clamp(2rem, 3.2vw, 3.1rem);
    line-height: 1.14;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
    hyphens: none;
}
.atlas-lead { margin: 1.4rem 0 0; color: var(--muted-dark); max-width: 30ch; }
.atlas-coast { margin-top: auto; padding-top: 2rem; width: 100%; opacity: 0.9; }
.atlas-map { margin: 0; min-width: 0; transform: rotate(-0.6deg); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55)); }
.atlas-map img { width: 100%; }
.atlas-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.8rem; min-width: 0; }
.atlas-legend li { white-space: nowrap; display: flex; align-items: center; gap: 0.9rem; color: var(--brass); font-size: 1rem; }
.atlas-legend svg { width: 34px; height: 34px; flex: 0 0 34px; }

/* Блок 2: разбор маяка */
.anatomy {
    color: var(--text-ink);
    background-color: var(--envelope);
    background-image: url("images/paper-envelope.jpg");
    background-size: 180px 320px;
    clip-path: var(--torn-band);
    overflow: hidden;
    padding: 4rem 1rem 4.4rem;
    margin: 0.4rem 0;
}
.anatomy-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, 0.8fr);
    gap: 2.5rem;
    align-items: center;
}
.anatomy .sec-head::after { background: var(--text-ink); }
.anatomy .sec-title { font-size: clamp(1.45rem, 2.2vw, 1.85rem); letter-spacing: 0.12em; }
.anatomy .sec-title::before { border-color: var(--rust); outline-color: var(--rust); }
.anatomy-text { min-width: 0; }
.anatomy-text p { color: var(--text-ink); max-width: 36ch; }
.anatomy-year { margin-top: 2.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.anatomy-year-num {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 6vw, 4.8rem);
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--rust);
}
.anatomy-year-num::after { content: ""; display: block; width: 58px; height: 2px; margin-top: 0.7rem; background: var(--text-ink); }
.anatomy-year-note { font-size: 0.88rem; color: var(--muted-light); max-width: 32ch; }
.anatomy-figure { margin: 0; min-width: 0; }
.anatomy-scheme { position: relative; width: 52%; }
.anatomy-scheme img { width: 100%; }
.anatomy-labels { list-style: none; margin: 0; padding: 0; }
.anatomy-labels li {
    position: absolute;
    left: 100%;
    top: var(--y);
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.95rem;
    color: var(--text-ink);
}
.anatomy-labels li::before { content: ""; display: block; width: 1.4rem; height: 1px; background: #4a4337; }
.polaroid {
    position: relative;
    margin: 0;
    background: #EEE5D0;
    padding: 0.85rem 0.85rem 2.6rem;
    transform: rotate(2.4deg);
    box-shadow: 0 10px 22px rgba(30, 42, 36, 0.35);
    justify-self: end;
    width: 100%;
    max-width: 330px;
}
.polaroid::before {
    content: "";
    position: absolute;
    inset: 10px -12px -8px 12px;
    background: #E3D8BF;
    transform: rotate(-4deg);
    z-index: -1;
    box-shadow: 0 6px 14px rgba(30, 42, 36, 0.25);
}
.polaroid img { width: 100%; aspect-ratio: 520 / 652; object-fit: cover; filter: sepia(0.15); }
.polaroid-clip { position: absolute; top: -26px; right: 34px; width: 26px; z-index: 2; transform: rotate(8deg); }
.clip-svg { width: 100%; height: auto; display: block; }

/* Блок записей */
.latest { background: rgba(10, 16, 14, 0.35); }
.card-grid { display: grid; gap: 2.6rem 2.4rem; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1181px) {
    .card-grid-3:has(> .card-slot:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.4rem 1.8rem; }
    .card-grid-3:has(> .card-slot:nth-child(4)) .card-title { font-size: 1.3rem; }
}
.latest-more { margin: 3rem 0 0; text-align: center; }
.empty-note { color: var(--muted-dark); font-style: italic; }

/* ---------- Карточки записей ---------- */
.card-slot {
    position: relative;
    min-width: 0;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5));
    transform: rotate(-1.1deg);
    transition: transform .25s ease;
}
.card-grid > .card-slot:nth-child(3n+2) { transform: rotate(0.9deg); }
.card-grid > .card-slot:nth-child(3n+3) { transform: rotate(-0.5deg); }
.card-slot:hover { transform: rotate(0deg) translateY(-4px); }
.card-grid > .card-slot:nth-child(n):hover { transform: rotate(0deg) translateY(-4px); }
.card-clip { position: absolute; top: -22px; right: 18%; width: 24px; z-index: 3; transform: rotate(6deg); pointer-events: none; }
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    color: var(--text-ink);
    background-color: var(--envelope);
    background-image: url("images/paper-envelope.jpg");
    background-size: 180px 320px;
    clip-path: var(--torn-card);
    padding: 1.4rem 1.4rem 1.6rem;
}
.card-photo {
    position: relative;
    margin: 0 0 1.2rem;
    padding: 0;
    box-shadow: 0 3px 6px rgba(30, 42, 36, 0.4);
    transform: rotate(-0.8deg);
    background: #2a2a24;
}
.card-photo a { display: block; text-decoration: none; }
.card-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; filter: sepia(0.12) contrast(1.03); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-pin {
    align-self: flex-start;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rust);
    border: 1px solid var(--rust);
    padding: 0.1em 0.6em;
    margin-bottom: 0.6rem;
}
.card-title { font-size: 1.5rem; letter-spacing: 0.08em; margin: 0 0 0.5rem; color: var(--text-ink); }
.card-title a { text-decoration: none; color: var(--text-ink); }
.card-title a:hover { color: var(--rust-deep); }
.card-excerpt { font-size: 0.93rem; line-height: 1.55; color: #3a3f36; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--rust-deep); }
.card-foot {
    margin-top: auto;
    padding-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1rem;
}
.card-stamp {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    color: var(--muted-light);
    border: 1.5px solid currentColor;
    padding: 0.15em 0.6em;
    transform: rotate(-3deg);
    opacity: 0.9;
}

/* Блок 3: чек-лист */
.checklist { overflow: hidden; padding: 4.2rem 1rem 4.6rem; min-height: 420px; }
.checklist-art {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 56%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
    mask-image: linear-gradient(to right, transparent 0, #000 30%);
}
.checklist-art img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.checklist-inner { position: relative; z-index: 1; }
.checklist-inner .sec-head { max-width: 780px; }
.check-list {
    list-style: none;
    counter-reset: chk;
    margin: 0;
    padding: 0;
    max-width: 470px;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}
.check-list li {
    counter-increment: chk;
    display: grid;
    grid-template-columns: 1.8rem 1.4rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: start;
    font-size: 1.02rem;
    line-height: 1.5;
}
.check-list li::before { content: counter(chk) "."; color: var(--muted-dark); font-size: 0.95rem; padding-top: 0.05em; }
.check-box {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.22em;
    border: 1.5px solid var(--muted-dark);
    position: relative;
}
.check-list li:hover .check-box::after {
    content: "";
    position: absolute;
    left: 0.28rem; top: 0.02rem;
    width: 0.32rem; height: 0.6rem;
    border: solid var(--rust);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Блок 4: места */
.places { background: var(--charcoal); padding: 3.8rem 1rem 4.2rem; }
.places::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("images/paper-dark.jpg");
    background-size: 472px 240px;
    opacity: 0.18;
    mix-blend-mode: luminosity;
    pointer-events: none;
}
.places .fp-wrap { position: relative; }
.places-quote { margin: 0 0 2.4rem; display: flex; align-items: center; gap: 1.6rem; }
.places-quote::before, .places-quote::after { content: ""; flex: 1 1 60px; height: 1px; background: var(--brass); opacity: 0.7; min-width: 30px; }
.places-quote p {
    margin: 0;
    flex: 0 1 auto;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 2.25rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
    hyphens: none;
}
.places-strip {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.4rem;
}
.places-strip figure { margin: 0; }
.places-strip img {
    width: 100%;
    aspect-ratio: 702 / 450;
    object-fit: cover;
    border: 1px solid var(--brass-soft);
    filter: sepia(0.1);
    transition: filter .25s, transform .25s;
}
.places-strip li:hover img { filter: sepia(0); transform: translateY(-3px); }
.places-strip figcaption { margin-top: 0.7rem; text-align: center; font-size: 0.95rem; color: var(--text-light); }

/* ---------- Внутренние страницы ---------- */
.page-shell { padding: 2rem 0 4.5rem; }
.crumbs { font-size: 0.88rem; color: var(--muted-dark); margin-bottom: 2rem; letter-spacing: 0.02em; }
.crumbs a { color: var(--text-light); }
.crumbs-sep { color: var(--brass); margin: 0 0.3em; }
.crumbs-current { color: var(--muted-dark); }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    align-items: start;
}
.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 2.2rem; }
.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.12em;
    margin: 0 0 0.4em;
}
.page-title::after { content: ""; display: block; width: 58px; height: 2px; margin-top: 0.9rem; background: var(--brass); }
.page-intro { color: var(--muted-dark); }

.entry-head { margin-bottom: 1.8rem; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; font-size: 0.9rem; color: var(--muted-dark); }
.entry-meta .card-stamp { color: var(--muted-dark); }
.entry-cats a { margin-right: 0.6em; }
.entry-cover { margin: 0 0 2rem; border: 1px solid var(--brass-soft); padding: 0.6rem; background: rgba(216, 205, 180, 0.06); }
.entry-cover img { width: 100%; }
.entry-content { font-size: 1.07rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.6em; letter-spacing: 0.08em; }
.entry-content h2 { font-size: 1.9rem; }
.entry-content a { color: var(--text-light); }
.entry-content a:hover { color: var(--rust); }
.entry-content ul li::marker { color: var(--brass); }
.entry-content ol li::marker { color: var(--rust); font-family: var(--font-display); }
.entry-content li { margin-bottom: 0.4em; }
.entry-content blockquote, .wp-block-quote {
    position: relative;
    margin: 2em 0;
    padding: 1.4rem 1.8rem 1.4rem 2.6rem;
    background: rgba(216, 205, 180, 0.08);
    border-left: 3px solid var(--rust);
    font-style: italic;
    color: var(--text-light);
}
.entry-content blockquote::before {
    content: "«";
    position: absolute;
    left: 0.7rem; top: 0.4rem;
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--brass);
    font-style: normal;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted-dark); font-style: normal; }
.entry-content img { margin: 1.2em 0; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 0.88rem; color: var(--muted-dark); margin-top: 0.4rem; }
.entry-content pre { overflow-x: auto; background: var(--ink-deep); padding: 1rem 1.2rem; border: 1px solid var(--brass-soft); }
.entry-content code { font-size: 0.92em; }
.entry-content table { font-size: 0.96rem; }
.alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.88rem; color: var(--muted-dark); }
.page-links { margin: 1.5em 0; display: flex; gap: 0.5em; flex-wrap: wrap; align-items: center; }
.entry-tags { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--brass-soft); display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.9rem; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; display: flex; flex-direction: column; gap: 2rem; }
.sidebar .widget {
    color: var(--text-ink);
    background-color: var(--envelope);
    background-image: url("images/paper-envelope.jpg");
    background-size: 180px 320px;
    padding: 1.6rem 1.6rem 1.4rem;
    clip-path: var(--torn-card);
    filter: none;
}
.sidebar .widget-title {
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    font-variant: small-caps;
    color: var(--text-ink);
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--muted-light);
    margin-bottom: 1rem;
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.55rem 0; border-bottom: 1px dashed rgba(122, 106, 82, 0.45); line-height: 1.4; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--text-ink); text-decoration-color: var(--muted-light); }
.sidebar .widget a:hover { color: var(--rust-deep); text-decoration-color: var(--rust-deep); }
.sidebar .widget p, .sidebar .widget .post-date, .sidebar .widget .rss-date { color: var(--text-ink); }
.sidebar .widget .post-date, .sidebar .widget .rss-date { display: block; font-size: 0.82rem; color: var(--muted-light); }
.sidebar .search-field { background: #EFE6D2; color: var(--text-ink); border-color: var(--muted-light); }

/* ---------- Пагинация ---------- */
.pager {
    margin-top: 3.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.8rem;
    border: 1px solid var(--brass);
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    transition: background-color .15s, color .15s;
}
.pager a.page-numbers:hover { background: var(--brass); color: var(--black); }
.pager .page-numbers.current { background: var(--rust); color: var(--black); border-color: var(--brass); box-shadow: 2px 2px 0 var(--black); }
.pager .page-numbers.dots { border: 0; min-width: 1.5rem; padding: 0; color: var(--muted-dark); }

/* ---------- Поиск ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0; max-width: 560px; }
.search-field {
    flex: 1 1 220px;
    min-width: 0;
    font: inherit;
    font-size: 1rem;
    padding: 0.62em 0.9em;
    background: rgba(242, 233, 216, 0.06);
    color: var(--text-light);
    border: 1px solid var(--brass);
    border-radius: 0;
}
.search-field::placeholder { color: var(--muted-dark); opacity: 1; }

/* ---------- 404 ---------- */
.lost { text-align: left; }
.lost-code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    letter-spacing: 0.12em;
    color: var(--rust);
    margin: 0 0 0.6rem;
}
.lost-home { margin-top: 1.8rem; }

/* ---------- Комментарии ---------- */
.notes { margin-top: 3.4rem; padding-top: 2rem; border-top: 1px solid var(--brass-soft); }
.notes-title, .comment-reply-title { font-size: 1.7rem; letter-spacing: 0.1em; font-variant: small-caps; }
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { margin-left: 2rem; }
.note-body {
    margin-bottom: 1.2rem;
    padding: 1.1rem 1.3rem;
    background: rgba(216, 205, 180, 0.07);
    border-left: 2px solid var(--brass);
}
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-bottom: 0.6rem; }
.note-head img { border-radius: 0; border: 1px solid var(--brass-soft); }
.note-author { font-weight: 700; }
.note-date { font-size: 0.85rem; color: var(--muted-dark); }
.note-wait { font-style: italic; color: var(--brass); }
.note-reply a { font-size: 0.88rem; }
.comment-respond { margin-top: 2rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: 0.3rem; font-size: 0.92rem; color: var(--muted-dark); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    font: inherit;
    padding: 0.6em 0.8em;
    background: rgba(242, 233, 216, 0.06);
    color: var(--text-light);
    border: 1px solid var(--brass);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.comment-notes, .logged-in-as, .must-log-in { font-size: 0.9rem; color: var(--muted-dark); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Подвал ---------- */
.colophon {
    background: var(--foot);
    color: var(--text-light);
    padding: 3.6rem 0 1.6rem;
    border-top: 1px solid rgba(169, 139, 75, 0.25);
}
.colophon-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 2.5rem 3rem;
}
.colophon-col { min-width: 0; }
.colophon .widget { color: #D9D2C3; font-size: 0.95rem; }
.colophon .widget + .widget { margin-top: 1.6rem; }
.colophon .widget-title {
    font-size: 1.7rem;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 0.9rem;
}
.colophon .widget p { color: #D9D2C3; }
.colophon .widget a { color: var(--text-light); text-decoration-color: var(--brass); }
.colophon .widget a:hover { color: var(--brass); }
.colophon .widget ul { list-style: none; margin: 0; padding: 0; }
.colophon .widget li { margin-bottom: 0.55rem; }
.colophon .widget_nav_menu .widget-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.colophon .widget .post-date { color: var(--muted-dark); font-size: 0.82rem; display: block; }
.colophon .search-field { color: var(--text-light); }
.colophon-base {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.colophon-base::before, .colophon-base::after { content: ""; flex: 1 1 40px; height: 1px; background: var(--brass); opacity: 0.55; }
.copyright { margin: 0; flex: 0 1 auto; text-align: center; font-size: 0.86rem; color: #CFC6B4; max-width: 70%; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    justify-content: center;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1rem 1.6rem;
    max-width: 860px;
    color: var(--text-ink);
    background-color: var(--envelope);
    background-image: url("images/paper-envelope.jpg");
    background-size: 180px 320px;
    padding: 1.1rem 1.4rem 1.1rem 1.6rem;
    border: 1px solid var(--muted-light);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 0 0 4px var(--envelope), inset 0 0 0 5px var(--brass);
}
.cookie-text { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--text-ink); }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
    .atlas-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
    .atlas-legend { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1rem 2.4rem; }
    .anatomy-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .polaroid { grid-column: 1 / -1; justify-self: center; }
    .places-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .site-nav { flex: 1 1 100%; display: none; }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; border-top: 1px solid var(--brass-soft); padding-top: 0.5rem; }
    .nav-list li + li::before { display: none; }
    .nav-list a { padding: 0.65rem 0; border-bottom: 1px solid rgba(169, 139, 75, 0.2); }
    .fp-wrap { width: 92%; }
    .atlas-grid { grid-template-columns: minmax(0, 1fr); }
    .atlas-coast { max-width: 520px; }
    .anatomy-grid { grid-template-columns: minmax(0, 1fr); }
    .anatomy-text p { max-width: none; }
    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checklist-art { position: relative; width: 100%; height: 260px; margin-bottom: 2rem; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 75%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 75%, transparent 100%); }
    .checklist { padding-top: 0; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
    .layout-single { width: 100%; }
    .colophon-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .colophon-col-3 { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .brand-key { width: 40px; height: 76px; }
    .brand-tagline { display: none; }
    .fp { padding: 3rem 1rem; }
    .anatomy { padding: 3rem 1rem 3.2rem; }
    .anatomy-scheme { width: 52%; }
    .anatomy-labels li { font-size: 0.78rem; gap: 0.3rem; white-space: normal; width: 88%; line-height: 1.2; }
    .anatomy-labels li::before { width: 0.8rem; flex: 0 0 0.8rem; }
    .card-grid-3, .card-grid-list { grid-template-columns: minmax(0, 1fr); }
    .polaroid { max-width: 80%; transform: rotate(1.5deg); }
    .polaroid::before { inset: 8px -6px -6px 8px; }
    .card { padding: 1.2rem 1.15rem 1.4rem; }
    .card-slot, .card-grid > .card-slot:nth-child(n) { transform: rotate(-0.4deg); }
    .places-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .places-quote { gap: 0.8rem; }
    .places-quote::before, .places-quote::after { min-width: 14px; flex-basis: 14px; }
    .colophon-cols { grid-template-columns: minmax(0, 1fr); }
    .colophon-base { flex-direction: column; gap: 0.8rem; }
    .colophon-base::before, .colophon-base::after { width: 100%; flex: none; }
    .copyright { max-width: none; }
    .cookie-inner { flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; }
    .sidebar .widget { padding: 1.4rem 1.3rem 1.2rem; }
    .entry-content blockquote, .wp-block-quote { padding: 1.2rem 1.2rem 1.2rem 2.2rem; }
    .notes-list .children { margin-left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
