/*
Theme Name: dds_preludealarms.com
Theme URI: https://preludealarms.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: pdalarm
*/

/* ---------- Шрифты ---------- */
@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+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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-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 Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-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+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+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 {
    --bg: #14181C;
    --panel: #1E242A;
    --grid: #2E3A42;
    --text: #E8EDF0;
    --muted: #7E8C96;
    --red: #E23B2E;
    --amber: #F2B33D;
    --black: #0E1114;
    --aside: #171C21;
    --line: #3A4852;
    --soft: #B9C4CB;
    --f-head: "Oswald", "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
    --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(46, 58, 66, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 58, 66, .55) 1px, transparent 1px),
        linear-gradient(rgba(46, 58, 66, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 58, 66, .22) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
    background-position: -1px -1px;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .6em;
    font-family: var(--f-head);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--text);
    overflow-wrap: break-word;
    hyphens: auto;
}
p, li, dd, td, th, blockquote, figcaption, .card-title, .ask-name, .part-text {
    overflow-wrap: break-word;
    hyphens: auto;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
button { font: inherit; }

.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;
}
.skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    padding: .6rem 1rem;
    background: var(--amber); color: var(--black);
    font-family: var(--f-head); text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 1rem; }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .55rem 1.15rem;
    border: 1px solid var(--amber);
    border-radius: 0;
    background: transparent;
    color: var(--amber);
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .88rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color .12s, color .12s, transform .12s;
}
.btn:hover { background: var(--amber); color: var(--black); transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--red); }
.btn-main { background: var(--red); color: #fff; }
.btn-main:hover { background: var(--black); color: var(--amber); }
.btn-ghost-dark { border-color: #fff; color: #fff; }
.btn-ghost-dark:hover { background: var(--black); color: #fff; box-shadow: 2px 2px 0 var(--amber); }

/* ---------- Шапка ---------- */
.masthead {
    background: var(--black);
    border-bottom: 1px solid var(--grid);
    position: relative;
}
.masthead::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0 8%, var(--red) 8% 14%, transparent 14%);
}
.masthead-row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.3rem 0;
}
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--text); min-width: 0; flex: 1 1 320px; }
.brand:hover { color: var(--text); }
.brand-logo-box { flex: 0 0 auto; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.brand-logo { max-width: 56px; max-height: 56px; width: auto; height: auto; }
.brand-mark { display: block; width: 56px; height: 56px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head); font-weight: 600; text-transform: uppercase;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.15; letter-spacing: .04em;
    max-width: 30ch;
}
.brand-desc { margin-top: .3rem; color: var(--muted); font-size: .78rem; line-height: 1.4; max-width: 56ch; }

.nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .5rem .8rem;
    border: 1px solid var(--line); background: transparent; color: var(--text);
    font-family: var(--f-head); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--red); 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; }
.nav-toggle[aria-expanded="true"] { border-color: var(--amber); }

.topnav { display: none; width: 100%; }
.topnav.is-open { display: block; }
.topnav-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--grid); }
.topnav-list li { border-bottom: 1px solid var(--grid); }
.topnav-list a {
    display: block; padding: .75rem 0;
    font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem;
    text-decoration: none; color: var(--text);
}
.topnav-list a:hover { color: var(--amber); }
.topnav-list .current-menu-item > a, .topnav-list .current_page_item > a { color: var(--red); }

@media (min-width: 960px) {
    .nav-toggle { display: none; }
    .topnav, .topnav.is-open { display: block; width: auto; }
    .topnav-list { display: flex; flex-wrap: wrap; gap: .3rem 1.8rem; border: 0; }
    .topnav-list li { border: 0; }
    .topnav-list a { padding: .25rem 0; border-bottom: 2px solid transparent; }
    .topnav-list .current-menu-item > a, .topnav-list .current_page_item > a { border-bottom-color: var(--red); }
}

/* ---------- Лист с проводами ---------- */
.board { padding: 2rem 0 3rem; }
.board-inner { position: relative; }
@media (min-width: 960px) {
    .board-inner::before, .board-inner::after {
        content: "";
        position: absolute; top: -2rem; bottom: -3rem;
        width: 1px; background: var(--grid);
    }
    .board-inner::before { left: -24px; }
    .board-inner::after { right: -24px; }
}

/* ---------- Заголовки секций ---------- */
.sec-title {
    display: flex; align-items: center; gap: .85rem;
    margin: 0 0 1.4rem;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    letter-spacing: .05em;
}
.sec-title::before { content: ""; flex: 0 0 auto; width: 12px; height: 12px; background: var(--red); }
.sec-title::after { content: ""; flex: 1 1 auto; min-width: 2rem; height: 1px; background: var(--grid); }
.sec-title > span { min-width: 0; }
.sec-title-light { color: #fff; }
.sec-title-light::before { background: var(--black); }
.sec-title-light::after { background: rgba(255, 255, 255, .45); }

/* ---------- Главная: секции-плашки ---------- */
.fp {
    background-image:
        linear-gradient(var(--grid), var(--grid)),
        linear-gradient(var(--grid), var(--grid));
    background-size: 1px 100%, 1px 100%;
    background-position: 56px 0, calc(100% - 56px) 0;
    background-repeat: no-repeat;
}
.fp-sec {
    position: relative;
    margin: 0 0 1.75rem;
    padding: 1.6rem 1.2rem 1.8rem;
    background: var(--panel);
    border: 1px solid var(--line);
}
.fp-sec:last-child { margin-bottom: 0; }
@media (min-width: 600px) {
    .fp-sec { padding: 1.8rem 2rem 2.1rem; }
}
@media (min-width: 960px) {
    .fp-sec::before {
        content: "";
        position: absolute; left: -25px; top: 2.3rem;
        width: 25px; height: 9px;
        background:
            radial-gradient(circle at 4px 50%, var(--red) 0 3px, transparent 3.5px) no-repeat,
            linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
    }
}
@media (min-width: 1180px) {
    .fp-sec::after {
        content: attr(data-circuit);
        position: absolute; left: -46px; top: 4rem;
        writing-mode: vertical-rl; transform: rotate(180deg);
        font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em;
        color: var(--muted);
    }
}

/* ---------- Блок 1: схема ---------- */
.scheme-wrap {
    overflow-x: auto;
    margin: 0 -.2rem;
    padding: .2rem;
    -webkit-overflow-scrolling: touch;
}
.scheme { display: block; width: 100%; min-width: 640px; height: auto; }
.sch-wires path { fill: none; stroke: var(--red); stroke-width: 1.6; }
.sch-ext path { fill: none; stroke: #4A5862; stroke-width: 1.2; }
.sch-ext circle { fill: var(--panel); stroke: #4A5862; stroke-width: 1.2; }
.sch-reserve { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 5 4; }
.sch-pulse path {
    fill: none; stroke: var(--amber); stroke-width: 2.4;
    stroke-dasharray: 10 70; stroke-linecap: square;
    animation: pdaFlow 3.4s linear infinite;
}
@keyframes pdaFlow { to { stroke-dashoffset: -80; } }
.sch-node { cursor: pointer; outline: none; }
.sch-node rect { fill: #1A2025; stroke: var(--soft); stroke-width: 1.4; transition: stroke .15s, fill .15s; }
.sch-node-main > rect:first-child { stroke: var(--text); stroke-width: 1.8; }
.sch-node .sch-inner { fill: none; stroke: var(--grid); stroke-width: 1; }
.sch-label { fill: var(--text); font-family: var(--f-head); font-size: 21px; font-weight: 500; letter-spacing: 1.2px; transition: fill .15s; }
.sch-cap { fill: var(--muted); font-family: var(--f-mono); font-size: 14px; }
.sch-spk { fill: none; stroke: var(--soft); stroke-width: 1.5; stroke-linejoin: round; }
.sch-led { fill: var(--red); animation: pdaBlink 1.6s steps(2, start) infinite; }
.sch-led-amber { fill: var(--amber); }
@keyframes pdaBlink { to { opacity: .25; } }
.sch-node:hover rect, .sch-node.is-lit rect, .sch-node:focus-visible rect { stroke: var(--amber); }
.sch-node:hover .sch-label, .sch-node.is-lit .sch-label, .sch-node:focus-visible .sch-label { fill: var(--amber); }
.sch-node-main.is-lit > rect:first-child, .sch-node-main:hover > rect:first-child { fill: #232A30; }
.scheme-note {
    margin: 1.1rem 0 0;
    min-height: 3.2em;
    padding: .7rem 1rem;
    background: var(--aside);
    border-left: 3px solid var(--red);
    color: var(--soft);
    font-family: var(--f-mono);
    font-size: .82rem;
    line-height: 1.55;
}
.scheme-note.is-filled { border-left-color: var(--amber); color: var(--text); }

/* ---------- Блок 2: разбор датчика ---------- */
.dissect { display: block; }
.dissect-fig {
    position: relative;
    margin: 0;
    aspect-ratio: 1200 / 686;
    background: #050607;
    overflow: hidden;
}
.dissect-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dissect-leads { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.lead { fill: none; stroke: #C9D1D6; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .75; transition: stroke .15s, opacity .15s; }
.dot {
    position: absolute;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid var(--red);
    border-radius: 50%;
    animation: pdaPing 2.4s ease-out infinite;
    pointer-events: none;
}
.dot-2 { animation-delay: .6s; }
.dot-3 { animation-delay: 1.2s; }
.dot-4 { animation-delay: 1.8s; }
@keyframes pdaPing {
    0% { transform: scale(.6); opacity: 1; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}
.parts { list-style: none; margin: 1.2rem 0 0; padding: 0; counter-reset: part; }
.part {
    counter-increment: part;
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: start;
    padding: .7rem 0;
    border-bottom: 1px solid var(--grid);
}
.part-line { display: none; }
.part-mark { grid-column: 1; grid-row: 1; width: 12px; height: 12px; margin-top: .35rem; background: var(--red); }
.part-text { grid-column: 2; grid-row: 1; min-width: 0; }
.part-text strong { display: block; font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: 1.1rem; line-height: 1.25; }
.part-text strong::before { content: counter(part, decimal-leading-zero) " "; color: var(--muted); font-family: var(--f-mono); font-size: .75rem; letter-spacing: 0; }
.part-text small { display: block; margin-top: .2rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.part:hover strong { color: var(--amber); }

@media (min-width: 1100px) {
    .dissect { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .dissect-leads { display: block; }
    .parts { position: relative; margin: 0; }
    .part {
        position: absolute; left: 0; right: 0;
        display: flex; align-items: center; gap: .9rem;
        padding: 0; border: 0;
        transform: translateY(-50%);
    }
    .part-1 { top: 20.9%; }
    .part-2 { top: 40.1%; }
    .part-3 { top: 58.7%; }
    .part-4 { top: 77.9%; }
    .part-line { display: block; flex: 1 1 auto; min-width: 1.5rem; height: 1px; background: #C9D1D6; opacity: .75; transition: background-color .15s, opacity .15s; }
    .part-text { flex: 0 1 auto; text-align: right; }
    .part-text strong::before { content: none; }
    .part-text small { display: none; }
    .part-mark { flex: 0 0 12px; margin: 0; }
    .part:hover .part-line { background: var(--amber); opacity: 1; }
    .dissect:has(.part-1:hover) .lead-1,
    .dissect:has(.part-2:hover) .lead-2,
    .dissect:has(.part-3:hover) .lead-3,
    .dissect:has(.part-4:hover) .lead-4 { stroke: var(--amber); opacity: 1; }
}
@media (min-width: 1280px) {
    .part-text small { display: block; max-width: 30ch; margin-left: auto; }
}

/* ---------- Блок записей на красной плашке ---------- */
.fp-latest { background: var(--red); border-color: #F0584B; }
.fp-latest .empty-note { color: #fff; }
.latest-more { margin: 1.6rem 0 0; }

/* ---------- Карточки ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.3rem; }
@media (min-width: 600px) {
    .cards-2, .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
    .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.card {
    display: flex; flex-direction: column;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .12s, border-color .12s;
}
.fp-latest .card { background: var(--bg); border-color: var(--black); }
.card:hover { transform: translate(-3px, -3px); border-color: var(--amber); }
.card-thumb { position: relative; padding: .7rem .7rem 0; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.card-index {
    position: absolute; top: .7rem; right: .7rem;
    padding: .15rem .5rem;
    background: var(--black); color: var(--amber);
    font-family: var(--f-mono); font-size: .75rem; line-height: 1.5;
}
.card-pin {
    position: absolute; left: .7rem; top: .7rem;
    padding: .15rem .5rem;
    background: var(--red); color: #fff;
    font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
}
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1rem 1rem 1.15rem; }
.card-title { margin: 0 0 .5rem; font-size: 1.08rem; letter-spacing: .04em; line-height: 1.25; }
.card-title a { text-decoration: none; color: var(--text); }
.card-title a:hover { color: var(--amber); }
.card-excerpt { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--soft); }
.card-foot { margin-top: auto; padding-top: .5rem; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.post-date { color: var(--muted); font-family: var(--f-mono); font-size: .75rem; letter-spacing: .03em; }

/* ---------- Блок 3: шкала регламента ---------- */
.gauge { --step: 0; }
.gauge-scale {
    position: relative;
    height: 56px;
    border-bottom: 1px solid var(--muted);
    background:
        repeating-linear-gradient(90deg, var(--amber) 0 2px, transparent 2px 25%) left bottom / 100% 26px no-repeat,
        repeating-linear-gradient(90deg, #5A6872 0 1px, transparent 1px 12.5%) left bottom / 100% 18px no-repeat,
        repeating-linear-gradient(90deg, #45525B 0 1px, transparent 1px 2.5%) left bottom / 100% 10px no-repeat;
}
.gauge-scale::after {
    content: ""; position: absolute; right: 0; bottom: 0;
    width: 2px; height: 26px; background: var(--amber);
}
.gauge-needle {
    position: absolute; top: 0;
    left: calc(var(--step) * 25%);
    width: 22px; height: 46px;
    margin-left: -10px;
    transition: left .45s cubic-bezier(.6, 0, .2, 1.2);
}
.gauge-needle::before {
    content: ""; position: absolute; left: 0; top: 0;
    width: 22px; height: 18px;
    background: var(--red);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.gauge-needle::after {
    content: ""; position: absolute; left: 10px; top: 16px;
    width: 2px; height: 30px; background: var(--red);
}
.gauge-marks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gauge-mark {
    min-width: 0;
    padding: .75rem .7rem .6rem 0;
    border: 0; border-top: 2px solid transparent;
    background: none;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.gauge-when { display: block; font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: clamp(.82rem, 1.4vw, 1.05rem); line-height: 1.2; }
.gauge-what { display: block; margin-top: .3rem; color: var(--muted); font-size: clamp(.72rem, 1.1vw, .84rem); line-height: 1.4; }
.gauge-mark:hover .gauge-when { color: var(--amber); }
.gauge-mark.is-active .gauge-when { color: var(--amber); }
.gauge-mark.is-active .gauge-what { color: var(--soft); }
.gauge-panel[hidden] { display: none !important; }
@media (max-width: 599px) {
    .gauge-mark { padding-right: .35rem; }
    .gauge-when { font-size: .74rem; letter-spacing: .02em; overflow-wrap: anywhere; }
    .gauge-what { display: none; }
}
.gauge-panels { margin-top: 1rem; }
.gauge-panel {
    padding: 1rem 1.3rem;
    background: var(--aside);
    border: 1px solid var(--grid);
    border-left: 3px solid var(--red);
}
.ticks-list { list-style: none; margin: 0; padding: 0; }
.ticks-list li { position: relative; padding-left: 1.4rem; margin: .3rem 0; color: var(--text); font-size: .9rem; }
.ticks-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; background: var(--amber); }
.gauge-note { margin: .9rem 0 0; color: var(--muted); font-size: .8rem; font-family: var(--f-mono); }

/* ---------- Блок 4: что уточнить ---------- */
.ask-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem;
}
.ask-cell {
    position: relative;
    min-width: 0;
    padding: 1rem 2.6rem 1.1rem 1.1rem;
    border: 1px solid #4A5862;
    background: transparent;
    transition: background-color .12s, border-color .12s, transform .12s;
}
.ask-cell:hover { border-color: var(--amber); background: #232A30; transform: translate(-2px, -2px); }
.ask-num { position: absolute; top: .55rem; right: .65rem; color: var(--muted); font-family: var(--f-mono); font-size: .72rem; }
.ask-name { display: block; font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: 1.12rem; line-height: 1.2; }
.ask-hint { display: block; margin-top: .4rem; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.ask-cell-big {
    display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 9rem;
    background: var(--amber); border-color: var(--amber); color: #15120A;
}
.ask-cell-big:hover { background: var(--amber); }
.ask-cell-big .ask-num { color: #4A3608; }
.ask-cell-big .ask-name { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 600; line-height: 1.05; }
.ask-cell-big .ask-hint { color: #3D2E0B; }
.ask-cta { margin: 1.6rem 0 0; }
@media (min-width: 600px) {
    .ask-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ask-cell-big, .ask-cell-wide { grid-column: span 2; }
}
@media (min-width: 960px) {
    .ask-grid { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); }
    .ask-cell-big { grid-column: 1; grid-row: 1 / span 2; }
    .ask-cell-wide { grid-column: span 2; }
}

/* ---------- Внутренние страницы ---------- */
.crumbs {
    margin: 0 0 1.4rem;
    padding: .55rem .9rem;
    background: var(--black);
    border: 1px solid var(--grid);
    border-left: 3px solid var(--red);
    font-family: var(--f-mono); font-size: .78rem; color: var(--muted);
    overflow-wrap: break-word;
}
.crumbs a { color: var(--soft); }
.crumbs-sep { color: var(--red); margin: 0 .25rem; }
.crumbs > span:last-child { color: var(--text); }

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

.page-head {
    margin: 0 0 1.4rem;
    padding: 1.3rem 1.2rem;
    background: var(--panel);
    border: 1px solid var(--line);
}
.page-head .page-intro { margin-top: .8rem; color: var(--soft); }
.page-head .page-intro > *:last-child { margin-bottom: 0; }
.page-title { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: .04em; }
.page-head .page-title { display: flex; align-items: center; gap: .8rem; }
.page-head .page-title::before { content: ""; flex: 0 0 12px; height: 12px; background: var(--red); }
@media (min-width: 600px) {
    .page-head { padding: 1.5rem 2rem; }
}

.sheet {
    padding: 1.4rem 1.2rem 1.8rem;
    background: var(--panel);
    border: 1px solid var(--line);
}
@media (min-width: 600px) {
    .sheet { padding: 2rem 2.2rem 2.4rem; }
}
.sheet-head { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--grid); }
.sheet-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; margin: .8rem 0 0; }
.sheet-cats a {
    display: inline-block; margin-right: .4rem;
    padding: .1rem .55rem;
    border: 1px solid var(--amber); color: var(--amber);
    font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; text-decoration: none;
}
.sheet-cats a:hover { background: var(--amber); color: var(--black); }
.sheet-cover { margin: 0 0 1.6rem; border: 1px solid var(--grid); padding: .5rem; }
.sheet-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sheet-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-family: var(--f-mono); font-size: .8rem; }

/* Типографика записи */
.entry { font-size: 1rem; line-height: 1.7; }
.entry h2 { font-size: 1.55rem; margin: 1.8em 0 .6em; padding-bottom: .35rem; border-bottom: 1px solid var(--grid); }
.entry h3 { font-size: 1.25rem; margin: 1.5em 0 .5em; }
.entry h4 { font-size: 1.08rem; margin: 1.3em 0 .5em; }
.entry > *:first-child { margin-top: 0; }
.entry ul, .entry ol { margin: 0 0 1.1em; padding-left: 1.5rem; }
.entry ul { list-style: none; padding-left: 1.4rem; }
.entry ul li { position: relative; }
.entry ul li::before { content: ""; position: absolute; left: -1.2rem; top: .62em; width: 7px; height: 7px; background: var(--red); }
.entry ol li::marker { color: var(--amber); font-family: var(--f-mono); }
.entry li { margin: .3em 0; }
.entry blockquote {
    margin: 1.4em 0;
    padding: 1rem 1.4rem;
    background: var(--aside);
    border-left: 3px solid var(--red);
    color: var(--text);
    font-size: 1.05rem;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { width: 100%; margin: 1.2em 0; border-collapse: collapse; border: 1px solid var(--line); font-size: .9rem; }
.entry th, .entry td { padding: .55rem .75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry th { background: var(--black); color: var(--amber); font-family: var(--f-head); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.entry tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }
.entry img { max-width: 100%; height: auto; }
.entry figure { margin: 1.4em 0; }
.entry figcaption, .wp-caption-text { margin-top: .4rem; color: var(--muted); font-size: .8rem; font-family: var(--f-mono); }
.entry code, .entry kbd { padding: .1em .35em; background: var(--black); border: 1px solid var(--grid); font-family: var(--f-mono); font-size: .88em; }
.entry pre { overflow-x: auto; padding: 1rem; background: var(--black); border: 1px solid var(--grid); font-family: var(--f-mono); font-size: .85rem; }
.entry pre code { padding: 0; border: 0; background: none; }
.entry hr { border: 0; height: 1px; margin: 2em 0; background: linear-gradient(90deg, var(--red) 0 40px, var(--grid) 40px); }
.alignleft { float: left; margin: .3em 1.2em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin: 1.4rem 0 0; }
@media (min-width: 600px) {
    .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.post-nav-link {
    display: block; min-width: 0;
    padding: .9rem 1.1rem;
    background: var(--panel); border: 1px solid var(--line);
    text-decoration: none; color: var(--text);
    font-family: var(--f-head); text-transform: uppercase; letter-spacing: .04em; line-height: 1.3;
}
.post-nav-link span { display: block; margin-bottom: .3rem; color: var(--muted); font-family: var(--f-mono); font-size: .72rem; text-transform: none; letter-spacing: 0; }
.post-nav-link:hover { border-color: var(--amber); color: var(--amber); }
.post-nav-next { text-align: right; }

.empty-note { color: var(--soft); }
.empty-box { padding: 1.4rem 1.3rem; background: var(--panel); border: 1px solid var(--line); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.8rem 0 0; }
.pager .page-numbers, .pager > a, .pager > span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-family: var(--f-mono); font-size: .85rem;
    text-decoration: none;
}
.pager a.page-numbers:hover, .pager > a:hover { border-color: var(--amber); color: var(--amber); }
.pager .page-numbers.current, .pager > span.post-page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.pager .page-numbers.dots { border-color: transparent; background: transparent; }

/* ---------- Сайдбар ---------- */
.sidebar {
    margin-top: 2rem;
    padding: 1.4rem 1.3rem;
    background: var(--aside);
    border: 1px solid var(--grid);
    border-top: 3px solid var(--amber);
    color: #C5CED4;
}
@media (min-width: 960px) {
    .sidebar { margin-top: 0; }
}
.sidebar .wgt + .wgt { margin-top: 1.8rem; }
.sidebar .wgt-title {
    display: flex; align-items: center; gap: .6rem;
    margin: 0 0 .9rem;
    color: var(--text); font-size: 1.05rem; letter-spacing: .06em;
}
.sidebar .wgt-title::before { content: ""; width: 9px; height: 9px; background: var(--red); flex: 0 0 auto; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1px solid var(--grid); font-size: .9rem; line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--text); text-decoration-color: transparent; }
.sidebar a:hover { color: var(--amber); text-decoration-color: var(--red); }
.sidebar .post-date, .sidebar .rss-date { display: block; color: #93A1AB; font-size: .75rem; }
.sidebar p { color: #C5CED4; }
.sidebar .search-form { margin: 0; }

/* ---------- Подвал ---------- */
.sitefoot {
    background: var(--black);
    border-top: 1px solid var(--grid);
    color: #A3B0B9;
    padding: 2.4rem 0 1.4rem;
    position: relative;
}
.sitefoot::before {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent 0 8%, var(--red) 8% 14%, transparent 14%);
}
.sitefoot-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 960px) {
    .sitefoot-cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 3rem; }
}
.sitefoot-col { min-width: 0; }
.sitefoot .wgt + .wgt { margin-top: 1.5rem; }
.sitefoot .wgt-title { margin: 0 0 .8rem; color: var(--text); font-size: 1.1rem; letter-spacing: .06em; }
.sitefoot p, .sitefoot .textwidget { color: #A3B0B9; font-size: .88rem; line-height: 1.55; }
.sitefoot ul { list-style: none; margin: 0; padding: 0; }
.sitefoot li { margin: 0 0 .45rem; font-size: .86rem; }
.sitefoot a { color: #D3DBE0; text-decoration: underline; text-decoration-color: var(--red); }
.sitefoot a:hover { color: var(--amber); }
.sitefoot .post-date { color: #93A1AB; }
.copyline {
    display: flex; align-items: center; gap: 1rem;
    margin: 2.2rem 0 0;
    color: #8996A0;
    font-family: var(--f-mono); font-size: .76rem;
    text-align: center;
}
.copyline::before, .copyline::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--grid); }
.copyline span { flex: 0 1 auto; }
@media (max-width: 599px) {
    .copyline::before, .copyline::after { display: none; }
}

/* ---------- Поиск ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.search-field {
    flex: 1 1 200px; min-width: 0;
    padding: .55rem .8rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--line); border-radius: 0;
    font: inherit;
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus { outline: none; border-color: var(--amber); }

/* ---------- Комментарии ---------- */
.comments { margin-top: 1.4rem; padding: 1.4rem 1.2rem; background: var(--panel); border: 1px solid var(--line); }
@media (min-width: 600px) {
    .comments { padding: 1.8rem 2.2rem; }
}
.comments-title { font-size: 1.3rem; }
.cmt-list, .cmt-list .children { list-style: none; margin: 0; padding: 0; }
.cmt-list .children { margin-left: 1.2rem; padding-left: 1rem; border-left: 1px solid var(--grid); }
.cmt-body { padding: 1rem 0; border-bottom: 1px solid var(--grid); }
.cmt-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; margin-bottom: .5rem; }
.cmt-head img { width: 40px; height: 40px; border: 1px solid var(--line); }
.cmt-author { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .04em; }
.cmt-date { color: var(--muted); font-family: var(--f-mono); font-size: .75rem; }
.cmt-wait { color: var(--amber); font-size: .85rem; }
.cmt-text p:last-child { margin-bottom: .4rem; }
.cmt-reply a { font-family: var(--f-mono); font-size: .78rem; }
.comment-respond { margin-top: 1.4rem; }
.comment-reply-title { font-size: 1.2rem; }
.comment-reply-title small { margin-left: .8rem; font-family: var(--f-mono); font-size: .75rem; text-transform: none; }
.form-note { color: var(--muted); font-size: .85rem; }
.comment-form label { display: block; margin-bottom: .3rem; color: var(--soft); font-family: var(--f-mono); font-size: .78rem; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--line); border-radius: 0;
    font: inherit;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--amber); }
.comment-form .submit {
    padding: .6rem 1.3rem;
    background: var(--red); color: #fff;
    border: 1px solid var(--amber); border-radius: 0;
    font-family: var(--f-head); text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
}
.comment-form .submit:hover { background: var(--black); color: var(--amber); }
.req { color: var(--red); }

/* ---------- 404 ---------- */
.nf { text-align: left; }
.nf-code {
    margin: 0 0 .5rem;
    font-family: var(--f-head); font-weight: 600;
    font-size: clamp(5rem, 16vw, 9rem); line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--amber);
    letter-spacing: .06em;
}
.nf-text { margin-top: 1rem; color: var(--soft); max-width: 60ch; }
.nf-home { margin: 1.2rem 0 0; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.4rem;
    max-width: 880px; margin-inline: auto;
    padding: 1rem 1.3rem;
    background: var(--black);
    border: 1px solid var(--amber);
    border-left: 4px solid var(--red);
    color: var(--text);
}
.cookie-text { flex: 1 1 320px; margin: 0; font-size: .85rem; line-height: 1.5; }

/* ---------- WP служебные ---------- */
.wp-block-image img { height: auto; }
