*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: #f8f9fa;              /* Crisp dossier paper */
    --surface: #ffffff;         /* Elevated telemetry cards */
    --topbar-bg: #111317;       /* Deep Aston Martin carbon */
    --topbar-text: #d1d5db;
    --text: #141619;            /* Sharp obsidian ink */
    --text-muted: #525866;
    --accent: #e66b1a;          /* Tactical amber / tachometer redline */
    --accent-dark: #c2550e;
    --border: #dfe3e8;
    --border-strong: #141619;   /* Crisp technical framing */
    --container-max: 1240px;


    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}


body {
    margin: 0;
    font-family: var(--font-sans), sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* 1. Тёмная верхняя полоса (Topbar) */
.topbar {
    background: var(--topbar-bg);
    color: var(--topbar-text);
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 28px;
}

.topbar a {
    color: var(--topbar-text);
    text-decoration: none;
    transition: opacity 0.2s;
}

.topbar a:hover {
    opacity: 0.8;
}

.topbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar p {
    margin: 0;
}

/* 2. Основная шапка (Header) */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 76px;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.site-logo img {
    height: 42px;
    width: auto;
}

/* 2. Основная шапка (Header) — ТЁМНАЯ */
.site-header {
    background: var(--topbar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 76px;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.site-logo img {
    height: 42px;
    width: auto;
}

/* Текстовый логотип-заглушка в стиле Q-Branch */
.dev-brand {
    font-family: var(--font-mono), monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.04em;
}

/* 3. Главное горизонтальное меню и выпадающие подменю */
.main-nav {
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .mod-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav .mod-menu > li {
    position: relative;
}

.main-nav .mod-menu > li > a,
.main-nav .mod-menu > li > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 0.25rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
}

.main-nav .mod-menu > li > a:hover,
.main-nav .mod-menu > li.active > a,
.main-nav .mod-menu > li.current > a {
    color: var(--accent);
}

/* Иконки-картинки в пунктах меню (домик, указатель) */
.main-nav img {
    height: 26px;
    width: auto;
    vertical-align: middle;
}

/* Стрелка вниз для пунктов с подменю */
.main-nav .mod-menu > li.parent > a::after,
.main-nav .mod-menu > li.parent > span::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
    margin-top: -3px;
}

/* Выпадающий список (2-й уровень) — ТЁМНЫЙ */
.main-nav .mod-menu ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #181b22;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0;
    z-index: 200;
}

.main-nav .mod-menu > li:hover > ul,
.main-nav .mod-menu > li:focus-within > ul {
    display: block;
}

.main-nav .mod-menu ul li a,
.main-nav .mod-menu ul li span,
.main-nav ul ul li a,
.main-nav ul ul li span {
    display: block;
    padding: 0.55rem 1.1rem;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
}

.main-nav .mod-menu ul li a:hover,
.main-nav ul ul li a:hover {
    background: rgba(230, 107, 26, 0.12);
    color: var(--accent);
}

/* Кнопка бургер-меню для мобильных */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
}

/* 5. Основной контент и сетка */
.main-wrapper {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 960px) {
    .layout-grid.has-left {
        grid-template-columns: 260px 1fr;
    }
    .layout-grid.has-right {
        grid-template-columns: 1fr 280px;
    }
    .layout-grid.has-left.has-right {
        grid-template-columns: 240px 1fr 260px;
    }
}

/* Адаптив для планшетов и смартфонов */
@media (max-width: 960px) {
    .hero-section {
        background-attachment: scroll;
    }
    .hero-card {
        display: none;
    }
    .menu-toggle {
        display: flex;
        margin-left: auto;
    }
    .header-search {
        display: none;
    }
    .main-nav {
        display: none;
        width: 100%;
        margin-left: 0;
        padding-bottom: 1rem;
        border-top: 1px solid var(--border);
    }
    .main-nav.is-open {
        display: block;
    }
    .header-inner {
        flex-wrap: wrap;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    .main-nav .mod-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .main-nav .mod-menu > li {
        width: 100%;
    }
    .main-nav .mod-menu > li > a,
    .main-nav .mod-menu > li > span {
        padding: 0.65rem 0;
        width: 100%;
    }
    .main-nav .mod-menu ul {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border);
        padding-left: 1rem;
        display: block;
    }
}

/* 6. Подвал */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* соцсети и поиск */
/* Иконки соцсетей в topbar */
.social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    color: var(--topbar-text);
    transition: background-color 0.2s, color 0.2s;
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.header-search {
    flex-shrink: 0;
}

.header-search .mod-finder {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
}

.header-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.header-search .awesomplete {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input[type="search"],
.header-search input[type="text"] {
    width: 210px;
    height: 38px;
    padding: 0 2.4rem 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--surface);
    color: var(--text);
    transition: width 0.25s ease, border-color 0.2s, background-color 0.2s;
}

.header-search input[type="search"]::placeholder,
.header-search input[type="text"]::placeholder {
    color: var(--text-muted);
}

.header-search input:focus {
    width: 250px;
    background: var(--bg);
    border-color: var(--accent);
    outline: none;
}

/* Кнопка-лупа внутри правой части поля */
.header-search .mod-finder__search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search button.btn-primary {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: transparent !important;
    font-size: 0;
    color: transparent;
    cursor: pointer;
}

/* Круг лупы на чистом CSS */
.header-search button.btn-primary::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 13px;
    height: 13px;
    border: 2px solid #6b7280;
    border-radius: 50%;
    transition: border-color 0.2s;
}

/* Ручка лупы на чистом CSS */
.header-search button.btn-primary::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 17px;
    width: 7px;
    height: 2px;
    background: #6b7280;
    transform: rotate(45deg);
    transform-origin: left center;
    transition: background-color 0.2s;
}

/* Подсветка оранжевым при наведении */
.header-search button.btn-primary:hover::before {
    border-color: var(--accent);
}

.header-search button.btn-primary:hover::after {
    background: var(--accent);
}

.header-search button.btn-primary span {
    display: none;
}

/* Выпадающие подсказки автодополнения */
.header-search .awesomplete > ul {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    min-width: 260px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    z-index: 300;
}

.header-search .awesomplete > ul > li {
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.header-search .awesomplete > ul > li:hover,
.header-search .awesomplete > ul > li[aria-selected="true"] {
    background: var(--surface);
    color: var(--accent);
}

/* Главный экран (Hero-блок) */
.hero-section {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: 4.5rem 0;
    border-bottom: 3px solid var(--accent);
    background-color: #14171d;
    --parallax-y: 0px;
}

/* Подвижный тактический фон */
.hero-section::before {
    content: "";
    position: absolute;
    inset: -140px -10%;
    z-index: 0;
    pointer-events: none;

    background-image:
        /* Затемнение к верхней «линии горизонта», чтобы сетка уходила в глубину */
            linear-gradient(to bottom, #14171d 18%, transparent 55%, rgba(20, 23, 29, 0.85) 100%),
                /* Кольца тактического радара справа (за окном с кодом) */
            radial-gradient(circle at 75% 48%, transparent 110px, rgba(230, 107, 26, 0.22) 111px, transparent 113px),
            radial-gradient(circle at 75% 48%, transparent 190px, rgba(255, 255, 255, 0.08) 191px, transparent 193px),
            radial-gradient(circle at 75% 48%, rgba(230, 107, 26, 0.2) 0%, transparent 45%),
                /* Крупная 3D-сетка */
            linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);

    background-size:
            100% 100%,
            100% 100%,
            100% 100%,
            100% 100%,
            90px 90px,
            90px 90px;

    /* 3D-наклон плоскости + плавный сдвиг при прокрутке */
    transform: perspective(650px) rotateX(38deg) translate3d(0, var(--parallax-y), 0);
    transform-origin: center 75%;
    will-change: transform;
}
/* Поднимаем контент Hero над фоновым слоем */
.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 860px;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1.25rem;
    background: rgba(230, 107, 26, 0.16);
    border: 1px solid rgba(230, 107, 26, 0.45);
    border-radius: 999px;
    color: #ff944d;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.hero-title {
    margin: 0 0 1.25rem;
    font-size: clamp(1.85rem, 3.8vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
}

.hero-subtitle {
    margin: 0 0 2rem;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.65;
    color: #d1d5db;
}
.hero-subtitle a,
.hero-subtitle span {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.65rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, background-color 0.2s, border-color 0.2s;
}

.hero-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.hero-btn-primary {
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
}

.hero-btn-primary:hover {
    background: #d15d12;
    border-color: #d15d12;
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #ffffff;
}

@media (max-width: 640px) {
    .hero-section {
        padding: 3rem 0;
    }
    .hero-btn {
        width: 100%;
    }
}

/* Hero 2-column Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 960px) {
    .hero-grid {
        grid-template-columns: 1.25fr 0.95fr;
    }
}

/* Live green pulse dot inside badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Tech Stack Pills */
.hero-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
}

.hero-stack li {
    padding: 0.25rem 0.65rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.8rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

/* Developer Code Window Card */
.hero-card {
    background: #161920;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.hero-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5563;
}

.window-dots i:first-child { background: #ef4444; }
.window-dots i:nth-child(2) { background: #f59e0b; }
.window-dots i:last-child { background: #22c55e; }

.window-title {
    font-family: var(--font-mono), monospace;
    font-size: 0.78rem;
    color: #9ca3af;
}

.hero-code {
    margin: 0;
    padding: 1.25rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.85rem;
    line-height: 1.65;
    color: #e5e7eb;
    overflow-x: auto;
}

.hero-code .c-key { color: #ff944d; }
.hero-code .c-str { color: #86efac; }
.hero-code .c-bool { color: #60a5fa; }
.hero-code .c-comment { color: #6b7280; }

/* cards */
.dossier-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.75rem;
    transition: border-color 0.2s, transform 0.2s;
}

.dossier-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Monospace technical stamp */
.dossier-code {
    display: inline-block;
    font-family: var(--font-mono), monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

/* Принудительно тёмный поиск в шапке */
.site-header .header-search input[type="search"],
.site-header .header-search input[type="text"],
.site-header .mod-finder input.form-control {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.site-header .header-search input::placeholder {
    color: #9ca3af !important;
}

.site-header .header-search input:focus {
    background-color: #181b22 !important;
    border-color: var(--accent) !important;
}

/* Секции главной страницы */
.dossier-section {
    padding: 4.5rem 0;
}

.section-header {
    max-width: 680px;
    margin-bottom: 2.75rem;
}

.section-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    color: var(--text);
}

.section-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Дополнение к уже существующему .dossier-card */
.dossier-card {
    display: flex;
    flex-direction: column;
}

.dossier-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.dossier-card p {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

.dossier-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.dossier-tags span {
    font-family: var(--font-mono), monospace;
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
}

.dossier-card h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.dossier-card:hover h3 a {
    color: var(--accent);
}

.dossier-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.15rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: gap 0.2s, color 0.2s;
}

.dossier-link:hover {
    color: var(--accent-dark);
    gap: 0.6rem;
}

/* Тёмная полоса телеметрии */
.protocol-header {
    margin-bottom: 2.25rem;
}

.protocol-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 800;
    color: #ffffff;
}
.telemetry-strip {
    background-color: #13151a;
    color: #ffffff;
    padding: 4rem 0;
    border-top: 2px solid var(--accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    background-image:
            radial-gradient(circle at 50% 0%, rgba(230, 107, 26, 0.12), transparent 60%),
            linear-gradient(27deg, #15181e 5px, transparent 5px),
            linear-gradient(207deg, #15181e 5px, transparent 5px),
            linear-gradient(27deg, #1c2028 5px, transparent 5px),
            linear-gradient(207deg, #1c2028 5px, transparent 5px),
            linear-gradient(90deg, #171a21 10px, transparent 10px),
            linear-gradient(#171a21 25%, #14171d 25%, #14171d 50%, transparent 50%, transparent 75%, #1b1f26 75%, #1b1f26);
    background-size: 100% 100%, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
    background-position: 0 0, 0 5px, 10px 0, 0 10px, 10px 5px, 0 0, 0 0;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 2rem;
}

.telemetry-item {
    background: rgba(20, 23, 29, 0.72);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 1.25rem 1.25rem 1.25rem 1.35rem;
}

.telemetry-val {
    display: block;
    font-family: var(--font-mono), monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.telemetry-label {
    font-size: 0.875rem;
    color: var(--topbar-text);
}

/* Карточки готовых решений */
.solution-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.solution-meta .dossier-code {
    margin-bottom: 0;
}

.solution-status {
    font-family: var(--font-mono), monospace;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    border-radius: 3px;
    background: rgba(230, 107, 26, 0.1);
    color: var(--accent-dark);
    border: 1px solid rgba(230, 107, 26, 0.3);
    letter-spacing: 0.04em;
}

.solution-price {
    font-family: var(--font-mono), monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.solution-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.15rem;
}

.solution-actions .dossier-link {
    margin-top: 0;
}

.dossier-link-muted {
    font-family: var(--font-mono), monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.dossier-link-muted:hover {
    color: var(--text);
}

/* Контакты внутри CTA-блока (на базе .telemetry-strip и .hero-card) */
.cta-contacts-card {
    display: block !important;
}

.cta-card-body {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-family: var(--font-mono), monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.contact-value {
    font-family: var(--font-mono), monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-value:hover {
    color: var(--accent);
}

.contact-text {
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.5;
}

/* Блок OpenPGP внутри карточки контактов */
.pgp-list {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pgp-fingerprint {
    display: block;
    padding: 0.55rem 0.85rem;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    font-family: var(--font-mono), monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #d1d5db;
    word-break: break-all;
    user-select: all; /* Позволяет выделить весь отпечаток одним кликом */
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.pgp-fingerprint:hover {
    background-color: #181b22;
    border-color: var(--accent);
    color: #ffffff;
}

/* 6. Тёмный подвал в стиле Q-Branch */
.site-footer {
    background: var(--topbar-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3.5rem 0 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.2fr 1fr 1fr;
    }
}

.site-footer h3 {
    margin: 0 0 1rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
}

.site-footer p {
    margin: 0 0 0.5rem;
    line-height: 1.6;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.site-footer a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.8rem;
    color: #6b7280;
}

.footer-security {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.footer-sep {
    opacity: 0.35;
}

.footer-requisites {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #9ca3af;
}

.footer-requisites p {
    margin: 0 0 0.65rem;
}

.footer-requisites p:last-child {
    margin-bottom: 0;
}

.footer-requisites .req-name {
    color: #e5e7eb;
    font-weight: 600;
}

.footer-requisites .req-mono {
    font-family: var(--font-mono), monospace;
    color: #d1d5db;
    user-select: all;
}

/* ================== внутренние страницы ====================================== */

.hero-grid.contacts-grid {
    align-items: stretch;
}

@media (min-width: 960px) {
    .hero-grid.contacts-grid {
        grid-template-columns: 0.95fr 1.25fr;
    }
}

.contacts-grid .cta-contacts-card {
    display: flex !important;
    flex-direction: column;
}

.contacts-grid .cta-card-body {
    flex-grow: 1;
}

.contacts-grid .hero-actions {
    margin-top: auto;
}

/* --  блог категории --*/

.dossier-page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0 2.25rem;
}
.dossier-page-header .section-title:last-child {
    margin-bottom: 0;
}

.dossier-page-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.dossier-page-top .dossier-code {
    margin-bottom: 0;
}

/* Реестр горизонтальных строк-досье */
.dossier-list-section {
    padding: 2.75rem 0 4rem;
}

.dossier-rows {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.dossier-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: start;
    gap: 2rem;
    padding: 1.75rem 1.25rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}

.dossier-row:hover {
    background: var(--surface);
    border-left-color: var(--accent);
}

.dossier-row__id {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.2rem;
}

.dossier-row__num {
    font-family: var(--font-mono), monospace;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.dossier-row__id .dossier-code {
    margin-bottom: 0;
    font-size: 0.72rem;
}

.dossier-row__title {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
}

.dossier-row__title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.dossier-row:hover .dossier-row__title a {
    color: var(--accent);
}

.dossier-row__excerpt {
    margin: 0;
    max-width: 68ch;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.dossier-row .dossier-tags {
    margin-top: 0.9rem;
    padding-top: 0;
    border-top: none;
}

.dossier-row__action {
    align-self: center;
    white-space: nowrap;
}

.dossier-row__action .dossier-link {
    margin-top: 0;
}

.is-inner .main-wrapper:has(.category-dossier),
.is-inner .main-wrapper:has(.categories-dossier) {
    max-width: 100%;
    padding: 0;
}

/* Карточка сектора с фоновым SVG-водяным знаком */
.dossier-card--sector {
    overflow: hidden;
    border-top: 3px solid var(--border-strong);
}

.dossier-card--sector:hover {
    border-top-color: var(--accent);
}

.dossier-card--sector > *:not(.sector-watermark) {
    position: relative;
    z-index: 1;
}

.sector-watermark {
    position: absolute;
    right: -14px;
    bottom: -14px;
    width: 132px;
    height: 132px;
    color: var(--text);
    opacity: 0.045;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.sector-watermark svg {
    width: 100%;
    height: 100%;
}

.dossier-card--sector:hover .sector-watermark {
    color: var(--accent);
    opacity: 0.11;
    transform: scale(1.06) rotate(-4deg);
}

.sector-placeholder {
    opacity: 0.72;
}

/* Пагинация Joomla 5 в стиле Q-Branch */
.dossier-pagination {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border);
}

.dossier-pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dossier-pagination li {
    margin: 0;
    padding: 0;
}

.dossier-pagination a,
.dossier-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.75rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.dossier-pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Активная страница */
.dossier-pagination li.active a,
.dossier-pagination li.active span,
.dossier-pagination span[aria-current="page"] {
    background: var(--topbar-bg);
    border-color: var(--topbar-bg);
    color: #ffffff;
}

/* Неактивные кнопки (В начало / Назад на 1-й странице) */
.dossier-pagination li.disabled a,
.dossier-pagination li.disabled span {
    opacity: 0.38;
    pointer-events: none;
}

/* Заменяем пустые FontAwesome-иконки Joomla 5 на текстовые стрелки */
.dossier-pagination [class*="icon-"] {
    font-style: normal;
}
.dossier-pagination .icon-first::before,
.dossier-pagination .icon-angle-double-left::before { content: "«"; }
.dossier-pagination .icon-previous::before,
.dossier-pagination .icon-angle-left::before { content: "‹"; }
.dossier-pagination .icon-next::before,
.dossier-pagination .icon-angle-right::before { content: "›"; }
.dossier-pagination .icon-last::before,
.dossier-pagination .icon-angle-double-right::before { content: "»"; }

@media (max-width: 768px) {
    .dossier-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 1.35rem 1rem;
    }
    .dossier-row__id {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    .dossier-row__action {
        align-self: flex-start;
    }
}
.dossier-pagination a > span,
.dossier-pagination li > span > span {
    border: none;
    background: transparent;
    padding: 0;
    min-width: auto;
    height: auto;
}

.article-dossier .dossier-card:hover {
    transform: none;
    border-color: var(--border);
}

.article-dossier .dossier-card a:not([class]) {
    color: var(--accent-dark);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(230, 107, 26, 0.45);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.article-dossier .dossier-card a:not([class]):hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* ============================================================
   Таблицы требований Joomla 5/4 — в стиле Q-Branch
   ============================================================ */

.req-table {
    display: flex;
    flex-direction: column;
    margin: 1.5rem 0 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface);
    font-size: 0.92rem;
}

.req-table__row {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr 2.1fr;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

.req-table__row:last-child {
    border-bottom: none;
}

.req-table__row:not(.req-table__row--head):not(.req-table__row--group):hover {
    background: var(--bg);
}

.req-table__row--head {
    background: var(--topbar-bg);
    color: #ffffff;
}

.req-table__row--head .req-table__cell {
    font-family: var(--font-mono), monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.req-table__row--group {
    background: var(--bg);
}

.req-table__row--group .req-table__cell {
    font-family: var(--font-mono), monospace;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--accent-dark);
    text-transform: uppercase;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.req-table__cell {
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border);
    line-height: 1.45;
}

.req-table__cell:last-child {
    border-right: none;
}

.req-table__row--head .req-table__cell {
    border-right-color: rgba(255, 255, 255, 0.12);
}

.req-table__row--head .req-table__cell:last-child {
    border-right: none;
}

/* Второй и третий столбцы — моноширинный шрифт для версий */
.req-table__row:not(.req-table__row--head) .req-table__cell:nth-child(2),
.req-table__row:not(.req-table__row--head) .req-table__cell:nth-child(3) {
    font-family: var(--font-mono), monospace;
    font-weight: 600;
    color: var(--text);
}

/* Ссылки внутри таблицы — в стиле статьи */
.req-table a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-decoration-color: rgba(230, 107, 26, 0.45);
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.req-table a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.req-table sup a {
    text-decoration: none;
    font-family: var(--font-mono), monospace;
    font-size: 0.7em;
    padding: 0 0.15em;
}

/* ============================================================
   Мобильная адаптация таблиц требований
   ============================================================ */
@media (max-width: 768px) {
    .req-table__row,
    .req-table__row--head {
        grid-template-columns: 1fr;
    }

    .req-table__row--head {
        display: none; /* заголовки скрываем на мобильных */
    }

    .req-table__row:not(.req-table__row--group) {
        position: relative;
        padding: 0.25rem 0;
    }

    .req-table__cell {
        border-right: none;
        padding: 0.25rem 0.9rem;
    }

    /* Название софта — жирнее и с отступом */
    .req-table__row:not(.req-table__row--group) .req-table__cell:first-child {
        font-weight: 700;
        font-size: 0.95rem;
        padding-top: 0.7rem;
    }

    /* Подписи Recommended/Minimum/More Information на мобильных */
    .req-table__row:not(.req-table__row--group):not(.req-table__row--head) .req-table__cell:nth-child(2)::before {
        content: "Recommended: ";
        font-family: var(--font-sans), sans-serif;
        font-weight: 400;
        color: var(--text-muted);
        font-size: 0.82em;
    }

    .req-table__row:not(.req-table__row--group):not(.req-table__row--head) .req-table__cell:nth-child(3)::before {
        content: "Minimum: ";
        font-family: var(--font-sans), sans-serif;
        font-weight: 400;
        color: var(--text-muted);
        font-size: 0.82em;
    }

    .req-table__row--group {
        margin-top: 0.25rem;
    }
}

/* ============================================================
   Блок примечаний
   ============================================================ */
.article-notes {
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-notes h4 {
    margin: 0 0 0.85rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.article-notes ol {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.article-notes li {
    line-height: 1.6;
}

.article-notes ul {
    margin: 0.5rem 0 0.25rem;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.article-notes a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-decoration-color: rgba(230, 107, 26, 0.45);
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.article-notes a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* Карточка профиля на странице Экспертиза */
.profile-dossier {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    /* background-color: var(--topbar-bg);
    background-image: radial-gradient(circle at 100% 0%, rgba(230, 107, 26, 0.14), transparent 55%);
    */
    background-color: #13151a;
    background-image:
            radial-gradient(circle at 50% 0%, rgba(230, 107, 26, 0.12), transparent 60%),
            linear-gradient(27deg, #15181e 5px, transparent 5px),
            linear-gradient(207deg, #15181e 5px, transparent 5px),
            linear-gradient(27deg, #1c2028 5px, transparent 5px),
            linear-gradient(207deg, #1c2028 5px, transparent 5px),
            linear-gradient(90deg, #171a21 10px, transparent 10px),
            linear-gradient(#171a21 25%, #14171d 25%, #14171d 50%, transparent 50%, transparent 75%, #1b1f26 75%, #1b1f26);
    background-size: 100% 100%, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
    background-position: 0 0, 0 5px, 10px 0, 0 10px, 10px 5px, 0 0, 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--accent);
    color: #e5e7eb;
}

.profile-dossier h2 {
    color: #ffffff;
}

.profile-dossier p {
    color: #d1d5db;
}

.profile-dossier__photo {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.profile-dossier__role {
    font-family: var(--font-mono), monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.85rem;
}

.exp-block-gap {
    margin-top: 2.5rem;
}

@media (max-width: 680px) {
    .profile-dossier {
        flex-direction: column;
        text-align: center;
    }
}

/* Инженерная лестница компетенций (зигзаг) */
.dossier-ladder {
    position: relative;
    max-width: 960px;
    margin: 3rem auto;
    padding: 0.5rem 0;
}

/* Центральная вертикальная ось */
.dossier-ladder::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--border);
    transform: translateX(-50%);
}

.ladder-item {
    position: relative;
    width: 50%;
    padding: 0 2.5rem 2.25rem 0;
    text-align: right;
}

.ladder-item:last-child {
    padding-bottom: 0;
}

/* Правые ступени (чётные) */
.ladder-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2.25rem 2.5rem;
    text-align: left;
}

/* Узел-маркер на центральной линии */
.ladder-item::after {
    content: "";
    position: absolute;
    top: 0.35rem;
    right: -7px;
    width: 14px;
    height: 14px;
    background: var(--surface);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.ladder-item:nth-child(even)::after {
    right: auto;
    left: -7px;
}

/* Горизонтальная отсечка к тексту */
.ladder-item::before {
    content: "";
    position: absolute;
    top: 0.72rem;
    right: 7px;
    width: 1.5rem;
    height: 1px;
    background: var(--accent);
}

.ladder-item:nth-child(even)::before {
    right: auto;
    left: 7px;
}

.ladder-item h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.ladder-item p {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.ladder-item .dossier-tags {
    border-top: none;
    padding-top: 0;
    justify-content: flex-end;
}

.ladder-item:nth-child(even) .dossier-tags {
    justify-content: flex-start;
}

/* Адаптив для мобильных (всё выстраивается по левой линии) */
@media (max-width: 768px) {
    .dossier-ladder::before {
        left: 10px;
    }
    .ladder-item,
    .ladder-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 2rem 2.5rem;
        text-align: left;
    }
    .ladder-item::after,
    .ladder-item:nth-child(even)::after {
        left: 3px;
        right: auto;
    }
    .ladder-item::before,
    .ladder-item:nth-child(even)::before {
        left: 17px;
        right: auto;
        width: 1rem;
    }
    .ladder-item .dossier-tags {
        justify-content: flex-start;
    }
}

@media (max-width: 400px) {
    .dossier-page-top {
        flex-wrap: wrap;
    }
    .dossier-page-top .dossier-code {
        font-size: 0.7rem; /* Чуть уменьшим шрифт */
    }
}
/* ============================================================================= */


/* Страницы error.php и offline.php */
.status-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    padding: 1.5rem;
}

.status-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.status-code {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.status-card h1 {
    margin-top: 0;
    font-size: 1.5rem;
}

.status-actions {
    margin-top: 1.5rem;
}

.offline-form .form-group {
    margin-bottom: 1rem;
}

.offline-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.offline-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.65rem 1.25rem;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover {
    opacity: 0.92;
}

.debug-details {
    margin-top: 1.5rem;
    text-align: left;
    font-size: 0.85rem;
    overflow-x: auto;
}