/*
Theme Name: dds_pregnancyproapp.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: semdos
*/

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

/* ---------- Палитра ---------- */
:root {
    --paper: #EFE7D6;
    --paper-deep: #E5DAC3;
    --navy: #1F3A5F;
    --navy-deep: #172D4A;
    --ink: #22201C;
    --pencil: #7A7264;
    --red: #C8452F;
    --red-deep: #A6361F;
    --green: #2F6B4F;
    --green-paper: #CFDEC9;
    --blue-paper: #C8E1EA;
    --yellow: #E8B23A;
    --line: #B9AC93;
    --white-paper: #F7F3EA;
    --head: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --text: "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Скрытие по атрибуту 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%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(185, 172, 147, .13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 172, 147, .13) 1px, transparent 1px),
        url("images/paper-warm.jpg");
    background-size: 26px 26px, 26px 26px, 460px auto;
}
img, svg { max-width: 100%; }
img { height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 1.4em 0 .55em; color: var(--ink); overflow-wrap: break-word; hyphens: manual; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
p, li, td, th, dd, figcaption, blockquote { overflow-wrap: break-word; hyphens: auto; }
a { color: var(--navy); text-decoration: none; background-image: linear-gradient(transparent 62%, rgba(232, 178, 58, .75) 62%, rgba(232, 178, 58, .75) 90%, transparent 90%); background-size: 100% 100%; transition: color .15s, background-size .2s; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.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: -9999px; top: 0; z-index: 100; background: var(--yellow); color: var(--ink); padding: .6rem 1rem; font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }

.shell { width: min(92%, 1180px); margin-inline: auto; }
.front-wrap { width: 92%; margin-inline: auto; }
@media (min-width: 600px) { .front-wrap { width: 85%; } }

/* ---------- Кнопки-штампы ---------- */
.stamp-btn, .comment-form .submit, .find button {
    display: inline-block;
    font-family: var(--head);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .03em;
    line-height: 1.2;
    color: #fff;
    background: var(--red);
    border: 0;
    border-radius: 0;
    padding: .62rem 1.25rem;
    box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgba(255, 255, 255, .8);
    cursor: pointer;
    text-align: center;
    transition: background-color .15s, transform .15s, box-shadow .15s;
}
.stamp-btn:hover, .comment-form .submit:hover, .find button:hover {
    color: #fff;
    background: var(--red-deep);
    transform: translate(1px, 2px) rotate(-1deg);
    box-shadow: inset 0 0 0 2px var(--red-deep), inset 0 0 0 3px rgba(255, 255, 255, .8), 0 0 0 transparent;
}
.stamp-btn--sm { font-size: .9rem; padding: .45rem .95rem; }

/* ---------- Маркерные метки секций ---------- */
.mark-label {
    display: inline-block;
    margin: 0 0 1.1rem;
    padding: 0 .35rem;
    font-family: var(--text);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ink);
    background-image: linear-gradient(176deg, transparent 50%, rgba(232, 178, 58, .9) 50%, rgba(232, 178, 58, .85) 88%, transparent 88%);
}
.mark-label--light { color: #fff; background-image: linear-gradient(176deg, transparent 72%, rgba(232, 178, 58, .95) 72%, rgba(232, 178, 58, .9) 96%, transparent 96%); }
.big-title { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0 0 1.2rem; letter-spacing: .005em; }
.big-title--light { color: #fff; }

/* ---------- Шапка ---------- */
.cover { background: var(--navy); color: #fff; border-bottom: 6px solid var(--navy-deep); position: relative; }
.cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; background: repeating-linear-gradient(90deg, var(--yellow) 0 34px, transparent 34px 46px); opacity: .55; }
.cover-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; padding: 1.4rem 0; }
.seal-link { flex: 0 0 auto; background: none; display: block; line-height: 0; }
.seal { display: block; width: 62px; height: 62px; transition: transform .3s; }
.seal-link:hover .seal { transform: rotate(-8deg); }
.brand-logo { display: block; max-width: 96px; max-height: 96px; width: auto; }
.cover-title { flex: 1 1 calc(100% - 90px); min-width: 0; }
.site-name { display: block; font-family: var(--head); font-weight: 700; font-size: clamp(1.12rem, 2.6vw, 1.85rem); line-height: 1.2; color: #fff; background: none; overflow-wrap: break-word; hyphens: manual; }
.site-name:hover { color: #fff; }
.site-desc { margin: .45rem 0 0; font-size: .92rem; line-height: 1.45; color: rgba(255, 255, 255, .82); letter-spacing: .015em; max-width: 46rem; }
.nav-toggle { display: inline-flex; align-items: center; gap: .6rem; margin-left: 0; background: transparent; border: 2px solid rgba(255, 255, 255, .7); color: #fff; font-family: var(--head); font-size: 1rem; padding: .45rem .8rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: #fff; 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; }
.topnav { flex: 1 0 100%; display: none; }
.topnav.is-open { display: block; }
.topnav-list { list-style: none; margin: 0; padding: .4rem 0 0; display: flex; flex-direction: column; gap: .2rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.topnav-list a { display: inline-block; padding: .45rem 0; font-family: var(--head); font-weight: 600; font-size: 1.08rem; letter-spacing: .02em; color: #fff; background-image: linear-gradient(transparent 84%, var(--yellow) 84%); background-size: 0 100%; background-repeat: no-repeat; }
.topnav-list a:hover, .topnav-list .current-menu-item > a { color: #fff; background-size: 100% 100%; }
@media (min-width: 600px) {
    .seal { width: 96px; height: 96px; }
    .cover-title { flex-basis: calc(100% - 130px); }
}
@media (min-width: 960px) {
    .cover-row { flex-wrap: nowrap; padding: 1.8rem 0; }
    .cover-title { flex: 1 1 0; }
    .nav-toggle { display: none; }
    .topnav { display: block; flex: 0 0 auto; margin-left: auto; }
    .topnav-list { flex-direction: row; gap: 1.7rem; border: 0; padding: 0; }
}

/* ---------- Хлебные крошки ---------- */
.inner-top { padding-top: 1.6rem; }
.crumbs { font-size: .88rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pencil); }
.crumbs a { color: var(--navy); font-weight: 700; }
.crumbs-sep { color: var(--red); margin: 0 .35rem; }
.crumbs-now { color: var(--ink); }

/* ---------- Полосы главной ---------- */
.sheet { position: relative; padding: 3.2rem 0; }
.sheet--green { background: var(--green-paper) url("images/paper-green.jpg"); background-size: 340px auto; border-top: 1px solid rgba(47, 107, 79, .25); border-bottom: 1px solid rgba(47, 107, 79, .25); box-shadow: 0 6px 10px -8px rgba(34, 32, 28, .4); }
.sheet--warm { background: transparent; }
.sheet--blue { background: var(--blue-paper) url("images/paper-blue.jpg"); background-size: 680px auto; }
.sheet--navy { background-color: var(--navy); background-image: linear-gradient(rgba(31, 58, 95, .965), rgba(31, 58, 95, .965)), url("images/paper-warm.jpg"); background-size: auto, 460px auto; color: #fff; overflow: hidden; }
.sheet-flag { position: absolute; left: 0; top: 2.6rem; width: 22px; height: 104px; background: var(--green); box-shadow: 2px 2px 0 rgba(0, 0, 0, .15); }
.sheet-flag::after { content: ""; position: absolute; inset: 8px 6px; border: 1px dashed rgba(255, 255, 255, .45); }

/* Блок 1 — линейка сумм */
.ruler-row { display: flex; flex-direction: column; gap: 1.6rem; }
.ruler-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; flex: 1 1 auto; min-width: 0; }
.ruler-item { display: flex; flex-direction: column; min-width: 0; }
.ruler-num { display: inline-block; align-self: flex-start; font-family: var(--head); font-weight: 700; font-size: clamp(2.2rem, 4.2vw, 3.5rem); line-height: 1.05; color: var(--red); padding: 0 .2rem; background-image: linear-gradient(177deg, transparent 66%, rgba(232, 178, 58, .9) 66%, rgba(232, 178, 58, .85) 86%, transparent 86%); white-space: nowrap; }
.ruler-cap { margin-top: .55rem; font-size: .86rem; line-height: 1.5; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #4c4a42; max-width: 17rem; }
.ruler-arrow { display: none; }
.check-stamp { position: relative; width: 170px; height: 170px; align-self: center; transform: rotate(-14deg); opacity: .92; flex: 0 0 auto; }
.check-stamp svg { display: block; width: 100%; height: 100%; }
.check-stamp-word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--head); font-weight: 700; font-size: 1.55rem; color: var(--red); background: rgba(207, 222, 201, .92); border: 3px solid var(--red); padding: .05rem .5rem; letter-spacing: .02em; white-space: nowrap; }
@media (min-width: 960px) {
    .ruler-row { flex-direction: row; align-items: center; }
    .ruler-list { flex-direction: row; align-items: flex-start; gap: 1.2rem; }
    .ruler-item { flex: 1 1 auto; }
    .ruler-arrow { display: block; flex: 0 0 56px; padding-top: 1.5rem; }
    .ruler-arrow svg { width: 56px; height: auto; display: block; }
    .check-stamp { width: 190px; height: 190px; }
}

/* Блок 2 — разбор условий */
.terms { padding-bottom: 2.4rem; }
.terms::after { content: ""; position: absolute; left: 7.5%; right: 7.5%; bottom: 0; height: 1px; background: var(--line); }
.terms-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.terms-text { min-width: 0; }
.tick-list { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.tick-list li { position: relative; padding: .3rem 0 .3rem 2.6rem; font-size: 1.12rem; margin-bottom: .35rem; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 26px; height: 26px; background: var(--red); box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgba(255, 255, 255, .7); transform: rotate(-3deg); }
.tick-list li::after { content: ""; position: absolute; left: 7px; top: .55rem; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-48deg); }
.terms-note { font-size: .95rem; color: var(--pencil); border-left: 3px solid var(--yellow); padding-left: .9rem; margin: 0; }
.doc-sheet { position: relative; margin: 0; min-width: 0; padding: 12% 10% 14% 8%; }
.doc-sheet img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; z-index: 0; }
.doc-sheet-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .9rem; }
.doc-sheet-head { font-family: var(--text); font-weight: 700; font-size: .9rem; letter-spacing: .26em; text-transform: uppercase; color: #3a3832; border-bottom: 1px solid rgba(34, 32, 28, .55); align-self: flex-start; padding-bottom: .15rem; transform: rotate(-1.6deg); }
.doc-flow { display: flex; flex-direction: column; align-items: stretch; gap: .45rem; }
.doc-box { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3.4rem; padding: .7rem .8rem; font-family: var(--head); font-weight: 700; font-size: 1rem; line-height: 1.2; text-transform: uppercase; color: var(--ink); box-shadow: 2px 3px 0 rgba(34, 32, 28, .12); transform: rotate(-1.5deg); }
.doc-box--green { background: #A9CFA6; }
.doc-box--blue { background: #B7DDEE; transform: rotate(-.5deg); }
.doc-box--yellow { background: #EFD38A; transform: rotate(-2.2deg); }
.doc-arrow { align-self: center; font-family: var(--head); font-weight: 700; font-size: 1.8rem; line-height: 1; color: var(--green); transform: rotate(90deg); }
@media (min-width: 600px) {
    .doc-sheet { aspect-ratio: 1480 / 800; padding: 11.6% 10% 13.5% 8%; }
    .doc-sheet-body { height: 100%; justify-content: space-between; }
    .doc-flow { flex-direction: row; align-items: center; gap: .4rem; }
    .doc-box { flex: 1 1 0; min-width: 0; min-height: 0; height: 100%; font-size: clamp(.68rem, 1.5vw, .95rem); padding: .5rem .35rem; }
    .doc-flow { height: 62%; }
    .doc-arrow { transform: none; flex: 0 0 auto; font-size: clamp(1.2rem, 2.2vw, 1.9rem); }
}
@media (min-width: 960px) {
    .terms-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 3rem; }
    .doc-box { font-size: clamp(.7rem, .9vw, .95rem); }
}

/* Последние записи и карточки */
.latest { padding-top: 2.6rem; }
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .latest .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--green-paper) url("images/paper-green.jpg");
    background-size: 340px auto;
    border: 1px solid rgba(47, 107, 79, .28);
    box-shadow: 3px 4px 0 rgba(34, 32, 28, .12);
    padding: .9rem 1.2rem 1.2rem;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translate(-2px, -3px) rotate(-.3deg); box-shadow: 6px 8px 0 rgba(34, 32, 28, .14); }
.card-tab { position: absolute; left: -9px; top: 2.2rem; width: 46px; height: 64px; background: var(--yellow); z-index: 2; box-shadow: 2px 2px 0 rgba(0, 0, 0, .12); }
.card.tab-1 .card-tab { background: #6AAE73; }
.card.tab-2 .card-tab { background: #5DA9D6; }
.card-thumb { position: relative; margin: 0 0 1rem; }
.card-thumb a { display: block; background: none; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 732 / 284; object-fit: cover; clip-path: polygon(0 2%, 3% 0, 18% 1.5%, 31% 0, 46% 1.2%, 63% 0, 78% 1.6%, 92% 0, 100% 1.8%, 99.4% 22%, 100% 47%, 99.2% 74%, 100% 98%, 86% 100%, 70% 98.6%, 52% 100%, 37% 98.4%, 21% 100%, 6% 98.8%, 0 100%, .7% 76%, 0 51%, .6% 27%); filter: sepia(.08) saturate(.95); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-title { hyphens: manual; font-family: var(--head); font-weight: 600; font-size: 1.24rem; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .7rem; }
.card-title a { color: var(--ink); background: none; }
.card-title a:hover { color: var(--red); }
.card-excerpt { font-size: 1rem; color: #3a3832; flex: 1; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(34, 32, 28, .2); }
.card-date { font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--pencil); font-weight: 700; }
.card.sticky { border-color: var(--red); }
.card.sticky::after { content: "Закреплено"; position: absolute; right: .8rem; top: .3rem; z-index: 3; font-family: var(--head); font-size: .78rem; color: var(--red); border: 2px solid var(--red); padding: 0 .4rem; background: rgba(247, 243, 234, .9); transform: rotate(6deg); }
.empty-note { font-size: 1.1rem; color: var(--pencil); }

/* Блок 3 — документы в папку */
.folder { padding: 3.4rem 0 3.6rem; }
.folder-inner { position: relative; z-index: 1; }
.folder-pile { display: block; width: 62%; max-width: 300px; margin: 2rem 0 -3.6rem auto; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%); mask-image: linear-gradient(to right, transparent 0, #000 22%); }
.sheet--navy .folder-pile { order: 2; }
.folder { display: flex; flex-direction: column; }
.doc-tiles { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.2rem; }
.doc-tile { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.doc-tile-paper { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 142px; aspect-ratio: 1 / .92; background: var(--white-paper); clip-path: polygon(2% 3%, 12% 0, 27% 2%, 44% 0, 60% 2.5%, 78% 0, 94% 2%, 100% 0, 98.5% 18%, 100% 38%, 98% 58%, 100% 80%, 98.6% 100%, 82% 97.8%, 64% 100%, 46% 98%, 28% 100%, 10% 97.6%, 0 100%, 1.6% 80%, 0 60%, 1.8% 40%, 0 20%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); transition: transform .2s; }
.doc-tile:nth-child(odd) .doc-tile-paper { transform: rotate(-1.5deg); }
.doc-tile:nth-child(even) .doc-tile-paper { transform: rotate(1.2deg); }
.doc-tile:hover .doc-tile-paper { transform: translateY(-4px) rotate(0); }
.doc-tile-cap { margin-top: .9rem; font-size: .82rem; line-height: 1.45; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #fff; }
.folder-note { margin: 2rem 0 0; max-width: 40rem; color: rgba(255, 255, 255, .86); font-size: 1rem; border-left: 3px solid var(--yellow); padding-left: 1rem; }
@media (min-width: 600px) {
    .doc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
    .folder { display: block; }
    .folder-inner { padding-right: 16%; }
    .doc-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .folder-pile { position: absolute; right: 0; top: 0; width: 18%; max-width: 280px; margin: 0; z-index: 0; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20%), linear-gradient(to top, transparent 0, #000 22%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 20%), linear-gradient(to top, transparent 0, #000 22%); mask-composite: intersect; }
}

/* Блок 4 — куда обратиться */
.where-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.4rem; align-items: center; }
.where-left { min-width: 0; }
.office-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
.office { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.office--red { color: var(--red); }
.office--green { color: var(--green); }
.office--blue { color: var(--navy); }
.office-stamp { position: relative; display: block; width: 150px; height: 150px; transition: transform .25s; }
.office:nth-child(1) .office-stamp { transform: rotate(-6deg); }
.office:nth-child(2) .office-stamp { transform: rotate(4deg); }
.office:nth-child(3) .office-stamp { transform: rotate(-3deg); }
.office:hover .office-stamp { transform: rotate(0) scale(1.04); }
.office-stamp svg { display: block; width: 100%; height: 100%; opacity: .88; }
.office-name { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); font-family: var(--head); font-weight: 700; font-size: 1.05rem; line-height: 1; padding: .12rem .45rem; background: var(--blue-paper); white-space: nowrap; }
.office-text { margin-top: .8rem; font-size: .98rem; line-height: 1.5; color: #2e3a40; max-width: 15rem; }
.right-quote { margin: 0; padding: 1.6rem 1.4rem; text-align: center; border-top: 1px solid var(--line); }
.right-quote p { margin: 0 0 1rem; font-family: var(--head); font-weight: 700; font-size: clamp(1.7rem, 3.3vw, 2.5rem); line-height: 1.22; color: var(--navy); }
.right-quote p::after { content: ""; display: block; width: 78%; height: 6px; margin: .7rem auto 0; background: rgba(232, 178, 58, .9); transform: rotate(-1.2deg); }
.right-quote cite { display: inline-block; font-style: normal; font-size: .88rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); }
@media (min-width: 600px) {
    .office-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
}
@media (min-width: 960px) {
    .where-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0; }
    .right-quote { border-top: 0; border-left: 1px solid var(--line); padding: 1.4rem 0 1.4rem 2.4rem; }
}

/* ---------- Внутренние страницы ---------- */
.layout-single { padding: 1.4rem 0 3.4rem; }
.layout-single > .content-area { width: 100%; }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.4rem; padding: 1.4rem 0 3.4rem; }
.content-area { min-width: 0; }
.sidebar { min-width: 0; }
@media (min-width: 960px) {
    .layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); gap: 6%; }
}
.list-head { margin-bottom: 2rem; }
.list-intro { color: var(--pencil); }
.card-grid--list { margin-bottom: 2.4rem; }

.paper-doc { position: relative; background: var(--white-paper); border: 1px solid var(--line); box-shadow: 4px 5px 0 rgba(34, 32, 28, .1); padding: 1.6rem 1.3rem 2rem; }
.paper-doc::before { content: ""; position: absolute; left: -1px; top: 1.6rem; width: 8px; height: 70px; background: var(--red); }
@media (min-width: 600px) { .paper-doc { padding: 2.4rem 2.6rem 2.8rem; } }
.doc-head { margin-bottom: 1.6rem; border-bottom: 1px dashed var(--line); padding-bottom: 1.2rem; }
.doc-rubric { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #fff; background: var(--green); padding: .2rem .7rem; }
.doc-rubric:hover { color: #fff; background: var(--navy); }
.doc-title { margin: .7rem 0 .5rem; }
.doc-date { font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; color: var(--pencil); font-weight: 700; }
.doc-cover { margin: 0 0 1.6rem; }
.doc-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.doc-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.doc-tags a { font-size: .9rem; background: var(--paper-deep); padding: .2rem .6rem; }
.doc-near { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 2rem 0; }
@media (min-width: 600px) { .doc-near { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-near-link { display: block; padding: 1rem 1.2rem; background: var(--green-paper) url("images/paper-green.jpg"); background-size: 340px auto; border: 1px solid rgba(47, 107, 79, .3); font-family: var(--head); font-weight: 600; color: var(--ink); }
.doc-near-link span { display: block; font-family: var(--text); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--pencil); margin-bottom: .3rem; }
.doc-near-link--next { text-align: right; }

/* Текст записи */
.entry > *:first-child { margin-top: 0; }
.entry h2 { padding-bottom: .2rem; background-image: linear-gradient(transparent 82%, rgba(232, 178, 58, .7) 82%); display: inline; }
.entry h2 + * { margin-top: 1rem; }
.entry h2::after { content: ""; display: block; }
.entry ul, .entry ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry ul { list-style: none; padding-left: 0; }
.entry ul li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.entry ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; background: var(--green); transform: rotate(-4deg); }
.entry ol li { margin-bottom: .45rem; }
.entry ol li::marker { font-family: var(--head); font-weight: 700; color: var(--red); }
.entry blockquote { margin: 1.6rem 0; padding: 1.2rem 1.4rem; background: var(--blue-paper); border-left: 5px solid var(--navy); font-size: 1.12rem; }
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .97rem; border: 1px solid var(--line); background: #fff; }
.entry th, .entry td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.entry th { background: var(--navy); color: #fff; font-family: var(--head); font-weight: 600; letter-spacing: .02em; }
.entry tr:nth-child(even) td { background: rgba(207, 222, 201, .35); }
.entry .wp-block-table { overflow-x: auto; }
.entry img { display: block; }
.entry figure { margin: 1.4rem 0; }
.entry figcaption { font-size: .85rem; color: var(--pencil); margin-top: .4rem; }
.entry code { background: var(--paper-deep); padding: .1rem .35rem; font-size: .92em; }
.entry pre { background: var(--navy); color: #fff; padding: 1rem; overflow-x: auto; }
.entry hr { border: 0; border-top: 1px dashed var(--line); margin: 2rem 0; }

/* ---------- Сайдбар ---------- */
.sidebar .widget { position: relative; margin-bottom: 1.8rem; padding: 1.3rem 1.3rem 1.4rem 1.6rem; background: var(--green-paper) url("images/paper-green.jpg"); background-size: 340px auto; border: 1px solid rgba(47, 107, 79, .3); color: var(--ink); box-shadow: 3px 4px 0 rgba(34, 32, 28, .1); }
.sidebar .widget::before { content: ""; position: absolute; left: -1px; top: 1.2rem; width: 7px; height: 44px; background: var(--yellow); }
.sidebar .widget-title { margin: 0 0 .9rem; font-family: var(--text); font-size: .92rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); }
.sidebar .widget-title::after { content: ""; display: block; width: 52px; height: 4px; margin-top: .4rem; background: var(--yellow); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { hyphens: manual; padding: .5rem 0; border-bottom: 1px dashed rgba(34, 32, 28, .22); line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--navy); background: none; font-weight: 700; }
.sidebar a:hover { color: var(--red); }
.sidebar .post-date { display: block; color: var(--pencil); font-size: .8rem; }
.sidebar p { color: var(--ink); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 1.4rem 0; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .8rem; font-family: var(--head); font-weight: 600; color: var(--navy); background: var(--white-paper); border: 1px solid var(--navy); box-shadow: inset 0 0 0 2px var(--white-paper), inset 0 0 0 3px rgba(31, 58, 95, .35); transition: background-color .15s, color .15s, transform .15s; }
.pager a.page-numbers:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.pager .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgba(255, 255, 255, .8); }
.pager .page-numbers.dots { border: 0; box-shadow: none; background: transparent; min-width: auto; padding: 0 .3rem; }

/* ---------- Поиск ---------- */
.find { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0; }
.find-field { flex: 1 1 14rem; min-width: 0; font: inherit; padding: .62rem .8rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0; }
.find-field::placeholder { color: var(--pencil); }

/* ---------- Комментарии ---------- */
.notes { margin-top: 2.4rem; }
.notes-title, .comment-reply-title { font-size: 1.5rem; }
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { padding-left: 1.4rem; border-left: 2px solid var(--line); }
.note-body { background: var(--white-paper); border: 1px solid var(--line); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.note-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.note-head img { display: block; border-radius: 50%; }
.note-author { display: block; font-weight: 700; }
.note-date { font-size: .8rem; letter-spacing: .14em; color: var(--pencil); }
.note-wait { font-style: italic; color: var(--red); }
.note-reply a { font-size: .9rem; font-weight: 700; }
.notes-nav { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.comment-respond { background: var(--white-paper); border: 1px solid var(--line); padding: 1.4rem 1.3rem; margin-top: 1.6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .92rem; }
.form-note { font-size: .92rem; color: var(--pencil); }
.req { color: var(--red); }

/* ---------- 404 ---------- */
.lost { position: relative; background: var(--white-paper); border: 1px solid var(--line); padding: 2.2rem 1.4rem; box-shadow: 4px 5px 0 rgba(34, 32, 28, .1); }
.lost-stamp { display: inline-flex; align-items: center; justify-content: center; width: 130px; height: 130px; border-radius: 50%; border: 5px double var(--red); color: var(--red); font-family: var(--head); font-weight: 700; font-size: 2.6rem; transform: rotate(-12deg); margin-bottom: 1rem; }
@media (min-width: 600px) { .lost { padding: 3rem 3rem; } }

/* ---------- Подвал ---------- */
.base { background: var(--navy); color: #fff; padding: 2.8rem 0 1.4rem; border-top: 6px solid var(--navy-deep); }
.base-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.base-col { min-width: 0; }
.base .widget { color: rgba(255, 255, 255, .88); }
.base .widget-title { margin: 0 0 .8rem; font-family: var(--text); font-size: .95rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.base .widget p, .base .textwidget { color: rgba(255, 255, 255, .86); font-size: .98rem; }
.base a { color: #fff; background-image: linear-gradient(transparent 88%, rgba(232, 178, 58, .9) 88%); background-size: 0 100%; background-repeat: no-repeat; }
.base a:hover { color: #fff; background-size: 100% 100%; }
.base ul { list-style: none; margin: 0; padding: 0; }
.base li { position: relative; padding: .28rem 0 .28rem 1.1rem; }
.base li::before { content: "›"; position: absolute; left: 0; top: .2rem; color: var(--yellow); font-weight: 700; }
.base-copy { margin: 2.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .22); text-align: center; font-size: .86rem; color: rgba(255, 255, 255, .78); }
@media (min-width: 960px) {
    .base-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
    .base-col { padding: 0 2.2rem; border-left: 1px solid rgba(255, 255, 255, .2); }
    .base-col:first-child { padding-left: 0; border-left: 0; }
    .base-col:last-child { padding-right: 0; }
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--navy-deep); color: #fff; border-top: 4px solid var(--yellow); box-shadow: 0 -6px 18px rgba(0, 0, 0, .25); }
.cookie-inner { width: min(92%, 1180px); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.4rem; padding: 1rem 0; }
.cookie-inner p { margin: 0; flex: 1 1 18rem; font-size: .95rem; color: rgba(255, 255, 255, .92); }

/* ---------- Мелкие экраны ---------- */
@media (max-width: 600px) {
    .sheet { padding: 2.4rem 0; }
    .folder { padding-bottom: 3.6rem; }
    .sheet-flag { width: 12px; height: 70px; }
    .card { padding: .8rem 1rem 1.1rem; }
    .card-tab { width: 34px; height: 48px; left: -7px; }
    .right-quote { padding: 1.4rem 1rem; }
    .comment-respond { padding: 1.2rem 1rem; }
}

/* ---------- WordPress ---------- */
.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .85rem; color: var(--pencil); }
.bypostauthor > .note-body { border-left: 4px solid var(--green); }
.gallery-caption { font-size: .85rem; }
.sticky { position: relative; }
