/*
Theme Name: dds_milliondollartoolbox.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: pplan
*/

/* ---------- Шрифты (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: 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: "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: 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+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; }

/* ---------- Палитра ---------- */
:root {
    --paper: #E9EDF0;
    --paper-light: #F3F5F7;
    --paper-sheet: #F6F7F8;
    --graphite: #1C2B36;
    --ink: #16202A;
    --muted: #5D6E7A;
    --red: #C8342B;
    --blue: #0E6E8C;
    --stamp: #F2D9A6;
    --line: #16202A;
    --green: #1E7A4C;
    --grid-minor: rgba(14, 110, 140, 0.09);
    --grid-major: rgba(14, 110, 140, 0.17);
    --on-dark: #E9EDF0;
    --on-dark-muted: #A9B8C3;
    --font-head: "Oswald", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "PT Mono", "DejaVu Sans Mono", Consolas, "Courier New", monospace;
}

/* ---------- Правила для [hidden] (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
[hidden] { display: none !important; }

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.65;
    background-color: var(--paper);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%230E6E8C' stroke-opacity='.08' stroke-width='3'%3E%3Ccircle cx='110' cy='110' r='96'/%3E%3Ccircle cx='110' cy='110' r='80' stroke-width='1.5'/%3E%3Cpath d='M44 118h132M44 98h132' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='120' viewBox='0 0 260 120'%3E%3Cg fill='none' stroke='%2316202A' stroke-opacity='.06' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M8 90c40-14 90-30 150-38s80-6 96-10'/%3E%3Cpath d='M20 104c50-10 120-22 220-30'/%3E%3Cpath d='M60 20l40 60M70 18l38 58'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(var(--grid-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
        linear-gradient(var(--grid-minor) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
    background-size: 220px 220px, 260px 120px, 90px 90px, 90px 90px, 18px 18px, 18px 18px;
    background-position: right 4% top 520px, left 2% top 1500px, -1px -1px, -1px -1px, -1px -1px, -1px -1px;
    background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat;
}

img, svg, video { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 .6em;
    color: var(--ink);
    overflow-wrap: break-word;
    hyphens: manual;
}
p { margin: 0 0 1em; }
p, li, td, th, dd, blockquote, figcaption { overflow-wrap: break-word; hyphens: auto; }

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

table { border-collapse: collapse; width: 100%; border: 2px solid var(--line); }
th, td { border: 1px solid var(--line); padding: .55em .75em; text-align: left; vertical-align: top; }
th { font-family: var(--font-head); font-weight: 600; letter-spacing: .06em; background: var(--paper-light); }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0; padding: 0; margin: -1px;
}
.skip {
    position: absolute;
    left: 12px; top: -60px;
    z-index: 100;
    padding: .6em 1em;
    background: var(--paper);
    border: 2px solid var(--ink);
    font-weight: 600;
}
.skip:focus { top: 12px; }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    position: relative;
    padding: .55em 1.15em;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper-light);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
}
.btn:hover {
    color: var(--paper);
    background: var(--ink);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--red);
}
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn--hatch { padding-left: calc(1.15em + 18px); }
.btn--hatch::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 18px;
    border-right: 2px solid var(--ink);
    background: repeating-linear-gradient(45deg, var(--red) 0 2px, transparent 2px 5px);
}
.btn--hatch:hover::before { border-right-color: var(--paper); background-color: var(--paper); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 3px 3px 0 var(--paper); }

/* ---------- Шапка ---------- */
.masthead {
    background: var(--graphite);
    color: var(--on-dark);
    border-bottom: 4px solid var(--ink);
    box-shadow: inset 0 -1px 0 rgba(233, 237, 240, .12);
}
.masthead__row {
    display: flex;
    align-items: center;
    gap: 1.5rem 2rem;
    padding: 1.4rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--on-dark);
    text-decoration: none;
}
.brand:hover { color: var(--on-dark); }
.brand__mark { flex: none; display: block; width: 64px; height: 64px; }
.brand__mark img, .brand__svg { width: 64px; height: 64px; display: block; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.brand__name {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(.9rem, 1.15vw, 1.08rem);
    line-height: 1.35;
    letter-spacing: .14em;
    text-transform: uppercase;
    overflow-wrap: break-word;
    hyphens: manual;
}
.brand__tagline {
    font-size: .74rem;
    line-height: 1.5;
    color: var(--on-dark-muted);
    overflow-wrap: break-word;
}
.topnav { flex: none; }
.topnav__list {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.topnav__list a {
    display: inline-block;
    padding: .3em 0;
    color: var(--on-dark);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color .15s ease, color .15s ease;
}
.topnav__list a:hover { color: #fff; border-bottom-color: var(--red); }
.topnav__list .current-menu-item > a,
.topnav__list .current_page_item > a { border-bottom-color: var(--red); }

.navtoggle {
    display: none;
    align-items: center;
    gap: .6em;
    padding: .5em .9em;
    border: 2px solid var(--on-dark);
    background: transparent;
    color: var(--on-dark);
    font-family: var(--font-mono);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.navtoggle__bars,
.navtoggle__bars::before,
.navtoggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.navtoggle__bars::before, .navtoggle__bars::after { content: ""; position: absolute; left: 0; }
.navtoggle__bars::before { top: -6px; }
.navtoggle__bars::after { top: 6px; }
.navtoggle[aria-expanded="true"] { background: var(--red); border-color: var(--red); }

@media (max-width: 960px) {
    .masthead__row { flex-wrap: wrap; }
    .navtoggle { display: inline-flex; flex: none; }
    .topnav { display: none; flex: 1 1 100%; }
    .topnav.is-open { display: block; }
    .topnav__list { flex-direction: column; gap: 0; border-top: 1px solid rgba(233, 237, 240, .2); }
    .topnav__list a { display: block; padding: .75em 0; border-bottom: 1px solid rgba(233, 237, 240, .14); }
}
@media (max-width: 600px) {
    .brand__mark, .brand__mark img, .brand__svg { width: 46px; height: 46px; }
    .brand { gap: .8rem; }
    .brand__name { letter-spacing: .08em; font-size: .82rem; }
    .brand__tagline { font-size: .7rem; }
}

/* ---------- Листы альбома ---------- */
.site-main { padding: 1.4rem 0 3rem; }
.sheet {
    border: 2px solid var(--line);
    padding: 1.8rem 2rem;
    margin-bottom: 1.2rem;
}
@media (max-width: 600px) {
    .sheet { padding: 1.3rem 1.1rem; }
}

.plate {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
    margin: 0 0 1.6rem;
    border: 2px solid var(--line);
    background: var(--paper);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1rem, 1.7vw, 1.3rem);
    line-height: 1.25;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.plate__no {
    flex: none;
    display: flex;
    align-items: center;
    padding: .35em .7em;
    border-right: 2px solid var(--line);
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: .1em;
}
.plate__name { padding: .35em 1em; min-width: 0; }
@media (max-width: 600px) {
    .plate { letter-spacing: .1em; }
    .plate__name { padding: .35em .7em; }
}

/* ---------- Чертёж с HTML-размерами ---------- */
.drawing { position: relative; margin: 0; }
.drawing img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(transparent 0, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-composite: intersect;
}
.dim, .area {
    position: absolute;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
.dim {
    color: var(--blue);
    font-size: clamp(.58rem, 1vw, .82rem);
    letter-spacing: .04em;
    text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper);
}
.dim--v { transform: translate(-50%, -50%) rotate(-90deg); }
.area {
    color: var(--ink);
    font-size: clamp(.62rem, 1.1vw, .9rem);
    text-shadow: 0 0 4px #fff, 0 0 4px #fff;
}
.area::after { content: " м²"; font-size: .8em; font-weight: 500; color: var(--muted); }

.stamp {
    display: inline-block;
    padding: .3em .8em;
    border: 4px double currentColor;
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
}
.stamp--blue { color: rgba(14, 110, 140, .85); }
.stamp--red { color: var(--red); }

/* ---------- Титульный лист ---------- */
.titlesheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.5rem 2.5rem;
    align-items: center;
    padding: 2.2rem 2rem 2rem 2.4rem;
}
.titlesheet__text { min-width: 0; }
.titlesheet__code {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.titlesheet__heading {
    margin: 0 0 1.4rem;
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3.9rem);
    line-height: 1.12;
    letter-spacing: .1em;
    text-transform: uppercase;
    hyphens: manual;
    overflow-wrap: normal;
}
.titlesheet__lead {
    max-width: 34em;
    margin: 0 0 1.6rem;
    font-size: 1.05rem;
    letter-spacing: .03em;
}
.titlesheet__figure { margin: 0; min-width: 0; }
.drawing__legend {
    position: absolute;
    right: 1.5%;
    top: 6%;
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-size: clamp(.62rem, 1vw, .82rem);
    font-weight: 600;
    line-height: 1.2;
}
.drawing__legend i {
    display: block;
    width: 1.8em;
    height: 1.1em;
    border: 1px solid var(--red);
    background: repeating-linear-gradient(45deg, var(--red) 0 2px, rgba(200, 52, 43, .35) 2px 4px);
}
.drawing__stamp {
    position: absolute;
    right: 2%;
    bottom: 9%;
    font-size: clamp(.8rem, 1.6vw, 1.35rem);
    transform: rotate(-4deg);
    background: rgba(233, 237, 240, .55);
}
@media (max-width: 960px) {
    .titlesheet { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 1.4rem; }
}

/* ---------- 01. Маршрут ---------- */
.route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 290px);
    gap: 0;
    padding: 0;
}
.route__main { padding: 1.8rem 2rem; min-width: 0; }
.route__line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0 .6rem;
    margin: .4rem 0 1rem;
    padding: 0 1rem 0 0;
    list-style: none;
}
.route__line::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(2.2rem + 26px);
    height: 2px;
    background: var(--ink);
}
.route__line::after {
    content: "";
    position: absolute;
    right: 0;
    top: calc(2.2rem + 21px);
    border-left: 11px solid var(--ink);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}
.route__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}
.route__span {
    position: relative;
    display: block;
    width: 100%;
    height: 2.2rem;
    padding-top: .15rem;
    color: var(--blue);
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--blue);
    margin-bottom: 0;
}
.route__span::before, .route__span::after {
    content: "";
    position: absolute;
    bottom: -5px;
    width: 1px;
    height: 9px;
    background: var(--blue);
}
.route__span::before { left: 0; }
.route__span::after { right: 0; }
.route__dot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-top: 0;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.45rem;
    transition: background-color .15s ease, color .15s ease;
}
.route__step:hover .route__dot { background: var(--ink); color: var(--paper); }
.route__step + .route__step .route__dot::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 9px solid var(--ink);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}
.route__label {
    margin-top: .7rem;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.3;
}
.route__hint {
    margin-top: .35rem;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.45;
}
.route__note { margin: 1.2rem 0 0; color: var(--muted); font-size: .76rem; }
.route__aside {
    padding: 1.8rem 1.6rem;
    border-left: 2px solid var(--line);
    background: rgba(243, 245, 247, .7);
    min-width: 0;
}
.route__aside-title {
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--line);
    font-size: 1.1rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li {
    position: relative;
    padding: 0 0 0 2rem;
    margin-bottom: .95rem;
    font-weight: 600;
    font-size: .88rem;
    line-height: 1.4;
}
.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .05em;
    width: 1.3rem;
    height: 1.1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 11l6 6L22 2' fill='none' stroke='%23C8342B' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
@media (max-width: 1100px) {
    .route { grid-template-columns: minmax(0, 1fr); }
    .route__aside { border-left: 0; border-top: 2px solid var(--line); }
}
@media (max-width: 960px) {
    .route__line { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
    .route__line::before { left: 26px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
    .route__line::after { display: none; }
    .route__step {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas: "dot label" "dot span" "dot hint";
        column-gap: 1rem;
        align-items: start;
        text-align: left;
        padding-bottom: 1.2rem;
    }
    .route__dot { grid-area: dot; }
    .route__step + .route__step .route__dot::before { display: none; }
    .route__label { grid-area: label; margin-top: .2rem; }
    .route__span { grid-area: span; height: auto; width: auto; border-bottom: 0; padding: 0; margin-top: .15rem; }
    .route__span::before, .route__span::after { display: none; }
    .route__hint { grid-area: hint; }
}
@media (max-width: 600px) {
    .titlesheet__heading { letter-spacing: .05em; }
    .route__main { padding: 1.3rem 1.1rem; }
    .route__aside { padding: 1.3rem 1.1rem; }
}

/* ---------- 02. Допустимое и запрещённое ---------- */
.compare__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    align-items: start;
}
.compare__item { margin: 0; min-width: 0; }
.compare__item figcaption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .7rem;
    margin-top: 1rem;
    text-align: center;
}
.compare__note { max-width: 30em; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.verdict {
    display: inline-block;
    padding: .45em 1.4em;
    border: 3px solid currentColor;
    background: var(--paper-light);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(.9rem, 1.4vw, 1.15rem);
    letter-spacing: .18em;
    text-transform: uppercase;
}
.verdict--yes { color: var(--green); }
.verdict--no { color: var(--red); }
.compare__axis {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}
.compare__axis::before {
    content: "";
    position: absolute;
    top: 4%;
    bottom: 6%;
    left: 50%;
    width: 2px;
    background: var(--ink);
}
.compare__axis span {
    position: relative;
    padding: .2em .3em .1em;
    border-bottom: 3px solid var(--ink);
    background: var(--paper);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: .04em;
}
@media (max-width: 960px) {
    .compare__grid { grid-template-columns: minmax(0, 1fr); }
    .compare__axis { padding: 1.4rem 0; }
    .compare__axis::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 2px; }
}

/* ---------- 03. Карточки дел ---------- */
.cards { display: grid; gap: 1.5rem; }
.cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.4rem; }
@media (max-width: 1100px) {
    .cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .cards--three, .cards--list { grid-template-columns: minmax(0, 1fr); }
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 52px;
    border: 2px solid var(--line);
    background: var(--paper-light);
    overflow: hidden;
    transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.card__spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 2px solid var(--line);
    background: var(--red);
    color: #fff;
}
.card__spine span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .82rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    white-space: nowrap;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.1rem 1.2rem 1.2rem;
}
.card__thumb {
    display: block;
    width: 62%;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    background: var(--paper);
}
.card__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2.2 / 1;
    object-fit: cover;
    filter: grayscale(.35) contrast(1.05);
    transition: filter .15s ease;
}
.card:hover .card__thumb img { filter: none; }
.card__pin {
    align-self: flex-start;
    margin-bottom: .6rem;
    padding: .1em .6em;
    background: var(--stamp);
    border: 1px solid var(--ink);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.card__title {
    margin: 0 0 .55rem;
    font-weight: 500;
    font-size: 1.28rem;
    line-height: 1.25;
    letter-spacing: .01em;
}
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--red); }
.card-excerpt { color: var(--muted); font-size: .8rem; line-height: 1.55; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .7rem 1rem;
    margin-top: auto;
    padding-top: .9rem;
}
.card__date { color: var(--muted); font-size: .76rem; }
.card .btn { font-size: .8rem; }
@media (max-width: 600px) {
    .card { padding-left: 40px; }
    .card__spine { width: 40px; }
    .card__thumb { width: 100%; }
}
.latest__more { margin: 1.5rem 0 0; text-align: right; }
.empty { color: var(--muted); }

/* ---------- 04–05. Пара листов ---------- */
.pair {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}
.pair > .sheet { margin-bottom: 0; min-width: 0; }
@media (max-width: 1100px) {
    .pair { grid-template-columns: minmax(0, 1fr); }
}

.forms__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.6rem;
    align-items: center;
}
.forms__pile { position: relative; min-width: 0; background: #DFE4E7; }
.forms__pile img { display: block; width: 100%; height: auto; }
.sheetlabel {
    position: absolute;
    transform-origin: left center;
    color: #2A3540;
    font-weight: 600;
    font-size: clamp(.5rem, 1vw, .76rem);
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
.forms__stamp {
    position: absolute;
    left: 68.6%;
    top: 59.5%;
    transform: translate(-50%, -50%) rotate(-12deg);
    font-size: clamp(.9rem, 2vw, 1.5rem);
    background: rgba(246, 247, 248, .88);
    box-shadow: 0 0 0 4px rgba(246, 247, 248, .88);
}
.doclist {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}
.doclist::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.2rem;
    bottom: 1.2rem;
    width: 2px;
    background: var(--red);
}
.doclist li {
    position: relative;
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    align-items: baseline;
    padding: .85rem 0 .85rem 1.6rem;
    border-bottom: 1px dashed rgba(22, 32, 42, .45);
}
.doclist li:last-child { border-bottom: 0; }
.doclist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 3px var(--paper);
}
.doclist__no { color: var(--muted); font-size: .8rem; }
.doclist__name { font-weight: 600; font-size: .86rem; line-height: 1.35; }
@media (max-width: 600px) {
    .forms__grid { grid-template-columns: minmax(0, 1fr); }
}

.ledger__wrap { overflow-x: auto; }
.ledger__table { min-width: 460px; background: rgba(246, 247, 248, .75); font-size: .8rem; line-height: 1.45; }
.ledger__table th { border: 0; border-bottom: 2px solid var(--line); border-left: 1px dashed var(--line); background: transparent; font-size: .85rem; }
.ledger__table td { border: 0; border-top: 1px dashed var(--line); border-left: 1px dashed var(--line); }
.ledger__table th:first-child, .ledger__table td:first-child { border-left: 0; }
.ledger__table tbody tr:first-child td { border-top: 0; }
.ledger__table tr.is-marked td { background: var(--stamp); }
.ledger__date { white-space: nowrap; font-weight: 600; color: var(--blue); }
.ledger__note { margin: 1rem 0 0; color: var(--muted); font-size: .76rem; }

/* ---------- Раскладки внутренних страниц ---------- */
.crumbs {
    margin: .4rem 0 1.2rem;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--muted);
}
.crumbs a { color: var(--ink); }
.crumbs__sep { color: var(--red); font-weight: 600; padding: 0 .2em; }
.crumbs__here { color: var(--muted); }

.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; }
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
    .layout-single .content-area { width: auto; }
}

.pagehead { background: rgba(246, 247, 248, .6); }
.pagehead__code {
    margin: 0 0 .6rem;
    color: var(--muted);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pagehead__title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(1.7rem, 3.6vw, 2.8rem);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.pagehead__intro { margin-top: 1rem; }
.pagehead__intro > *:last-child { margin-bottom: 0; }

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin: 1.4rem 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .8rem;
    border: 2px solid var(--ink);
    background: var(--paper-light);
    color: var(--ink);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.pager a.page-numbers:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--red); }
.pager .page-numbers.current { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--red); }
.pager .page-numbers.dots { border-color: transparent; background: transparent; min-width: auto; padding: 0 .3rem; }
.pager--inner { font-weight: 600; }
.pager--inner .post-page-numbers { display: inline-flex; min-width: 2.2rem; justify-content: center; padding: .2em .5em; border: 2px solid var(--ink); text-decoration: none; }
.pager--inner .post-page-numbers.current { background: var(--ink); color: var(--paper); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.5rem 1.4rem;
    border: 2px solid var(--line);
    background: var(--paper-sheet);
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 1.8rem; color: var(--ink); font-size: .86rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding-bottom: .5rem;
    margin-bottom: .9rem;
    border-bottom: 2px solid var(--line);
    color: var(--ink);
    font-size: 1rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.sidebar .widget-title::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--red); }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.sidebar a:hover { color: var(--red); }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { padding: .55rem 0; border-bottom: 1px dashed rgba(22, 32, 42, .4); line-height: 1.45; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { display: block; color: var(--muted); font-size: .74rem; }
.sidebar select { max-width: 100%; padding: .4em; border: 2px solid var(--ink); background: #fff; font-family: inherit; }

/* ---------- Запись и страница ---------- */
.doc { background: var(--paper-sheet); padding: 2.2rem 2.4rem; }
@media (max-width: 600px) { .doc { padding: 1.4rem 1.1rem; } }
.doc__head { margin-bottom: 1.4rem; padding-bottom: 1.1rem; border-bottom: 2px solid var(--line); }
.doc__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.2rem;
    margin: 0 0 .8rem;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .06em;
}
.doc__meta > * + *::before { content: "/"; color: var(--red); margin-right: 1.2rem; margin-left: -.6rem; }
.doc__title {
    margin: 0;
    font-weight: 600;
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    line-height: 1.18;
    letter-spacing: .02em;
}
.doc__cover { margin: 0 0 1.6rem; border: 2px solid var(--line); }
.doc__cover img { display: block; width: 100%; height: auto; }
.doc__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 0; font-size: .8rem; }
.doc__tags a { padding: .15em .6em; border: 1px solid var(--ink); text-decoration: none; background: var(--paper-light); }
.doc__tags a:hover { background: var(--ink); color: var(--paper); }

.entry { font-size: .95rem; line-height: 1.8; }
.entry > *:last-child { margin-bottom: 0; }
.entry h2 {
    position: relative;
    margin: 2rem 0 .9rem;
    padding-left: 1rem;
    font-size: 1.5rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.entry h2::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; background: var(--red); }
.entry h3 { margin: 1.6rem 0 .7rem; font-size: 1.25rem; letter-spacing: .03em; }
.entry h4 { margin: 1.4rem 0 .6rem; font-size: 1.08rem; }
.entry p { margin: 0 0 1.1em; }
.entry ul, .entry ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.entry li { margin-bottom: .45em; }
.entry ul { list-style: none; padding-left: 1.4em; }
.entry ul > li { position: relative; }
.entry ul > li::before { content: ""; position: absolute; left: -1.2em; top: .7em; width: 7px; height: 7px; background: var(--red); }
.entry ol { list-style: decimal-leading-zero; }
.entry ol > li::marker { color: var(--blue); font-weight: 600; }
.entry blockquote {
    margin: 1.6em 0;
    padding: 1.1em 1.4em 1.1em 1.5em;
    border: 2px solid var(--line);
    border-left: 8px solid var(--red);
    background: var(--stamp);
    font-weight: 500;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry blockquote cite { display: block; margin-top: .6em; font-size: .82rem; font-style: normal; color: var(--muted); }
.entry table { margin: 1.4em 0; font-size: .85rem; }
.entry th { background: var(--paper); }
.entry img { display: block; height: auto; }
.entry figure { margin: 1.5em 0; }
.entry figcaption, .entry .wp-caption-text { margin-top: .5em; color: var(--muted); font-size: .78rem; }
.entry pre {
    overflow-x: auto;
    padding: 1em 1.2em;
    background: var(--graphite);
    color: var(--on-dark);
    font-size: .85rem;
    line-height: 1.6;
}
.entry code { padding: .1em .35em; background: var(--paper); font-size: .9em; }
.entry pre code { padding: 0; background: none; }
.entry hr { margin: 2em 0; border: 0; border-top: 2px dashed var(--line); }
.entry .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry .aligncenter { margin-left: auto; margin-right: auto; }
.entry .wp-block-button__link { border-radius: 0; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; }

.neighbors {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}
.neighbors__link {
    display: block;
    padding: 1rem 1.2rem;
    border: 2px solid var(--line);
    background: var(--paper-light);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.3;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease;
}
.neighbors__link span { display: block; margin-bottom: .3rem; color: var(--muted); font-family: var(--font-mono); font-size: .74rem; font-weight: 500; }
.neighbors__link:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--red); }
.neighbors__link--next { grid-column: 2; text-align: right; }
@media (max-width: 600px) {
    .neighbors { grid-template-columns: minmax(0, 1fr); }
    .neighbors__link--next { grid-column: auto; }
}

/* ---------- Комментарии ---------- */
.talk { background: var(--paper-sheet); }
.talk__title, .comment-reply-title {
    font-size: 1.15rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.talk__list, .talk__list .children { margin: 0 0 1.6rem; padding: 0; list-style: none; }
.talk__list .children { margin: 1rem 0 0 1.6rem; }
.note { margin-bottom: 1rem; }
.note__body { padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--blue); background: var(--paper-light); }
.note__head { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; margin-bottom: .5rem; font-size: .82rem; }
.note__author { font-weight: 600; }
.note__date { color: var(--muted); }
.note__wait { color: var(--red); font-size: .8rem; }
.note__text { font-size: .88rem; }
.note__text p:last-child { margin-bottom: .4rem; }
.note__reply a { font-size: .8rem; font-weight: 600; }
.talk__closed { color: var(--muted); }
.comment-respond { margin-top: 1rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-size: .82rem; font-weight: 600; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .65em .8em;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: .9rem;
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-notes, .logged-in-as, .must-log-in { color: var(--muted); font-size: .8rem; }
.req { color: var(--red); }
.comment-form .submit {
    padding: .65em 1.4em;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.comment-form .submit:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--red); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; }

/* ---------- Поиск и 404 ---------- */
.finder { display: flex; gap: .6rem; margin: 1rem 0 1.4rem; }
.finder__field {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6em .8em;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: .9rem;
}
.finder__btn { flex: none; }
.sidebar .finder { flex-wrap: wrap; }
.lost { background: var(--paper-sheet); text-align: left; }
.lost__code {
    display: inline-block;
    margin: 0 0 1rem;
    padding: .2em .8em;
    border: 4px double var(--red);
    color: var(--red);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    transform: rotate(-3deg);
}
.lost__title {
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* ---------- Подвал ---------- */
.colophon {
    padding: 2.8rem 0 1.6rem;
    background: var(--graphite);
    color: var(--on-dark-muted);
    border-top: 4px solid var(--ink);
}
.colophon__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(233, 237, 240, .18);
}
.colophon__col { min-width: 0; }
.colophon .widget { margin-bottom: 1.4rem; color: var(--on-dark-muted); font-size: .84rem; line-height: 1.6; }
.colophon .widget:last-child { margin-bottom: 0; }
.colophon .widget-title {
    margin-bottom: .9rem;
    color: var(--on-dark);
    font-size: 1rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.colophon a { color: var(--on-dark); text-decoration-color: var(--red); }
.colophon a:hover { color: #fff; }
.colophon ul { margin: 0; padding: 0; list-style: none; }
.colophon li { position: relative; padding: .22rem 0 .22rem 1.1rem; }
.colophon li::before { content: "›"; position: absolute; left: 0; top: .18rem; color: var(--red); font-weight: 600; }
.colophon .post-date { display: block; color: var(--on-dark-muted); font-size: .74rem; }
.colophon__copy { margin: 1.4rem 0 0; color: var(--on-dark-muted); font-size: .78rem; }
@media (max-width: 960px) {
    .colophon__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 1rem 0;
    background: var(--graphite);
    color: var(--on-dark);
    border-top: 3px solid var(--red);
}
.cookie-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.cookie-banner__text { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--on-dark); }
.cookie-banner__ok { flex: none; }
@media (max-width: 600px) {
    .cookie-banner__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Служебные классы WordPress ---------- */
.alignleft { float: left; }
.alignright { float: right; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky { position: relative; }
.bypostauthor > .note__body { border-left-color: var(--red); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.gallery img { display: block; width: 100%; height: auto; }
