/*
Theme Name: dds_64wildwoodst.com
Theme URI: https://64wildwoodst.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: wwdelo
*/

/* ---------- Шрифты ---------- */
@font-face {
    font-family: "Roboto Serif";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 50% 150%;
    src: url("fonts/roboto-serif-cyrillic-wdth-normal.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Roboto Serif";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 50% 150%;
    src: url("fonts/roboto-serif-latin-wdth-normal.woff2") format("woff2-variations");
    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: 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;
}
@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;
}

/* ---------- Переменные ---------- */
:root {
    --paper: #E8DCC3;
    --board: #CDBB97;
    --ink-cover: #23282E;
    --ink: #2B2620;
    --muted: #6E6752;
    --wine: #7A2E2A;
    --wine-deep: #5E211E;
    --brass: #A98B4F;
    --brass-soft: rgba(169, 139, 79, 0.45);
    --calque: #F4EFE2;
    --line: #3C3A33;
    --aside: #DDCEAE;
    --fold: #D3C29E;
    --cover-text: #DCD2BD;
    --cover-muted: #A79C84;
    --f-head: "Roboto Serif", "PT Serif", Georgia, "Times New Roman", serif;
    --f-body: "PT Serif", Georgia, "Times New Roman", serif;
    --shadow-sheet: 0 2px 0 rgba(60, 58, 51, 0.08), 0 10px 18px -10px rgba(60, 40, 20, 0.45);
}

/* ---------- Скрытие через hidden (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
.topnav-toggle[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; }
}
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        url("images/paper-grain.png"),
        radial-gradient(ellipse at 50% 40%, rgba(232, 220, 195, 0) 55%, rgba(120, 88, 48, 0.22) 100%);
    background-repeat: repeat, no-repeat;
    background-attachment: scroll, fixed;
    background-size: 360px 360px, 100% 100%;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-stretch: 62%;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    margin: 1.6em 0 0.55em;
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
p, li, td, th, dd, dt, blockquote, figcaption { overflow-wrap: break-word; hyphens: auto; }
a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--brass);
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--wine); text-decoration-color: var(--wine); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--wine);
    outline-offset: 3px;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-to {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--wine);
    color: var(--calque);
    text-decoration: none;
}
.skip-to:focus { top: 1rem; color: var(--calque); }

.shell { width: min(94%, 1480px); margin-left: auto; margin-right: auto; }

/* ---------- Кнопки-ярлыки ---------- */
.stamp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .62em 1.35em .58em;
    font-family: var(--f-head);
    font-stretch: 72%;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--calque);
    text-decoration: none;
    text-align: center;
    background-color: var(--wine);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 0;
    border-radius: 2px;
    box-shadow: inset 0 0 0 3px var(--wine), inset 0 0 0 4px var(--brass), 0 2px 0 var(--wine-deep);
    cursor: pointer;
    transition: transform .15s, background-color .2s, box-shadow .15s;
}
.stamp-btn:hover {
    color: var(--calque);
    background-color: var(--wine-deep);
    box-shadow: inset 0 0 0 3px var(--wine-deep), inset 0 0 0 4px var(--brass), 0 1px 0 var(--wine-deep);
    transform: translateY(1px);
}
.stamp-btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 3px var(--wine-deep), inset 0 0 0 4px var(--brass); }
.stamp-btn--small { font-size: .88rem; padding: .5em 1em .46em; }
.ink-link {
    font-family: var(--f-head);
    font-stretch: 75%;
    font-weight: 600;
    font-size: 1.05rem;
}

/* ---------- Шапка ---------- */
.masthead {
    background-color: var(--board);
    background-image: url("images/paper-grain.png"), linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(90, 60, 30, .08));
    background-size: 360px 360px, 100% 100%;
    border-bottom: 1px solid rgba(60, 58, 51, .45);
    box-shadow: 0 6px 14px -10px rgba(60, 40, 20, .6);
    padding: 14px 0;
}
.masthead-frame {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 1.1rem 1.6rem;
    border: 3px double rgba(60, 58, 51, .7);
    outline: 1px solid rgba(169, 139, 79, .55);
    outline-offset: -9px;
}
.brand { display: flex; align-items: center; gap: 1.3rem; flex: 1 1 auto; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; text-decoration: none; line-height: 0; }
.brand-seal { width: 96px; height: 96px; display: block; transform: rotate(-6deg); }
.brand-logo { display: block; max-width: 110px; max-height: 110px; width: auto; height: auto; }
.brand-text { min-width: 0; max-width: 64rem; }
.brand-name {
    margin: 0 0 .35rem;
    font-family: var(--f-head);
    font-stretch: 60%;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.55rem);
    line-height: 1.2;
    color: var(--ink);
}
.brand-name a { color: inherit; text-decoration: none; }
.brand-name a:hover { color: var(--wine); }
.brand-desc {
    margin: 0;
    font-size: .92rem;
    line-height: 1.5;
    color: var(--muted);
    padding-top: .35rem;
    border-top: 1px solid var(--brass-soft);
}

.topnav { flex: 0 0 auto; position: relative; }
.topnav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1.5rem;
}
.topnav-list a {
    display: inline-block;
    padding: .3rem .2rem .15rem;
    font-family: var(--f-head);
    font-stretch: 72%;
    font-weight: 500;
    font-size: 1.12rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--brass);
    transition: color .2s, border-color .2s;
}
.topnav-list a:hover { color: var(--wine); border-color: var(--wine); }
.topnav-list .current-menu-item > a,
.topnav-list .current_page_item > a,
.topnav-list .current-menu-ancestor > a {
    color: var(--wine);
    padding: .3rem .75rem .25rem;
    border: 2px solid var(--wine);
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px var(--board), inset 0 0 0 3px rgba(122, 46, 42, .7);
    transform: rotate(-1.5deg);
}
.topnav-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    padding: .5rem .9rem;
    font-family: var(--f-head);
    font-stretch: 72%;
    font-weight: 600;
    font-size: 1rem;
    color: var(--wine);
    background: transparent;
    border: 2px solid var(--wine);
    border-radius: 3px;
    cursor: pointer;
}
.topnav-bars, .topnav-bars::before, .topnav-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--wine);
    content: "";
    position: relative;
}
.topnav-bars::before { position: absolute; top: -6px; }
.topnav-bars::after { position: absolute; top: 6px; }

/* ---------- Заголовки дел ---------- */
.case-no {
    margin: 0 0 .1rem;
    font-family: var(--f-head);
    font-stretch: 70%;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .04em;
    color: var(--wine);
}
.case-title {
    margin: 0 0 1.4rem;
    padding-bottom: .55rem;
    font-size: clamp(1.9rem, 3.4vw, 3.2rem);
    font-stretch: 50%;
    hyphens: manual;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.005em;
    text-transform: uppercase;
    color: var(--wine);
    background-image: linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass));
    background-size: 7.5rem 3px, 3.5rem 1px;
    background-position: 0 100%, 8.2rem calc(100% - 1px);
    background-repeat: no-repeat;
}
.case-title--plain { text-transform: none; font-stretch: 64%; letter-spacing: 0; }
.case-lead { max-width: 44rem; color: var(--ink); margin-bottom: 1.8rem; }
.case-more { margin: 1.4rem 0 0; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- Главная ---------- */
.front-main { width: 85%; margin-left: auto; margin-right: auto; padding-bottom: 2rem; }
.case { padding: 3rem 0; min-width: 0; }
.case + .case, .spread, .case + .spread, .spread + .spread { border-top: 1px solid rgba(60, 58, 51, .28); }
.spread > .case { border-top: 0; }
.spread > .case + .case { border-top: 1px solid rgba(60, 58, 51, .28); }

/* Дело 1: шаги */
.case-steps {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2rem 3rem;
    align-items: center;
}
.case-steps-text { min-width: 0; }
.case-steps-art { margin: 0; min-width: 0; }
.case-steps-art img {
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 62%, transparent 100%);
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 950 / 860;
    object-fit: cover;
    mix-blend-mode: multiply;
}
.tag-route {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.4rem;
    position: relative;
}
.tag-route::before {
    content: "";
    position: absolute;
    left: 2rem;
    right: 2rem;
    top: 52%;
    border-top: 2px dashed var(--brass);
    z-index: 0;
}
.tag {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: .7rem .55rem 1rem;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass-soft);
    box-shadow: var(--shadow-sheet);
}
.tag:nth-child(odd) { transform: rotate(-1deg); }
.tag:nth-child(even) { transform: rotate(.8deg) translateY(4px); }
.tag::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    background: linear-gradient(225deg, var(--paper) 50%, var(--fold) 50%);
    box-shadow: -1px 1px 2px rgba(60, 40, 20, .25);
}
.tag-num {
    font-family: var(--f-head);
    font-stretch: 62%;
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1;
    color: var(--line);
}
.tag-icon { display: block; width: 58px; height: 58px; margin: .45rem 0 .55rem; }
.tag-label {
    font-family: var(--f-head);
    font-stretch: 66%;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--ink);
}

/* Развороты */
.spread { display: block; }

/* Дело 2: три пути */
.paths {
    display: flex;
    align-items: flex-start;
    padding: .6rem .4rem 1.2rem;
}
.path-sheet {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 1.5rem 1.2rem 1.7rem;
    text-align: center;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass-soft);
    box-shadow: var(--shadow-sheet), 6px 0 12px -8px rgba(60, 40, 20, .35);
    transition: transform .25s;
}
.path-sheet::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -7px;
    height: 8px;
    background: var(--calque);
    clip-path: polygon(0 0, 100% 0, 100% 40%, 94% 90%, 88% 30%, 81% 100%, 74% 45%, 66% 85%, 59% 25%, 51% 95%, 44% 40%, 36% 100%, 29% 30%, 21% 85%, 14% 35%, 7% 100%, 0 45%);
}
.path-sheet--one { transform: rotate(-2deg); z-index: 1; margin-top: .4rem; }
.path-sheet--two { transform: rotate(1.2deg); z-index: 2; margin-left: -.9rem; margin-top: 1.4rem; }
.path-sheet--three { transform: rotate(-.8deg); z-index: 3; margin-left: -.9rem; }
.path-sheet:hover { transform: rotate(0) translateY(-6px); z-index: 4; }
.path-clip { position: absolute; left: 10px; top: -22px; width: 18px; height: 48px; }
.path-sheet img {
    -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 70%, transparent 100%);
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    mix-blend-mode: multiply;
}
.path-title {
    hyphens: manual;
    margin: 1rem 0 .55rem;
    padding-bottom: .5rem;
    font-size: clamp(1.25rem, 1.7vw, 1.6rem);
    font-stretch: 54%;
    color: var(--wine);
    border-bottom: 1px solid var(--brass-soft);
}
.path-text { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--muted); }

/* Карточки записей */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 2.2rem 1.6rem;
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass);
    outline: 1px solid rgba(169, 139, 79, .35);
    outline-offset: -6px;
    box-shadow: var(--shadow-sheet);
    margin-bottom: 8px;
    transition: transform .2s, box-shadow .2s;
}
.card::before {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 22px;
    height: 22px;
    z-index: 2;
    background: linear-gradient(225deg, var(--paper) 50%, var(--fold) 50%);
    box-shadow: -1px 1px 2px rgba(60, 40, 20, .3);
}
.card::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -8px;
    height: 9px;
    background: var(--calque);
    border-left: 1px solid var(--brass);
    border-right: 1px solid var(--brass);
    clip-path: polygon(0 0, 100% 0, 100% 50%, 93% 100%, 86% 35%, 78% 90%, 70% 30%, 62% 100%, 54% 40%, 46% 85%, 38% 25%, 30% 95%, 22% 40%, 14% 100%, 7% 35%, 0 80%);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 0 rgba(60, 58, 51, .08), 0 18px 24px -14px rgba(60, 40, 20, .55); }
.card-pinned {
    position: absolute;
    top: .7rem;
    left: .7rem;
    z-index: 3;
    padding: .15rem .55rem;
    font-family: var(--f-head);
    font-stretch: 70%;
    font-weight: 600;
    font-size: .8rem;
    color: var(--wine);
    background: var(--calque);
    border: 2px solid var(--wine);
    transform: rotate(-4deg);
}
.card-photo { position: relative; padding: 1.1rem 1rem 0; }
.card-photo::before {
    content: "";
    position: absolute;
    top: .55rem;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    z-index: 2;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #E6D3A2, var(--brass) 55%, #6F5A2E);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.card-photo a {
    display: block;
    position: relative;
    border: 5px solid #FBF8EF;
    box-shadow: 0 3px 8px -3px rgba(60, 40, 20, .5);
    transform: rotate(-1.2deg);
    text-decoration: none;
}
.card:nth-child(even) .card-photo a { transform: rotate(1deg); }
.card-photo a::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 18px;
    height: 18px;
    background: linear-gradient(315deg, var(--calque) 50%, #E3D8BF 50%);
}
.card-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: sepia(.25);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem 1.15rem 1.25rem;
}
.card-rubric {
    align-self: flex-start;
    margin-bottom: .45rem;
    font-family: var(--f-head);
    font-stretch: 70%;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--wine);
    border-bottom: 1px solid var(--brass);
}
.card-title {
    margin: 0 0 .55rem;
    font-size: 1.28rem;
    font-stretch: 66%;
    line-height: 1.2;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--wine); }
.card-excerpt { font-size: .9rem; line-height: 1.5; color: var(--ink); margin-bottom: .9rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    padding-top: .7rem;
    border-top: 1px dashed var(--brass-soft);
}
.card-date { font-size: .85rem; color: var(--muted); letter-spacing: .03em; }

/* Дело 3: документы */
.docs-sheet {
    position: relative;
    margin: .5rem .6rem 1.4rem 0;
    padding: 1.6rem 1.7rem 2.2rem;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass-soft);
    box-shadow: var(--shadow-sheet);
    transform: rotate(-.4deg);
}
.docs-sheet::before {
    content: "";
    position: absolute;
    inset: 6px -8px -10px 10px;
    z-index: -1;
    background: #EDE4CF;
    border: 1px solid var(--brass-soft);
    transform: rotate(1.6deg);
    box-shadow: var(--shadow-sheet);
}
.docs-sheet::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 46px;
    height: 46px;
    background: linear-gradient(315deg, var(--paper) 48%, rgba(60, 40, 20, .25) 50%, #E4D7B8 52%, var(--calque) 78%);
}
.docs-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.docs-table th, .docs-table td {
    border: 1px solid var(--brass);
    padding: .75rem .9rem;
    text-align: left;
    vertical-align: middle;
}
.docs-table th {
    font-family: var(--f-head);
    font-stretch: 70%;
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(169, 139, 79, .12);
}
.docs-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: .85rem;
    align-items: center;
}
.docs-check {
    grid-row: span 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--wine);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23F4EFE2' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 2px var(--calque), 0 0 0 3px rgba(122, 46, 42, .45);
}
.docs-table th:last-child, .docs-table td:last-child { width: 9.5rem; }
.docs-name { font-size: 1.08rem; color: var(--ink); }
.docs-hint { font-size: .82rem; line-height: 1.4; color: var(--muted); }
.docs-mark { font-style: italic; color: var(--muted); white-space: nowrap; }
.docs-mark--always { color: var(--wine); font-style: normal; font-weight: 700; }

/* Дело 4: вопросы */
.faq-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 32%);
    gap: 2rem;
    align-items: stretch;
}
.faq-main { min-width: 0; }
.faq-sheet {
    padding: .6rem 1.5rem;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass-soft);
    box-shadow: var(--shadow-sheet);
}
.faq-item { border-bottom: 1px solid var(--brass-soft); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: 1rem 0 1rem 2.4rem;
    font-family: var(--f-head);
    font-stretch: 72%;
    font-weight: 500;
    font-size: 1.12rem;
    line-height: 1.3;
    color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "+";
    position: absolute;
    left: 0;
    top: .95rem;
    width: 1.55rem;
    height: 1.55rem;
    border: 2px solid var(--brass);
    border-radius: 50%;
    font-family: var(--f-body);
    font-size: 1.2rem;
    line-height: 1.25rem;
    text-align: center;
    color: var(--brass);
}
.faq-item[open] summary::before { content: "−"; border-color: var(--wine); color: var(--wine); }
.faq-item summary:hover { color: var(--wine); }
.faq-answer { padding: 0 0 1.1rem 2.4rem; font-size: .95rem; color: var(--muted); }
.faq-answer p { margin: 0; }
.faq-art { margin: 0; min-width: 0; position: relative; min-height: 320px; }
.faq-art img {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--brass);
    outline: 1px solid rgba(169, 139, 79, .45);
    outline-offset: 5px;
    filter: sepia(.15);
}

/* ---------- Внутренние страницы ---------- */
.crumbs {
    padding: 1.4rem 0 .4rem;
    font-size: .88rem;
    color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration-thickness: 2px; }
.crumbs a:hover { color: var(--wine); }
.crumbs-sep { color: var(--brass); margin: 0 .25rem; }
.crumbs span:last-child { color: var(--ink); }

.layout-single { display: block; padding: 1rem 0 3.5rem; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    align-items: start;
    padding: 1rem 0 3.5rem;
}
.content-area { min-width: 0; }

.list-head { margin-bottom: 2rem; }
.list-head .case-title { margin-bottom: 1rem; }
.list-intro { max-width: 48rem; color: var(--muted); }
.layout-with-sidebar .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.folio {
    position: relative;
    padding: 2.4rem 2.6rem 2.6rem;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass);
    outline: 1px solid rgba(169, 139, 79, .3);
    outline-offset: -8px;
    box-shadow: var(--shadow-sheet);
}
.folio::before {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 30px;
    height: 30px;
    background: linear-gradient(225deg, var(--paper) 50%, var(--fold) 50%);
    box-shadow: -1px 1px 3px rgba(60, 40, 20, .3);
}
.folio-head { margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 3px double var(--brass); }
.folio-title {
    margin: .2rem 0 .5rem;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-stretch: 52%;
    hyphens: manual;
    color: var(--wine);
    line-height: 1.08;
}
.folio-meta { margin: 0; font-size: .9rem; color: var(--muted); }
.folio-photo { margin: 0 0 1.8rem; }
.folio-photo img {
    display: block;
    width: 100%;
    height: auto;
    border: 6px solid #FBF8EF;
    box-shadow: 0 4px 12px -4px rgba(60, 40, 20, .5);
}
.folio-tags { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .9rem; }
.folio-tags a { color: var(--muted); text-decoration-thickness: 1px; }

.prose { font-size: 1.07rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.85rem; color: var(--wine); padding-bottom: .3rem; border-bottom: 1px solid var(--brass-soft); }
.prose h3 { font-size: 1.45rem; }
.prose h4 { font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose ul li::marker { color: var(--brass); }
.prose ol li::marker { color: var(--wine); font-family: var(--f-head); font-weight: 700; }
.prose blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem 1.2rem 1.8rem;
    background: rgba(169, 139, 79, .12);
    border-left: 4px solid var(--wine);
    font-style: italic;
    color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table, .prose th, .prose td { border: 1px solid var(--brass); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .6rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: rgba(169, 139, 79, .16); font-family: var(--f-head); font-stretch: 72%; }
.prose img { display: block; height: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.prose pre { overflow-x: auto; padding: 1rem; background: rgba(60, 58, 51, .08); border: 1px solid var(--brass-soft); }
.prose hr { border: 0; border-top: 3px double var(--brass); margin: 2em 0; }

.post-navigation { margin-top: 2.2rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.post-navigation a {
    display: block;
    height: 100%;
    padding: 1rem 1.2rem;
    text-decoration: none;
    background: rgba(244, 239, 226, .7);
    border: 1px solid var(--brass-soft);
}
.post-navigation a:hover { border-color: var(--wine); }
.post-navigation .nav-next { text-align: right; }
.nav-cap { display: block; font-size: .82rem; color: var(--muted); letter-spacing: .04em; }
.nav-name { display: block; font-family: var(--f-head); font-stretch: 70%; font-weight: 600; font-size: 1.1rem; color: var(--ink); }

/* Пагинация */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 2.8rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: .45rem .8rem;
    font-family: var(--f-head);
    font-stretch: 72%;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
    background-color: var(--calque);
    border: 1px solid var(--brass);
    box-shadow: 0 2px 0 rgba(60, 58, 51, .15);
}
.pager a.page-numbers:hover { color: var(--wine); border-color: var(--wine); }
.pager .page-numbers.current {
    color: var(--calque);
    background-color: var(--wine);
    border-color: var(--wine);
    box-shadow: inset 0 0 0 2px var(--wine), inset 0 0 0 3px var(--brass);
}
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; min-width: auto; }

/* Поиск */
.seek { display: flex; gap: .6rem; max-width: 34rem; margin: 1.2rem 0; }
.seek-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6rem .8rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #FBF8EF;
    border: 1px solid var(--brass);
    border-radius: 2px;
}
.empty-sheet { padding: 1.6rem 1.8rem; background: var(--calque); border: 1px solid var(--brass-soft); }

/* 404 */
.lost { text-align: center; }
.lost .seek { margin-left: auto; margin-right: auto; }
.lost-code {
    margin: 0;
    font-family: var(--f-head);
    font-stretch: 55%;
    font-weight: 800;
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--wine);
    display: inline-block;
    padding: .2rem 1.6rem;
    border: 4px double var(--wine);
    transform: rotate(-4deg);
}

/* Сайдбар */
.sidebar {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    background-color: var(--aside);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass);
    box-shadow: var(--shadow-sheet);
    color: var(--ink);
}
.sidebar .slip + .slip { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px dashed var(--brass); }
.sidebar .slip-title {
    margin: 0 0 .9rem;
    padding-bottom: .4rem;
    font-size: 1.35rem;
    font-stretch: 64%;
    text-transform: uppercase;
    color: var(--wine);
    border-bottom: 2px solid var(--brass);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0 .5rem 1.1rem; position: relative; border-bottom: 1px solid rgba(169, 139, 79, .35); line-height: 1.35; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li::before { content: ""; position: absolute; left: 0; top: .95rem; width: 6px; height: 6px; background: var(--wine); transform: rotate(45deg); }
.sidebar a { color: var(--ink); text-decoration-thickness: 2px; }
.sidebar a:hover { color: var(--wine); }
.sidebar .post-date, .sidebar time { display: block; font-size: .8rem; color: var(--muted); }
.sidebar p, .sidebar .textwidget { color: var(--ink); }

/* Комментарии */
.remarks { margin-top: 2.6rem; }
.remarks-title, .comment-reply-title {
    font-size: 1.7rem;
    font-stretch: 62%;
    text-transform: uppercase;
    color: var(--wine);
    margin: 0 0 1.2rem;
}
.remarks-list, .remarks-list .children { list-style: none; margin: 0; padding: 0; }
.remarks-list .children { padding-left: 1.6rem; border-left: 2px dashed var(--brass-soft); }
.remark-body {
    margin-bottom: 1.1rem;
    padding: 1.1rem 1.3rem;
    background: rgba(244, 239, 226, .85);
    border: 1px solid var(--brass-soft);
}
.remark-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .5rem; }
.remark-avatar { display: block; border-radius: 50%; border: 2px solid var(--brass); }
.remark-author { font-family: var(--f-head); font-stretch: 72%; font-weight: 600; font-size: 1.05rem; }
.remark-date { font-size: .85rem; color: var(--muted); }
.remark-wait { font-style: italic; color: var(--wine); }
.remark-text p:last-child { margin-bottom: 0; }
.remark-reply { margin-top: .6rem; font-size: .9rem; }
.comment-respond {
    margin-top: 2rem;
    padding: 1.6rem 1.8rem;
    background-color: var(--calque);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass);
}
.comment-respond label { display: block; margin-bottom: .3rem; font-family: var(--f-head); font-stretch: 74%; font-weight: 500; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
    width: 100%;
    padding: .6rem .8rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #FBF8EF;
    border: 1px solid var(--brass);
    border-radius: 2px;
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-family: var(--f-body); font-size: .9rem; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }
#cancel-comment-reply-link { font-size: .9rem; margin-left: .6rem; }

/* ---------- Подвал ---------- */
.colophon {
    margin-top: 1rem;
    padding: 3.5rem 0 1.6rem;
    color: var(--cover-text);
    background-color: var(--ink-cover);
    background-image: url("images/paper-grain.png"), linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .15));
    background-size: 360px 360px, 100% 100%;
    border-top: 4px double var(--brass);
}
.colophon-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.colophon-col { min-width: 0; padding: 0 2.4rem; }
.colophon-col:first-child { padding-left: 0; }
.colophon-col:last-child { padding-right: 0; }
.colophon-col + .colophon-col { border-left: 1px solid rgba(169, 139, 79, .55); }
.colophon .slip-title {
    margin: 0 0 1rem;
    font-size: 2rem;
    font-stretch: 62%;
    font-weight: 600;
    color: var(--calque);
}
.colophon p, .colophon .textwidget { color: var(--cover-text); font-size: .98rem; }
.colophon a { color: var(--paper); text-decoration-color: var(--brass); text-decoration-thickness: 1px; }
.colophon a:hover { color: #FFFFFF; text-decoration-color: var(--paper); }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { position: relative; padding: .25rem 0 .25rem 1.1rem; }
.colophon li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
.colophon-copy {
    margin: 2.6rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(169, 139, 79, .55);
    text-align: center;
    font-size: .9rem;
    color: var(--cover-muted);
}

/* ---------- Cookie ---------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 90;
    width: min(760px, calc(100% - 2rem));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem 1.4rem;
    padding: 1.1rem 1.4rem;
    color: var(--cover-text);
    background-color: var(--ink-cover);
    background-image: url("images/paper-grain.png");
    background-size: 360px 360px;
    border: 1px solid var(--brass);
    outline: 1px solid rgba(169, 139, 79, .4);
    outline-offset: -6px;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
}
.cookie-text { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--cover-text); }
.cookie-banner .stamp-btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (min-width: 1180px) {
    .spread {
        display: grid;
        grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    }
    .spread--even { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }
    .spread > .case:first-child { padding-right: 2.4rem; }
    .spread > .case + .case { padding-left: 2.4rem; border-top: 0; border-left: 1px solid rgba(60, 58, 51, .28); }
    .cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem 1rem; }
    .cards--three .card-photo { padding: 1rem .7rem 0; }
    .cards--three .card-body { padding: .85rem .8rem 1.1rem; }
    .cards--three .card-title { font-size: 1.12rem; }
    .cards--three .card-excerpt {
        font-size: .84rem;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .cards--three .card-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1179px) {
    .cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .faq-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 28%); }
}

@media (max-width: 960px) {
    .masthead-frame { flex-wrap: wrap; padding: 1rem 1.2rem; }
    .topnav { width: 100%; display: flex; flex-direction: column; align-items: flex-start; }
    .topnav-toggle { display: inline-flex; }
    .topnav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: .8rem;
        border-top: 1px solid var(--brass);
    }
    .topnav-list.is-open { display: flex; }
    .topnav-list a { display: block; padding: .7rem .2rem; border-bottom: 1px solid var(--brass-soft); }
    .topnav-list .current-menu-item > a,
    .topnav-list .current_page_item > a { transform: none; margin: .4rem 0; }
    .front-main { width: 92%; }
    .layout-single > .content-area { width: 92%; }
    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .sidebar { margin-top: 2.6rem; }
    .case-steps { grid-template-columns: minmax(0, 1fr); }
    .case-steps-art { max-width: 520px; justify-self: center; }
    .tag-route { gap: .7rem; }
    .tag { padding: .6rem .35rem .8rem; }
    .tag-icon { width: 46px; height: 46px; }
    .tag-label { font-size: .92rem; }
    .cards--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
    .colophon-cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .colophon-col, .colophon-col:first-child, .colophon-col:last-child { padding: 0; }
    .colophon-col + .colophon-col { border-left: 0; border-top: 1px solid rgba(169, 139, 79, .55); padding-top: 1.8rem; }
    .folio { padding: 2rem 1.8rem 2.2rem; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell { width: 94%; }
    .masthead { padding: 8px 0; }
    .masthead-frame { padding: .9rem 1rem; outline-offset: -6px; }
    .brand { gap: .8rem; align-items: flex-start; }
    .brand-seal { width: 64px; height: 64px; }
    .brand-logo { max-width: 72px; max-height: 72px; }
    .brand-name { font-size: 1rem; }
    .brand-desc { font-size: .82rem; }
    .front-main { width: 92%; }
    .layout-single > .content-area { width: 100%; }
    .case { padding: 2.2rem 0; }
    .case-title { font-size: 1.85rem; }
    .tag-route { flex-direction: column; gap: .8rem; }
    .tag-route::before { left: 26px; right: auto; top: 1rem; bottom: 1rem; border-top: 0; border-left: 2px dashed var(--brass); }
    .tag {
        flex: none;
        flex-direction: row;
        text-align: left;
        gap: .8rem;
        padding: .6rem .9rem;
    }
    .tag:nth-child(odd), .tag:nth-child(even) { transform: none; }
    .tag-icon { width: 40px; height: 40px; margin: 0; flex: 0 0 auto; }
    .tag-num { width: 1.2rem; }
    .paths { flex-direction: column; align-items: stretch; gap: 1.8rem; padding: 1rem 0; }
    .path-sheet--one, .path-sheet--two, .path-sheet--three { margin: 0; transform: none; }
    .path-sheet:hover { transform: none; }
    .path-sheet img { width: 70%; margin: 0 auto; }
    .docs-sheet { padding: 1.2rem 1rem 1.8rem; margin-right: .4rem; transform: none; }
    .docs-sheet::before { inset: 6px -3px -8px 5px; transform: rotate(.8deg); }
    .docs-table th, .docs-table td { padding: .6rem .55rem; }
    .docs-item { grid-template-columns: 24px minmax(0, 1fr); column-gap: .6rem; }
    .docs-check { width: 24px; height: 24px; background-size: 16px 16px; }
    .docs-mark { white-space: normal; font-size: .88rem; }
    .faq-wrap { grid-template-columns: minmax(0, 1fr); }
    .faq-sheet { padding: .4rem 1rem; }
    .faq-art { min-height: 0; }
    .faq-art img { position: static; height: auto; aspect-ratio: 16 / 10; object-position: 50% 70%; }
    .folio { padding: 1.5rem 1.1rem 1.8rem; }
    .comment-respond { padding: 1.2rem 1rem; }
    .seek { flex-direction: column; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; bottom: .6rem; }
    .colophon { padding-top: 2.6rem; }
    .colophon .slip-title { font-size: 1.6rem; }
}
