/*
Theme Name: dds_lightsonchiropracticyucaipa.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: aptkv
*/

/* ---------- Шрифты ---------- */
@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: 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+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+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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Палитра ---------- */
:root {
    --paper: #EDE8DC;
    --paper-light: #F4F1E8;
    --grid: #B9AE97;
    --ink: #22252A;
    --muted: #8A8172;
    --muted-dark: #6B6356;
    --blue: #2F5DA8;
    --blue-deep: #24497F;
    --blue-line: #9DB3D6;
    --orange: #E0592A;
    --orange-dark: #C44816;
    --night: #1E2A38;
    --night-deep: #16202B;
    --tracing: rgba(47, 93, 168, 0.07);
    --tracing-strong: rgba(47, 93, 168, 0.12);
    --line: rgba(47, 93, 168, 0.55);
    --head-font: "Oswald", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    --body-font: "PT Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Скрытие по атрибуту hidden (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
.topnav[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; } }

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--body-font);
    font-size: 1.0625rem;
    line-height: 1.65;
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(185, 174, 151, 0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 174, 151, 0.45) 1px, transparent 1px),
        linear-gradient(rgba(185, 174, 151, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 174, 151, 0.18) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
}

p, li, dd, td, th, h1, h2, h3, h4, h5, h6, a, span, figcaption, blockquote {
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--head-font);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
    margin: 1.4em 0 0.55em;
    letter-spacing: 0.01em;
}
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--orange-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--orange);
    outline-offset: 3px;
}
img { max-width: 100%; height: auto; }

.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: 12px; top: -60px; z-index: 100;
    background: var(--orange); color: #fff; padding: 0.5rem 1rem; border: 1px solid var(--ink);
}
.skip-to:focus { top: 12px; color: #fff; }

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

/* ---------- Кнопки ---------- */
.btn,
.finder__btn,
.comment-form .submit,
.cookie-banner__btn {
    display: inline-block;
    font-family: var(--head-font);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    color: var(--ink);
    background: var(--orange);
    border: 1px solid var(--ink);
    border-radius: 0;
    padding: 0.7em 1.4em;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform .15s, box-shadow .15s, background-color .15s, color .15s;
}
.btn:hover, .finder__btn:hover, .comment-form .submit:hover, .cookie-banner__btn:hover {
    color: #fff;
    background: var(--orange-dark);
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}
.btn--small { font-size: 0.95rem; padding: 0.5em 1em; box-shadow: 2px 2px 0 var(--ink); }

/* ---------- Шапка ---------- */
.masthead {
    background: var(--night);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 -5px 0 var(--night), inset 0 -6px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}
.masthead__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0 1.2rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}
.brand:hover { color: #fff; }
.brand__mark { flex: 0 0 auto; display: block; color: #fff; }
.brand__svg { display: block; width: 62px; height: 62px; }
.brand-logo { display: block; max-height: 64px; width: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; max-width: 700px; hyphens: manual; }
.brand__name {
    font-family: var(--head-font);
    font-weight: 500;
    font-size: 1.02rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand__desc {
    margin-top: 0.3rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.topnav {
    flex: 0 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    padding-left: 1.8rem;
    align-self: stretch;
    display: flex;
    align-items: center;
}
.topnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; }
.topnav__list a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-family: var(--head-font);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    padding: 0.35rem 0;
    border-bottom: 3px solid transparent;
    transition: border-color .2s, color .2s;
}
.topnav__list a:hover { color: #fff; border-bottom-color: rgba(224, 89, 42, 0.6); }
.topnav__list .current-menu-item > a,
.topnav__list .current_page_item > a { border-bottom-color: var(--orange); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.8rem;
    font-family: var(--head-font);
    font-size: 1rem;
    cursor: pointer;
    flex: 0 0 auto;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 20px; height: 2px; background: #fff; position: relative; content: "";
}
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

/* ---------- Пластины-листы ---------- */
.sheet-area { display: block; padding: 2rem 0 3.5rem; }

.plate {
    position: relative;
    margin: 0 0 2.2rem;
    padding: 0 2rem 2.2rem;
    border: 1px solid var(--line);
    background: rgba(244, 241, 232, 0.55);
}
.plate::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 30px;
    height: 30px;
    background: linear-gradient(225deg, var(--paper) 0 50%, #DCD4C1 50% 100%);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.plate__head {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin: 0 0 1.6rem -2rem;
}
.plate__titles { min-width: 0; flex: 1 1 auto; padding-right: 2.5rem; }
.sheet-no {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 88px;
    padding: 0 0.6rem;
    font-family: var(--head-font);
    font-weight: 600;
    font-size: 3.3rem;
    line-height: 1;
    color: var(--blue-deep);
    background: rgba(47, 93, 168, 0.1);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.sheet-no--small { min-width: 64px; height: 60px; font-size: 2.2rem; border: 1px solid var(--line); }
.plate__title {
    margin: 0;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem);
    text-transform: uppercase;
    color: var(--blue-deep);
    letter-spacing: 0.02em;
}
.plate__sub {
    margin: 0.15rem 0 0;
    font-family: var(--head-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--blue-deep);
    font-size: 1.05rem;
}
.plate__more {
    flex: 0 0 auto;
    margin-right: 1.5rem;
    font-family: var(--head-font);
    font-size: 1rem;
    letter-spacing: 0.03em;
}

/* ---------- Блок 01: сравнительный чертёж ---------- */
.compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) minmax(0, 1fr);
    gap: 0;
    align-items: end;
}
.compare__plan { margin: 0; min-width: 0; }
.compare__label {
    font-family: var(--head-font);
    font-weight: 500;
    font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem);
    text-align: center;
    color: var(--blue-deep);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    margin: 0 8% 1.1rem;
    padding: 0.2rem 0.5rem;
    position: relative;
}
.compare__label::before, .compare__label::after {
    content: ""; position: absolute; bottom: -9px; width: 1px; height: 16px; background: var(--blue-deep);
}
.compare__label::before { left: -1px; }
.compare__label::after { right: -1px; }
.compare__plan img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.compare__scale {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    position: relative;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-width: 0;
}
.compare__scale::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 4.6rem;
    bottom: 1.2rem;
    width: 1px;
    background: var(--ink);
    opacity: 0.55;
}
.compare__mark {
    position: relative;
    text-align: center;
    padding: 0.55rem 0;
}
.compare__mark::before, .compare__mark::after {
    content: "";
    position: absolute;
    top: 1.15rem;
    width: 17%;
    height: 1px;
    background: var(--orange);
}
.compare__mark::before { left: 0; }
.compare__mark::after { right: 0; }
.compare__name {
    position: relative;
    z-index: 1;
    display: inline-block;
    max-width: 62%;
    font-family: var(--head-font);
    font-weight: 500;
    font-size: 1.12rem;
    line-height: 1.2;
    color: var(--ink);
    background: var(--paper-light);
    padding: 0.1rem 0.5rem;
    border: 1px solid rgba(47, 93, 168, 0.25);
}
.compare__vals {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.25;
}
.compare__val { flex: 1 1 0; min-width: 0; padding: 0 0.3rem; }
.compare__val--flat { text-align: left; color: var(--blue-deep); }
.compare__val--apt { text-align: right; color: var(--orange-dark); }
.compare__mark:nth-child(odd) .compare__vals { opacity: 1; }
.compare__legend {
    margin: 1.2rem 0 0;
    font-size: 0.88rem;
    color: var(--muted-dark);
    text-align: center;
}
.legend-chip { display: inline-block; width: 12px; height: 12px; margin: 0 0.35rem 0 0.9rem; vertical-align: -1px; border: 1px solid var(--ink); }
.legend-chip--flat { background: var(--blue-deep); }
.legend-chip--apt { background: var(--orange); }

/* ---------- Блок: юридическая карточка ---------- */
.plate--law {
    padding: 1.8rem 2rem;
    background: linear-gradient(90deg, transparent 0 52%, var(--tracing-strong) 52% 100%), rgba(244, 241, 232, 0.55);
}
.law {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.law__card {
    position: relative;
    min-width: 0;
    padding: 2rem 2.4rem 2.2rem;
    color: #fff;
    background-color: var(--blue-deep);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    border: 1px solid #1A3763;
    box-shadow: 6px 6px 0 rgba(30, 42, 56, 0.25);
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}
.law__card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 34px;
    background: linear-gradient(225deg, transparent 0 50%, #DCE4F1 50% 100%);
}
.law__title {
    margin: 0 0 1.1rem;
    color: #fff;
    font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.law__list { list-style: none; margin: 0; padding: 0; }
.law__list li {
    position: relative;
    padding: 0.35rem 0 0.35rem 2.1rem;
    font-size: 1.04rem;
    line-height: 1.5;
}
.law__list li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.7rem;
    border-style: solid;
    border-width: 7px 0 7px 13px;
    border-color: transparent transparent transparent var(--orange);
}
.law__note {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    min-width: 0;
}
.law__seal {
    display: block;
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
}
.law__comment { min-width: 0; }
.law__label {
    margin: 0 0 0.5rem;
    font-family: var(--head-font);
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--blue-deep);
}
.law__text { margin: 0 0 0.9rem; font-size: 0.96rem; color: var(--ink); }
.law__sign {
    display: block;
    height: 26px;
    border-bottom: 1px solid var(--blue-line);
    background: linear-gradient(var(--blue-line), var(--blue-line)) 0 8px / 100% 1px no-repeat;
    position: relative;
}
.law__sign::after {
    content: "";
    position: absolute;
    right: 12%;
    bottom: 3px;
    width: 64px;
    height: 16px;
    border-bottom: 1.5px solid var(--blue);
    border-radius: 0 0 60% 40%;
    transform: skewX(-25deg);
    opacity: 0.6;
}

/* ---------- Карточки записей ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
    align-items: start;
}
.card-grid--front { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem; }
.card-grid--front .card:nth-child(3n+2) { margin-top: 2rem; }
.card-grid--front .card:nth-child(n+4) { display: none; }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--paper-light);
    border: 1px solid var(--blue-line);
    box-shadow: 4px 4px 0 rgba(47, 93, 168, 0.12);
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(225deg, transparent 0 50%, #D9E1EE 50% 100%);
    border-left: 1px solid var(--blue-line);
    border-bottom: 1px solid var(--blue-line);
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 rgba(47, 93, 168, 0.18); border-color: var(--blue); }
.card-thumb {
    margin: 1rem 1rem 0;
    border: 1px solid rgba(47, 93, 168, 0.25);
    background: var(--paper);
    overflow: hidden;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
    object-fit: cover;
    transition: transform .35s;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.1rem 1.4rem 1.3rem;
}
.card-pin {
    align-self: flex-start;
    margin-bottom: 0.5rem;
    font-family: var(--head-font);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--blue);
    padding: 0.1rem 0.5rem;
}
.card-title { margin: 0 0 0.55rem; font-size: 1.28rem; line-height: 1.28; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue); text-decoration: underline; }
.card-excerpt { flex: 1; color: var(--muted-dark); font-size: 0.97rem; line-height: 1.55; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--blue-line);
}
.card-date { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.03em; }

.empty-note { color: var(--muted-dark); font-style: normal; }

/* ---------- Блок 03: шкала расходов ---------- */
.ruler { position: relative; padding-top: 0.5rem; }
.ruler__line {
    position: absolute;
    left: 0;
    right: 0;
    top: 3.15rem;
    height: 16px;
    border-top: 1.5px solid var(--blue);
    background:
        repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 100px) 0 0 / 100% 14px no-repeat,
        repeating-linear-gradient(90deg, rgba(47, 93, 168, 0.6) 0 1px, transparent 1px 20px) 0 0 / 100% 7px no-repeat;
}
.ruler__line::before, .ruler__line::after {
    content: "";
    position: absolute;
    top: -8px;
    width: 1.5px;
    height: 16px;
    background: var(--blue);
}
.ruler__line::before { left: 0; }
.ruler__line::after { right: 0; }
.ruler__marks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
    position: relative;
}
.ruler__mark { min-width: 0; padding-left: 0.4rem; }
.ruler__flag { display: block; width: 34px; height: 40px; margin: 0 0 1.6rem 1.4rem; }
.ruler__name { margin: 0 0 0.35rem; font-size: 1.25rem; color: var(--blue-deep); }
.ruler__text { margin: 0; font-size: 0.93rem; line-height: 1.5; color: var(--muted-dark); }

/* ---------- Блок 04: оглавление альбома ---------- */
.album {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 2.2rem;
    align-items: center;
}
.album__stamp {
    position: relative;
    min-width: 0;
    padding: 1.2rem 1.6rem 1.6rem;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--blue);
    box-shadow: inset 0 0 0 4px rgba(244, 241, 232, 0.9), inset 0 0 0 5px var(--blue-line);
}
.album__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
    margin: 0 0 1.4rem;
    border: 1px solid var(--blue-line);
}
.album__table th, .album__table td {
    border: 1px solid var(--blue-line);
    padding: 0.55rem 0.8rem;
    text-align: left;
    vertical-align: top;
}
.album__table th {
    font-family: var(--head-font);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: var(--blue-deep);
    background: var(--tracing-strong);
}
.album__table tbody tr:hover { background: var(--tracing); }
.album__no { font-family: var(--head-font); color: var(--orange-dark); width: 4.2rem; }
.album__part { font-weight: 700; color: var(--ink); }
.album__art {
    margin: 0;
    min-width: 0;
    padding: 1rem;
    background: var(--tracing);
    border: 1px dashed var(--blue-line);
    transform: rotate(-1.2deg);
}
.album__art img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 830 / 586;
    object-fit: cover;
}

/* ---------- Раскладки внутренних страниц ---------- */
.layout-single { display: block; width: min(100%, 85%); margin-left: auto; margin-right: auto; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.content-area { min-width: 0; }

.crumbs {
    margin: 0 0 1.6rem;
    padding: 0.55rem 1rem;
    font-size: 0.92rem;
    color: var(--muted-dark);
    background: var(--tracing);
    border-left: 4px solid var(--blue);
    border-top: 1px solid var(--blue-line);
    border-bottom: 1px solid var(--blue-line);
}
.crumbs a { color: var(--blue); }
.crumbs__sep { color: var(--orange); margin: 0 0.3rem; }

.page-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 1.6rem;
    padding-bottom: 0.9rem;
    border-bottom: 2px solid var(--blue);
    position: relative;
}
.page-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 120px;
    height: 4px;
    background: var(--orange);
}
.page-head__title { margin: 0; text-transform: uppercase; color: var(--blue-deep); letter-spacing: 0.02em; }
.page-head__desc { width: 100%; color: var(--muted-dark); }
.page-intro { margin-bottom: 1.8rem; }

.doc-sheet {
    position: relative;
    padding: 2rem 2.4rem 2.4rem;
    background: rgba(250, 248, 242, 0.88);
    border: 1px solid var(--blue-line);
    box-shadow: 5px 5px 0 rgba(47, 93, 168, 0.1);
}
.doc-sheet::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(47, 93, 168, 0.18);
    pointer-events: none;
}
.doc-sheet__head { position: relative; margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--blue-line); }
.doc-sheet__title { margin: 0 0 0.5rem; color: var(--ink); }
.doc-sheet__meta { margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; color: var(--muted); }
.doc-sheet__cat a { font-family: var(--head-font); letter-spacing: 0.03em; }
.doc-sheet__cover { margin: 0 0 1.6rem; position: relative; }
.doc-sheet__cover img { display: block; width: 100%; height: auto; border: 1px solid var(--blue-line); }
.doc-sheet__tags { position: relative; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.doc-sheet__tags a { font-size: 0.9rem; padding: 0.15rem 0.6rem; border: 1px solid var(--blue-line); text-decoration: none; background: var(--tracing); }

.entry-content { position: relative; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { color: var(--blue-deep); padding-left: 0.8rem; border-left: 4px solid var(--orange); }
.entry-content h3 { color: var(--blue-deep); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content ul li::marker { color: var(--orange); }
.entry-content ol li::marker { color: var(--blue); font-family: var(--head-font); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem;
    background: var(--tracing-strong);
    border-left: 5px solid var(--blue);
    font-size: 1.1rem;
    color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.97rem; border: 1px solid var(--blue-line); }
.entry-content th, .entry-content td { border: 1px solid var(--blue-line); padding: 0.55rem 0.75rem; text-align: left; }
.entry-content th { background: var(--tracing-strong); font-family: var(--head-font); font-weight: 500; color: var(--blue-deep); }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.4em 0; max-width: 100%; }
.entry-content figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
.entry-content pre { overflow-x: auto; background: var(--night); color: #fff; padding: 1rem 1.2rem; font-size: 0.92rem; }
.entry-content hr { border: 0; border-top: 1px dashed var(--blue-line); margin: 2em 0; }
.entry-content .alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

.post-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}
.post-steps__link {
    display: block;
    min-width: 0;
    padding: 1rem 1.2rem;
    border: 1px solid var(--blue-line);
    background: var(--paper-light);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    transition: border-color .2s, transform .2s;
}
.post-steps__link span { display: block; font-family: var(--head-font); font-weight: 500; font-size: 0.88rem; color: var(--orange-dark); margin-bottom: 0.25rem; }
.post-steps__link--next { grid-column: 2; text-align: right; }
.post-steps__link:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--blue); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.4rem 1.5rem;
    color: var(--ink);
    background-color: #E3E6E5;
    background-image:
        linear-gradient(rgba(47, 93, 168, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 93, 168, 0.08) 1px, transparent 1px);
    background-size: 18px 18px;
    border: 1px solid var(--blue-line);
}
.side-sheet { margin: 0 0 1.8rem; color: var(--ink); }
.side-sheet:last-child { margin-bottom: 0; }
.side-sheet__title {
    margin: 0 0 0.8rem;
    padding-bottom: 0.45rem;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--blue-deep);
    border-bottom: 2px solid var(--orange);
}
.side-sheet ul { list-style: none; margin: 0; padding: 0; }
.side-sheet li { padding: 0.5rem 0; border-bottom: 1px dashed var(--blue-line); line-height: 1.4; color: var(--ink); }
.side-sheet li:last-child { border-bottom: 0; }
.side-sheet a { color: var(--ink); text-decoration: none; }
.side-sheet a:hover { color: var(--blue); text-decoration: underline; }
.side-sheet .post-date { display: block; font-size: 0.85rem; color: var(--muted-dark); }
.side-sheet p { color: var(--ink); }

/* ---------- Пагинация ---------- */
.sheet-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 2.4rem 0 0.5rem;
}
.sheet-pager .page-numbers,
.sheet-pager .post-page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.8rem;
    font-family: var(--head-font);
    font-weight: 500;
    color: var(--blue-deep);
    text-decoration: none;
    background: var(--paper-light);
    border: 1px solid var(--blue);
    transition: background-color .15s, color .15s, transform .15s;
}
.sheet-pager a.page-numbers:hover,
.sheet-pager a.post-page-numbers:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.sheet-pager .page-numbers.current,
.sheet-pager .post-page-numbers.current {
    background: var(--orange);
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
}
.sheet-pager .page-numbers.dots { border-color: transparent; background: none; min-width: auto; padding: 0 0.3rem; }

/* ---------- Поиск ---------- */
.finder { display: flex; gap: 0.6rem; margin: 1.2rem 0; max-width: 560px; }
.finder__field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    font: inherit;
    color: var(--ink);
    background: #FBFAF6;
    border: 1px solid var(--blue);
    border-radius: 0;
}

/* ---------- 404 ---------- */
.lost-sheet {
    position: relative;
    padding: 2.4rem 2.4rem 2.6rem;
    background: rgba(250, 248, 242, 0.9);
    border: 1px solid var(--blue-line);
    text-align: left;
}
.lost-sheet__code {
    display: block;
    font-family: var(--head-font);
    font-weight: 600;
    font-size: clamp(5rem, 3rem + 8vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--blue);
    letter-spacing: 0.04em;
}
.lost-sheet__title { margin: 0.6rem 0 0.8rem; text-transform: uppercase; color: var(--blue-deep); }
.lost-sheet__text { max-width: 640px; color: var(--muted-dark); }

/* ---------- Комментарии ---------- */
.remarks {
    margin-top: 2.4rem;
    padding: 1.8rem 2rem;
    background: rgba(250, 248, 242, 0.85);
    border: 1px solid var(--blue-line);
}
.remarks__title, .comment-reply-title { margin: 0 0 1.2rem; font-size: 1.4rem; text-transform: uppercase; color: var(--blue-deep); }
.remarks__list, .remarks__list .children { list-style: none; margin: 0; padding: 0; }
.remarks__list .children { padding-left: 1.6rem; border-left: 1px dashed var(--blue-line); margin-left: 0.6rem; }
.remark__body { padding: 1rem 1.2rem; margin-bottom: 1rem; background: var(--paper-light); border: 1px solid rgba(47, 93, 168, 0.25); }
.remark__head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.remark__ava { display: block; border-radius: 0; border: 1px solid var(--blue-line); }
.remark__author { display: block; font-weight: 700; }
.remark__date { font-size: 0.85rem; color: var(--muted); }
.remark__wait { color: var(--orange-dark); font-size: 0.92rem; }
.remark__reply a { font-family: var(--head-font); font-size: 0.92rem; }
.remarks__closed { color: var(--muted-dark); }
.comment-form label { display: block; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.95rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    font: inherit;
    color: var(--ink);
    background: #FBFAF6;
    border: 1px solid var(--blue);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-notes, .logged-in-as { font-size: 0.92rem; color: var(--muted-dark); }

/* ---------- Подвал ---------- */
.basement {
    color: rgba(255, 255, 255, 0.86);
    background: var(--night);
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 5px 0 var(--night), inset 0 6px 0 rgba(255, 255, 255, 0.2);
    padding: 2.8rem 0 1.6rem;
}
.basement__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}
.basement__col { min-width: 0; padding: 0 2rem; border-left: 1px solid rgba(255, 255, 255, 0.25); }
.basement__col:first-child { padding-left: 0; border-left: 0; }
.foot-note { margin-bottom: 1.4rem; color: rgba(255, 255, 255, 0.86); font-size: 0.97rem; }
.foot-note__title {
    margin: 0 0 0.8rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}
.foot-note p { color: rgba(255, 255, 255, 0.86); }
.foot-note a { color: #A9C2EA; text-decoration-color: rgba(169, 194, 234, 0.6); }
.foot-note a:hover { color: #fff; }
.foot-note ul { list-style: none; margin: 0; padding: 0; counter-reset: footlink; }
.foot-note li { margin-bottom: 0.3rem; counter-increment: footlink; color: rgba(255, 255, 255, 0.86); }
.foot-note .menu li::before { content: counter(footlink) ". "; color: #A9C2EA; }
.foot-note .post-date { color: rgba(255, 255, 255, 0.6); }
.basement__copy {
    margin: 2rem 0 0;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.78);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem 1.4rem;
    color: #fff;
    background: var(--night);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 4px var(--night), 0 10px 28px rgba(0, 0, 0, 0.3);
}
.cookie-banner__text { margin: 0; font-size: 0.93rem; line-height: 1.5; color: #fff; flex: 1 1 auto; min-width: 0; }
.cookie-banner__btn { flex: 0 0 auto; box-shadow: 3px 3px 0 #000; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead__row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .topnav {
        flex: 1 0 100%;
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
    }
    .js .topnav:not(.is-open) { display: none; }
    .topnav__list { flex-direction: column; gap: 0; width: 100%; padding: 0.4rem 0; }
    .topnav__list a { display: block; padding: 0.6rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
    .topnav__list .current-menu-item > a { border-bottom-color: var(--orange); }

    .shell--front { width: min(92%, 1240px); }
    .compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; }
    .compare__scale { grid-column: 1 / -1; grid-row: 2; }
    .compare__plan--right { grid-column: 2; grid-row: 1; }
    .compare__scale::before { top: 0.5rem; bottom: 0.5rem; }

    .law { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .plate--law { background: rgba(244, 241, 232, 0.55); }
    .law__note { padding: 1.2rem 1.4rem; background: var(--tracing-strong); }

    .card-grid--front { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid--front .card:nth-child(3n+2) { margin-top: 0; }
    .card-grid--front .card:nth-child(even) { margin-top: 1.6rem; }

    .ruler__line { display: none; }
    .ruler__marks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1.4rem; }
    .ruler__mark { border-top: 1.5px solid var(--blue); padding-top: 0.2rem; }
    .ruler__flag { margin: 0 0 0.6rem 0.6rem; }

    .album { grid-template-columns: minmax(0, 1fr); }
    .album__art { width: min(100%, 520px); justify-self: center; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .layout-single { width: 100%; }
    .basement__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 1rem; }
    .basement__col:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 1.4rem; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .masthead__row { padding: 0.9rem 0; gap: 0.9rem; }
    .brand__svg { width: 46px; height: 46px; }
    .brand__name { font-size: 0.95rem; }
    .brand__desc { display: none; }
    .sheet-area { padding: 1.4rem 0 2.6rem; }

    .plate { padding: 0 1.1rem 1.6rem; }
    .plate--law { padding: 1.1rem; }
    .plate__head { margin-left: -1.1rem; gap: 0.9rem; flex-wrap: wrap; }
    .plate__titles { flex: 1 1 0; padding-right: 1.6rem; }
    .plate__title { font-size: 1.3rem; }
    .plate__sub { font-size: 0.92rem; }
    .plate__more { flex: 0 0 100%; margin: 0 0 0 1.1rem; }
    .sheet-no { min-width: 62px; height: 60px; font-size: 2.2rem; }

    .compare { grid-template-columns: minmax(0, 1fr); }
    .compare__plan--right { grid-column: 1; grid-row: auto; }
    .compare__scale { grid-row: auto; }
    .compare__label { margin-left: 0; margin-right: 0; }
    .compare__mark::before, .compare__mark::after { width: 8%; }
    .compare__name { max-width: 80%; }

    .law__card { padding: 1.5rem 1.4rem 1.6rem; }
    .law__note { flex-direction: column; align-items: flex-start; padding: 1.1rem 1.2rem; }
    .law__seal { width: 110px; height: 110px; }

    .card-grid, .card-grid--front { grid-template-columns: minmax(0, 1fr); }
    .card-grid--front .card:nth-child(even) { margin-top: 0; }

    .ruler__marks { grid-template-columns: minmax(0, 1fr); }
    .album__stamp { padding: 0.9rem 0.9rem 1.2rem; }
    .album__table th, .album__table td { padding: 0.45rem 0.5rem; }
    .album__table { font-size: 0.9rem; }

    .doc-sheet { padding: 1.4rem 1.2rem 1.6rem; }
    .lost-sheet { padding: 1.6rem 1.2rem; }
    .remarks { padding: 1.3rem 1.1rem; }
    .post-steps { grid-template-columns: minmax(0, 1fr); }
    .post-steps__link--next { grid-column: 1; }
    .finder { flex-direction: column; }

    .basement__cols { grid-template-columns: minmax(0, 1fr); }
    .basement__col, .basement__col:nth-child(3) { padding: 1.2rem 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.25); }
    .basement__col:first-child { padding-top: 0; border-top: 0; }

    .cookie-banner { flex-direction: column; align-items: stretch; gap: 0.8rem; padding: 1rem 1.1rem; left: 10px; right: 10px; bottom: 10px; }
}
