/*
Theme Name: dds_ii1.su
Theme URI: https://ii1.su/
Author: Дмитрий Сафронов
Description: Тема «Цифровой дозор» — образовательная платформа о цифровой гигиене, кибербезопасности и аналитике переходов. Холодная палитра, glassmorphism и японский минимализм.
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: iidozor
*/

/* ===== Токены ===== */
:root {
    --bg: #0B1120;
    --bg-alt: #111827;
    --bg-head: #0F172A;
    --ink: #E2E8F0;
    --sky: #38BDF8;
    --indigo: #818CF8;
    --mute: #64748B;
    --mint: #34D399;
    --pink: #F472B6;
    --line: rgba(56, 189, 248, 0.15);
    --line-hot: rgba(56, 189, 248, 0.4);
    --glass: rgba(17, 24, 39, 0.62);
    --grad: linear-gradient(90deg, #38BDF8, #818CF8);
    --f-head: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
    --f-body: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    --r-btn: 12px;
    --r-card: 16px;
}

/* ===== Сброс и база ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    font-family: var(--f-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(56, 189, 248, 0.03) 0, rgba(56, 189, 248, 0.03) 1px, transparent 1px, transparent 24px);
}
body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
    background-repeat: no-repeat;
    background-size: contain;
}
body::before {
    top: -120px;
    right: -120px;
    width: 560px;
    height: 560px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2338BDF8'/%3E%3Cstop offset='1' stop-color='%23818CF8'/%3E%3C/linearGradient%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='40'/%3E%3C/filter%3E%3C/defs%3E%3Cpath filter='url(%23b)' fill='url(%23g)' opacity='0.08' d='M290 70c60 40 80 120 50 190s-120 90-190 60S40 210 70 140 230 30 290 70z'/%3E%3C/svg%3E");
}
body::after {
    left: 0;
    bottom: 0;
    width: 420px;
    height: 320px;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 320' fill='none' stroke='%2338BDF8' stroke-width='1.2'%3E%3Cpath d='M30 280 110 210 190 250 250 160 340 190 390 100M110 210 140 120 250 160M190 250 230 300M140 120 60 80M250 160 300 60 390 100M340 190 360 280'/%3E%3Cg fill='%2338BDF8'%3E%3Ccircle cx='30' cy='280' r='4'/%3E%3Ccircle cx='110' cy='210' r='5'/%3E%3Ccircle cx='190' cy='250' r='4'/%3E%3Ccircle cx='250' cy='160' r='6'/%3E%3Ccircle cx='340' cy='190' r='4'/%3E%3Ccircle cx='390' cy='100' r='4'/%3E%3Ccircle cx='140' cy='120' r='4'/%3E%3Ccircle cx='60' cy='80' r='3'/%3E%3Ccircle cx='300' cy='60' r='4'/%3E%3Ccircle cx='230' cy='300' r='3'/%3E%3Ccircle cx='360' cy='280' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: #F1F5F9;
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.25rem; line-height: 1.1; font-weight: 800; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }
blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    border-left: 2px solid var(--sky);
    background: rgba(56, 189, 248, 0.06);
    border-radius: 0 12px 12px 0;
    font-size: 1.1rem;
}
blockquote p:last-child { margin-bottom: 0; }
hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--sky), transparent); margin: 2.5rem 0; }
code, pre { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }
code { background: rgba(129, 140, 248, 0.12); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: #0F172A; border: 1px solid var(--line); padding: 1rem 1.2rem; border-radius: 12px; overflow-x: auto; }
pre code { background: none; padding: 0; }
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; border: 1px solid rgba(56, 189, 248, 0.3); }
th, td { border: 1px solid rgba(56, 189, 248, 0.3); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
th { background: rgba(56, 189, 248, 0.08); color: #F1F5F9; font-family: var(--f-head); }
.table-wrap, .wp-block-table { overflow-x: auto; }

a { color: var(--sky); text-decoration: none; transition: color .2s ease; }
a:hover { color: #7DD3FC; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

/* Анимированное подчёркивание текстовых ссылок */
.entry-content a,
.crumbs a,
.faq-a a,
.wdg a,
.list-desc a,
.lost-text a,
.remark-text a,
.gate-glass-text a {
    background-image: linear-gradient(#818CF8, #818CF8);
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .3s ease, color .2s ease;
    padding-bottom: 1px;
}
.entry-content a:hover,
.crumbs a:hover,
.faq-a a:hover,
.wdg a:hover,
.list-desc a:hover,
.lost-text a:hover,
.remark-text a:hover,
.gate-glass-text a:hover { background-size: 100% 1px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

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

/* ===== Полоса сверху ===== */
.signal-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad);
    z-index: 200;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}
.admin-bar .signal-bar { top: 46px; }

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.8rem 1.45rem;
    border-radius: var(--r-btn);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
    background-image: none;
}
.btn-fill { background: var(--sky); color: #0B1120; }
.btn-fill:hover { color: #0B1120; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(56, 189, 248, 0.45); }
.btn-line { background: transparent; color: var(--sky); border-color: var(--sky); }
.btn-line:hover { color: #E0F2FE; background: rgba(56, 189, 248, 0.14); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(56, 189, 248, 0.3); }
.btn-ghost { background: transparent; color: var(--sky); padding-left: 0; padding-right: 0; border: 0; }
.btn-ghost::after {
    content: "";
    width: 16px; height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9M8.5 4 12 8l-3.5 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9M8.5 4 12 8l-3.5 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s ease;
}
.btn-ghost:hover { color: #7DD3FC; transform: translateY(-2px); }
.btn-ghost:hover::after { transform: translateX(3px); }

/* ===== Шапка ===== */
.masthead {
    position: relative;
    z-index: 50;
    margin-top: 3px;
    background: rgba(15, 23, 42, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--ink);
    min-width: 0;
    flex: 1 1 0;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: 0 0 auto; display: flex; filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35)); }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    color: #F1F5F9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--mute);
    display: none;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line-hot);
    background: rgba(56, 189, 248, 0.06);
    color: var(--ink);
    border-radius: var(--r-btn);
    font: 600 0.85rem var(--f-body);
    cursor: pointer;
}
.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--sky);
    border-radius: 2px;
    position: relative;
    transition: transform .2s ease;
}
.nav-toggle-lines::before, .nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines::after { transform: translateY(-6px) rotate(-45deg); }

.primary-nav { display: none; width: 100%; }
.primary-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0.5rem 0 0.3rem; }
.nav-list li { margin: 0; position: relative; }
.nav-list a {
    display: block;
    padding: 0.65rem 0.2rem;
    color: var(--ink);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}
.nav-list a:hover,
.nav-list .current-menu-item > a { color: var(--sky); }
.nav-list .sub-menu { list-style: none; margin: 0; padding-left: 1rem; }

/* ===== Хлебные крошки ===== */
.page-top { padding-top: 1.6rem; padding-bottom: 4rem; }
.crumbs {
    font-size: 0.85rem;
    color: var(--mute);
    margin-bottom: 1.8rem;
    line-height: 1.6;
}
.crumbs a { color: #94A3B8; }
.crumbs a:hover { color: var(--sky); }
.crumbs span { color: var(--mute); }
.crumbs-sep { margin: 0 0.35rem; color: var(--sky) !important; opacity: .7; }

/* ===== Раскладки ===== */
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar { display: block; }
.content-area { min-width: 0; }
.sidebar { min-width: 0; margin-top: 3rem; }

/* ===== Заголовки секций ===== */
.zone-title,
.list-title,
.remarks-title {
    position: relative;
    padding-left: 24px;
    margin: 0;
}
.zone-title::before,
.list-title::before,
.remarks-title::before {
    content: "";
    position: absolute;
    left: 0; top: 0.1em; bottom: 0.1em;
    width: 2px;
    background: linear-gradient(180deg, #38BDF8, #818CF8);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    border-radius: 2px;
}
.entry-content h2 { position: relative; padding-left: 16px; }
.entry-content h2::before,
.zone-title::after {
    content: "";
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--sky);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), 0 0 10px rgba(56, 189, 248, 0.9);
}
.entry-content h2::before { left: 0; top: 0.62em; }
.zone-title::after { left: 11px; top: 50%; margin-top: -2px; }
.zone-title { padding-left: 28px; font-size: 1.75rem; line-height: 1.2; }

/* ===== Главная: зоны ===== */
.zone { padding: 80px 0; position: relative; }
.zone-alt {
    background-color: var(--bg-alt);
    background-image: radial-gradient(rgba(129, 140, 248, 0.05) 1px, transparent 1.2px);
    background-size: 16px 16px;
}
.zone-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    margin-bottom: 2.6rem;
}
.zone-head > * { min-width: 0; }
.seam { height: 80px; }
.seam-down { background: linear-gradient(180deg, rgba(11, 17, 32, 0) 0%, #111827 100%); }
.seam-up { background: linear-gradient(180deg, #111827 0%, rgba(11, 17, 32, 0) 100%); }
.pulse-line {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, #38BDF8 50%, transparent);
    opacity: .6;
}
.pulse-line::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 4px; height: 4px;
    margin: -2px 0 0 -2px;
    border-radius: 50%;
    background: #38BDF8;
    box-shadow: 0 0 10px #38BDF8;
}

/* Hero */
.gate {
    position: relative;
    overflow: hidden;
    padding: 72px 0 88px;
    isolation: isolate;
}
.gate-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    z-index: -2;
}
.gate-veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg, rgba(11, 17, 32, 0.94) 0%, rgba(11, 17, 32, 0.78) 45%, rgba(11, 17, 32, 0.45) 100%),
        linear-gradient(180deg, rgba(11, 17, 32, 0) 60%, #0B1120 100%);
}
.gate-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.gate-lead { min-width: 0; }
.gate-title {
    margin: 0 0 1.2rem;
    font-size: 2.3rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    max-width: 16ch;
}
.gate-sub { color: #CBD5E1; font-size: 1.05rem; max-width: 52ch; margin-bottom: 2rem; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.gate-glass {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    border-radius: var(--r-card);
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.gate-glass-text { color: #CBD5E1; font-size: 0.95rem; margin-bottom: 1.2rem; }
.gate-marks { list-style: none; margin: 0; padding: 0; }
.gate-marks li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0;
    margin: 0;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    font-size: 0.92rem;
    color: var(--ink);
}
.gate-marks svg { flex: 0 0 22px; color: var(--sky); display: block; }
.gate-marks li:nth-child(2) svg { color: var(--indigo); }

/* Статистика */
.tally {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 2rem 1.4rem;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%);
    position: relative;
}
.tally-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 0.9rem;
}
.tally-item:nth-child(even) { border-left: 1px solid rgba(56, 189, 248, 0.2); }
.tally-num {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1;
    letter-spacing: -0.02em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.tally-cap { color: var(--mute); font-size: 0.9rem; line-height: 1.45; }

/* Шаги */
.route {
    list-style: none;
    margin: 0;
    padding: 0 0 0 28px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
}
.route::before {
    content: "";
    position: absolute;
    left: 8px; top: 1rem; bottom: 1rem;
    border-left: 1px dashed rgba(129, 140, 248, 0.3);
}
.route-step {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 1.6rem 1.5rem 1.4rem;
    background: rgba(15, 23, 42, 0.58);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.route-step:hover { border-color: var(--line-hot); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 18px rgba(56, 189, 248, 0.12); }
.route-step::before {
    content: "";
    position: absolute;
    left: -24px; top: 2rem;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--indigo);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.8);
}
.route-num {
    display: block;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.route-title { margin: 0 0 0.5rem; font-size: 1.2rem; }
.route-step p { margin: 0; color: #94A3B8; font-size: 0.95rem; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; max-width: 860px; }
.faq-item {
    min-width: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 1.3rem;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.faq-item:hover { border-color: var(--line-hot); box-shadow: 0 0 20px rgba(56, 189, 248, 0.12); }
.faq-item[open] { border-color: rgba(56, 189, 248, 0.32); }
.faq-q {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 1.1rem 2.2rem 1.1rem 0;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.02rem;
    color: #F1F5F9;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: "";
    position: absolute;
    right: 0.2rem; top: 50%;
    width: 10px; height: 10px;
    margin-top: -7px;
    border-right: 2px solid var(--sky);
    border-bottom: 2px solid var(--sky);
    transform: rotate(45deg);
    transition: transform .25s ease, margin-top .25s ease;
}
.faq-item[open] .faq-q::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-a { padding: 0 0 1.2rem; color: #94A3B8; font-size: 0.96rem; }
.faq-item[open] .faq-a { animation: faqOpen .35s ease; }
.faq-a p:last-child, .faq-a ul:last-child { margin-bottom: 0; }
@keyframes faqOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.ticks { list-style: none; padding-left: 0; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 0.15rem; top: 0.5em;
    width: 12px; height: 7px;
    border-left: 2px solid #38BDF8;
    border-bottom: 2px solid #38BDF8;
    transform: rotate(-45deg);
}

/* ===== Карточки ===== */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: var(--r-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42), 0 0 22px rgba(56, 189, 248, 0.15);
}
.card.sticky { border-color: rgba(129, 140, 248, 0.45); }
.card-media { border-radius: var(--r-card) var(--r-card) 0 0; overflow: hidden; }
.card-media a { display: block; }
.card-media img,
.card-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .4s ease;
}
.card:hover .card-media img { transform: scale(1.03); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.35rem 1.35rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.8rem;
    font-size: 0.8rem;
    color: var(--mute);
    margin-bottom: 0.7rem;
}
.card-title { margin: 0 0 0.6rem; font-size: 1.15rem; line-height: 1.35; }
.card-title a { color: #F1F5F9; }
.card-title a:hover { color: var(--sky); }
.card-excerpt { color: #94A3B8; font-size: 0.93rem; line-height: 1.6; flex: 1; overflow-wrap: anywhere; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: 0.6rem; font-size: 0.9rem; }

.chip {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid;
    background-image: none;
}
.tone-sky { color: #38BDF8; background-color: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.3); }
.tone-indigo { color: #A5B4FC; background-color: rgba(129, 140, 248, 0.14); border-color: rgba(129, 140, 248, 0.32); }
.tone-mint { color: #34D399; background-color: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.tone-pink { color: #F472B6; background-color: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.3); }
.chip:hover { filter: brightness(1.15); }

/* ===== Списки / архив ===== */
.list-head { margin-bottom: 2.2rem; }
.list-title { font-size: 2rem; line-height: 1.15; }
.list-desc { color: #94A3B8; margin: 0.9rem 0 0; max-width: 62ch; }
.empty-note {
    padding: 1.6rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--glass);
    color: #94A3B8;
}

/* ===== Пагинация ===== */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.8rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.9rem;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.6);
    color: var(--ink);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.pager a.page-numbers:hover { border-color: var(--sky); color: var(--sky); transform: translateY(-2px); box-shadow: 0 0 14px rgba(56, 189, 248, 0.25); }
.pager .page-numbers.current { background: var(--sky); border-color: var(--sky); color: #0B1120; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 0.3rem; color: var(--mute); }

/* ===== Запись / страница ===== */
.entry-head { margin-bottom: 1.8rem; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; font-size: 0.85rem; color: var(--mute); margin-bottom: 1rem; }
.entry-title {
    margin: 0;
    font-size: 2.1rem;
    line-height: 1.12;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.entry-cover { margin: 0 0 2rem; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.05rem; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 12px; display: block; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--mute); margin-top: 0.5rem; }
.entry-content ul li::marker { color: var(--sky); }
.entry-content ol li::marker { color: var(--indigo); font-weight: 700; }
.alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.entry-tags a { font-size: 0.85rem; padding: 0.25rem 0.7rem; border-radius: 999px; border: 1px solid var(--line); color: #94A3B8; }
.entry-tags a:hover { border-color: var(--sky); color: var(--sky); }
.entry-pages { margin-top: 1.5rem; }

.post-navigation { margin-top: 3rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.post-navigation a {
    display: block;
    height: 100%;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--glass);
    transition: border-color .2s ease;
}
.post-navigation a:hover { border-color: var(--line-hot); }
.pn-label { display: block; font-size: 0.78rem; color: var(--mute); margin-bottom: 0.25rem; }
.pn-title { display: block; color: #F1F5F9; font-family: var(--f-head); font-weight: 600; }
.nav-next { text-align: right; }

/* ===== Сайдбар и виджеты ===== */
.sidebar .wdg {
    padding: 1.4rem 1.4rem;
    margin-bottom: 1.4rem;
    background: rgba(17, 24, 39, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    color: #CBD5E1;
}
.wdg-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: #F1F5F9;
    position: relative;
    padding-left: 14px;
}
.wdg-title::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 4px; height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--sky);
    box-shadow: 0 0 8px var(--sky);
}
.wdg ul { list-style: none; padding: 0; margin: 0; }
.wdg li { margin: 0; padding: 0.55rem 0; border-bottom: 1px solid rgba(56, 189, 248, 0.08); line-height: 1.45; }
.wdg li:last-child { border-bottom: 0; }
.sidebar .wdg a { color: #E2E8F0; }
.sidebar .wdg a:hover { color: var(--sky); }
.wdg .post-date { display: block; font-size: 0.78rem; color: #7C8BA1; margin-top: 0.15rem; }
.sidebar .wdg p { color: #CBD5E1; }

/* ===== Поиск ===== */
.seek { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }
.seek-label { width: 100%; font-size: 0.85rem; color: #94A3B8; }
.seek-field {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: var(--r-btn);
    border: 1px solid var(--line-hot);
    background: rgba(11, 17, 32, 0.7);
    color: var(--ink);
    font: inherit;
}
.seek-field::placeholder { color: var(--mute); }
.seek-field:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); }

/* ===== 404 ===== */
.lost { text-align: center; padding: 2rem 0 1rem; }
.lost-code {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 6rem;
    line-height: 1;
    margin: 0 0 0.5rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    opacity: .85;
}
.lost-title { margin: 0 0 1rem; }
.lost-text { color: #94A3B8; max-width: 52ch; margin: 0 auto 1rem; }
.lost .seek { max-width: 520px; margin: 1.5rem auto; text-align: left; }

/* ===== Комментарии ===== */
.remarks { margin-top: 3.5rem; }
.remarks-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
.remark-list, .remark-list .children { list-style: none; margin: 0; padding: 0; }
.remark-list .children { padding-left: 1.5rem; }
.remark-box {
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--glass);
}
.remark-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin-bottom: 0.5rem; }
.remark-head img { border-radius: 50%; display: block; }
.remark-author { font-weight: 600; color: #F1F5F9; }
.remark-date { font-size: 0.8rem; color: var(--mute); }
.remark-text { color: #CBD5E1; }
.remark-text p:last-child { margin-bottom: 0.4rem; }
.remark-wait { color: var(--indigo); font-size: 0.85rem; }
.comment-reply-link { font-size: 0.85rem; font-weight: 600; }
.comment-respond {
    margin-top: 2rem;
    padding: 1.6rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--glass);
}
.comment-reply-title { margin-top: 0; font-size: 1.2rem; }
.comment-form label { display: block; font-size: 0.88rem; color: #94A3B8; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--r-btn);
    border: 1px solid var(--line-hot);
    background: rgba(11, 17, 32, 0.7);
    color: var(--ink);
    font: inherit;
}
.comment-form textarea:focus,
.comment-form input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); }
.comment-form-cookies-consent label { display: inline; }
.comment-form .submit {
    padding: 0.8rem 1.45rem;
    border: 0;
    border-radius: var(--r-btn);
    background: var(--sky);
    color: #0B1120;
    font: 700 0.95rem var(--f-head);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.comment-form .submit:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(56, 189, 248, 0.45); }
.remark-note, .logged-in-as { font-size: 0.85rem; color: var(--mute); }

/* ===== Подвал ===== */
.colophon {
    position: relative;
    background: #0B1120;
    padding: 64px 0 28px;
    color: #CBD5E1;
}
.colophon::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #38BDF8 30%, #818CF8 70%, transparent);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}
.colophon-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
.colophon-col { min-width: 0; }
.colophon .wdg { color: #CBD5E1; }
.colophon .wdg-title { color: #F1F5F9; }
.colophon .wdg p { color: #94A3B8; font-size: 0.93rem; }
.colophon .wdg a { color: #CBD5E1; }
.colophon .wdg a:hover { color: #38BDF8; }
.colophon .wdg li { border-bottom-color: rgba(56, 189, 248, 0.08); padding: 0.4rem 0; }
.colophon-copy {
    margin: 3rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    font-size: 0.85rem;
    color: #7C8BA1;
}

/* ===== Cookie ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.1rem 1.3rem;
    background: rgba(15, 23, 42, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line-hot);
    border-radius: var(--r-card);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
}
.cookie-text { margin: 0; font-size: 0.88rem; color: #CBD5E1; line-height: 1.55; min-width: 0; }
.cookie-accept { align-self: flex-start; }

/* ===== ≥600px ===== */
@media (min-width: 600px) {
    h1 { font-size: 2.8rem; }
    .brand-name { font-size: 0.95rem; }
    .gate { padding: 96px 0 110px; }
    .gate-title { font-size: 3rem; }
    .gate-glass { padding: 1.8rem 1.8rem; }
    .tally { padding: 2.2rem 2rem; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-navigation .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-step { padding: 1.8rem 1.8rem 1.6rem; }
    .faq-item { padding: 0 1.6rem; }
    .cookie-banner {
        left: 50%; right: auto;
        width: min(92%, 760px);
        transform: translateX(-50%);
        flex-direction: row;
        align-items: center;
        padding: 1.1rem 1.5rem;
    }
    .cookie-accept { align-self: center; flex: 0 0 auto; }
    .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entry-title { font-size: 2.5rem; }
    .list-title { font-size: 2.3rem; }
}

/* ===== ≥782px (админ-бар) ===== */
@media (min-width: 783px) {
    .admin-bar .signal-bar { top: 32px; }
}

/* ===== ≥960px ===== */
@media (min-width: 960px) {
    .brand-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-width: 60ch;
    }
    .nav-toggle { display: none; }
    .primary-nav { display: block; width: auto; flex: 0 0 auto; }
    .masthead-row { flex-wrap: nowrap; padding: 1rem 0; }
    .nav-list { display: flex; gap: 0.3rem; padding: 0; }
    .nav-list > li > a {
        border: 0;
        padding: 0.55rem 0.95rem;
        border-radius: 10px;
        white-space: nowrap;
    }
    .nav-list > li > a:hover,
    .nav-list > .current-menu-item > a { background: rgba(56, 189, 248, 0.1); color: var(--sky); }
    .nav-list .sub-menu {
        position: absolute;
        top: 100%; left: 0;
        min-width: 220px;
        padding: 0.4rem;
        background: rgba(15, 23, 42, 0.96);
        border: 1px solid var(--line);
        border-radius: 12px;
        display: none;
    }
    .nav-list li:hover > .sub-menu,
    .nav-list li:focus-within > .sub-menu { display: block; }

    h1 { font-size: 3.5rem; line-height: 1.1; }
    .zone { padding: 110px 0; }
    .zone-title { font-size: 2.2rem; }

    .gate { padding: 120px 0 140px; }
    .gate-inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr); gap: 5rem; }
    .gate-title { font-size: 3.5rem; line-height: 1.1; }
    .gate-glass { margin-top: 7rem; padding: 2rem 2rem; }

    .tally { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 2.6rem 2.4rem; }
    .tally-item { padding: 0.4rem 1.6rem; }
    .tally-item:nth-child(even) { border-left: 0; }
    .tally-item + .tally-item { border-left: 1px solid rgba(56, 189, 248, 0.2); }
    .tally-num { font-size: 3rem; }

    .route {
        padding: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 6rem;
        row-gap: 1.5rem;
    }
    .route::before { left: 50%; top: 2rem; bottom: 2rem; }
    .route-step { justify-self: start; max-width: 470px; }
    .route-step::before { top: 2.3rem; }
    .route-step:nth-child(odd)::before { left: auto; right: calc(-3rem - 4px); }
    .route-step:nth-child(even)::before { left: calc(-3rem - 4px); }
    .route-step:nth-child(2) { margin-top: 7rem; }
    .route-step:nth-child(3) { margin-left: 3.5rem; margin-top: -2rem; }
    .route-step:nth-child(4) { margin-top: 5rem; }

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

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
    .sidebar { margin-top: 0; }
    .layout-with-sidebar .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .colophon-grid { grid-template-columns: 1.2fr 1fr 1.2fr; gap: 3.5rem; }
    .colophon-grid > * { min-width: 0; }
}

@media (max-width: 599px) {
    .layout-single .content-area { width: 100%; }
    .home .shell { width: min(92%, 1180px); }
    .tally-item { padding: 0.9rem 0.6rem; }
    .tally-item:nth-child(n+3) { border-top: 1px solid rgba(56, 189, 248, 0.12); }
    .tally-num { font-size: 1.9rem; }
    .gate-actions .btn { flex: 1 1 auto; }
    .alignleft, .alignright { float: none; margin: 1rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
