/*
Theme Name: dds_libroslighthouse.com
Theme URI: https://libroslighthouse.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: lbrlh
*/

/* ---------- Шрифты ---------- */
@font-face {
    font-family: "Oranienbaum";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/oranienbaum-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: "Oranienbaum";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/oranienbaum-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+0304, U+0308, U+0329, 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";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-serif-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 Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-serif-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+0304, U+0308, U+0329, 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";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-serif-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 Serif";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-serif-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+0304, U+0308, U+0329, 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";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/pt-serif-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 Serif";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/pt-serif-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Палитра ---------- */
:root {
    --graphite: #23262B;
    --graphite-deep: #1B1D21;
    --graphite-soft: #2C3036;
    --kalka: #E9E2D0;
    --kalka-dark: #DDD4BD;
    --ink: #2A2B2E;
    --muted: #6E6A5E;
    --brass: #B08D57;
    --brass-light: #CBAA73;
    --teal: #2F5D62;
    --teal-deep: #244A4E;
    --brick: #A34A32;
    --grid: #C9BFA6;
    --on-dark: #E9E2D0;
    --on-dark-muted: #B9B2A1;
    --font-display: "Oranienbaum", "Didot", "Bodoni MT", "Times New Roman", serif;
    --font-text: "PT Serif", "Georgia", "Times New Roman", serif;
    --paper: url("images/paper.jpg");
    --grid-lines:
        linear-gradient(rgba(201, 191, 166, .32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 191, 166, .32) 1px, transparent 1px);
}

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

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.6;
    color: var(--on-dark);
    background-color: var(--graphite);
    background-image:
        radial-gradient(rgba(255, 255, 255, .03) 1px, transparent 1.3px),
        radial-gradient(rgba(0, 0, 0, .22) 1px, transparent 1.5px),
        linear-gradient(180deg, #25282D 0%, var(--graphite) 40%, #202328 100%);
    background-size: 7px 7px, 11px 11px, 100% 100%;
    background-position: 0 0, 3px 5px, 0 0;
}
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .6em;
    line-height: 1.2;
    font-weight: 400;
    overflow-wrap: break-word;
    hyphens: auto;
}
p, li, dd, td, th, blockquote, figcaption, .card-title, .widget { overflow-wrap: break-word; hyphens: auto; }
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px dashed var(--brass); outline-offset: 3px; }
button { font: inherit; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--teal);
    color: var(--kalka);
}
.skip-link:focus { top: 1rem; }

.shell { width: min(85%, 1280px); margin-inline: auto; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .72rem 1.35rem;
    border: 1px solid var(--brass);
    border-radius: 0;
    font-family: var(--font-text);
    font-size: .76rem;
    line-height: 1.3;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn-solid { background: var(--teal); color: var(--kalka); }
.btn-solid:hover, .btn-solid:focus-visible { background: var(--teal-deep); color: var(--kalka); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--brass); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover, .btn-line:focus-visible { background: var(--brass); color: var(--graphite-deep); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-small { padding: .5rem .9rem; font-size: .68rem; }

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
    background: var(--graphite-deep);
    border-bottom: 1px solid var(--brass);
    box-shadow: 0 3px 0 var(--graphite-deep), 0 4px 0 rgba(176, 141, 87, .45);
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.4rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-width: 0;
    max-width: 54%;
    color: var(--brass-light);
    text-decoration: none;
}
.brand:hover { color: var(--brass-light); }
.brand-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 76px; height: 76px;
    padding: 6px;
    border: 1px solid var(--brass);
    outline: 1px solid rgba(176, 141, 87, .35);
    outline-offset: 3px;
    color: var(--brass);
    background: radial-gradient(circle at 50% 25%, rgba(203, 170, 115, .18), transparent 60%);
}
.brand-svg { width: 100%; height: 100%; display: block; }
.brand-logo { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.brand-name {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.15;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brass-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: .8rem;
    line-height: 1.4;
    color: var(--on-dark-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .6rem .9rem;
    border: 1px solid var(--brass);
    background: transparent;
    color: var(--kalka);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px; height: 1px;
    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; }

.site-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.7rem;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav-list a {
    display: inline-block;
    padding: .35rem 0;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--kalka);
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
}
.site-nav-list a:hover,
.site-nav-list .current-menu-item > a,
.site-nav-list .current_page_item > a { color: var(--brass-light); border-bottom-color: var(--brass); }

/* ---------- Лист (секция-калька) ---------- */
.front { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 56px; }
.sheet,
.sheet-frame {
    position: relative;
    color: var(--ink);
    background-color: var(--kalka);
    background-image: var(--grid-lines), var(--paper);
    background-size: 24px 24px, 24px 24px, auto;
}
.sheet { box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 10px 24px rgba(0, 0, 0, .25); }
.sheet-frame { padding: 1.6rem 2rem 2rem; }
.sheet-frame::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid var(--brass);
    pointer-events: none;
}
.sheet-frame > * { position: relative; }
.sheet-head {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin: 0 0 1.4rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--grid);
}
.sheet-no {
    display: inline-block;
    font-family: var(--font-display);
    font-size: .95rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink);
}
.sheet-rule { flex: 0 1 140px; height: 1px; background: var(--ink); opacity: .6; }
.sheet-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
}

/* ---------- Лист 01 — атлас ---------- */
.atlas-spread {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
    align-items: center;
}
.atlas-text { min-width: 0; }
.atlas-title {
    margin: 0 0 1.4rem;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.4vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink);
    hyphens: manual;
}
.atlas-lead { max-width: 30rem; font-size: 1.15rem; line-height: 1.55; color: var(--ink); }
.atlas-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.atlas-figure { margin: 0; min-width: 0; }
.atlas-plate { position: relative; margin-right: 8.6rem; }
.atlas-plate img { display: block; width: 100%; height: auto; aspect-ratio: 1230 / 890; object-fit: cover; mix-blend-mode: multiply; }
.callout {
    position: absolute;
    right: -8.6rem;
    padding: 0 0 .15rem;
    transform: translateY(-100%);
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-align: right;
    color: var(--ink);
    white-space: nowrap;
}
.callout::before {
    content: "";
    position: absolute;
    left: -3px; bottom: -3px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--brass);
}
.callout-1 { left: 66%; top: 16%; }
.callout-2 { left: 86%; top: 42%; }
.callout-3 { left: 97%; top: 66%; }
.atlas-caption { margin-top: .6rem; font-size: .8rem; color: var(--muted); font-style: italic; }
.atlas-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.8rem 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--brass);
}
.atlas-legend li {
    padding: .8rem 1rem 0;
    font-size: .86rem;
    color: var(--ink);
    text-align: center;
}
.atlas-legend li + li { border-left: 1px solid var(--brass); }

/* ---------- Лист 02 — словарь стилей ---------- */
.style-scale { margin: 0 -1rem; padding: 0; list-style: none; }
.style-row { position: relative; border-bottom: 1px solid var(--grid); }
.style-row:first-child { border-top: 1px solid var(--grid); }
.style-toggle {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 18%) minmax(0, 1fr) 96px;
    align-items: center;
    width: 100%;
    min-height: 70px;
    padding: .5rem 1rem .5rem 2rem;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.style-toggle:hover { background: rgba(176, 141, 87, .12); }
.style-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.style-dates { grid-column: 2; font-size: .9rem; color: var(--muted); }
.style-icon { grid-column: 4; justify-self: end; display: block; width: 72px; height: 60px; }
.style-icon img { display: block; width: 100%; height: 100%; object-fit: contain; transition: filter .15s; }
.style-desc {
    position: absolute;
    top: 50%;
    left: calc(50% + 1rem);
    right: 120px;
    margin: 0;
    transform: translateY(-50%);
    font-size: .9rem;
    line-height: 1.45;
    color: var(--kalka);
    pointer-events: none;
}
.style-row.is-open { background: var(--teal); border-color: var(--teal); }
.style-row.is-open .style-toggle { min-height: 98px; color: var(--kalka); }
.style-row.is-open .style-toggle:hover { background: transparent; }
.style-row.is-open .style-dates { color: #BFD0CF; }
.style-row.is-open .style-icon img { filter: invert(1) brightness(1.15); }

/* ---------- Последние записи ---------- */
.latest { padding: 2.4rem 0 1.2rem; }
.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem 1.5rem;
    margin-bottom: 1.4rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(176, 141, 87, .55);
}
.latest-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--kalka);
}
.latest-all { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-light); }
.empty-note { color: var(--on-dark-muted); font-style: italic; }
.sheet-frame .empty-note { color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    background-color: var(--kalka);
    background-image: var(--paper);
    border: 1px solid var(--brass);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--brass); }
.card.sticky { border-width: 2px; }
.card-thumb { border-bottom: 1px solid var(--brass); background: var(--kalka); }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb img.card-engraving { object-fit: contain; padding: .7rem 1rem 0; mix-blend-mode: multiply; filter: contrast(1.05); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1.1rem 1.3rem 1.3rem; }
.card-cat { margin-bottom: .45rem; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.card-title { margin: 0 0 .6rem; font-family: var(--font-text); font-size: 1.22rem; line-height: 1.3; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-title a:hover { color: var(--teal); text-decoration: underline; text-decoration-color: var(--brass); }
.card-excerpt { flex: 1; font-size: .9rem; line-height: 1.5; color: #4A4A45; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .9rem;
    padding-top: .8rem;
    border-top: 1px solid var(--grid);
}
.card-date { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- Лист 03 — сохранение ---------- */
.sheet-care { background: none; box-shadow: none; }
.care-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; }
.care-layout > .sheet-frame { box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 10px 24px rgba(0, 0, 0, .25); }
.care-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.care-step { min-width: 0; padding: 0 1.1rem .4rem; }
.care-step + .care-step { border-left: 1px solid var(--grid); }
.care-num { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--brass); margin-bottom: .5rem; }
.care-img { display: block; width: 100%; height: auto; aspect-ratio: 17 / 10; object-fit: cover; mix-blend-mode: multiply; margin-bottom: .8rem; }
.care-name { margin: 0 0 .35rem; font-family: var(--font-text); font-size: 1.08rem; }
.care-text { margin: 0; font-size: .86rem; line-height: 1.45; color: #4A4A45; }
.care-side { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.4rem; }
.stamp {
    display: inline-block;
    margin-bottom: 1.2rem;
    padding: .55rem .9rem;
    border: 3px double var(--brick);
    outline: 1px solid var(--brick);
    outline-offset: 3px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.15;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brick);
    transform: rotate(-4deg);
    background: rgba(163, 74, 50, .04);
}
.care-emblem { display: block; width: 150px; height: auto; mix-blend-mode: multiply; margin-bottom: .8rem; }
.care-note { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }

/* ---------- Лист 04 — места ---------- */
.places-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 0; border: 1px solid var(--grid); }
.places-map { display: flex; align-items: center; min-width: 0; border-right: 1px solid var(--grid); }
.map-canvas { position: relative; width: 100%; }
.places-map img { display: block; width: 100%; height: auto; aspect-ratio: 1870 / 526; object-fit: cover; mix-blend-mode: multiply; }
.map-pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--brass);
    color: var(--graphite-deep);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 0 0 3px var(--kalka), 0 0 0 4px var(--brass);
}
.map-dir {
    position: absolute;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: .95rem;
    color: var(--ink);
}
.map-dir-n { left: 7.1%; top: 46%; }
.map-dir-s { left: 7.1%; top: 95%; }
.map-dir-e { left: 13.4%; top: 66%; }
.map-dir-w { left: 1.1%; top: 62%; }
.places-list-wrap { min-width: 0; padding: 1.2rem 1.4rem; }
.places-intro { font-size: .84rem; line-height: 1.45; color: var(--muted); margin-bottom: 1rem; }
.places-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .8rem; }
.places-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: .8rem; align-items: start; }
.places-no {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--brass);
    color: var(--graphite-deep);
    font-family: var(--font-display);
    font-size: .9rem;
}
.places-name { font-size: .95rem; line-height: 1.3; }
.places-date { font-size: .8rem; color: var(--muted); }

/* ---------- Внутренние страницы ---------- */
.inner { padding: 1.4rem 0 3.5rem; }
.breadcrumbs { margin: 0 0 1.2rem; font-size: .82rem; letter-spacing: .04em; color: var(--on-dark-muted); }
.breadcrumbs a { color: var(--brass-light); }
.breadcrumbs .sep { margin: 0 .35rem; color: var(--brass); }
.layout-single { display: block; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    align-items: start;
}
.content-area { min-width: 0; }
.page-head { margin-bottom: 1.2rem; padding: 1.8rem 2.2rem; }
.page-title { margin: .3rem 0 .4rem; font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.05; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.page-sub { margin: 0; font-size: .95rem; color: var(--muted); }
.page-sub p { margin: 0; }
.card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty-sheet { padding: 2rem 2.2rem; }

.entry { padding: 2.2rem 2.6rem 2.6rem; }
.entry-head { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--brass); }
.entry-title { margin: .3rem 0 .6rem; font-family: var(--font-display); font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1.08; letter-spacing: .03em; color: var(--ink); }
.entry-meta { font-size: .85rem; color: var(--muted); }
.entry-cover { margin: 0 0 1.6rem; border: 1px solid var(--brass); }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.04rem; line-height: 1.72; color: var(--ink); }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.6em 0 .6em; font-family: var(--font-display); letter-spacing: .03em; color: var(--ink); }
.entry-content h2 { font-size: 1.9rem; padding-bottom: .3rem; border-bottom: 1px solid var(--grid); }
.entry-content h3 { font-size: 1.5rem; }
.entry-content h4 { font-size: 1.25rem; }
.entry-content a { color: var(--teal); }
.entry-content a:hover { color: var(--brick); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--brass); }
.entry-content ol li::marker { color: var(--brass); font-family: var(--font-display); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem;
    border-left: 3px solid var(--brass);
    background: rgba(47, 93, 98, .08);
    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 var(--brass); font-size: .94rem; }
.entry-content th, .entry-content td { padding: .6rem .8rem; border: 1px solid var(--grid); text-align: left; vertical-align: top; }
.entry-content th { background: rgba(176, 141, 87, .18); font-weight: 700; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .84rem; color: var(--muted); font-style: italic; margin-top: .4rem; }
.entry-content pre { overflow-x: auto; padding: 1rem; background: rgba(42, 43, 46, .06); border: 1px solid var(--grid); font-size: .9rem; }
.entry-content hr { border: 0; border-top: 1px solid var(--brass); margin: 2em 0; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
.wp-block-image img { height: auto; }
.page-links { margin-top: 1.4rem; font-size: .9rem; }

.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 0; padding: 1rem 0 0; list-style: none; border-top: 1px solid var(--grid); }
.entry-tags a { display: inline-block; padding: .25rem .7rem; border: 1px solid var(--brass); font-size: .78rem; text-decoration: none; color: var(--ink); }
.entry-tags a:hover { background: var(--brass); color: var(--graphite-deep); }

.entry-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.entry-nav a {
    display: block;
    padding: 1rem 1.3rem;
    border: 1px solid rgba(176, 141, 87, .55);
    background: var(--graphite-soft);
    color: var(--on-dark);
    text-decoration: none;
    font-size: .95rem;
}
.entry-nav a span { display: block; margin-bottom: .2rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-light); }
.entry-nav a:hover { border-color: var(--brass); color: var(--brass-light); }
.entry-nav-next { grid-column: 2; text-align: right; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sidebar .widget {
    position: relative;
    padding: 1.5rem 1.6rem 1.6rem;
    color: var(--ink);
    background-color: var(--kalka-dark);
    background-image: var(--grid-lines), var(--paper);
    background-size: 24px 24px, 24px 24px, auto;
    border-top: 3px solid var(--brass);
}
.sidebar .widget-title {
    margin: 0 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--grid);
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
}
.sidebar .widget ul { margin: 0; padding: 0; list-style: none; }
.sidebar .widget li { padding: .5rem 0; border-bottom: 1px dashed var(--grid); font-size: .92rem; line-height: 1.4; color: var(--ink); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); text-decoration-color: var(--brass); }
.sidebar .widget a:hover { color: var(--teal); }
.sidebar .widget .post-date, .sidebar .widget .rss-date { display: block; font-size: .78rem; color: var(--muted); }
.sidebar .widget p { color: var(--ink); }

/* ---------- Пагинация (type => plain) ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 1.8rem; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .8rem;
    border: 1px solid rgba(176, 141, 87, .6);
    background: var(--graphite-soft);
    color: var(--on-dark);
    font-size: .9rem;
    text-decoration: none;
    transition: background-color .15s, color .15s, transform .15s;
}
.pager a.page-numbers:hover { background: var(--brass); color: var(--graphite-deep); transform: translate(-2px, -2px); }
.pager .page-numbers.current { background: var(--teal); border-color: var(--brass); color: var(--kalka); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .3rem; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 14px; padding: 2rem 2.4rem 2.2rem; }
.comments-title, .comment-reply-title { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin: 0 0 1rem; }
.comment-reply-title small { margin-left: .6rem; font-family: var(--font-text); font-size: .8rem; letter-spacing: 0; text-transform: none; }
.comment-list, .comment-list .children { margin: 0 0 1.6rem; padding: 0; list-style: none; }
.comment-list .children { margin: .8rem 0 0 1.6rem; }
.note-body { padding: 1rem 0; border-bottom: 1px solid var(--grid); }
.note-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.note-avatar { border-radius: 0; border: 1px solid var(--brass); display: block; }
.note-author { display: block; font-weight: 700; color: var(--ink); }
.note-date { font-size: .8rem; color: var(--muted); }
.note-wait { font-size: .85rem; color: var(--brick); font-style: italic; }
.note-text { font-size: .96rem; color: var(--ink); }
.note-reply a { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.comment-form label { display: block; margin-bottom: .3rem; font-size: .86rem; color: var(--ink); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--brass);
    border-radius: 0;
    background: rgba(255, 255, 255, .45);
    color: var(--ink);
    font: inherit;
    font-size: .96rem;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.form-note { font-size: .84rem; color: var(--muted); }
.req { color: var(--brick); }
.comments-nav { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; font-size: .88rem; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: .5rem; margin: 1rem 0; }
.search-field {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    border: 1px solid var(--brass);
    border-radius: 0;
    background: rgba(255, 255, 255, .5);
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
}
.sidebar .search-form { margin: 0; }

/* ---------- 404 ---------- */
.lost { max-width: 760px; margin-inline: auto; padding: 2.6rem 2.8rem 2.8rem; text-align: center; }
.lost-title { margin: .4rem 0 .8rem; font-family: var(--font-display); font-size: clamp(2.2rem, 4.5vw, 3.6rem); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.lost-text { color: var(--ink); }
.lost .search-form { max-width: 520px; margin: 1.4rem auto; }
.lost-back { margin: 1.4rem 0 0; }

/* ---------- Подвал ---------- */
.colophon {
    margin-top: 0;
    padding: 3rem 0 1.4rem;
    background: var(--graphite-deep);
    border-top: 1px solid var(--brass);
    box-shadow: inset 0 3px 0 var(--graphite-deep), inset 0 4px 0 rgba(176, 141, 87, .45);
    color: var(--on-dark-muted);
}
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.colophon-col { min-width: 0; padding: 0 2rem; }
.colophon-col:first-child { padding-left: 0; }
.colophon-col:last-child { padding-right: 0; }
.colophon-col + .colophon-col { border-left: 1px solid rgba(176, 141, 87, .3); }
.colophon .widget { margin-bottom: 1.4rem; color: var(--on-dark-muted); font-size: .9rem; line-height: 1.55; }
.colophon .widget:last-child { margin-bottom: 0; }
.colophon .widget-title {
    margin: 0 0 .9rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brass-light);
}
.colophon .widget p { color: var(--on-dark-muted); }
.colophon .widget ul { margin: 0; padding: 0; list-style: none; }
.colophon .widget li { padding: .3rem 0; color: var(--on-dark-muted); }
.colophon .widget a { color: var(--on-dark); text-decoration: underline; text-decoration-color: rgba(176, 141, 87, .7); }
.colophon .widget a:hover { color: var(--brass-light); }
.colophon .widget .post-date { display: block; font-size: .78rem; color: var(--on-dark-muted); }
.colophon-copy {
    margin: 2.4rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(176, 141, 87, .45);
    text-align: center;
    font-size: .84rem;
    letter-spacing: .04em;
    color: var(--on-dark-muted);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    padding: 1rem 1.6rem;
    background: var(--graphite-deep);
    border-top: 1px solid var(--brass);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, .35);
    color: var(--on-dark);
}
.cookie-text { margin: 0; max-width: 760px; font-size: .88rem; line-height: 1.45; color: var(--on-dark); }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
    .atlas-plate { margin-right: 7rem; }
    .callout { right: -7rem; font-size: .92rem; }
    .care-layout { grid-template-columns: minmax(0, 1fr) 200px; }
}

@media (max-width: 960px) {
    .shell { width: 92%; }
    .masthead-row { flex-wrap: wrap; gap: 1rem; padding: 1rem 0; }
    .brand { max-width: calc(100% - 7.5rem); }
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav-list { flex-direction: column; gap: 0; border-top: 1px solid rgba(176, 141, 87, .4); }
    .site-nav-list a { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(176, 141, 87, .2); }

    .atlas-spread { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .atlas-plate { margin-right: 7rem; }

    .style-toggle { grid-template-columns: minmax(0, 40%) minmax(0, 1fr) 80px; padding-left: 1.6rem; }
    .style-icon { grid-column: 3; }
    .style-desc { position: static; transform: none; padding: 0 1.6rem 1rem; pointer-events: auto; }
    .style-row.is-open .style-toggle { min-height: 70px; }

    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-single .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .care-layout { grid-template-columns: minmax(0, 1fr); }
    .care-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
    .care-step, .care-step:first-child, .care-step:last-child { padding: 0 1rem; }
    .care-step:nth-child(odd) { padding-left: 0; border-left: 0; }
    .care-step:nth-child(even) { padding-right: 0; }
    .care-side { flex-direction: row; flex-wrap: wrap; gap: 1.4rem; text-align: left; padding: 1.8rem 2rem; }
    .stamp { margin-bottom: 0; }
    .care-emblem { width: 110px; margin-bottom: 0; }
    .care-note { flex: 1 1 220px; }

    .places-layout { grid-template-columns: minmax(0, 1fr); }
    .places-map { border-right: 0; border-bottom: 1px solid var(--grid); }

    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 14px; }

    .colophon-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .colophon-col, .colophon-col:first-child, .colophon-col:last-child { padding: 0; }
    .colophon-col + .colophon-col { border-left: 0; border-top: 1px solid rgba(176, 141, 87, .3); padding-top: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .brand-mark { width: 58px; height: 58px; }
    .brand { gap: .8rem; }
    .brand-desc { display: none; }
    .sheet-frame { padding: 1.3rem 1.3rem 1.5rem; }
    .sheet-frame::before { inset: 6px; }
    .sheet-head { gap: .7rem; flex-wrap: wrap; }
    .sheet-rule { flex-basis: 40px; }
    .atlas-title { font-size: clamp(2.1rem, 10vw, 2.8rem); }
    .atlas-lead { font-size: 1.02rem; }
    .atlas-plate { margin-right: 0; }
    .callout { display: none; }
    .atlas-legend { grid-template-columns: minmax(0, 1fr); }
    .atlas-legend li { padding: .6rem .4rem; }
    .atlas-legend li + li { border-left: 0; border-top: 1px solid var(--grid); }

    .style-scale { margin: 0 -.4rem; }
    .style-toggle { grid-template-columns: minmax(0, 1fr) 64px; padding: .7rem .8rem; row-gap: .15rem; }
    .style-name { grid-column: 1; font-size: 1.1rem; }
    .style-dates { grid-column: 1; grid-row: 2; }
    .style-icon { grid-column: 2; grid-row: 1 / span 2; width: 56px; height: 50px; }
    .style-desc { padding: 0 .8rem .9rem; }

    .card-grid, .card-grid-list, .layout-single .card-grid-list { grid-template-columns: minmax(0, 1fr); }

    .care-steps { grid-template-columns: minmax(0, 1fr); }
    .care-step, .care-step:first-child, .care-step:last-child, .care-step:nth-child(odd), .care-step:nth-child(even) { padding: 0; border-left: 0; }
    .care-step + .care-step { border-top: 1px solid var(--grid); padding-top: 1.2rem; }
    .care-side { flex-direction: column; text-align: center; padding: 1.6rem 1.4rem; }

    .map-pin { width: 22px; height: 22px; font-size: .78rem; box-shadow: 0 0 0 2px var(--kalka), 0 0 0 3px var(--brass); }
    .map-dir { font-size: .7rem; }
    .places-list-wrap { padding: 1rem; }

    .page-head, .empty-sheet { padding: 1.4rem 1.4rem; }
    .entry { padding: 1.5rem 1.4rem 1.8rem; }
    .comments { padding: 1.5rem 1.4rem 1.7rem; }
    .lost { padding: 1.8rem 1.4rem 2rem; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .entry-nav-next { grid-column: 1; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
    .search-form { flex-direction: column; }

    .cookie-banner { flex-direction: column; align-items: stretch; gap: .8rem; padding: 1rem 1.2rem; }
    .cookie-text { font-size: .82rem; }
}
