/*
Theme Name: dds_bluejayvfx.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: bjvfx
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-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: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-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: "Roboto"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/roboto-cyrillic-400-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/roboto-latin-400-italic.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: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-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: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-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: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-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: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-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; }

/* ---------- Переменные ---------- */
:root {
    --bg: #0E1216;
    --bg-blue: #131C26;
    --bg-foot: #0A0D10;
    --bg-rail: #111921;
    --grid: rgba(35, 50, 64, 0.4);
    --text: #DCE3EA;
    --muted: #7C8C9C;
    --acid: #8CFF3D;
    --cyan: #3DBCFF;
    --flag: #FF7A3D;
    --panel: #1A2430;
    --line: #2A3846;
    --ink-on-acid: #0E1216;
    --f-head: "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "JetBrains Mono", "Consolas", "Liberation Mono", monospace;
}

/* ---------- Скрытые элементы (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
.site-nav[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; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 96px 96px;
    background-position: center top;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.6em;
    color: var(--text);
    overflow-wrap: break-word;
    hyphens: auto;
}
a { color: var(--cyan); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s ease; }
a:hover { color: var(--acid); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--acid);
    outline-offset: 2px;
}
p, li, td, th, dd, figcaption, blockquote { overflow-wrap: break-word; hyphens: auto; }
::selection { background: var(--acid); color: var(--ink-on-acid); }

.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-link {
    position: absolute;
    left: 1rem; top: -60px;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--acid);
    color: var(--ink-on-acid);
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.shell { width: min(92%, 1180px); margin-inline: auto; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .7rem 1.3rem;
    border: 1px solid var(--acid);
    border-radius: 0;
    background: transparent;
    color: var(--acid);
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .03em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--acid); color: var(--ink-on-acid); transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--cyan); }
.btn:active { transform: none; box-shadow: none; }
.btn-acid { background: var(--acid); color: var(--ink-on-acid); }
.btn-acid:hover { background: transparent; color: var(--acid); }
.btn-sm { padding: .5rem .9rem; font-size: .88rem; }

/* ---------- Шапка ---------- */
.masthead { background: linear-gradient(180deg, #0B0F13 0%, var(--bg) 100%); padding-top: 2.2rem; }
.masthead-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}
.brand { display: flex; align-items: flex-start; gap: 1rem; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; margin-top: .25rem; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-text { min-width: 0; max-width: 620px; }
.brand-name {
    margin: 0 0 .5rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1.6rem, 3.2vw, 2.45rem);
    line-height: 1.12;
    letter-spacing: -.005em;
}
.brand-name a { color: var(--text); text-decoration: none; }
.brand-name a:hover { color: var(--acid); }
.brand-desc { margin: 0; color: #B9C4CF; font-size: .98rem; line-height: 1.45; max-width: 560px; }

.nav-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .55rem .8rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-family: var(--f-mono);
    font-size: .8rem;
    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(--acid);
    position: relative;
    transition: transform .2s ease;
}
.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"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { flex: 0 0 auto; }
.site-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.site-nav-list a {
    position: relative;
    display: inline-block;
    padding: .1rem 0 .1rem 1.1rem;
    color: #C9D2DB;
    font-family: var(--f-head);
    font-size: 1.08rem;
    text-decoration: none;
}
.site-nav-list a::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 7px; height: 7px;
    border: 1px solid var(--line);
    transform: translateY(-50%);
    transition: background-color .15s ease, border-color .15s ease;
}
.site-nav-list a:hover { color: var(--acid); }
.site-nav-list a:hover::before { border-color: var(--acid); }
.site-nav-list .current-menu-item > a,
.site-nav-list .current_page_item > a { color: var(--acid); }
.site-nav-list .current-menu-item > a::before,
.site-nav-list .current_page_item > a::before { background: var(--acid); border-color: var(--acid); }

.masthead-rule {
    position: relative;
    margin-top: 1.6rem;
    border-bottom: 1px solid #3A5266;
    height: 1px;
}
.seq-tag {
    position: absolute;
    right: 0; top: -.85rem;
    padding: .12rem .45rem;
    background: var(--cyan);
    color: #06131D;
    font-family: var(--f-mono);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .06em;
}

/* ---------- Заголовки секций ---------- */
.sec-title {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: .7rem;
    margin: 0 0 1.6rem;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.sec-title::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 55%;
    width: 64px;
    margin-right: .9rem;
    border-top: 1px solid #3A5266;
}
.sec-num { color: var(--cyan); font-family: var(--f-mono); font-size: .62em; font-weight: 400; letter-spacing: 0; opacity: .9; }
.sec-title--wire::after {
    content: "";
    flex: 1 1 auto;
    align-self: center;
    min-width: 2rem;
    height: 46px;
    margin-left: .8rem;
    margin-right: calc(150px + 1.4rem + (100% - 150px - 1.4rem - 7rem) / 12 - 1px);
    border-top: 1px solid rgba(61, 188, 255, .7);
    border-right: 1px solid rgba(61, 188, 255, .7);
    transform: translateY(23px);
}
.sec-note { margin: 1.1rem 0 0; color: var(--muted); font-size: .92rem; max-width: 760px; }

/* ---------- Главная: секции ---------- */
.front-sec { padding: 3.2rem 0; position: relative; }
.front-sec:first-child { padding-top: 3.6rem; }
.sec-layers, .sec-latest {
    background-color: var(--bg-blue);
    background-image:
        linear-gradient(rgba(35, 50, 64, .4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(35, 50, 64, .4) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: center top;
}
.sec-tools, .sec-stages { background-color: rgba(10, 13, 16, .35); }
.empty-note { color: var(--muted); }

/* ---------- 01. Пайплайн ---------- */
.pipe { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 1.4rem; align-items: start; }
.pipe-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.4rem;
}
.pipe-step { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.pipe-step + .pipe-step::before {
    content: "";
    position: absolute;
    top: 27px;
    right: 100%;
    width: 1.4rem;
    border-top: 1px solid var(--cyan);
}
.pipe-step + .pipe-step::after {
    content: "";
    position: absolute;
    top: 23px;
    left: -1px;
    border-left: 6px solid var(--cyan);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transform: translateX(-100%);
}
.pipe-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: .5rem .3rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-family: var(--f-head);
    font-size: .98rem;
    line-height: 1.15;
    cursor: pointer;
    overflow-wrap: anywhere;
    transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.pipe-node:hover { border-color: var(--cyan); color: #fff; }
.pipe-node.is-active {
    border: 2px solid var(--acid);
    box-shadow: 0 0 0 1px rgba(140, 255, 61, .18), 0 0 18px rgba(140, 255, 61, .12);
}
.pipe-node.is-active::before {
    content: "";
    position: absolute;
    top: -7px; left: 50%;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--acid);
    background: var(--bg) radial-gradient(circle, var(--acid) 0 2px, transparent 3px);
    transform: translateX(-50%);
}
.pipe-cap { display: block; margin-top: .55rem; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.pipe-panel {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: .9rem 1rem 1rem;
    min-width: 0;
}
.pipe-panel-title { margin: 0 0 .7rem; font-family: var(--f-head); font-size: 1rem; color: var(--text); }
.pipe-layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.pipe-layers li {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .4rem;
    border-left: 2px solid transparent;
    font-size: .8rem;
    color: #AEB9C4;
    min-width: 0;
}
.pipe-layers li.is-on { border-left-color: var(--acid); background: rgba(61, 188, 255, .1); color: var(--text); }
.pl-num { color: var(--cyan); font-family: var(--f-mono); font-size: .75rem; }
.pl-name { min-width: 0; flex: 1; border-bottom: 1px solid var(--line); padding-bottom: 1px; }

/* ---------- 02. Слои ---------- */
.layers {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 1.6rem;
    align-items: stretch;
}
.layers-list {
    list-style: none;
    margin: 0;
    padding: 0 1rem;
    border: 1px solid var(--line);
    background: rgba(26, 36, 48, .88);
    display: grid;
    grid-template-rows: repeat(6, 1fr);
}
.layers-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem 0;
    font-size: 1rem;
    color: var(--text);
}
.layers-item + .layers-item { border-top: 1px solid var(--line); }
.layers-item::after {
    content: "";
    position: absolute;
    right: calc(-1rem - 1.6rem - 1px);
    top: 50%;
    width: calc(1.6rem + 1rem + 45px);
    border-top: 1px solid var(--acid);
    opacity: .9;
}
.layers-item::before {
    content: "";
    position: absolute;
    right: 45px;
    top: 50%;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--acid);
    transform: translate(50%, -50%);
}
.layers-box {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    border-radius: 3px;
    background: var(--acid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%230E1216' stroke-width='2.2'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.layers-item.is-flag .layers-box { background-color: var(--flag); }
.layers-shot {
    position: relative;
    margin: 0;
    border: 1px solid var(--line);
    overflow: hidden;
    min-width: 0;
    aspect-ratio: 1600 / 678;
}
.layers-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.layers-shot::after {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    background:
        linear-gradient(var(--acid), var(--acid)) left top / 16px 1px no-repeat,
        linear-gradient(var(--acid), var(--acid)) left top / 1px 16px no-repeat,
        linear-gradient(var(--acid), var(--acid)) right bottom / 16px 1px no-repeat,
        linear-gradient(var(--acid), var(--acid)) right bottom / 1px 16px no-repeat;
    opacity: .7;
}
.layers-wire {
    position: absolute;
    left: 0;
    top: var(--y);
    width: var(--x);
    border-top: 1px solid var(--acid);
    pointer-events: none;
}
.layers-wire::after {
    content: "";
    position: absolute;
    right: -5px; top: -5px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--acid);
    box-shadow: 0 0 0 3px rgba(140, 255, 61, .25);
}

/* ---------- 03. Карточки ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 10px;
    transition: border-color .15s ease, transform .15s ease;
}
.card::before, .card::after {
    content: "";
    position: absolute;
    width: 12px; height: 12px;
    pointer-events: none;
    transition: border-color .15s ease;
}
.card::before { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.card::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.card:hover { border-color: #3A5266; transform: translateY(-3px); }
.card:hover::before, .card:hover::after { border-color: var(--acid); }
.card-thumb { position: relative; display: block; overflow: hidden; background: #0B0F13; }
.card-thumb img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .card-thumb img { transform: scale(1.03); }
.card-thumb::after {
    content: "";
    position: absolute;
    inset: 8px;
    pointer-events: none;
    background:
        linear-gradient(#DCE3EA, #DCE3EA) left top / 14px 1px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) left top / 1px 14px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) right top / 14px 1px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) right top / 1px 14px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) left bottom / 14px 1px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) left bottom / 1px 14px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) right bottom / 14px 1px no-repeat,
        linear-gradient(#DCE3EA, #DCE3EA) right bottom / 1px 14px no-repeat;
    opacity: .75;
}
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1rem .5rem .4rem; }
.card-title { margin: 0 0 .5rem; font-size: 1.2rem; font-weight: 500; line-height: 1.25; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--acid); }
.card-excerpt { color: #A9B5C1; font-size: .92rem; line-height: 1.5; margin-bottom: .9rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.stamp { color: var(--muted); font-family: var(--f-mono); font-size: .78rem; letter-spacing: .02em; }
.card.sticky .card-thumb::before {
    content: "закреплено";
    position: absolute;
    z-index: 2;
    left: 8px; top: 8px;
    padding: .1rem .4rem;
    background: var(--flag);
    color: #160A04;
    font-family: var(--f-mono);
    font-size: .68rem;
}

/* ---------- 04. Инструменты ---------- */
.tools { border: 1px solid var(--line); background: var(--panel); padding: .6rem 1.4rem; }
.tools-scroll { overflow-x: auto; }
.tools-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .96rem; }
.tools-table th, .tools-table td {
    padding: .8rem .9rem;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--line);
}
.tools-table th + th, .tools-table td + td { border-left: 1px solid var(--line); }
.tools-table tbody tr:last-child td { border-bottom: 0; }
.tools-table th { font-family: var(--f-head); font-weight: 500; color: #C9D2DB; font-size: 1rem; border-bottom-color: #3A5266; }
.tools-table tbody tr { transition: background-color .15s ease; }
.tools-table tbody tr:hover { background: rgba(61, 188, 255, .06); }
.tools-name { white-space: nowrap; }
.tools-name::before {
    content: "";
    display: inline-block;
    width: 8px; height: 8px;
    margin-right: .55rem;
    border-radius: 50%;
    background: var(--acid);
    vertical-align: .08em;
}
.tools-scale-head { width: 110px; text-align: center !important; font-size: .85rem !important; }
.tools-scale {
    position: relative;
    width: 110px;
    background: linear-gradient(var(--cyan), var(--cyan)) center / 1px 100% no-repeat;
}
.tools-tick {
    position: relative;
    display: block;
    height: 2px;
    margin: 0 auto;
    width: calc(var(--lvl) * 14px);
    background: var(--cyan);
}
.tools-tick::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 7px; height: 7px;
    background: var(--acid);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- 05. Шесть этапов ---------- */
.stages {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
}
.stage { position: relative; min-width: 0; }
.stage + .stage::before {
    content: "";
    position: absolute;
    right: 100%;
    top: calc(45% - .5px);
    width: 1.5rem;
    border-top: 1px solid #3A5266;
}
.stage-fig { margin: 0; }
.stage-fig img {
    width: 100%;
    aspect-ratio: 640 / 569;
    object-fit: cover;
    border: 1px solid #3A5266;
    transition: border-color .15s ease, transform .15s ease;
}
.stage:hover .stage-fig img { border-color: var(--acid); transform: translateY(-3px); }
.stage-fig figcaption { margin-top: .6rem; text-align: center; font-size: .88rem; color: #C9D2DB; line-height: 1.3; }
.stage-num { display: block; color: var(--cyan); font-family: var(--f-mono); font-size: .7rem; margin-bottom: .15rem; }
.stages-cta {
    margin-top: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.3rem 1.6rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--acid);
    background: var(--panel);
}
.stages-cta p { margin: 0; color: #B9C4CF; max-width: 680px; }

/* ---------- Внутренние страницы ---------- */
.page-main { padding: 2rem 0 3.5rem; }
.crumbs {
    margin: 0 0 1.8rem;
    font-family: var(--f-mono);
    font-size: .78rem;
    color: var(--muted);
    letter-spacing: .02em;
}
.crumbs a { color: var(--cyan); text-decoration: none; }
.crumbs a:hover { color: var(--acid); text-decoration: underline; }
.crumbs-sep { color: #3A5266; margin: 0 .3rem; }
.crumbs-current { color: #AEB9C4; }

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

.page-head { margin-bottom: 1.6rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 500; margin: 0 0 .5rem; }
.page-intro { color: #B9C4CF; }
.entry-meta { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.chip {
    display: inline-block;
    padding: .12rem .5rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--cyan);
    font-family: var(--f-mono);
    font-size: .74rem;
    text-decoration: none;
}
.chip:hover { border-color: var(--acid); color: var(--acid); }
.entry-cats { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.entry-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: 2rem 0 0; }
.entry-cover { margin: 0 0 1.8rem; border: 1px solid var(--line); }
.entry-cover img { width: 100%; height: auto; }

.card-grid--feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid--feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Типографика записи */
.entry { font-size: 1.05rem; line-height: 1.72; color: var(--text); }
.entry > * + * { margin-top: 0; }
.entry h2 { font-size: 1.7rem; margin: 2.2rem 0 .8rem; font-weight: 500; padding-left: .9rem; border-left: 3px solid var(--acid); }
.entry h3 { font-size: 1.35rem; margin: 1.8rem 0 .7rem; font-weight: 500; }
.entry h4 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
.entry p { margin: 0 0 1.1em; }
.entry ul, .entry ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry li { margin-bottom: .4em; }
.entry ul li::marker { color: var(--acid); }
.entry ol li::marker { color: var(--cyan); font-family: var(--f-mono); }
.entry blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--cyan);
    background: var(--panel);
    color: #C9D2DB;
    font-style: italic;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .95rem; border: 1px solid var(--line); }
.entry th, .entry td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.entry th { background: var(--panel); font-family: var(--f-head); font-weight: 500; }
.entry .wp-block-table { overflow-x: auto; margin: 1.4rem 0; }
.entry img { height: auto; }
.entry figure { margin: 1.6rem 0; }
.entry figcaption { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.entry pre, .entry code { font-family: var(--f-mono); font-size: .88em; }
.entry code { padding: .1em .35em; background: var(--panel); border: 1px solid var(--line); }
.entry pre { padding: 1rem 1.2rem; overflow-x: auto; background: #0A0D10; border: 1px solid var(--line); }
.entry pre code { padding: 0; border: 0; background: none; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.entry .alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.entry .alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.entry .aligncenter { margin-left: auto; margin-right: auto; }
.entry-pages { margin-top: 1.5rem; font-family: var(--f-mono); font-size: .85rem; }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2.6rem 0 0; }
.post-nav-link {
    display: block;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-family: var(--f-head);
    font-size: 1.05rem;
    min-width: 0;
}
.post-nav-link:hover { border-color: var(--acid); color: var(--acid); }
.post-nav-link--next { grid-column: 2; text-align: right; }
.post-nav-dir { display: block; color: var(--cyan); font-family: var(--f-mono); font-size: .72rem; margin-bottom: .3rem; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2.4rem 0 0; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-family: var(--f-mono);
    font-size: .85rem;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.pager a.page-numbers:hover { border-color: var(--acid); color: var(--acid); }
.pager .page-numbers.current { background: var(--acid); border-color: var(--acid); color: var(--ink-on-acid); font-weight: 500; }
.pager .page-numbers.dots { border: 0; background: none; min-width: 0; padding: 0 .3rem; color: var(--muted); }

/* ---------- Сайдбар и виджеты ---------- */
.sidebar {
    min-width: 0;
    padding: 1.4rem 1.4rem .4rem;
    border: 1px solid var(--line);
    background: var(--bg-rail);
    color: #C9D2DB;
}
.sidebar .wgt { margin-bottom: 1.8rem; }
.wgt-title {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 0 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--line);
}
.sidebar .wgt-title { color: var(--text); }
.sidebar .wgt ul { list-style: none; margin: 0; padding: 0; }
.sidebar .wgt li { padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; line-height: 1.4; }
.sidebar .wgt li:last-child { border-bottom: 0; }
.sidebar .wgt a { color: #DCE3EA; text-decoration: none; }
.sidebar .wgt a:hover { color: var(--acid); }
.sidebar .wgt .post-date { display: block; color: var(--muted); font-size: .78rem; font-family: var(--f-mono); }
.sidebar .wgt p { color: #C9D2DB; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: .5rem; margin: 1rem 0 1.4rem; max-width: 520px; }
.search-field {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #0A0D10;
    color: var(--text);
    font: inherit;
}
.search-field::placeholder { color: var(--muted); }
.sidebar .search-form { margin: 0; }

/* ---------- 404 ---------- */
.lost { padding: 1rem 0 2rem; }
.lost-code {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(5rem, 16vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--cyan);
    letter-spacing: .04em;
}
.lost-text { color: #B9C4CF; max-width: 620px; }

/* ---------- Комментарии ---------- */
.talk { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.talk-title, .comment-reply-title { font-size: 1.4rem; font-weight: 500; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { margin-left: 1.6rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.note-body { margin-bottom: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--panel); }
.note-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .6rem; }
.note-ava { border-radius: 0; border: 1px solid var(--line); }
.note-author { font-family: var(--f-head); font-weight: 500; }
.note-date { color: var(--muted); font-family: var(--f-mono); font-size: .75rem; }
.note-wait { color: var(--flag); font-size: .88rem; }
.note-text p:last-child { margin-bottom: 0; }
.note-reply { margin-top: .5rem; font-size: .85rem; }
.comment-respond { margin-top: 2rem; padding: 1.4rem 1.5rem; border: 1px solid var(--line); background: var(--panel); }
.comment-respond label { display: block; margin-bottom: .3rem; font-size: .9rem; color: #C9D2DB; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #0A0D10;
    color: var(--text);
    font: inherit;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.comment-notes, .logged-in-as, .must-log-in { color: var(--muted); font-size: .88rem; }
.req { color: var(--flag); }
.form-submit .submit {
    padding: .75rem 1.4rem;
    border: 1px solid var(--acid);
    border-radius: 0;
    background: var(--acid);
    color: var(--ink-on-acid);
    font-family: var(--f-head);
    font-size: 1rem;
    cursor: pointer;
}
.form-submit .submit:hover { background: transparent; color: var(--acid); }
.talk-closed { color: var(--muted); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Подвал ---------- */
.site-foot {
    background: var(--bg-foot);
    border-top: 1px solid var(--line);
    padding: 2.8rem 0 0;
    color: #B9C4CF;
}
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.foot-col { min-width: 0; }
.site-foot .wgt-title { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1.25rem; border-bottom: 0; padding-bottom: 0; margin-bottom: .6rem; }
.site-foot .wgt { color: #B9C4CF; font-size: .92rem; line-height: 1.55; margin-bottom: 1.4rem; }
.site-foot .wgt p { color: #B9C4CF; }
.site-foot .wgt ul { list-style: none; margin: 0; padding: 0; }
.site-foot .wgt li { margin-bottom: .3rem; }
.site-foot .wgt a { color: var(--cyan); text-decoration: none; }
.site-foot .wgt a:hover { color: var(--acid); text-decoration: underline; }
.foot-copy {
    margin-top: 1.4rem;
    padding: 1.1rem 0 1.4rem;
    border-top: 1px solid var(--line);
    text-align: center;
}
.foot-copy p { margin: 0; color: var(--muted); font-size: .82rem; }

/* ---------- Cookie ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem 1.4rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--acid);
    background: #121A23;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.cookie-text { margin: 0; font-size: .9rem; color: #C9D2DB; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .pipe { grid-template-columns: minmax(0, 1fr); }
    .pipe-panel { max-width: 360px; }
    .sec-title--wire::after { display: none; }
    .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2rem; }
    .stage:nth-child(4)::before { display: none; }
}

@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; align-items: center; }
    .brand { flex: 1 1 auto; }
    .nav-toggle { display: inline-flex; }
    .site-nav { flex: 1 0 100%; }
    .js .site-nav:not(.is-open) { display: none; }
    .site-nav-list { padding: .8rem 0 .2rem; border-top: 1px solid var(--line); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.5rem; }
    .layout-single { width: 100%; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-single .card-grid--feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pipe-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.6rem; }
    .pipe-step:nth-child(4)::before, .pipe-step:nth-child(4)::after { display: none; }
    .layers { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 1.2rem; }
    .layers-item::after { right: calc(-1rem - 1.2rem - 1px); width: calc(1.2rem + 1rem + 45px); }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sec-title::before { width: 24px; margin-right: .5rem; }
}

@media (max-width: 720px) {
    .layers { grid-template-columns: minmax(0, 1fr); }
    .layers-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; column-gap: 1rem; }
    .layers-item + .layers-item { border-top: 0; }
    .layers-item { border-bottom: 1px solid var(--line); }
    .layers-item::after, .layers-item::before { display: none; }
    .layers-wire { display: none; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    .masthead { padding-top: 1.4rem; }
    .brand-logo { width: 36px; height: 36px; }
    .brand-desc { font-size: .88rem; }
    .front-sec { padding: 2.4rem 0; }
    .card-grid, .card-grid--feed, .layout-single .card-grid--feed { grid-template-columns: minmax(0, 1fr); }
    .pipe-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pipe-step::before, .pipe-step::after { display: none; }
    .pipe-panel { max-width: none; }
    .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; row-gap: 1.6rem; }
    .stage::before { display: none; }
    .stages-cta { flex-direction: column; align-items: flex-start; padding: 1.2rem 1.2rem; }
    .tools { padding: .4rem .8rem; }
    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-link--next { grid-column: 1; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem; }
    .comment-respond { padding: 1.1rem 1rem; }
    .sidebar { padding: 1.1rem 1.1rem .2rem; }
    .entry .alignleft, .entry .alignright { float: none; margin: 1rem 0; }
    .sec-title::before { display: none; }
}
