/*
Theme Name: dds_tsangconstruction.com
Theme URI: https://tsangconstruction.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: tsgobm
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans Narrow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/pt-sans-narrow-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 Narrow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/pt-sans-narrow-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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans Narrow"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/pt-sans-narrow-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 Narrow"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/pt-sans-narrow-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+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: 500; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Палитра ---------- */
:root {
    --paper: #E8EBE9;
    --sheet: #F2F4F3;
    --graphite: #24282B;
    --graphite-2: #1B1E20;
    --sage: #6F7A72;
    --seal: #C8402A;
    --seal-dark: #A3321F;
    --ink: #2C4A6E;
    --field: #CBD6E0;
    --on-dark: #E8EBE9;
    --on-dark-soft: #B9C3C9;
    --head: "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
    --body: "PT Sans Narrow", "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
    --mono: "IBM Plex Mono", "Courier New", monospace;
    --grid-cell: 19px;
}

/* ---------- Сброс ---------- */
*, *::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(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--graphite);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(44, 74, 110, .13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 74, 110, .13) 1px, transparent 1px),
        linear-gradient(rgba(44, 74, 110, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 74, 110, .055) 1px, transparent 1px);
    background-size: calc(var(--grid-cell) * 5) calc(var(--grid-cell) * 5), calc(var(--grid-cell) * 5) calc(var(--grid-cell) * 5), var(--grid-cell) var(--grid-cell), var(--grid-cell) var(--grid-cell);
    background-position: -1px -1px;
}

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: 500; line-height: 1.15; margin: 0 0 .6em; color: var(--graphite); }
p, li, td, th, dd, h1, h2, h3, h4, blockquote, figcaption, .card-title, .brand-name { overflow-wrap: break-word; hyphens: auto; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--seal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--seal); 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: 1rem; top: -4rem; z-index: 100; background: var(--seal); color: #fff; padding: .6rem 1rem; font-family: var(--head); text-transform: uppercase; }
.skip-link:focus { top: 1rem; color: #fff; }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    font-family: var(--head);
    font-weight: 500;
    font-size: .9rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: var(--seal);
    border: 1.5px solid var(--seal-dark);
    border-radius: 0;
    padding: .5rem 1rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--seal-dark); color: #fff; transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--graphite); }
.btn:active { transform: none; box-shadow: none; }

/* ---------- Шапка ---------- */
.masthead { background: var(--graphite); color: var(--on-dark); border-bottom: 4px solid var(--ink); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.6rem 0; position: relative; }
.brand { display: flex; align-items: center; gap: 1.2rem; color: var(--on-dark); text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand-mark { flex: 0 0 auto; color: var(--field); line-height: 0; }
.brand-svg { width: 88px; height: auto; display: block; }
.brand-logo { display: block; max-width: 96px; max-height: 96px; width: auto; height: auto; }
.brand-text { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.brand-name { font-family: var(--head); font-weight: 500; text-transform: uppercase; font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.08; letter-spacing: .01em; max-width: 25ch; hyphens: manual; }
.brand-desc { font-family: var(--body); font-size: .9rem; line-height: 1.4; color: var(--on-dark-soft); max-width: 62ch; }

.nav-toggle { display: none; }
.site-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.site-nav-list a { font-family: var(--head); text-transform: uppercase; font-size: .92rem; letter-spacing: .05em; color: var(--on-dark); text-decoration: none; display: inline-block; padding: .1rem 0; border-bottom: 1px solid transparent; }
.site-nav-list a:hover, .site-nav-list .current-menu-item > a { color: #fff; border-bottom-color: var(--seal); }
.site-nav { flex: 0 0 auto; padding-left: 1.6rem; border-left: 1px solid rgba(203, 214, 224, .25); }

@media (max-width: 959px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle {
        display: inline-flex; align-items: center; gap: .6rem;
        background: transparent; color: var(--on-dark); border: 1.5px solid var(--field);
        font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem;
        padding: .45rem .8rem; cursor: pointer; border-radius: 0;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
    .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-bars::before { top: -6px; }
    .nav-toggle-bars::after { top: 6px; }
    .site-nav { display: none; width: 100%; padding: 1rem 0 0; border-left: 0; border-top: 1px solid rgba(203, 214, 224, .25); }
    .site-nav.is-open { display: block; }
}
@media (max-width: 600px) {
    .masthead-row { padding: 1.1rem 0; gap: 1rem; }
    .brand { gap: .8rem; align-items: flex-start; }
    .brand-svg { width: 58px; }
    .brand-desc { font-size: .82rem; }
}

/* ---------- Заголовки граф ---------- */
.graph-head { border-bottom: 1px solid var(--ink); padding-bottom: .55rem; margin-bottom: 1.5rem; position: relative; }
.graph-head::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 56px; height: 5px; background: var(--ink); }
.graph-no { display: inline-block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); margin-bottom: .3rem; }
.graph-title { font-family: var(--head); font-weight: 500; text-transform: uppercase; font-size: clamp(1.35rem, 2.5vw, 2rem); letter-spacing: .01em; margin: 0; hyphens: manual; }
.doc-title, .card-title, .notes-title { hyphens: manual; }

/* ---------- Главная ---------- */
.front { padding: 1.2rem 0 3rem; }
.sheet { padding: 2.6rem 0; min-width: 0; }
.sheet + .sheet { border-top: 3px solid var(--ink); box-shadow: inset 0 4px 0 var(--paper), inset 0 5px 0 var(--ink); }

/* Обмерный лист */
.obmer-grid { display: grid; grid-template-columns: minmax(0, 2.7fr) minmax(0, 1fr); gap: 1.8rem; align-items: start; }
.obmer-plan { margin: 0; position: relative; container-type: inline-size; border: 1.5px solid var(--ink); background: var(--paper); }
.obmer-plan img { display: block; width: 100%; height: auto; aspect-ratio: 1104 / 672; }
.plan-tag {
    position: absolute;
    font-family: var(--head);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(8px, 2.1cqw, 15px);
    letter-spacing: .02em;
    line-height: 1.12;
    color: var(--graphite);
    background: rgba(232, 235, 233, .94);
    padding: .12em .3em;
    white-space: nowrap;
}
.plan-tag-stack { text-align: center; }
.obmer-notes { border-left: 1.5px solid var(--ink); padding: .2rem 0 .2rem 1.1rem; font-size: .9rem; line-height: 1.6; }
.obmer-notes p:last-child { margin-bottom: 0; }
.obmer-notes strong { font-family: var(--head); font-weight: 500; text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; color: var(--ink); }

/* Ведомость документов */
.ledger-wrap { min-width: 0; }
.ledger { width: 100%; border-collapse: collapse; border: 1.5px solid var(--ink); background: rgba(242, 244, 243, .72); }
.ledger caption { caption-side: top; font-family: var(--head); font-size: 1rem; text-align: center; padding: .55rem 1rem; border: 1.5px solid var(--ink); border-bottom: 0; background: rgba(242, 244, 243, .72); }
.ledger th, .ledger td { border: 1px solid var(--ink); padding: .8rem 1rem; text-align: left; vertical-align: top; }
.ledger thead th { background: var(--field); font-family: var(--head); font-weight: 500; font-size: .92rem; text-align: center; padding: .45rem 1rem; }
.ledger tbody th { font-family: var(--head); font-weight: 500; font-size: 1.08rem; width: 32%; }
.ledger td { font-size: .95rem; line-height: 1.5; }
.ledger .ledger-no { font-family: var(--mono); width: 3.6rem; text-align: center; color: var(--ink); }
.ledger tbody tr { transition: background-color .15s; }
.ledger tbody tr:hover { background: rgba(203, 214, 224, .55); }
.ledger tbody tr:hover .ledger-no { color: var(--seal); }

@media (max-width: 600px) {
    .ledger thead { display: none; }
    .ledger caption { display: block; border-bottom: 1.5px solid var(--ink); }
    .ledger { border-top: 0; }
    .ledger, .ledger tbody, .ledger tr { display: block; }
    .ledger tbody tr { display: grid; grid-template-columns: 3rem minmax(0, 1fr); border-bottom: 1px solid var(--ink); }
    .ledger tbody tr:last-child { border-bottom: 0; }
    .ledger th, .ledger td { border: 0; padding: .6rem .8rem; }
    .ledger tbody th { width: auto; border-left: 1px solid var(--ink); }
    .ledger .ledger-no { width: auto; padding-left: .4rem; padding-right: .4rem; }
    .ledger tbody td:last-child { grid-column: 1 / -1; border-top: 1px dashed rgba(44, 74, 110, .45); }
}

/* Карточки записей */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: rgba(242, 244, 243, .9);
    border: 1.5px solid var(--ink);
    padding: .75rem;
    position: relative;
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.card-thumb { position: relative; border: 1px solid rgba(44, 74, 110, .4); }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 864 / 504; object-fit: cover; }
.card-pin { position: absolute; top: .5rem; left: .5rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--seal); padding: .2rem .45rem; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: .9rem .25rem .1rem; min-width: 0; }
.card-title { font-size: 1.3rem; font-weight: 500; line-height: 1.18; margin: 0 0 .5rem; }
.card-title a { color: var(--graphite); text-decoration: none; }
.card-title a:hover { color: var(--seal); }
.card-excerpt { font-size: .93rem; line-height: 1.5; color: var(--graphite); margin-bottom: .9rem; }
.card-excerpt p { margin: 0 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-family: var(--mono); font-size: .8rem; color: var(--sage); letter-spacing: .03em; border: 1px solid var(--sage); padding: .15rem .45rem; transform: rotate(-2deg); display: inline-block; }
.latest-more { margin: 1.6rem 0 0; text-align: right; font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.empty-note { font-family: var(--head); color: var(--sage); }

@media (max-width: 959px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }

/* Шкала состояния */
.scale { padding-top: .6rem; }
.scale-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-top: 2.6rem;
}
.scale-track::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 2.6rem;
    height: 2px;
    background: var(--ink);
}
.scale-track::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: calc(2.6rem - 6px);
    height: 14px;
    background:
        linear-gradient(90deg, var(--ink) 2px, transparent 2px) 0 0 / 20% 100% repeat-x,
        linear-gradient(90deg, var(--ink) 1px, transparent 1px) 0 4px / 5% 6px repeat-x;
    border-right: 2px solid var(--ink);
    pointer-events: none;
}
.scale-step {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 1.4rem .3rem .4rem;
    font-family: var(--head);
    font-weight: 500;
    font-size: .92rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--graphite);
    cursor: pointer;
    min-width: 0;
    overflow-wrap: anywhere;
    transition: color .15s;
}
.scale-step::before { content: ""; position: absolute; top: -6px; left: 50%; width: 2px; height: 14px; background: var(--ink); transform: translateX(-50%); }
.scale-step:hover { color: var(--seal); }
.scale-step.is-active { color: var(--seal); font-weight: 700; }
.scale-step.is-active::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 2px; background: var(--seal); }
.scale-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    width: 22px;
    height: 34px;
    transform: translateX(-50%);
    transition: left .35s ease;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 34'%3E%3Cpath d='M7 0h8v20h7L11 34 0 20h7z' fill='%23C8402A'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.scale-note {
    margin: 1.6rem auto 0;
    max-width: 68ch;
    background: rgba(203, 214, 224, .7);
    border-left: 4px solid var(--seal);
    padding: 1rem 1.3rem;
    font-size: .98rem;
}
@media (max-width: 600px) {
    .scale-track { grid-template-columns: minmax(0, 1fr); padding: 0 0 0 2.2rem; }
    .scale-track::before { left: .9rem; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
    .scale-track::after { display: none; }
    .scale-pointer { display: none; }
    .scale-step { text-align: left; padding: .75rem .4rem; font-size: .9rem; }
    .scale-step::before { top: 50%; left: -1.5rem; width: 14px; height: 2px; transform: translateY(-50%); }
    .scale-step.is-active::after { left: -2.45rem; right: auto; top: 50%; bottom: auto; width: 0; height: 0; background: none; border: 8px solid transparent; border-left: 11px solid var(--seal); transform: translateY(-50%); }
    .scale-note { padding: .9rem 1rem; margin-top: 1rem; }
}

/* Цитата на кальке */
.tracing {
    margin: 0;
    position: relative;
    overflow: hidden;
    padding: 3.2rem 3rem 2.6rem;
    background: rgba(203, 214, 224, .78);
    border: 1px solid rgba(44, 74, 110, .3);
    box-shadow: 0 1px 0 rgba(36, 40, 43, .08);
    text-align: center;
}
.tracing-quote { margin: 0 auto; max-width: 780px; position: relative; z-index: 1; }
.tracing-quote p {
    margin: 0 auto;
    max-width: 15.5em;
    font-family: var(--head);
    font-weight: 500;
    font-size: clamp(1.5rem, 3.3vw, 2.5rem);
    line-height: 1.18;
    color: var(--graphite);
    hyphens: manual;
}
.tracing-quote p::before, .tracing-quote p::after {
    font-family: var(--head);
    font-weight: 700;
    color: var(--ink);
    font-size: 1.6em;
    line-height: 0;
    position: relative;
    top: .22em;
    opacity: .85;
}
.tracing-quote p::before { content: "«"; margin-right: .12em; }
.tracing-quote p::after { content: "»"; margin-left: .12em; }
.tracing figcaption { position: relative; z-index: 1; margin-top: 1.2rem; font-size: .9rem; color: var(--sage); letter-spacing: .03em; }
.stamp {
    position: absolute;
    font-family: var(--head);
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(44, 74, 110, .32);
    border: 3px double rgba(44, 74, 110, .32);
    padding: .15em .45em;
    line-height: 1.1;
    pointer-events: none;
    user-select: none;
}
.stamp-a { top: 1rem; right: 2rem; font-size: clamp(.9rem, 1.9vw, 1.5rem); transform: rotate(-4deg); }
.stamp-b { bottom: .8rem; right: 3rem; font-size: clamp(1.4rem, 3vw, 2.4rem); padding: .2em .8em; transform: rotate(3deg); }
@media (max-width: 600px) {
    .tracing { padding: 3.4rem 1.3rem 4.4rem; }
    .stamp-a { top: .7rem; right: .8rem; }
    .stamp-b { bottom: .5rem; right: .8rem; opacity: .6; }
}

/* ---------- Внутренние страницы ---------- */
.inner { padding: 1.2rem 0 3.5rem; }
.crumbs {
    font-family: var(--mono);
    font-size: .76rem;
    letter-spacing: .03em;
    color: var(--sage);
    padding: .6rem 0 .7rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px dashed var(--ink);
    overflow-wrap: anywhere;
}
.crumbs a { color: var(--ink); }
.crumbs a:hover { color: var(--seal); }
.crumbs-sep { color: var(--seal); padding: 0 .25rem; }
.crumbs [aria-current] { color: var(--graphite); }

.layout-single { display: block; }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67%) minmax(0, 27%); justify-content: space-between; align-items: start; }
.content-area { min-width: 0; }
.sidebar { min-width: 0; }
@media (max-width: 959px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
}

.page-head { margin-bottom: 1.8rem; }
.page-head .graph-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.archive-desc { margin-top: .6rem; color: var(--sage); }
.card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 959px) { .layout-single .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .card-grid-list, .layout-single .card-grid-list { grid-template-columns: minmax(0, 1fr); } }

/* Документ: запись и страница */
.doc {
    background: rgba(242, 244, 243, .93);
    border: 1.5px solid var(--ink);
    padding: 2rem 2.3rem 2.2rem;
    position: relative;
}
.doc::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 19px); opacity: .55; }
.doc-head { border-bottom: 1px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1.6rem; }
.doc-title { font-family: var(--head); font-weight: 500; text-transform: uppercase; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; margin: 0 0 .8rem; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.doc-cats a { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; margin-right: .6rem; }
.doc-cover { margin: 0 0 1.6rem; border: 1px solid rgba(44, 74, 110, .4); }
.doc-cover img { display: block; width: 100%; height: auto; }
.doc-tags { margin: 1.6rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--ink); font-family: var(--mono); font-size: .78rem; }
.doc-tags a { display: inline-block; margin: 0 .4rem .4rem 0; padding: .15rem .5rem; border: 1px solid var(--ink); text-decoration: none; }
.doc-tags a:hover { background: var(--ink); color: #fff; }
@media (max-width: 600px) { .doc { padding: 1.4rem 1.2rem 1.6rem; } }

.entry { font-size: 1.08rem; }
.entry > *:last-child { margin-bottom: 0; }
.entry h2 { font-size: 1.55rem; text-transform: uppercase; margin-top: 2rem; padding-bottom: .35rem; border-bottom: 1px solid var(--ink); }
.entry h3 { font-size: 1.3rem; margin-top: 1.6rem; }
.entry h4 { font-size: 1.12rem; margin-top: 1.4rem; }
.entry ul, .entry ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
.entry li { margin-bottom: .35em; }
.entry ul { list-style: none; padding-left: 1.3rem; }
.entry ul li { position: relative; }
.entry ul li::before { content: ""; position: absolute; left: -1.1rem; top: .62em; width: 7px; height: 7px; border: 1.5px solid var(--ink); background: var(--field); }
.entry ol li::marker { font-family: var(--mono); color: var(--ink); }
.entry blockquote { margin: 1.5rem 0; padding: 1.1rem 1.4rem; background: rgba(203, 214, 224, .7); border-left: 4px solid var(--seal); font-family: var(--head); font-size: 1.2rem; }
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; border: 1.5px solid var(--ink); font-size: .96rem; }
.entry th, .entry td { border: 1px solid var(--ink); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.entry th { background: var(--field); font-family: var(--head); font-weight: 500; }
.entry figure { margin: 1.5rem 0; }
.entry figcaption, .entry .wp-element-caption { font-size: .85rem; color: var(--sage); margin-top: .4rem; }
.entry img { display: block; }
.entry pre { overflow-x: auto; background: var(--graphite); color: var(--on-dark); padding: 1rem 1.2rem; font-size: .9rem; }
.entry code { font-family: var(--mono); font-size: .9em; }
.entry hr { border: 0; border-top: 2px solid var(--ink); margin: 2rem 0; }
.wp-block-table { overflow-x: auto; }
.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { margin-inline: auto; }

.doc-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.doc-nav a { display: block; padding: .9rem 1.1rem; border: 1.5px solid var(--ink); background: rgba(242, 244, 243, .9); color: var(--graphite); text-decoration: none; font-family: var(--head); line-height: 1.3; }
.doc-nav a span { display: block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; color: var(--sage); margin-bottom: .3rem; }
.doc-nav a:hover { border-color: var(--seal); color: var(--seal); }
.doc-nav-next { grid-column: 2; text-align: right; }
@media (max-width: 600px) { .doc-nav { grid-template-columns: minmax(0, 1fr); } .doc-nav-next { grid-column: 1; } }

/* ---------- Боковая колонка ---------- */
.sidebar .widget {
    background: var(--field);
    border: 1.5px solid var(--ink);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--graphite);
}
.sidebar .widget-title { font-family: var(--head); font-weight: 500; text-transform: uppercase; font-size: 1rem; letter-spacing: .04em; color: var(--graphite); border-bottom: 1px solid var(--ink); padding-bottom: .45rem; margin-bottom: .8rem; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .5rem 0; border-bottom: 1px dashed rgba(44, 74, 110, .45); line-height: 1.35; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--graphite); text-decoration-color: rgba(44, 74, 110, .6); }
.sidebar .widget a:hover { color: var(--seal); }
.sidebar .post-date { display: block; font-family: var(--mono); font-size: .74rem; color: #4E5A52; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.2rem; align-items: center; }
.pager .page-numbers, .pager > a, .pager > span {
    display: inline-block;
    min-width: 2.4rem;
    text-align: center;
    padding: .45rem .75rem;
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--ink);
    background: rgba(242, 244, 243, .9);
    border: 1.5px solid var(--ink);
    text-decoration: none;
    line-height: 1.2;
}
.pager a.page-numbers:hover, .pager > a:hover { background: var(--seal); border-color: var(--seal); color: #fff; }
.pager .page-numbers.current, .pager > span.current { background: var(--ink); color: #fff; }
.pager .page-numbers.dots { border: 0; background: none; min-width: 0; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: .5rem; max-width: 520px; margin: 1rem 0; }
.search-field { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: .5rem .75rem; border: 1.5px solid var(--ink); border-radius: 0; background: var(--sheet); color: var(--graphite); }
.empty-sheet { background: rgba(242, 244, 243, .9); border: 1.5px solid var(--ink); padding: 1.6rem 1.8rem; }

/* ---------- 404 ---------- */
.lost { background: rgba(242, 244, 243, .93); border: 1.5px solid var(--ink); padding: 2.4rem 2.4rem 2.2rem; }
.lost-code { font-family: var(--head); font-weight: 700; font-size: clamp(5rem, 16vw, 10rem); line-height: .9; margin: 0 0 1rem; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.lost .graph-title { margin-bottom: 1rem; }
@media (max-width: 600px) { .lost { padding: 1.6rem 1.2rem; } }

/* ---------- Комментарии ---------- */
.notes { margin-top: 2rem; background: rgba(242, 244, 243, .9); border: 1.5px solid var(--ink); padding: 1.6rem 2rem; }
.notes-title, .comment-reply-title { font-family: var(--head); text-transform: uppercase; font-size: 1.25rem; border-bottom: 1px solid var(--ink); padding-bottom: .4rem; }
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { padding-left: 1.6rem; border-left: 1px dashed var(--ink); }
.note-body { padding: 1rem 0; border-bottom: 1px dashed rgba(44, 74, 110, .45); }
.note-meta { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.note-author { font-family: var(--head); font-weight: 500; }
.note-meta time { font-family: var(--mono); font-size: .76rem; color: var(--sage); }
.note-wait { font-size: .9rem; color: var(--seal); }
.note-reply a { font-family: var(--head); text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.comment-form p { margin-bottom: .9rem; }
.comment-form label { display: block; font-family: var(--head); font-size: .9rem; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; font: inherit; font-size: 1rem; padding: .5rem .7rem; border: 1.5px solid var(--ink); border-radius: 0; background: #fff; color: var(--graphite);
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-family: var(--body); }
.comment-form .submit { font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--seal); border: 1.5px solid var(--seal-dark); border-radius: 0; padding: .55rem 1.2rem; cursor: pointer; }
.comment-form .submit:hover { background: var(--seal-dark); }
@media (max-width: 600px) { .notes { padding: 1.2rem 1.1rem; } }

/* ---------- Подвал ---------- */
.colophon { background: var(--graphite); color: var(--on-dark-soft); border-top: 4px solid var(--ink); padding: 2.6rem 0 1.4rem; }
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1rem; color: var(--on-dark-soft); font-size: .95rem; line-height: 1.55; }
.colophon .widget-title { font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: 1rem; color: var(--on-dark); margin-bottom: .8rem; padding-bottom: .4rem; border-bottom: 1px solid rgba(203, 214, 224, .25); }
.colophon .widget ul { list-style: none; margin: 0; padding: 0; }
.colophon .widget li { margin-bottom: .45rem; }
.colophon .widget a { color: var(--on-dark); text-decoration-color: rgba(203, 214, 224, .45); }
.colophon .widget a:hover { color: #fff; text-decoration-color: var(--seal); }
.colophon .widget p { color: var(--on-dark-soft); }
.colophon-copy { margin: 2rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgba(203, 214, 224, .2); text-align: center; font-size: .85rem; color: var(--on-dark-soft); }
@media (max-width: 959px) { .colophon-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 600px) { .colophon-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; } }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    max-width: 780px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.3rem;
    background: var(--graphite);
    color: var(--on-dark);
    border: 1.5px solid var(--field);
    border-top: 4px solid var(--seal);
    box-shadow: 6px 6px 0 rgba(44, 74, 110, .45);
}
.cookie-text { margin: 0; font-size: .92rem; line-height: 1.45; flex: 1; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }
@media (max-width: 600px) { .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; padding: 1rem 1.1rem; } }

/* ---------- Адаптив главной ---------- */
@media (max-width: 959px) {
    .obmer-grid { grid-template-columns: minmax(0, 1fr); }
    .obmer-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; border-left: 0; border-top: 1.5px solid var(--ink); padding: 1rem 0 0; }
}
@media (max-width: 600px) {
    .sheet { padding: 2rem 0; }
    .obmer-notes { grid-template-columns: minmax(0, 1fr); }
    .graph-title { font-size: 1.3rem; }
}
