/*
Theme Name: dds_investorschoicestpete.com
Theme URI: https://investorschoicestpete.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: kvitaudit
*/

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

/* ---------- Переменные ---------- */
:root {
    --page: #1E2227;
    --page-grid: #2C333A;
    --head: #16191D;
    --panel: #252A30;
    --paper: #E8E1D1;
    --paper-lite: #F3EEE2;
    --paper-grid: #C9BFA8;
    --ink: #22262B;
    --mute-paper: #5F6873;
    --mute-dark: #9AA3AD;
    --red: #C8452D;
    --red-deep: #A3361F;
    --yellow: #F2C94C;
    --green: #4E8F5B;
    --steel: #6B7480;
    --line-dark: #3A424B;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    --f-mono: "IBM Plex Mono", "PT Mono", "Courier New", Consolas, monospace;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --paper-tex: linear-gradient(rgba(201, 191, 168, .55) 1px, transparent 1px), linear-gradient(90deg, rgba(201, 191, 168, .55) 1px, transparent 1px);
    --perf: radial-gradient(circle, var(--page) 3.4px, transparent 3.9px);
}

/* ---------- Сброс и база ---------- */
*, *::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-mono);
    font-size: 15px;
    line-height: 1.65;
    color: var(--paper);
    background-color: var(--page);
    background-image:
        linear-gradient(rgba(44, 51, 58, .9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 51, 58, .9) 1px, transparent 1px),
        linear-gradient(rgba(44, 51, 58, .38) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 51, 58, .38) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 700; line-height: 1.12; margin: 0 0 .6em; }
p, li, h1, h2, h3, h4, td, th, dd, blockquote, figcaption, .card-title, .brand-name, .brand-desc { overflow-wrap: break-word; hyphens: auto; }
.mega-title, .big-quote, .doc-sheet__title, .stamp-mark, .sticky-note, .hand-note, .nf-sheet__code { hyphens: manual; }
button { font: inherit; }
:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 3px; }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-to {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--yellow); color: var(--ink); padding: .6rem 1rem; font-family: var(--f-head); text-decoration: none;
}
.skip-to:focus { top: 1rem; }

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

/* ---------- Общие элементы ---------- */
.mega-title {
    display: inline-block;
    max-width: 100%;
    position: relative;
    margin: 0 0 1.6rem;
    padding-bottom: .55rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(2rem, 5.2vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: .015em;
    text-transform: uppercase;
    color: var(--paper);
}
.mega-title::after {
    content: "";
    position: absolute; left: -.2rem; right: -.4rem; bottom: 0; height: 6px;
    background: var(--red);
    border-radius: 3px 1px 4px 1px;
    transform: rotate(-.4deg);
}
.mega-title--ink { color: var(--ink); }
.mega-title--plain { text-transform: none; font-size: clamp(1.9rem, 3.8vw, 3.3rem); letter-spacing: .005em; }

.wavy-link, .entry-content a, .card-excerpt a, .crumbs a:hover, .widget a:hover, .notes a {
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: var(--red);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}
.wavy-link { color: var(--paper); font-weight: 600; }
.wavy-link:hover { color: var(--yellow); }

.hand-note { font-family: var(--f-hand); font-weight: 600; color: var(--red); line-height: 1; }

.stamp-btn {
    display: inline-block;
    padding: .55rem 1.15rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: #fff;
    background: var(--red);
    border: 2px solid var(--red);
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: 0;
    cursor: pointer;
    transform: rotate(-1deg);
    transition: transform .15s ease, background-color .15s ease, outline-color .15s ease;
}
.stamp-btn:hover { background: var(--red-deep); border-color: var(--red-deep); transform: rotate(0) translate(1px, 1px); }
.stamp-btn:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 4px; }
.stamp-btn--ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.stamp-btn--ghost:hover { background: var(--red); color: #fff; }
.stamp-btn--sm { padding: .4rem .8rem; font-size: .85rem; }

.stamp-mark {
    display: inline-block;
    padding: .15em .45em;
    font-family: var(--f-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--red);
    border: 5px solid var(--red);
    outline: 2px solid var(--red);
    outline-offset: 4px;
    opacity: .88;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.empty-note { color: var(--mute-dark); font-size: .95rem; }
.empty-note--ink { color: var(--ink); }

/* бумажные листы */
.sheet { padding: 2.2rem 0; }
.sheet__inner {
    position: relative;
    padding: 3rem 3rem 2.6rem;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--paper-tex);
    background-size: 18px 18px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.sheet--perf .sheet__inner::before,
.card::before,
.doc-sheet::before {
    content: "";
    position: absolute; top: 6px; left: 10px; right: 10px; height: 10px;
    background: var(--perf) 0 50% / 15px 10px repeat-x;
}
.band { padding: 3.4rem 0; }

/* ---------- Шапка ---------- */
.ledger-head {
    position: relative;
    background-color: var(--head);
    background-image: linear-gradient(rgba(58, 66, 75, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(58, 66, 75, .35) 1px, transparent 1px);
    background-size: 12px 12px;
    border-bottom: 3px solid var(--red);
}
.ledger-head__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.6rem 0 1.5rem;
}
.brand { display: flex; align-items: flex-start; gap: 1.3rem; min-width: 0; flex: 1 1 auto; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-stamp { display: block; width: 88px; height: 88px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); transform: rotate(-6deg); }
.brand-logo { display: block; max-width: 96px; max-height: 96px; width: auto; height: auto; }
.brand-text { min-width: 0; max-width: 40rem; }
.brand-name { margin: 0 0 .55rem; font-family: var(--f-head); font-weight: 500; font-size: 1.02rem; line-height: 1.35; letter-spacing: .01em; color: var(--paper); }
.brand-name a { text-decoration: none; }
.brand-name a:hover { color: #fff; }
.brand-desc { margin: 0; font-family: var(--f-mono); font-size: .76rem; line-height: 1.55; color: var(--mute-dark); }

.ledger-nav { flex: 0 0 auto; padding-top: .2rem; }
.ledger-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.ledger-nav__list li { display: flex; align-items: center; }
.ledger-nav__list li + li::before { content: ""; width: 1px; height: 1.1rem; background: var(--line-dark); margin: 0 .95rem; }
.ledger-nav__list a {
    font-family: var(--f-head); font-weight: 500; font-size: 1rem; letter-spacing: .07em;
    text-transform: uppercase; text-decoration: none; color: var(--paper);
    padding: .25rem 0; border-bottom: 2px solid transparent;
}
.ledger-nav__list a:hover, .ledger-nav__list .current-menu-item > a, .ledger-nav__list .current_page_item > a { color: #fff; border-bottom-color: var(--red); }

.menu-toggle {
    display: none;
    align-items: center; gap: .55rem;
    background: transparent; color: var(--paper);
    border: 2px solid var(--line-dark); outline: 1px solid var(--line-dark); outline-offset: 2px;
    padding: .45rem .8rem; cursor: pointer;
    font-family: var(--f-head); text-transform: uppercase; letter-spacing: .08em;
}
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }

/* ---------- Блок 1: разбор квитанции ---------- */
.fr-lines { padding-top: 2.4rem; }
.fr-lines__inner { padding-top: 3.2rem; }
.fr-lines__aside { min-width: 0; }
.fr-lines__stamp { display: table; margin: 0 .6rem 2.4rem auto; font-size: clamp(1.3rem, 2.4vw, 2.2rem); transform: rotate(-8deg); }
.fr-lines__lead { max-width: 46rem; margin: -.4rem 0 2rem; font-size: .92rem; color: var(--ink); }
.fr-lines__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 4.5rem; align-items: end; }
.bill { position: relative; margin: 0; min-width: 0; transform: rotate(-.6deg); filter: drop-shadow(0 8px 10px rgba(34, 38, 43, .28)); }
.bill__paper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.bill__print { position: relative; padding: 6% 6.5% 5.5% 6.5%; color: #2B2F33; }
.bill__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .9rem; }
.bill__title { font-family: var(--f-mono); font-weight: 600; font-size: clamp(.85rem, 1.5vw, 1.1rem); letter-spacing: .04em; text-transform: uppercase; }
.bill__num { font-family: var(--f-mono); font-size: .72rem; text-align: right; line-height: 1.35; color: #4A5058; }
.bill__table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: clamp(.66rem, 1.05vw, .82rem); line-height: 1.25; }
.bill__table th, .bill__table td { border: 1.5px solid #3B4045; padding: .42em .55em; text-align: right; white-space: nowrap; }
.bill__table th { font-weight: 600; text-align: center; }
.bill__table td:first-child, .bill__table th:first-child { text-align: left; white-space: normal; }
.bill__table td:nth-child(2) { text-align: center; }
.bill__table tfoot td { font-weight: 600; }
.bill__table tfoot td:first-child { text-align: left; }

.bill-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; min-width: 0; }
.bill-legend li { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: baseline; padding-left: 1.6rem; }
.bill-legend li::before {
    content: ""; position: absolute; left: 0; top: .48em; width: 14px; height: 14px;
    border: 2px solid var(--red); border-radius: 50%; background: var(--paper);
}
.bill-legend li::after {
    content: ""; position: absolute; right: 100%; top: calc(.48em + 6px); width: 3.6rem; height: 1.5px;
    background: linear-gradient(90deg, rgba(200, 69, 45, .2), var(--red));
}
.bill-legend__name { font-family: var(--f-head); font-weight: 500; font-size: 1.15rem; color: var(--ink); }
.bill-legend .hand-note { font-size: 1.45rem; }
.bill-legend__hint { grid-column: 1 / -1; font-size: .78rem; color: var(--mute-paper); }

/* ---------- Блок 2: кубометры ---------- */
.fr-flow { padding-top: 3rem; }
.fr-flow__grid { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 4rem; align-items: start; }
.fr-flow__main { min-width: 0; }
.fr-flow__big { display: flex; align-items: flex-end; gap: 1.4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.fr-flow__big span { font-family: var(--f-head); font-weight: 700; font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: .9; color: #fff; }
.fr-flow__big small { max-width: 22rem; font-size: .8rem; line-height: 1.5; color: var(--mute-dark); padding-bottom: .4rem; }
.flow-bar { display: flex; height: 46px; box-shadow: 0 0 0 1px var(--line-dark), 0 6px 0 rgba(0, 0, 0, .25); }
.flow-bar__seg { display: block; min-width: 0; height: 100%; flex-grow: 0; flex-shrink: 1; }
.flow-bar__seg + .flow-bar__seg { box-shadow: inset 2px 0 0 rgba(22, 25, 29, .35); }
.flow-bar__seg--heat, .dot--heat { background: var(--red); }
.flow-bar__seg--water, .dot--water { background: var(--yellow); }
.flow-bar__seg--light, .dot--light { background: var(--green); }
.flow-bar__seg--keep, .dot--keep { background: var(--steel); }
.flow-legend { display: flex; margin: .9rem 0 1.6rem; font-size: .84rem; color: var(--paper); }
.flow-legend span { display: flex; align-items: center; justify-content: center; gap: .45rem; min-width: 0; flex-grow: 0; flex-shrink: 1; text-align: center; }
.dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 auto; }
.fr-flow__note { max-width: 42rem; font-size: .88rem; color: var(--mute-dark); }

.stickies { display: grid; gap: 1rem; padding-top: .4rem; }
.sticky-note {
    margin: 0;
    padding: 1.15rem 1.1rem 1.25rem;
    font-family: var(--f-hand); font-weight: 600; font-size: 1.75rem; line-height: 1.05;
    text-align: center; color: #1B1D20;
    background: var(--yellow);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(0, 0, 0, .04));
    box-shadow: 0 10px 16px -6px rgba(0, 0, 0, .55);
}
.sticky-note:nth-child(1) { transform: rotate(-3deg); }
.sticky-note:nth-child(2) { transform: rotate(2deg) translateX(.6rem); }
.sticky-note:nth-child(3) { transform: rotate(-1.5deg) translateX(.2rem); }

/* ---------- Последние записи / карточки ---------- */
.fr-latest { padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.fr-latest__more { margin: 2.2rem 0 0; text-align: center; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 1.75rem 0 0;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--paper-tex);
    background-size: 18px 18px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .32);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card::after { content: ""; position: absolute; top: 0; bottom: 0; left: 14px; width: 2px; background: var(--red); opacity: .8; }
.card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 16px 28px rgba(0, 0, 0, .4); }
.card-thumb { margin: 0 1.1rem 0 1.75rem; position: relative; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; filter: saturate(.85) contrast(1.03); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1.05rem 1.1rem 1.2rem 1.75rem; }
.card-pin { align-self: flex-start; margin-bottom: .5rem; padding: .1rem .5rem; font-family: var(--f-head); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; background: var(--yellow); color: var(--ink); }
.card-title { margin: 0 0 .65rem; font-family: var(--f-head); font-weight: 500; font-size: 1.32rem; line-height: 1.22; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-title a:hover { color: var(--red); }
.card-excerpt { font-size: .8rem; line-height: 1.6; color: #3E444B; margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.card-date { font-size: .78rem; color: var(--mute-paper); letter-spacing: .04em; }
.card .stamp-btn { transform: rotate(-3deg); }
.card .stamp-btn:hover { transform: rotate(0) translate(1px, 1px); }

/* ---------- Блок 3: календарь ---------- */
.fr-cal__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); gap: 3rem; }
.fr-cal__main { min-width: 0; }
.months {
    list-style: none; margin: .4rem 0 0; padding: 0 0 3.6rem;
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .55rem;
}
.months li { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.months__cell {
    display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 5;
    font-size: .8rem; color: var(--mute-paper);
    background: rgba(243, 238, 226, .7); border: 1.5px solid #B9AE95;
}
.months li.is-marked .months__cell { color: var(--ink); font-weight: 600; border: 3px solid var(--red); box-shadow: inset 0 0 0 1px rgba(200, 69, 45, .35); }
.months .hand-note { position: absolute; top: calc(100% + .45rem); left: 50%; width: 5.4em; transform: translateX(-50%) rotate(-3deg); text-align: center; font-size: 1.35rem; line-height: .95; }
.fr-cal__hint { font-size: .8rem; color: var(--mute-paper); margin: 0; }
.fr-cal__side { min-width: 0; padding-left: 2rem; border-left: 1.5px solid #A99D84; display: grid; gap: 1.6rem; align-content: center; }
.check-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; align-items: start; }
.check-row p { margin: 0; font-size: .86rem; line-height: 1.6; }
.check-stamp { display: block; transform: rotate(-6deg); }

/* ---------- Блок 4: документы ---------- */
.fr-docs { padding-bottom: 4.4rem; }
.fr-docs__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.doc-fan { position: relative; margin: 0; min-width: 0; }
.doc-fan img { display: block; width: 100%; height: auto; }
.doc-fan__tag {
    position: absolute;
    transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
    padding: .05em .45em;
    font-family: var(--f-head); font-weight: 700; font-size: clamp(.58rem, 1.35vw, 1.05rem); letter-spacing: .02em;
    color: var(--red); white-space: nowrap;
    border: 2.5px solid var(--red); outline: 1px solid var(--red); outline-offset: 2px;
    background: rgba(255, 255, 255, .25);
    mix-blend-mode: multiply;
}
.fr-docs__quote { min-width: 0; }
.big-quote {
    display: inline-block; position: relative; margin: 0 0 1.6rem; padding-bottom: .9rem;
    font-family: var(--f-head); font-weight: 700; font-size: clamp(2.8rem, 5.6vw, 5rem); line-height: .98; color: var(--paper);
}
.big-quote::after { content: ""; position: absolute; left: 0; right: -.5rem; bottom: 0; height: 6px; background: var(--red); border-radius: 3px 1px 4px 1px; transform: rotate(-.6deg); }
.fr-docs__text { font-size: .88rem; color: var(--mute-dark); margin-bottom: 1.4rem; }

/* ---------- Внутренние страницы ---------- */
.inner-wrap { padding: 2rem 0 4.5rem; }
.crumbs { margin-bottom: 1.8rem; font-size: .8rem; color: var(--mute-dark); }
.crumbs a { color: var(--paper); text-decoration: none; }
.crumbs-sep { color: var(--red); margin: 0 .35rem; }
.crumbs-current { color: var(--mute-dark); }

.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); column-gap: 6%; align-items: start; }
.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 1.8rem; }
.page-head__title { font-size: clamp(2rem, 4.6vw, 3.8rem); }
.page-head__sub { color: var(--mute-dark); font-size: .9rem; margin: -.6rem 0 0; }
.page-head__intro { color: var(--paper); }
.card-grid--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-with-sidebar .card-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sheet-box { padding: 2rem 2rem; background-color: var(--paper); background-image: var(--paper-tex); background-size: 18px 18px; color: var(--ink); }

.doc-sheet {
    position: relative;
    padding: 3.4rem 3.2rem 3rem 3.6rem;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--paper-tex);
    background-size: 18px 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}
.doc-sheet::after { content: ""; position: absolute; top: 0; bottom: 0; left: 1.8rem; width: 2px; background: var(--red); opacity: .75; }
.doc-sheet__head { margin-bottom: 1.8rem; }
.doc-sheet__title {
    display: inline-block; position: relative; margin: 0 0 1.1rem; padding-bottom: .5rem;
    font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; color: var(--ink);
}
.doc-sheet__title::after { content: ""; position: absolute; left: 0; right: -.3rem; bottom: 0; height: 5px; background: var(--red); border-radius: 3px 1px 3px 1px; transform: rotate(-.4deg); }
.doc-sheet__meta { display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; font-size: .8rem; }
.date-stamp { display: inline-block; padding: .15rem .55rem; border: 2px solid var(--red); color: var(--red); font-weight: 600; letter-spacing: .06em; transform: rotate(-2deg); }
.doc-sheet__cats a { margin-right: .6rem; color: var(--ink); text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: var(--red); text-underline-offset: 4px; }
.doc-sheet__cover { margin: 0 0 2rem; }
.doc-sheet__cover img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.doc-sheet__tags { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px dashed #A99D84; display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .82rem; }
.doc-sheet__tags a { color: var(--red); text-decoration: none; }
.doc-sheet__tags a:hover { text-decoration: underline; }

/* типографика записи */
.entry-content { font-size: .95rem; line-height: 1.75; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 { font-size: 1.85rem; margin: 2rem 0 .8rem; text-transform: uppercase; letter-spacing: .01em; }
.entry-content h3 { font-size: 1.4rem; margin: 1.7rem 0 .6rem; }
.entry-content h4 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.entry-content a { color: var(--ink); }
.entry-content a:hover { color: var(--red); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.entry-content li { margin-bottom: .4em; }
.entry-content ul li::marker { color: var(--red); content: "■  "; font-size: .8em; }
.entry-content ol li::marker { color: var(--red); font-weight: 600; }
.entry-content blockquote {
    margin: 1.8rem 0; padding: 1.2rem 1.5rem 1.2rem 1.6rem;
    background: rgba(242, 201, 76, .38); border-left: 5px solid var(--red);
    font-size: 1rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-size: .8rem; color: var(--mute-paper); font-style: normal; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .86rem; background: rgba(243, 238, 226, .8); }
.entry-content th, .entry-content td { border: 1px solid var(--ink); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.entry-content th { background: #D9CFB9; font-weight: 600; }
.entry-content .wp-block-table { overflow-x: auto; margin: 1.6rem 0; }
.entry-content .wp-block-table table { margin: 0; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.8rem 0; }
.entry-content figcaption { font-size: .78rem; color: var(--mute-paper); margin-top: .5rem; }
.entry-content pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--ink); color: var(--paper); font-size: .85rem; }
.entry-content code { background: rgba(34, 38, 43, .08); padding: .1em .3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 2px dashed #A99D84; margin: 2rem 0; }
.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .78rem; color: var(--mute-paper); }

.post-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; margin: 2rem 0; }
.post-steps__link { display: block; padding: 1rem 1.2rem; color: var(--paper); text-decoration: none; border: 1.5px solid var(--line-dark); background: var(--panel); font-family: var(--f-head); font-size: 1.05rem; line-height: 1.3; }
.post-steps__link span { display: block; font-family: var(--f-mono); font-size: .74rem; color: var(--mute-dark); margin-bottom: .3rem; }
.post-steps__link:hover { border-color: var(--red); }
.post-steps__link--next { text-align: right; grid-column: 2; }

/* 404 */
.nf-sheet { overflow: hidden; }
.nf-sheet__stamp { position: absolute; top: 2.4rem; right: 2.4rem; font-size: clamp(1.1rem, 2.6vw, 2rem); transform: rotate(-10deg); }
.nf-sheet__code { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: clamp(5rem, 14vw, 9rem); line-height: .9; color: var(--red); }

/* ---------- Форма поиска ---------- */
.search-line { display: flex; gap: .9rem; align-items: stretch; margin: 1.4rem 0; }
.search-line__field {
    flex: 1 1 auto; min-width: 0;
    padding: .65rem .85rem; font-family: var(--f-mono); font-size: .9rem; color: var(--ink);
    background: var(--paper-lite); border: 2px solid var(--ink); border-radius: 0;
}
.search-line__field::placeholder { color: #7A818A; }
.search-line__btn { transform: none; }

/* ---------- Пагинация ---------- */
.ledger-pages { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2.6rem 0 0; }
.ledger-pages .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.7rem; height: 2.7rem; padding: 0 .8rem;
    font-family: var(--f-head); font-weight: 500; font-size: 1rem; letter-spacing: .04em;
    color: var(--paper); text-decoration: none;
    background: var(--head); border: 2px solid var(--line-dark);
}
.ledger-pages a.page-numbers:hover { border-color: var(--red); color: #fff; }
.ledger-pages .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; outline: 1px solid var(--red); outline-offset: 2px; }
.ledger-pages .page-numbers.dots { background: none; border: 0; min-width: 1.5rem; padding: 0; }
.doc-sheet .ledger-pages .page-numbers { background: var(--paper-lite); color: var(--ink); border-color: var(--ink); }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; display: grid; gap: 1.6rem; }
.sidebar .widget {
    position: relative; padding: 2.3rem 1.4rem 1.4rem;
    background: var(--panel); border: 1.5px solid var(--line-dark);
    color: var(--paper); font-size: .86rem;
}
.sidebar .widget-title {
    position: absolute; top: -.9rem; left: 1rem; margin: 0;
    padding: .3rem .8rem; font-family: var(--f-head); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink); background: var(--yellow); transform: rotate(-2deg);
    box-shadow: 0 6px 10px -4px rgba(0, 0, 0, .5);
}
.sidebar .widget a { color: var(--paper); text-decoration: none; }
.sidebar .widget a:hover { color: #fff; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .6rem 0; border-bottom: 1px dashed var(--line-dark); line-height: 1.45; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date, .sidebar .widget .rss-date { display: block; color: var(--mute-dark); font-size: .75rem; }
.sidebar .widget p { color: var(--paper); }
.sidebar .search-line__field { background: var(--paper); }

/* ---------- Подвал ---------- */
.ledger-foot {
    background-color: var(--head);
    background-image: linear-gradient(rgba(58, 66, 75, .3) 1px, transparent 1px), linear-gradient(90deg, rgba(58, 66, 75, .3) 1px, transparent 1px);
    background-size: 12px 12px;
    border-top: 1px solid var(--line-dark);
    color: var(--mute-dark);
}
.ledger-foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3.2rem 0 2.6rem; }
.ledger-foot__col { min-width: 0; padding: 0 2.4rem; border-left: 1px solid var(--line-dark); }
.ledger-foot__col:first-child { padding-left: 0; border-left: 0; }
.ledger-foot__col:last-child { padding-right: 0; }
.ledger-foot .widget { margin-bottom: 1.4rem; font-size: .84rem; color: var(--mute-dark); }
.ledger-foot .widget:last-child { margin-bottom: 0; }
.ledger-foot .widget-title { margin: 0 0 .8rem; font-family: var(--f-head); font-weight: 500; font-size: 1.35rem; letter-spacing: .02em; color: var(--paper); }
.ledger-foot .widget p { color: var(--mute-dark); }
.ledger-foot .widget a { color: #C9CFD6; text-decoration: none; }
.ledger-foot .widget a:hover { color: #fff; }
.ledger-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.ledger-foot .widget li { position: relative; padding: .28rem 0 .28rem 1.1rem; }
.ledger-foot .widget li::before { content: "›"; position: absolute; left: 0; color: var(--red); font-weight: 600; }
.ledger-foot .widget .post-date { display: block; color: var(--mute-dark); font-size: .74rem; }
.ledger-foot__copy { border-top: 1px solid var(--line-dark); padding: 1.3rem 0; }
.ledger-foot__copy p { margin: 0; text-align: center; font-size: .76rem; color: var(--mute-dark); }

/* ---------- Комментарии ---------- */
.notes {
    position: relative; margin-top: 2.2rem; padding: 2.4rem 2.6rem;
    color: var(--ink); background-color: var(--paper); background-image: var(--paper-tex); background-size: 18px 18px;
}
.notes__title, .notes .comment-reply-title { font-family: var(--f-head); font-size: 1.6rem; text-transform: uppercase; margin: 0 0 1.2rem; }
.notes__list, .notes__list .children { list-style: none; margin: 0; padding: 0; }
.notes__list .children { padding-left: 2rem; border-left: 2px solid rgba(200, 69, 45, .5); margin-left: .6rem; }
.note-body { padding: 1rem 0 1.1rem; border-bottom: 1px dashed #A99D84; }
.note-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.note-head img { display: block; border-radius: 0; border: 2px solid var(--ink); }
.note-meta { display: flex; flex-direction: column; font-size: .78rem; }
.note-author { font-family: var(--f-head); font-size: 1.05rem; }
.note-meta time { color: var(--mute-paper); }
.note-wait { font-size: .8rem; color: var(--red); }
.note-text { font-size: .9rem; }
.note-reply a { font-size: .8rem; color: var(--red); font-weight: 600; text-decoration: none; }
.notes .comment-respond { margin-top: 1.8rem; }
.notes .comment-form p { margin: 0 0 1rem; }
.notes label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .3rem; }
.notes input[type="text"], .notes input[type="email"], .notes input[type="url"], .notes textarea {
    width: 100%; padding: .6rem .75rem; font-family: var(--f-mono); font-size: .9rem; color: var(--ink);
    background: var(--paper-lite); border: 2px solid var(--ink); border-radius: 0;
}
.notes .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.notes .comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.form-note { font-size: .8rem; color: var(--mute-paper); }
.req { color: var(--red); }
.notes .form-submit { margin-top: 1.4rem; }
.notes .comments-pagination, .notes .comment-navigation { margin: 1rem 0; font-size: .85rem; }
.notes .nav-links { display: flex; justify-content: space-between; gap: 1rem; }

/* ---------- Cookie-баннер ---------- */
.cookie-note[hidden] { display: none !important; }
.cookie-note {
    position: fixed; z-index: 90; left: 1rem; right: 1rem; bottom: 1rem;
    max-width: 640px; margin-left: auto; margin-right: auto;
    display: flex; align-items: center; gap: 1.2rem;
    padding: 1.1rem 1.3rem;
    color: var(--ink); background: var(--yellow);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
    transform: rotate(-.4deg);
}
.cookie-note__text { margin: 0; font-size: .8rem; line-height: 1.5; min-width: 0; }
.cookie-note__btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .ledger-head__row { flex-wrap: wrap; gap: 1rem; }
    .brand { flex: 1 1 calc(100% - 9rem); }
    .menu-toggle { display: inline-flex; }
    .ledger-nav { flex: 1 1 100%; display: none; padding-top: 0; }
    .ledger-nav.is-open { display: block; }
    .ledger-nav__list { flex-direction: column; align-items: stretch; border-top: 1px solid var(--line-dark); }
    .ledger-nav__list li { display: block; border-bottom: 1px solid var(--line-dark); }
    .ledger-nav__list li + li::before { display: none; }
    .ledger-nav__list a { display: block; padding: .8rem 0; border-bottom: 0; }

    .front .shell { width: min(92%, 1240px); }
    .fr-lines__grid { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .bill-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2rem; }
    .bill-legend li::after { display: none; }
    .fr-flow__grid { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .stickies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sticky-note { font-size: 1.45rem; }
    .card-grid, .card-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fr-cal__inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .fr-cal__side { padding-left: 0; border-left: 0; padding-top: 1.6rem; border-top: 1.5px solid #A99D84; }
    .months { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 3.8rem; }
    .fr-docs__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
    .layout-single > .content-area { width: 100%; }
    .ledger-foot__cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .ledger-foot__col { padding: 0; border-left: 0; }
    .ledger-foot__col + .ledger-foot__col { padding-top: 2rem; border-top: 1px solid var(--line-dark); }
}

@media (max-width: 600px) {
    body { font-size: 14px; }
    .brand { gap: .9rem; flex-basis: 100%; }
    .brand-stamp { width: 60px; height: 60px; }
    .brand-name { font-size: .92rem; }
    .brand-desc { font-size: .7rem; }
    .ledger-head__row { padding: 1.1rem 0; }
    .menu-toggle { margin-left: auto; }

    .sheet { padding: 1.4rem 0; }
    .sheet__inner { padding: 2.4rem 1.2rem 1.8rem; }
    .band { padding: 2.4rem 0; }
    .fr-lines__stamp { font-size: 1.2rem; border-width: 3px; margin-right: .4rem; }
    .bill { transform: none; }
    .bill__print { padding: 7% 5% 6%; }
    .bill__table { font-size: .58rem; }
    .bill__table th, .bill__table td { padding: .35em .3em; }
    .bill__num { font-size: .6rem; }
    .bill-legend { grid-template-columns: minmax(0, 1fr); }
    .fr-flow__big span { font-size: 3.4rem; }
    .flow-bar { height: 34px; }
    .flow-legend { flex-wrap: wrap; gap: .4rem 1rem; }
    .flow-legend span { flex-basis: auto !important; }
    .stickies { grid-template-columns: minmax(0, 1fr); }
    .sticky-note { font-size: 1.5rem; padding: .9rem 1rem; }
    .card-grid, .card-grid--list, .layout-with-sidebar .card-grid--list { grid-template-columns: minmax(0, 1fr); }
    .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .months .hand-note { font-size: 1.15rem; width: 5.6em; }
    .check-row { grid-template-columns: 36px minmax(0, 1fr); }
    .check-stamp { width: 36px; height: 36px; }
    .doc-fan__tag { border-width: 1.5px; outline: 0; padding: 0 .3em; }
    .doc-sheet { padding: 2.6rem 1.2rem 2rem 2rem; }
    .doc-sheet::after { left: 1rem; }
    .notes { padding: 2rem 1.2rem; }
    .notes__list .children { padding-left: 1rem; }
    .sheet-box { padding: 1.4rem 1.2rem; }
    .search-line { flex-direction: column; }
    .post-steps { grid-template-columns: minmax(0, 1fr); }
    .post-steps__link--next { grid-column: auto; }
    .nf-sheet__stamp { top: 1.6rem; right: 1rem; }
    .cookie-note { flex-direction: column; align-items: flex-start; gap: .8rem; padding: 1rem; transform: none; }
}
