/*
Theme Name: dds_spe.su
Theme URI: https://spe.su/
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: spezh
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Oswald"; src: url("fonts/oswald.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "PT Sans Narrow"; src: url("fonts/ptsn-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PT Sans Narrow"; src: url("fonts/ptsn-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plexmono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Переменные ---------- */
:root {
    --metal: #23262B;
    --metal-hi: #2C2F34;
    --metal-plate: #33373C;
    --metal-deep: #1B1D21;
    --paper: #EDE9DE;
    --graph: #E8E4D8;
    --grid: #C9C4B4;
    --kalka: #BCCFD7;
    --kalka-soft: #D3DFE5;
    --ink: #1C1E22;
    --muted: #6E7681;
    --blue: #2B5FA8;
    --blue-deep: #1F4C8C;
    --red: #C4362B;
    --red-deep: #A62B22;
    --ochre: #B98A3C;
    --light: #EDE9DE;
    --light-muted: #9AA0A6;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
    --f-text: "PT Sans Narrow", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-hand: "Caveat", "Segoe Print", cursive;
    --f-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
    --clip-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 64'%3E%3Cpath d='M8 14V50a6 6 0 0 0 12 0V10a8 8 0 0 0-16 0v42a10 10 0 0 0 20 0' fill='none' stroke='%23C4362B' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
    --clip-steel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 64'%3E%3Cpath d='M8 14V50a6 6 0 0 0 12 0V10a8 8 0 0 0-16 0v42a10 10 0 0 0 20 0' fill='none' stroke='%2378808A' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M8 14V50a6 6 0 0 0 12 0V10a8 8 0 0 0-16 0v42a10 10 0 0 0 20 0' fill='none' stroke='%23D9DEE3' stroke-width='1' stroke-linecap='round' transform='translate(-.6 -.6)'/%3E%3C/svg%3E");
    --binder: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 56'%3E%3Cpath d='M30 14 6 6a4 4 0 0 0-4 6l2 16-2 16a4 4 0 0 0 4 6l24-8' fill='none' stroke='%23B9BEC4' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M30 18 10 12M30 38 10 44' fill='none' stroke='%23E2E5E8' stroke-width='1'/%3E%3Crect x='28' y='8' width='22' height='40' rx='2' fill='%23151618'/%3E%3Crect x='30' y='10' width='3' height='36' fill='%23383B40'/%3E%3Crect x='48' y='12' width='26' height='32' fill='%23151618'/%3E%3C/svg%3E");
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--metal);
    background-image: url("images/metal-bg.jpg");
    background-size: 512px 512px;
    color: var(--ink);
    font-family: var(--f-text);
    font-size: 1.125rem;
    line-height: 1.55;
    overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 600; line-height: 1.15; margin: 1.4em 0 .6em; hyphens: auto; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px dashed var(--red); outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; }
button, input, textarea, select { font: inherit; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--red); color: #fff; padding: .6rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- Кнопки-штампы ---------- */
.stamp-btn {
    display: inline-block;
    padding: .5em 1.05em .45em;
    background-color: var(--red);
    background-image:
        radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.2px),
        radial-gradient(rgba(0,0,0,.18) 1px, transparent 1.3px);
    background-size: 5px 5px, 7px 7px;
    background-position: 0 0, 2px 3px;
    color: #fff;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    border: 0;
    border-radius: 0;
    box-shadow: 3px 3px 0 rgba(28,30,34,.55);
    transform: translate(1px, -1px) rotate(-.6deg);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
    white-space: normal;
}
.stamp-btn:hover { color: #fff; background-color: var(--red-deep); transform: translate(3px, 1px) rotate(-.6deg); box-shadow: 1px 1px 0 rgba(28,30,34,.55); }
.stamp-btn:active { transform: translate(4px, 2px) rotate(-.6deg); box-shadow: none; }

.ink-link { font-family: var(--f-head); letter-spacing: .05em; text-transform: uppercase; font-size: .95rem; }

/* ---------- Шапка ---------- */
.masthead {
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18)), var(--metal-hi);
    background-image: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.2)), url("images/metal-bg.jpg");
    background-size: auto, 512px 512px;
    border-bottom: 3px solid var(--red);
    box-shadow: 0 6px 18px rgba(0,0,0,.45);
    color: var(--light);
    position: relative;
    z-index: 5;
}
.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.6rem 0 1.5rem;
}
.brand { display: flex; align-items: flex-start; gap: 1rem; color: var(--light); text-decoration: none; min-width: 0; flex: 1 1 520px; }
.brand:hover { color: #fff; }
.brand-mark { flex: 0 0 auto; color: var(--light); padding-top: .2rem; }
.brand-svg { display: block; width: 56px; height: 56px; }
.brand-logo { width: 64px; height: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    line-height: 1.12;
    letter-spacing: .04em;
    text-transform: uppercase;
    max-width: 22em;
}
.brand-desc { margin-top: .5rem; font-size: 1.05rem; color: #D4D2CB; max-width: 34em; line-height: 1.35; }

.nav-toggle { display: none; }
.top-nav-list { list-style: none; margin: 0; padding: .45rem 0 0; display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.top-nav-list a {
    display: inline-block;
    color: var(--light);
    text-decoration: none;
    font-family: var(--f-text);
    font-size: 1.05rem;
    padding: .15rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .12s ease, color .12s ease;
}
.top-nav-list a:hover, .top-nav-list .current-menu-item > a { color: #fff; border-bottom-color: var(--red); }

/* ---------- Листы ---------- */
.sheet {
    position: relative;
    background-color: var(--paper);
    padding: 2.4rem 2.6rem;
    box-shadow: 9px 11px 0 -2px var(--kalka), 9px 11px 0 -1px #9FB6C4, 0 12px 26px rgba(0,0,0,.5);
}
.sheet-grid {
    background-color: var(--graph);
    background-image:
        linear-gradient(rgba(201,196,180,.85) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,196,180,.85) 1px, transparent 1px),
        linear-gradient(rgba(201,196,180,.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,196,180,.45) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    background-position: -1px -1px;
}
.sheet-vatman { background-color: var(--paper); }
.sheet-curl::after {
    content: "";
    position: absolute;
    right: 0; bottom: 0;
    width: 64px; height: 64px;
    background: linear-gradient(315deg, var(--metal) 0 48%, #D9D4C6 50%, #F7F4EC 72%, #E3DED0 100%);
    box-shadow: -3px -3px 6px rgba(0,0,0,.15);
}

.clip { position: absolute; display: block; pointer-events: none; background-repeat: no-repeat; background-size: contain; }
.clip-top { width: 22px; height: 60px; top: -22px; right: 2.2rem; background-image: var(--clip-red); transform: rotate(-18deg); z-index: 3; }
.clip-card { width: 18px; height: 50px; top: -18px; left: 1.4rem; background-image: var(--clip-steel); transform: rotate(-8deg); z-index: 3; }
.binder { position: absolute; width: 62px; height: 46px; top: 46%; background-image: var(--binder); background-size: contain; background-repeat: no-repeat; z-index: 3; pointer-events: none; }
.binder-left { left: -40px; }
.binder-right { right: -40px; transform: scaleX(-1); }

/* ---------- Заголовки секций ---------- */
.sec-title {
    margin: 0 0 1.4rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.45rem, 2.6vw, 1.95rem);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink);
}
.sec-num {
    display: inline-block;
    color: var(--blue);
    font-weight: 400;
    margin-right: .2em;
    border-bottom: 3px solid var(--blue);
    line-height: 1;
    padding-bottom: .12em;
}
.sec-title-light { color: var(--light); }
.sec-title-light .sec-num { color: var(--light-muted); border-color: var(--blue); }
.eyebrow { margin: 0 0 .1rem; font-family: var(--f-head); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.pencil-note {
    font-family: var(--f-hand);
    font-weight: 600;
    font-size: 1.9rem;
    color: var(--red);
    margin: 0;
    line-height: 1;
    transform: rotate(-5deg);
    position: relative;
    padding-right: 1.6rem;
    border-bottom: 2px solid var(--red);
    border-bottom-left-radius: 60% 6px;
    white-space: nowrap;
}
.pencil-note::after {
    content: "";
    position: absolute;
    right: 0; top: .1em;
    width: 1rem; height: 1rem;
    border: 2px solid var(--red);
    border-radius: 50% 45% 55% 50%;
}

/* ---------- Главная ---------- */
.front { padding: 3rem 0 4rem; }
.fs { margin-bottom: 3.2rem; }
.fs-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 2rem; }
.fs-head .sec-title { margin-bottom: 2rem; }

/* Блок 1: маршрут */
.fs-route { transform: rotate(-.25deg); padding-bottom: 2.6rem; }
.route {
    list-style: none;
    margin: 0;
    padding: 0 18px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    position: relative;
}
.route::before {
    content: "";
    position: absolute;
    left: 2px; right: 2px; top: 11px;
    height: 2px;
    background: var(--ink);
}
.route::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 5px;
    height: 14px;
    background:
        linear-gradient(to top right, transparent 46%, var(--ink) 47% 55%, transparent 56%) left top / 14px 7px no-repeat,
        linear-gradient(to bottom right, transparent 46%, var(--ink) 47% 55%, transparent 56%) left bottom / 14px 7px no-repeat,
        linear-gradient(to top left, transparent 46%, var(--ink) 47% 55%, transparent 56%) right top / 14px 7px no-repeat,
        linear-gradient(to bottom left, transparent 46%, var(--ink) 47% 55%, transparent 56%) right bottom / 14px 7px no-repeat;
}
.route-node { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; min-width: 0; padding: 0 .2rem; }
.route-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--graph);
    border: 2px solid var(--ink);
    transition: background-color .15s ease, transform .15s ease;
}
.route-node:hover .route-dot { background: var(--red); border-color: var(--red); transform: scale(1.12); }
.route-label { margin-top: .7rem; font-size: 1.02rem; line-height: 1.2; hyphens: auto; }

/* Блок 2: разрез */
.fs-cut { margin-top: -1rem; padding: 1.3rem; transform: rotate(.2deg); }
.cut-frame { border: 2px solid var(--blue); padding: 2rem 2.2rem 2.2rem; position: relative; }
.cut-frame::after {
    content: "";
    position: absolute;
    right: -2px; bottom: -2px;
    width: 34px; height: 34px;
    background: linear-gradient(315deg, var(--paper) 0 48%, var(--blue) 49% 52%, #FBF9F3 53%);
}
.cut-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); gap: 2rem; align-items: center; }
.cut-figure { margin: 0; display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) 5.6rem; align-items: stretch; }
.cut-img { width: 100%; height: auto; }
.cut-labels { list-style: none; margin: 0; padding: 0; position: relative; font-size: 1.05rem; }
.cut-labels li { position: absolute; transform: translateY(-50%); line-height: 1.1; white-space: nowrap; }
.cut-labels-left li { right: .45rem; text-align: right; }
.cut-labels-right li { left: .45rem; }
.cut-side { border-left: 1px solid var(--ink); padding-left: 1.6rem; font-family: var(--f-mono); font-size: .86rem; line-height: 1.55; color: var(--ink); align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ochre-stamp {
    align-self: flex-start;
    margin-top: 1.4rem;
    display: inline-block;
    padding: .3rem .9rem .25rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.55rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ochre);
    border: 4px double var(--ochre);
    outline: 2px solid var(--ochre);
    outline-offset: 3px;
    background: repeating-linear-gradient(-45deg, rgba(185,138,60,.12) 0 2px, transparent 2px 7px);
    transform: rotate(-6deg);
    opacity: .9;
    mix-blend-mode: multiply;
}

/* Последние записи */
.fs-journal {
    background: var(--paper);
    background-image: linear-gradient(rgba(201,196,180,.35) 1px, transparent 1px);
    background-size: 100% 28px;
    padding: 2.4rem 2.6rem 2rem;
    box-shadow: 0 10px 24px rgba(0,0,0,.45);
    position: relative;
}
.journal-head { margin-bottom: 2rem; }
.journal-head .sec-title { margin-bottom: 0; }
.journal-more { margin: 1.8rem 0 0; text-align: right; }
.empty-note { font-size: 1.15rem; color: var(--muted); margin: 0; }

/* ---------- Карточки-кальки ---------- */
.cards { display: grid; gap: 2.4rem 2rem; }
.cards-front { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .cards-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(188,207,215,.82);
    border: 1px solid #A7BCC7;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 4px 6px 0 rgba(43,95,168,.35), 0 8px 18px rgba(0,0,0,.25);
    transition: transform .15s ease, box-shadow .15s ease;
    min-width: 0;
}
.cards .card:nth-child(3n+1) { transform: rotate(-.5deg); }
.cards .card:nth-child(3n+2) { transform: rotate(.35deg); }
.cards .card:nth-child(3n) { transform: rotate(-.2deg); }
.card::after {
    content: "";
    position: absolute;
    right: -1px; top: -1px;
    width: 28px; height: 28px;
    background: linear-gradient(225deg, var(--paper) 0 49%, #E4EDF2 51%, #9FB6C4 100%);
    box-shadow: -2px 2px 3px rgba(0,0,0,.15);
}
.fs-journal .card::after, .desk .card::after { background: linear-gradient(225deg, var(--paper) 0 49%, #E4EDF2 51%, #9FB6C4 100%); }
.cards .card:hover { transform: translate(-3px, -3px) rotate(0deg); box-shadow: 7px 9px 0 rgba(43,95,168,.45), 0 10px 22px rgba(0,0,0,.28); }
.card-thumb { border: 2px solid #F4F7F8; outline: 1px solid var(--blue); outline-offset: 0; background: #F4F7F8; padding: 3px; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9.2; object-fit: cover; }
.card-body { flex: 1; display: flex; flex-direction: column; padding-top: 1rem; min-width: 0; }
.card-title {
    margin: 0 0 .5rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.18;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue-deep); text-decoration: underline; text-decoration-color: var(--blue); }
.card-excerpt { font-size: 1.02rem; line-height: 1.4; color: #2A2E34; flex: 1; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: .9rem; }
.card-date { font-size: .98rem; color: #4F5862; font-family: var(--f-mono); font-size: .85rem; }
.card.sticky .card-title::before { content: "★ "; color: var(--red); }

/* Блок материалов */
.fs-materials { padding: 2.4rem 2.6rem 2.6rem; transform: rotate(-.15deg); }
.mat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 11rem); gap: 2rem; align-items: center; }
.table-wrap { overflow-x: auto; min-width: 0; }
.spec-table { font-size: 1.05rem; min-width: 30rem; }
.spec-table th, .spec-table td { border: 1px solid rgba(43,95,168,.55); padding: .45rem .9rem; text-align: left; }
.spec-table th { background: #DAD6CB; font-family: var(--f-text); font-weight: 700; color: var(--ink); }
.spec-table td:nth-child(3), .spec-table td:nth-child(4) { font-family: var(--f-mono); font-size: .9rem; white-space: nowrap; }
.spec-table thead th { border-bottom: 2px solid var(--blue); }
.spec-table tbody tr:hover td { background: rgba(43,95,168,.07); }
.spec-table tbody tr.row-marked { outline: 2px solid var(--red); outline-offset: 1px; border-radius: 40% / 60%; }
.table-wrap { padding: 6px 4px; }
.sample { margin: 0; position: relative; text-align: center; }
.sample img { width: 100%; max-width: 11rem; margin: 0 auto; mix-blend-mode: multiply; }
.sample-face { position: absolute; font-family: var(--f-mono); font-size: .8rem; color: var(--blue); background: rgba(237,233,222,.85); padding: 0 .25rem; line-height: 1.3; }
.sample-a { top: 26%; left: 47%; }
.sample-b { top: 56%; left: 28%; }
.sample-c { top: 50%; right: 9%; }
.sample figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; line-height: 1.3; }
.mat-note { margin: 1.4rem 0 0; font-size: .98rem; color: var(--muted); max-width: 46rem; }

/* Блок цеха: металлическая плита */
.plate {
    position: relative;
    background-color: var(--metal-plate);
    background-image: linear-gradient(100deg, rgba(255,255,255,.07), rgba(0,0,0,.18) 45%, rgba(255,255,255,.05) 70%, rgba(0,0,0,.2)), url("images/metal-bg.jpg");
    background-size: auto, 512px 512px;
    border: 1px solid #4A4F55;
    box-shadow: 0 12px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
    padding: 2.4rem 2.8rem;
    color: var(--light);
}
.screw { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9AA0A6, #4A4F55 70%); box-shadow: 0 1px 1px rgba(0,0,0,.6); }
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 2px; background: #2A2D31; transform: rotate(35deg); }
.screw-tl { top: 12px; left: 12px; } .screw-tr { top: 12px; right: 12px; } .screw-bl { bottom: 12px; left: 12px; } .screw-br { bottom: 12px; right: 12px; }
.shop-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 2.4rem; align-items: end; }
.shop-photo .sec-title { margin-bottom: 1.2rem; }
.shop-photo img { width: 100%; aspect-ratio: 386 / 136; object-fit: cover; border: 1px solid #555A60; box-shadow: 0 6px 14px rgba(0,0,0,.45); }
.facts-title { margin: 0 0 1.3rem; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: .04em; text-transform: uppercase; color: #C9CCCF; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: .8rem 0; border-bottom: 1px solid rgba(237,233,222,.45); font-size: 1.12rem; color: var(--light); }
.facts li:first-child { border-top: 0; }
.facts strong { font-weight: 700; color: #fff; }

/* ---------- Внутренние страницы ---------- */
.inner { padding: 2rem 0 4rem; }
.inner-head { margin-bottom: 2rem; color: var(--light); }
.crumbs { font-size: 1rem; color: var(--light-muted); margin-bottom: .6rem; }
.crumbs a { color: var(--light); text-decoration-color: rgba(237,233,222,.4); }
.crumbs a:hover { color: #fff; text-decoration-color: var(--red); }
.crumbs-sep { color: var(--red); margin: 0 .25rem; }
.inner-title { margin: .2rem 0 .4rem; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: .05em; text-transform: uppercase; color: var(--light); }
.inner-lead { color: #CFCDC6; max-width: 48rem; margin: 0; }
.inner-lead p { margin: 0; }

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

.desk { background: var(--paper); background-image: linear-gradient(rgba(201,196,180,.35) 1px, transparent 1px); background-size: 100% 28px; padding: 2.2rem 2rem 1.8rem; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.empty-sheet { padding: .5rem 0; }

/* Документ: запись и страница */
.doc { padding: 2.6rem 3rem 2.4rem; margin-bottom: 2.4rem; }
.doc-head { border-bottom: 2px solid var(--blue); padding-bottom: 1rem; margin-bottom: 1.6rem; }
.doc-title { margin: 0 0 .5rem; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: .03em; text-transform: uppercase; color: var(--ink); }
.doc-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-family: var(--f-mono); font-size: .88rem; color: var(--muted); }
.doc-cats a { margin-right: .6rem; color: var(--blue); }
.doc-cover { margin: 0 0 1.8rem; border: 1px solid var(--blue); padding: 4px; background: #F6F4EE; }
.doc-cover img { width: 100%; }
.doc-body { font-size: 1.18rem; line-height: 1.65; }
.doc-body h2 { font-size: 1.6rem; letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid rgba(43,95,168,.5); padding-bottom: .3rem; }
.doc-body h3 { font-size: 1.3rem; letter-spacing: .02em; }
.doc-body ul, .doc-body ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
.doc-body li { margin-bottom: .35em; }
.doc-body ul li::marker { color: var(--red); }
.doc-body ol li::marker { color: var(--blue); font-family: var(--f-mono); }
.doc-body blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem 1.2rem 1.8rem;
    background: var(--kalka-soft);
    border-left: 4px solid var(--blue);
    font-size: 1.22rem;
}
.doc-body blockquote p:last-child { margin-bottom: 0; }
.doc-body table { margin: 1.4em 0; font-size: 1.02rem; }
.doc-body th, .doc-body td { border: 1px solid rgba(43,95,168,.6); padding: .5rem .75rem; text-align: left; }
.doc-body th { background: #DAD6CB; }
.doc-body thead, .doc-body .wp-block-table thead { border-bottom: 2px solid var(--blue); }
.doc-body .wp-block-table { overflow-x: auto; }
.doc-body figure { margin: 1.6em 0; }
.doc-body figcaption, .wp-caption-text { font-size: .95rem; color: var(--muted); margin-top: .4rem; }
.doc-body pre, .doc-body code { font-family: var(--f-mono); font-size: .9rem; background: #E2DED2; }
.doc-body pre { padding: 1rem 1.2rem; overflow-x: auto; }
.doc-body code { padding: .05em .3em; }
.doc-body hr { border: 0; border-top: 1px dashed var(--blue); margin: 2em 0; }
.doc-body img { height: auto; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
.doc-pages { margin-top: 1.4rem; font-family: var(--f-head); }
.doc-tags { margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem .8rem; }
.doc-tags a { font-family: var(--f-mono); font-size: .88rem; text-decoration: none; border: 1px solid var(--blue); padding: .1rem .5rem; }
.doc-tags a:hover { background: var(--blue); color: #fff; }

.post-navigation { margin-bottom: 2.4rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-navigation a { display: block; height: 100%; padding: 1rem 1.2rem; background: var(--metal-plate); border: 1px solid #4A4F55; color: var(--light); text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
.post-navigation a:hover { border-color: var(--red); transform: translateY(-2px); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.pn-label { display: block; font-family: var(--f-head); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--light-muted); }
.pn-title { display: block; margin-top: .3rem; font-size: 1.08rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Сайдбар ---------- */
.sidebar {
    background: var(--kalka);
    border: 1px solid #A7BCC7;
    padding: 1.6rem 1.5rem;
    color: var(--ink);
    box-shadow: 4px 6px 0 rgba(43,95,168,.35), 0 8px 18px rgba(0,0,0,.3);
    position: relative;
    min-width: 0;
}
.sidebar::before { content: ""; position: absolute; top: -18px; right: 1.6rem; width: 18px; height: 50px; background: var(--clip-steel) no-repeat center / contain; transform: rotate(-8deg); }
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { margin: 0 0 .9rem; font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--blue); padding-bottom: .35rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px solid rgba(43,95,168,.3); line-height: 1.3; color: var(--ink); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: #173F75; text-decoration: none; }
.sidebar a:hover { color: var(--red); text-decoration: underline; }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: .8rem; color: #3E4A56; }
.sidebar p { color: var(--ink); }
.sidebar .search-label { color: var(--ink); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 2.4rem; }
.pager .page-numbers {
    display: inline-block;
    min-width: 2.4rem;
    padding: .35rem .7rem;
    text-align: center;
    font-family: var(--f-mono);
    font-size: .95rem;
    color: var(--ink);
    background: var(--kalka-soft);
    border: 1px solid var(--blue);
    text-decoration: none;
    transition: transform .1s ease, background-color .1s ease;
}
.pager a.page-numbers:hover { background: var(--blue); color: #fff; transform: translate(1px, 1px); }
.pager .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.pager .page-numbers.dots { background: none; border: 0; min-width: 0; }

/* ---------- Поиск ---------- */
.search-form { margin: 0 0 1rem; }
.search-label { display: block; font-family: var(--f-head); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.search-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.search-field { flex: 1 1 12rem; min-width: 0; padding: .55rem .8rem; border: 1px solid var(--blue); border-radius: 0; background: #F8F6F0; color: var(--ink); }
.search-submit { flex: 0 0 auto; }

/* ---------- 404 ---------- */
.lost { text-align: left; max-width: 46rem; padding: 2.8rem 3rem; }
.lost-code { margin: 0; font-family: var(--f-head); font-weight: 300; font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--blue); letter-spacing: .06em; }
.lost-text { font-size: 1.15rem; }
.lost-home { margin-top: 1.4rem; }
.lost-note { position: absolute; right: 2.6rem; top: 3rem; }

/* ---------- Комментарии ---------- */
.remarks { padding: 2.2rem 2.6rem; margin-bottom: 2.4rem; }
.remarks-title { margin: 0 0 1.2rem; font-family: var(--f-head); font-size: 1.5rem; letter-spacing: .04em; text-transform: uppercase; }
.remarks-list, .remarks-list .children { list-style: none; margin: 0; padding: 0; }
.remarks-list .children { padding-left: 1.6rem; border-left: 2px solid var(--kalka); }
.note { padding: 1rem 0; border-bottom: 1px solid rgba(43,95,168,.3); }
.note-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: .5rem; }
.note-head img { border-radius: 0; border: 1px solid var(--blue); }
.note-author { font-weight: 700; }
.note-date { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); }
.note-wait { font-family: var(--f-hand); font-size: 1.4rem; color: var(--red); margin: 0 0 .4rem; }
.note-reply a { font-family: var(--f-head); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-family: var(--f-head); font-size: 1.35rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .8rem; }
.comment-reply-title small { margin-left: .8rem; font-size: .9rem; }
.form-note { color: var(--muted); font-size: 1rem; }
.comment-form label { display: block; font-family: var(--f-head); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .55rem .8rem;
    border: 1px solid var(--blue);
    border-radius: 0;
    background: #F8F6F0;
    color: var(--ink);
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { text-transform: none; font-family: var(--f-text); font-size: 1rem; letter-spacing: 0; }
.comment-form .submit {
    padding: .55em 1.2em .5em;
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: 0;
    font-family: var(--f-head);
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 rgba(28,30,34,.55);
    cursor: pointer;
    transform: rotate(-.6deg);
}
.comment-form .submit:hover { background: var(--red-deep); transform: translate(2px, 2px) rotate(-.6deg); box-shadow: 1px 1px 0 rgba(28,30,34,.55); }

/* ---------- Подвал ---------- */
.basement {
    background-color: #202327;
    background-image: linear-gradient(rgba(16,17,20,.55), rgba(16,17,20,.55)), url("images/metal-bg.jpg");
    background-size: auto, 512px 512px;
    border-top: 3px solid var(--red);
    color: var(--light);
    padding: 2.6rem 0 1.4rem;
}
.basement-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 3rem; }
.basement-col { min-width: 0; }
.basement .widget { margin-bottom: 1.2rem; color: var(--light); }
.basement .widget-title { margin: 0 0 .7rem; font-family: var(--f-head); font-weight: 600; font-size: 1.35rem; letter-spacing: .05em; text-transform: uppercase; color: var(--light); }
.basement p, .basement .textwidget { color: #D4D2CB; font-size: 1.05rem; line-height: 1.45; }
.basement ul { list-style: none; margin: 0; padding: 0; }
.basement li { margin-bottom: .3rem; }
.basement a { color: var(--light); text-decoration-color: rgba(237,233,222,.5); }
.basement a:hover { color: #fff; text-decoration-color: var(--red); }
.copyline { margin: 1.6rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(154,160,166,.3); font-size: 1rem; color: var(--light-muted); }

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1.4rem;
    max-width: 58rem;
    margin-inline: auto;
    padding: 1rem 1.4rem;
    background: var(--metal-plate);
    border: 1px solid #4A4F55;
    border-top: 3px solid var(--red);
    color: var(--light);
    box-shadow: 0 10px 28px rgba(0,0,0,.55);
}
.cookie-text { margin: 0; flex: 1 1 22rem; font-size: 1.02rem; color: var(--light); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .cut-grid { grid-template-columns: minmax(0, 1fr); }
    .cut-side { border-left: 0; border-top: 1px solid var(--ink); padding: 1.2rem 0 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 1.6rem; }
    .cut-side p { flex: 1 1 16rem; }
    .ochre-stamp { margin-top: .4rem; }
    .layout-single .cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .masthead-row { align-items: center; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        padding: .5rem .8rem;
        background: transparent;
        border: 1px solid rgba(237,233,222,.5);
        color: var(--light);
        font-family: var(--f-head);
        letter-spacing: .08em;
        text-transform: uppercase;
        cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--light); 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; }
    .top-nav { display: none; flex-basis: 100%; }
    .top-nav.is-open { display: block; }
    .top-nav-list { flex-direction: column; gap: 0; padding: .4rem 0 0; border-top: 1px solid rgba(237,233,222,.2); }
    .top-nav-list a { display: block; padding: .6rem 0; border-bottom: 1px solid rgba(237,233,222,.12); }
    .brand { flex-basis: 0; }

    .route { grid-template-columns: minmax(0, 1fr); padding: 0 0 0 4px; row-gap: 1.1rem; }
    .route::before { left: 13px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
    .route::after { display: none; }
    .route-node { flex-direction: row; text-align: left; gap: 1rem; }
    .route-label { margin-top: 0; }
    .cards-front { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.6rem; }
    .mat-grid { grid-template-columns: minmax(0, 1fr); }
    .sample { max-width: 14rem; justify-self: center; }
    .shop-grid { grid-template-columns: minmax(0, 1fr); }
    .basement-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .binder { display: none; }
}
@media (max-width: 600px) {
    body { font-size: 1.06rem; }
    .brand { flex: 1 1 100%; }
    .brand-name { font-size: 1.12rem; letter-spacing: .02em; }
    .brand-svg { width: 42px; height: 42px; }
    .fs-head .sec-title { margin-bottom: .6rem; }
    .fs-route .pencil-note { margin-bottom: 1.6rem; }
    .brand-desc { font-size: .98rem; }
    .front { padding: 2rem 0 3rem; }
    .sheet { padding: 1.8rem 1.3rem; }
    .fs-cut { padding: .8rem; }
    .cut-frame { padding: 1.4rem 1rem 1.6rem; }
    .cut-figure { grid-template-columns: 4.6rem minmax(0, 1fr) 4rem; }
    .cut-labels { font-size: .82rem; }
    .cut-labels-left li { right: .2rem; }
    .cut-labels-right li { left: .2rem; }
    .fs-journal { padding: 1.8rem 1.3rem 1.6rem; }
    .fs-materials { padding: 1.8rem 1.3rem 2.2rem; }
    .plate { padding: 2rem 1.3rem; }
    .pencil-note { font-size: 1.6rem; }
    .cards-front, .cards-list, .layout-single .cards-list { grid-template-columns: minmax(0, 1fr); }
    .desk { padding: 1.6rem 1.1rem 1.4rem; }
    .doc { padding: 1.8rem 1.3rem 1.8rem; }
    .remarks { padding: 1.6rem 1.3rem; }
    .lost { padding: 2rem 1.3rem; }
    .lost-note { position: static; display: inline-block; margin-top: 1.4rem; }
    .post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
    .post-navigation .nav-next { grid-column: 1; }
    .basement-cols { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .cookie-banner { left: .6rem; right: .6rem; bottom: .6rem; padding: .9rem 1rem; }
    .clip-top { right: 1.2rem; }
}
