/* =====================================================
   ELDAR MARKETING: Warm Editorial Monochrome + Accent
   Основано на практиках Usedeft и контракте DESIGN.md.
   ===================================================== */

/* === FONTS === */
@font-face { font-family: 'GT Eesti'; src: url('/fonts/gteestiprodisplay_regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'GT Eesti'; src: url('/fonts/gteestiprodisplay_medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'GT Eesti'; src: url('/fonts/gteestiprodisplay_bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a, button, summary, label, input, select, textarea { touch-action: manipulation; }

/* === BODY === */
body {
    font-family: var(--font-sans);
    font-size: var(--t-base);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    font-variant-numeric: tabular-nums;
    transition: background-color var(--transition-med), color var(--transition-med);
    overflow-x: clip;
}

main {
    min-height: 60vh;
}

/* === CONTAINERS === */
.wide {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.reading {
    max-width: var(--reading);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.narrow {
    max-width: var(--narrow);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.full-bleed {
    width: 100%;
    padding-inline: var(--gutter);
}

/* Reading column for content pages */
.page-content,
main > article,
main > .markdown,
main > p,
main > h2:not(.section-title),
main > h3,
main > ul,
main > ol,
main > blockquote {
    max-width: var(--reading);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* === SECTION (унифицированный ритм) === */
.section {
    max-width: var(--container);
    margin-inline: auto;
    padding-block: var(--section-pad-block);
    padding-inline: var(--gutter);
}

.section--tight {
    padding-block: var(--s-5);
}

/* Тёплая полноширинная тональная секция (без резкого чёрно-белого перепада) */
.section-band {
    width: 100%;
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-band--lead {
    border-bottom: none;
}

/* Контрастная секция для service-страниц (в тёмной теме глубокий уголь, не белая полоса) */
.section--invert {
    background: var(--bg-invert);
    color: var(--on-invert);
    box-shadow: 0 0 0 100vmax var(--bg-invert);
    clip-path: inset(0 -100vmax);
}

html.dark .section--invert {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* === TYPOGRAPHY HIERARCHY === */
h1, h2, h3 {
    overflow-wrap: break-word;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
    text-wrap: balance;
}

h1 {
    font-size: clamp(var(--t-3xl), 5.2vw, var(--t-5xl));
    line-height: 1.02;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(var(--t-xl), 3.2vw, var(--t-3xl));
    line-height: 1.06;
    letter-spacing: -0.024em;
}

@media (max-width: 479.98px) {
    h2 {
        font-size: clamp(var(--t-lg), 8.2vw, var(--t-xl));
        line-height: 1.1;
    }
}

h3 {
    font-size: clamp(var(--t-md), 1.8vw, var(--t-lg));
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

:where(main) p {
    color: var(--ink-3);
    font-size: var(--t-base);
    line-height: 1.6;
    text-wrap: pretty;
}

.lead {
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-3);
    text-wrap: pretty;
}

.eyebrow,
.section-head__num {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    display: inline-block;
}

/* Anchor offset под sticky header */
.section[id],
.section-band[id],
section[id] {
    scroll-margin-top: var(--s-6);
}

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
    transition: background-color var(--transition-med), border-color var(--transition-med);
}

.site-header__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--s-2) max(var(--gutter), env(safe-area-inset-right, 0px)) var(--s-2) max(var(--gutter), env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-height: 64px;
}

.site-header__logo {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: var(--t-base);
    letter-spacing: -0.015em;
    line-height: 1;
    min-height: 44px;
    transition: opacity var(--transition-fast);
}

.site-header__logo svg {
    height: 26px;
    width: auto;
    fill: var(--ink);
    transition: fill var(--transition-med);
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: var(--s-0);
    margin-left: auto;
}

.site-header__nav a {
    position: relative;
    color: var(--muted);
    text-decoration: none;
    font-size: var(--t-sm);
    font-weight: 500;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.site-header__nav a.is-active {
    color: var(--ink);
    font-weight: 600;
}

.site-header__nav a.is-active::after {
    content: '';
    position: absolute;
    left: var(--s-2);
    right: var(--s-2);
    bottom: var(--s-0);
    height: 2px;
    background: var(--accent);
    border-radius: var(--r-pill);
}

@media (hover: hover) and (pointer: fine) {
    .site-header__nav a:hover {
        color: var(--ink);
        background: var(--bg-alt);
    }
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
    font-size: var(--t-sm);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-pill);
    margin-left: var(--s-1);
    white-space: nowrap;
    transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
    letter-spacing: -0.01em;
    min-height: 44px;
}

.site-header__cta:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .site-header__cta:hover {
        background: var(--accent);
        color: var(--on-accent);
        transform: translateY(-1px);
    }
}

.site-header__lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 var(--s-1);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: var(--ink-2);
    text-decoration: none;
    font-size: var(--t-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}
@media (hover: hover) and (pointer: fine) {
    .site-header__lang:hover {
        border-color: var(--ink);
        color: var(--ink);
        background: var(--bg-alt);
    }
}
.site-header__lang--mobile {
    min-width: 44px;
    min-height: 44px;
}

.site-header__mobile-actions {
    display: none;
    align-items: center;
    gap: var(--s-1);
    margin-left: auto;
}

.site-header__call-btn,
.site-header__menu-btn {
    display: inline-flex;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.site-header__call-btn:active,
.site-header__menu-btn:active { transform: scale(0.95); }
.site-header__menu-btn.is-open { border-color: var(--ink); background: var(--ink); color: var(--bg); }

@media (hover: hover) and (pointer: fine) {
    .site-header__call-btn:hover,
    .site-header__menu-btn:hover { border-color: var(--ink); }
}

.menu-icon {
    display: inline-flex;
    flex-direction: column;
    gap: var(--s-0);
    width: 18px;
    height: 14px;
    align-items: center;
    justify-content: center;
}

.menu-icon__bar {
    display: block;
    width: 18px;
    height: 1.6px;
    background: currentColor;
    border-radius: var(--r-xs);
    transition: transform 280ms var(--ease-out), opacity 160ms var(--ease-out);
    transform-origin: center;
}

.site-header__menu-btn.is-open .menu-icon__bar:first-child {
    transform: translateY(3px) rotate(45deg);
}

.site-header__menu-btn.is-open .menu-icon__bar:last-child {
    transform: translateY(-3px) rotate(-45deg);
}

/* bp-exception: ширина навигации шапки (5 пунктов + телефон помещаются от 861px) */
@media (max-width: 860px) {
    .site-header__nav,
    .site-header__cta,
    .site-header__inner > .site-header__lang { display: none; }
    .site-header__mobile-actions { display: inline-flex; }
    .site-header__inner { gap: var(--s-2); padding: var(--s-2) max(var(--gutter), env(safe-area-inset-right, 0px)) var(--s-2) max(var(--gutter), env(safe-area-inset-left, 0px)); }
    .site-header__logo svg { height: 24px; }
}

@media (max-width: 479.98px) {
    .site-header__logo span { display: none; }
    .site-header__logo { min-width: 44px; justify-content: center; padding: var(--s-1); margin-left: calc(var(--s-1) * -1); }
}

/* === MOBILE MENU OVERLAY === */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}

.mobile-menu.is-open { pointer-events: auto; visibility: visible; }

.mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 14, 0.56);
    opacity: 0;
    transition: opacity 280ms var(--ease-out);
}

.mobile-menu.is-open .mobile-menu__backdrop {
    opacity: 1;
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 100vw);
    background: var(--bg-invert);
    color: var(--on-invert);
    border-left: 1px solid rgba(246, 244, 239, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 320ms var(--ease-out);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }

.mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    padding: max(var(--s-3), env(safe-area-inset-top, 0px)) max(var(--s-3), env(safe-area-inset-right, 0px)) var(--s-3) var(--s-3);
    border-bottom: 1px solid rgba(246, 244, 239, 0.1);
    flex-shrink: 0;
}

.mobile-menu__head-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
}

.mobile-menu__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    text-decoration: none;
    color: var(--on-invert);
    font-weight: 600;
    font-size: var(--t-sm);
    letter-spacing: -0.01em;
    min-height: 44px;
}

.mobile-menu__brand svg { fill: var(--on-invert); }

.mobile-menu__theme,
.mobile-menu__close {
    background: transparent;
    border: 1px solid rgba(246, 244, 239, 0.2);
    color: var(--on-invert);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu__theme .tt-sun { display: block; }
.mobile-menu__theme .tt-moon { display: none; }
html.dark .mobile-menu__theme .tt-sun { display: none; }
html.dark .mobile-menu__theme .tt-moon { display: block; }

.mobile-menu__theme:active,
.mobile-menu__close:active { transform: scale(0.95); }

@media (hover: hover) and (pointer: fine) {
    .mobile-menu__theme:hover,
    .mobile-menu__close:hover { background: rgba(246, 244, 239, 0.1); }
}

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    padding: var(--s-2) 0;
    flex: 1;
}

.mobile-menu__link {
    position: relative;
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3);
    text-decoration: none;
    color: var(--on-invert);
    border-bottom: 1px solid rgba(246, 244, 239, 0.08);
    min-height: 44px;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), background-color var(--transition-fast);
}

.mobile-menu.is-open .mobile-menu__link {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(80ms + (var(--i, 0) * 40ms));
}

.mobile-menu__link-num {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--on-invert-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.mobile-menu__link-text {
    font-size: var(--t-lg);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.mobile-menu__link:active {
    background: rgba(246, 244, 239, 0.08);
}

.mobile-menu__link.is-active {
    background: rgba(246, 244, 239, 0.06);
}

.mobile-menu__link.is-active .mobile-menu__link-num,
.mobile-menu__link.is-active .mobile-menu__link-text {
    color: var(--accent-on-invert);
}

@media (hover: hover) and (pointer: fine) {
    .mobile-menu__link:hover {
        background: rgba(246, 244, 239, 0.05);
    }
    .mobile-menu__link:hover .mobile-menu__link-text {
        transform: translateX(6px);
        color: var(--accent-on-invert);
    }
}

.mobile-menu__foot {
    padding: var(--s-3) var(--s-3) max(var(--s-4), env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(246, 244, 239, 0.1);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}

.mobile-menu.is-open .mobile-menu__foot {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 220ms;
}

.mobile-menu__foot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
}

.mobile-menu__foot-label {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    color: var(--on-invert-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.mobile-menu__phone {
    color: var(--on-invert);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--t-base);
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    letter-spacing: -0.01em;
}

.mobile-menu__foot-row--socials {
    gap: var(--s-1);
    flex-wrap: wrap;
}

.mobile-menu__social {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    padding: var(--s-1) var(--s-2);
    min-height: 44px;
    background: rgba(246, 244, 239, 0.08);
    color: var(--on-invert);
    border-radius: var(--r-pill);
    text-decoration: none;
    font-size: var(--t-xs);
    font-weight: 500;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.mobile-menu__social:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .mobile-menu__social:hover { background: rgba(246, 244, 239, 0.16); transform: translateY(-1px); }
}

.mobile-menu__caption {
    font-size: var(--t-xs);
    color: var(--on-invert-muted);
    margin: 0;
}

html.menu-open, html.menu-open body { overflow: hidden; }

@media (max-width: 479.98px) {
    .mobile-menu__head { padding: max(var(--s-2), env(safe-area-inset-top, 0px)) var(--s-3) var(--s-2); }
    .mobile-menu__link { padding: var(--s-2) var(--s-3); grid-template-columns: 28px 1fr; gap: var(--s-2); }
    .mobile-menu__foot { padding: var(--s-2) var(--s-3) max(var(--s-3), env(safe-area-inset-bottom, 0px)); }
}

/* bp-exception: короткие и альбомные экраны смартфонов для мобильного меню */
@media (max-height: 640px) {
    .mobile-menu__head { padding: var(--s-1) var(--s-3); }
    .mobile-menu__nav { padding: var(--s-1) 0; }
    .mobile-menu__link { padding: var(--s-1) var(--s-3); }
    .mobile-menu__link-text { font-size: var(--t-md); }
    .mobile-menu__foot { padding: var(--s-2) var(--s-3) max(var(--s-2), env(safe-area-inset-bottom, 0px)); gap: var(--s-1); }
}

/* === HERO === */
.hero {
    max-width: var(--container);
    margin-inline: auto;
    padding: clamp(var(--s-4), 4.5vw, var(--s-5)) var(--gutter) clamp(var(--s-4), 5vw, var(--s-5));
}

.hero > .hero__title { margin-top: 0; }
.hero > .hero__lead { margin-top: var(--s-2); }
.hero > .hero__cta-row { margin-top: var(--s-3); }
.hero + .section { padding-block-start: 0; }

/* Editorial Hero (главная: широкий H1 в 2-3 строки + асимметричный 2-й ярус) */
@keyframes hero-lift {
    from { transform: translateY(12px); }
    to { transform: translateY(0); }
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero--editorial {
    padding-block: clamp(var(--s-4), 4.5vw, var(--s-5)) clamp(var(--s-5), 6vw, var(--s-6));
}

.hero--editorial .hero__title {
    margin: 0;
    max-width: 24ch;
    font-size: clamp(var(--t-3xl), 5.2vw, var(--t-5xl));
    line-height: 1.02;
    letter-spacing: -0.032em;
    animation: hero-lift 360ms var(--ease-out) both;
}

@media (max-width: 479.98px) {
    .hero--editorial {
        padding-block: var(--s-3) var(--s-4);
    }
    .hero--editorial .hero__title {
        font-size: clamp(var(--t-xl), 9.6vw, var(--t-2xl));
        line-height: 1.04;
    }
}

.hero__title em {
    font-style: normal;
    font-weight: inherit;
    color: var(--accent);
}

.hero__body {
    margin-top: clamp(var(--s-3), 4vw, var(--s-4));
    padding-top: clamp(var(--s-3), 3.5vw, var(--s-4));
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    align-items: start;
}

@media (min-width: 768px) {
    .hero__body {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: var(--s-4);
    }
}

@media (min-width: 1000px) {
    .hero__body {
        grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
        gap: var(--s-5);
    }
}

.hero__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    animation: hero-rise 380ms var(--ease-out) 60ms both;
}

.hero__lead {
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-2);
    max-width: 48ch;
    text-wrap: pretty;
}

@media (max-width: 479.98px) {
    .hero__lead {
        font-size: var(--t-base);
        line-height: 1.55;
    }
}

.hero__lead strong {
    color: var(--ink);
    font-weight: 600;
}

.hero__cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
}

@media (max-width: 479.98px) {
    .hero__cta-row .btn { width: 100%; }
}

.hero__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .hero__link:hover {
        color: var(--accent);
        text-decoration-color: var(--accent);
    }
}

/* Статичная компактная строка фактов без багающих счётчиков */
.hero__facts {
    list-style: none;
    margin: var(--s-2) 0 0;
    padding: var(--s-3) 0 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-2) var(--s-3);
    font-size: var(--t-sm);
    color: var(--muted);
}

.hero__facts li {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    line-height: 1.35;
}

.hero__facts strong {
    color: var(--ink);
    font-weight: 600;
    font-size: var(--t-md);
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
}

.hero__visual {
    min-width: 0;
    margin: 0;
    animation: hero-lift 420ms var(--ease-out) 40ms both;
}

.hero__photo-frame {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 5 / 4;
    background: var(--bg-invert);
    box-shadow: var(--shadow-md);
}

.hero__photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.hero__caption {
    margin-top: var(--s-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-3);
    font-size: var(--t-sm);
    color: var(--muted);
    line-height: 1.3;
}

.hero__caption > span {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.hero__caption b {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
}

.hero__caption .hero__link {
    gap: var(--s-1);
}

.hero__caption .hero__link svg {
    flex: none;
    transition: transform var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .hero__caption .hero__link:hover svg {
        transform: translate(2px, -2px);
    }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-pill);
    text-decoration: none;
    font-size: var(--t-sm);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
    white-space: nowrap;
    border: 1px solid transparent;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

@media (max-width: 479.98px) {
    .btn {
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        max-width: 100%;
    }
}

.btn--primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: var(--shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
    .btn--primary:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
    }
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-2);
}

@media (hover: hover) and (pointer: fine) {
    .btn--ghost:hover {
        background: var(--ink);
        color: var(--bg);
        border-color: var(--ink);
    }
}

.btn--invert.btn--primary {
    background: var(--accent);
    color: var(--on-accent);
}

@media (hover: hover) and (pointer: fine) {
    .btn--invert.btn--primary:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
    }
}

.btn--invert.btn--ghost {
    color: var(--on-invert);
    border-color: rgba(246, 244, 239, 0.3);
}

@media (hover: hover) and (pointer: fine) {
    .btn--invert.btn--ghost:hover {
        background: var(--on-invert);
        color: var(--bg-invert);
        border-color: var(--on-invert);
    }
}

.btn--small {
    padding: var(--s-1) var(--s-2);
    font-size: var(--t-sm);
    min-height: 44px;
}

.btn__arrow {
    transition: transform var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover .btn__arrow { transform: translateX(3px); }
}

/* === STATS BAND === */
.stats {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats__item {
    padding: var(--s-4) var(--s-3);
    border-right: 1px solid var(--line);
    min-width: 0;
}

.stats__item:first-child { padding-left: 0; }
.stats__item:last-child { border-right: none; padding-right: 0; }

.stats__num {
    font-size: clamp(var(--t-xl), 3.6vw, var(--t-3xl));
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: var(--s-1);
    font-variant-numeric: tabular-nums;
    display: block;
}

.stats__num[data-long] {
    white-space: nowrap;
    font-size: clamp(var(--t-md), 2.5vw, var(--t-xl));
}

.stats__label {
    font-size: var(--t-sm);
    color: var(--muted);
    line-height: 1.45;
    display: block;
}

@media (max-width: 767.98px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats__item { border-right: none; padding: var(--s-3) var(--s-2); }
    .stats__item:first-child { padding-left: var(--s-2); }
    .stats__item:nth-child(odd) { border-right: 1px solid var(--line); }
    .stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 479.98px) {
    .stats__num[data-long] {
        white-space: normal;
        font-size: clamp(var(--t-base), 5.5vw, var(--t-lg));
    }
}

/* === SECTION HEAD === */
.section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-2);
    align-items: end;
    margin-bottom: var(--s-4);
}

@media (min-width: 768px) {
    .section-head {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: var(--s-4);
    }
    .section-head > .btn,
    .section-head > .section-head__action { justify-self: end; }
}

.section-head > div { display: flex; flex-direction: column; gap: var(--s-1); }
.section-head__title { margin: 0; }

.section-head__lead {
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-3);
    text-wrap: pretty;
    margin: 0;
}

.section-head__side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
}

@media (min-width: 768px) {
    .section-head__side {
        align-items: flex-end;
        text-align: right;
    }
}

.section--invert .section-head__num { color: var(--on-invert-muted); }
.section--invert .section-head__title { color: var(--on-invert); }
.section--invert .section-head__lead { color: var(--on-invert-muted); }

/* === SERVICES GRID (2x2 редакционная сетка) === */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .services-grid[data-grid~="d4"] { grid-template-columns: repeat(4, 1fr); }
    .services-grid[data-grid~="d3"] { grid-template-columns: repeat(3, 1fr); }
    .services-grid[data-grid~="d2"] { grid-template-columns: repeat(2, 1fr); }
}

.service-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-4);
    text-decoration: none;
    color: var(--ink);
    background: var(--bg-elevated);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin: -1px 0 0 -1px;
    transition: background-color var(--transition-fast);
    min-height: 220px;
}

.service-cell:active { background: var(--bg-alt); }

@media (hover: hover) and (pointer: fine) {
    .service-cell:hover { background: var(--bg-alt); }
    .service-cell:hover .service-cell__action { color: var(--accent-hover); }
}

@media (max-width: 767.98px) {
    .service-cell {
        padding: var(--s-3);
        min-height: 0;
    }
}

.service-cell__num {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.service-cell__title {
    font-size: var(--t-lg);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.2;
    color: var(--ink);
    margin: 0;
}

.service-cell__desc {
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
    max-width: 48ch;
    flex: 1;
    margin: 0;
}

.service-cell__action {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--accent);
    margin-top: var(--s-1);
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    border-bottom: 1px solid currentColor;
    padding-bottom: var(--s-0);
    transition: color var(--transition-fast);
}

.service-cell__arrow {
    font-size: var(--t-md);
    color: var(--accent);
    transition: transform var(--transition-fast);
    align-self: flex-start;
}

@media (hover: hover) and (pointer: fine) {
    .service-cell:hover .service-cell__arrow { transform: translateX(4px); }
}

/* === SERVICES CATALOG PAGE (/services/) === */
.services-auto-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .services-auto-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .services-auto-grid { grid-template-columns: repeat(4, 1fr); }
}

.services-auto-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--ink);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .services-auto-card:hover {
        border-color: var(--line-2);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.services-auto-card__title {
    font-size: var(--t-md);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
}

.services-auto-card__desc {
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink-3);
    flex: 1;
}

.services-sectors {
    margin-top: var(--s-4);
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-3);
}

.services-sectors__label {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
}

.services-sectors__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: var(--t-base);
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .services-sectors__link:hover {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }
}

/* === PROCESS === */
.process {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .process { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
}

@media (min-width: 1000px) {
    .process { grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
    .process[data-grid~="d3"] { grid-template-columns: repeat(3, 1fr); }
}

.process__step {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
}

.section--invert .process__step { border-top-color: rgba(246, 244, 239, 0.16); }

.process__num {
    font-family: var(--font-sans);
    font-size: var(--t-xl);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}

.process__title {
    font-size: var(--t-md);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: inherit;
    margin: 0;
}

.process__desc {
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
    flex: 1;
    margin: 0;
}

.section--invert .process__desc { color: var(--on-invert-muted); }

.process__time {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-top: auto;
    padding-top: var(--s-2);
}

.section--invert .process__time { color: var(--on-invert-muted); }

/* === WHY (редакционный hairline-список) === */
.why {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
}

@media (min-width: 1000px) {
    .why {
        grid-template-columns: 5fr 7fr;
        gap: var(--s-5);
        align-items: start;
    }
}

.why__intro {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

@media (min-width: 1000px) {
    .why__intro {
        position: sticky;
        top: var(--header-h);
    }
}

.why__lead {
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-3);
    margin-top: var(--s-1);
    text-wrap: pretty;
}

.why__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.why__item {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-1);
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
    .why__item {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
        gap: var(--s-3);
        align-items: baseline;
    }
}

.why__title {
    font-size: var(--t-md);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
    margin: 0;
}

.why__desc {
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
    margin: 0;
}

/* === CASE FILTER BAR (/cases/) === */
.case-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1);
    margin-bottom: var(--s-4);
}

.case-filter__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    min-height: 44px;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink-2);
    font-family: inherit;
    font-size: var(--t-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.case-filter__btn:active { transform: scale(0.97); }

.case-filter__btn[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

.case-filter__count {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
}

@media (hover: hover) and (pointer: fine) {
    .case-filter__btn:not([aria-pressed="true"]):hover {
        border-color: var(--line-2);
        color: var(--ink);
    }
}

/* === CASES GRID === */
.cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .cases-grid { grid-template-columns: repeat(3, 1fr); }
    .cases-grid[data-grid~="d2"],
    .cases-grid.cases-grid--archive { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
}

.case-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
    text-decoration: none;
    color: var(--ink);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 240px;
}

.case-card[hidden] { display: none; }

.case-card:active {
    background: var(--bg-alt);
    transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
    .case-card:hover {
        border-color: var(--line-2);
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }
}

.case-card--img { padding: 0; overflow: hidden; }
.case-card--img .case-card__pic { display: block; position: relative; overflow: hidden; background: var(--bg-alt); }
.case-card--img .case-card__pic img,
.case-card--img .case-card__pic .case-card__video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform var(--transition-med);
}

@media (hover: hover) and (pointer: fine) {
    .case-card--img:hover .case-card__pic img,
    .case-card--img:hover .case-card__pic .case-card__video { transform: scale(1.03); }
}

.case-card--motion {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}

@media (hover: hover) and (pointer: fine) {
    .case-card--motion:hover {
        border-color: var(--accent);
    }
}

.case-card__motion-badge {
    position: absolute;
    top: var(--s-2);
    right: var(--s-2);
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    padding: var(--s-0) var(--s-2);
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: var(--t-xs);
    font-weight: 600;
    line-height: 1.4;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.case-card__motion-ico {
    color: var(--accent);
    flex: none;
}

.case-hero-video {
    margin: var(--s-3) 0 var(--s-4);
}

.case-hero-video video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg-alt);
    box-shadow: var(--shadow-sm);
}

.case-hero-video__cap {
    margin-top: var(--s-1);
    font-size: var(--t-sm);
    color: var(--muted);
}

.case-card--img .case-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
    flex: 1;
}

/* Горизонтальная feature-раскладка для растянутой на всю ширину (1 / -1) последней карточки (исключает 800px монстра) */
@media (min-width: 768px) {
    .cases-grid--archive .case-card--img.is-span-full {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: stretch;
    }
    .cases-grid--archive .case-card--img.is-span-full .case-card__pic,
    .cases-grid--archive .case-card--img.is-span-full .case-card__pic picture {
        display: block;
        height: 100%;
    }
    .cases-grid--archive .case-card--img.is-span-full .case-card__pic img,
    .cases-grid--archive .case-card--img.is-span-full .case-card__pic .case-card__video {
        height: 100%;
        aspect-ratio: 16 / 10;
    }
    .cases-grid--archive .case-card--img.is-span-full .case-card__body {
        padding: var(--s-4);
    }
}

@media (min-width: 768px) and (max-width: 999.98px) {
    [data-grid~="t2"] > .case-card--img:last-child:nth-child(2n+1),
    [data-grid~="t3"] > .case-card--img:last-child:nth-child(3n+1),
    [data-grid~="t4"] > .case-card--img:last-child:nth-child(4n+1) {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: stretch;
    }
    [data-grid~="t2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic,
    [data-grid~="t2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic picture,
    [data-grid~="t3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic,
    [data-grid~="t3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic picture,
    [data-grid~="t4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic,
    [data-grid~="t4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic picture {
        display: block;
        height: 100%;
    }
    [data-grid~="t2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic img,
    [data-grid~="t2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic .case-card__video,
    [data-grid~="t3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic img,
    [data-grid~="t3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic .case-card__video,
    [data-grid~="t4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic img,
    [data-grid~="t4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic .case-card__video {
        height: 100%;
        aspect-ratio: 16 / 10;
    }
    [data-grid~="t2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__body,
    [data-grid~="t3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__body,
    [data-grid~="t4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__body {
        padding: var(--s-4);
    }
}

@media (min-width: 1000px) {
    [data-grid~="d2"] > .case-card--img:last-child:nth-child(2n+1),
    [data-grid~="d3"] > .case-card--img:last-child:nth-child(3n+1),
    [data-grid~="d4"] > .case-card--img:last-child:nth-child(4n+1) {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: stretch;
    }
    [data-grid~="d2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic,
    [data-grid~="d2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic picture,
    [data-grid~="d3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic,
    [data-grid~="d3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic picture,
    [data-grid~="d4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic,
    [data-grid~="d4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic picture {
        display: block;
        height: 100%;
    }
    [data-grid~="d2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic img,
    [data-grid~="d2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__pic .case-card__video,
    [data-grid~="d3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic img,
    [data-grid~="d3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__pic .case-card__video,
    [data-grid~="d4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic img,
    [data-grid~="d4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__pic .case-card__video {
        height: 100%;
        aspect-ratio: 16 / 10;
    }
    [data-grid~="d2"] > .case-card--img:last-child:nth-child(2n+1) .case-card__body,
    [data-grid~="d3"] > .case-card--img:last-child:nth-child(3n+1) .case-card__body,
    [data-grid~="d4"] > .case-card--img:last-child:nth-child(4n+1) .case-card__body {
        padding: var(--s-4);
    }
}

.cases-grid .case-card.is-span-full {
    grid-column: 1 / -1;
}

.case-card__meta {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.case-card__title {
    font-size: var(--t-md);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
}

.case-card__desc {
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink-3);
    flex: 1;
}

.case-card__metric {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    padding-top: var(--s-2);
    border-top: 1px solid var(--line);
}

.case-card__metric-value {
    font-size: var(--t-lg);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.case-card__metric-label {
    font-size: var(--t-xs);
    color: var(--muted);
    line-height: 1.35;
}

.case-card__cta {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--accent);
    margin-top: auto;
    padding-top: var(--s-1);
}

/* === POST LIST (редакционный hairline-список) === */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: var(--reading);
    margin-inline: auto;
    border-top: 1px solid var(--line);
}

.post-list--wide {
    max-width: none;
}

.post-list li {
    display: grid;
    grid-template-columns: 104px 1fr auto;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-2);
    border-bottom: 1px solid var(--line);
    min-height: 56px;
    transition: background-color var(--transition-fast);
}

.post-list li:active { background: var(--bg-alt); }

@media (hover: hover) and (pointer: fine) {
    .post-list li:hover { background: var(--bg-alt); }
}

@media (max-width: 767.98px) {
    .post-list li {
        grid-template-columns: 1fr;
        gap: var(--s-0);
        padding: var(--s-2) 0;
    }
    .post-list .reading-time { justify-self: start; }
}

.post-list .date {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.post-list a {
    font-size: var(--t-md);
    font-weight: 500;
    letter-spacing: -0.012em;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.3;
    display: flex;
    align-items: center;
    min-height: 44px;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .post-list a:hover { color: var(--accent); }
}

.post-list .reading-time {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* === LEAD BAND (единая финальная секция на главной: оффер + контакты + форма) === */
.lead-band {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    align-items: start;
}

@media (min-width: 1000px) {
    .lead-band {
        grid-template-columns: 5fr 7fr;
        gap: var(--s-5);
    }
}

.lead-band__info {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.lead-band__title {
    margin: 0;
}

.lead-band__lead {
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-3);
    max-width: 44ch;
    margin: 0;
}

.lead-band__contacts {
    list-style: none;
    margin: var(--s-2) 0 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.lead-band__contacts li {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    padding: var(--s-2) 0;
    border-bottom: 1px solid var(--line);
}

.lead-band__meta-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.lead-band__contacts a,
.lead-band__contacts .lead-band__meta-val {
    font-size: var(--t-md);
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.lead-band__contacts a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    align-self: flex-start;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .lead-band__contacts a:hover { color: var(--accent); }
}

.lead-band__form .lf-embed {
    margin: 0;
}

/* === BIG LINK BLOCK === */
.big-link {
    display: block;
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-5) var(--gutter);
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    transition: background-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .big-link:hover { background: var(--bg-alt); }
    .big-link:hover .big-link__title { color: var(--accent); }
    .big-link:hover .big-link__title svg { transform: translateX(6px); }
}

.big-link__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    margin-bottom: var(--s-2);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.big-link__title {
    font-size: clamp(var(--t-lg), 3vw, var(--t-2xl));
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.08;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    transition: color var(--transition-fast);
}

.big-link__title svg { transition: transform var(--transition-med); }

/* === CTA BAND (для специализированных страниц услуг) === */
.cta-band {
    background: var(--bg-invert);
    color: var(--on-invert);
    padding-block: var(--section-pad-block);
}

html.dark .cta-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cta-band__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
}

@media (min-width: 1000px) {
    .cta-band__inner {
        grid-template-columns: 7fr 5fr;
        gap: var(--s-5);
        align-items: end;
    }
}

.cta-band__copy { display: flex; flex-direction: column; gap: var(--s-2); }

.cta-band__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--on-invert-muted);
}

.cta-band__title {
    font-size: clamp(var(--t-xl), 3.2vw, var(--t-3xl));
    font-weight: 700;
    letter-spacing: -0.024em;
    line-height: 1.06;
    color: var(--on-invert);
    margin: 0;
    text-wrap: balance;
}

.cta-band__lead {
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--on-invert-muted);
    max-width: 56ch;
}

.cta-band__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-2);
}

.cta-band__meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    border-top: 1px solid rgba(246, 244, 239, 0.14);
    padding-top: var(--s-3);
}

@media (min-width: 1000px) {
    .cta-band__meta {
        border-top: none;
        padding-top: 0;
        border-left: 1px solid rgba(246, 244, 239, 0.14);
        padding-left: var(--s-4);
    }
}

.cta-band__meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.cta-band__meta-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--on-invert-muted);
}

.cta-band__meta-item a,
.cta-band__meta-item span {
    font-size: var(--t-md);
    color: var(--on-invert);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.cta-band__meta-item a { display: inline-flex; align-items: center; min-height: 44px; }

@media (hover: hover) and (pointer: fine) {
    .cta-band__meta-item a:hover { text-decoration: underline; text-underline-offset: 4px; }
}

/* === ARTICLE CONTENT (single page) === */
article.page-article {
    max-width: var(--reading);
    margin: var(--s-5) auto;
    padding: 0 var(--gutter);
}

article.page-article h1 {
    font-size: clamp(var(--t-xl), 4vw, var(--t-3xl));
    letter-spacing: -0.025em;
    font-weight: 700;
    margin-bottom: var(--s-3);
}

@media (max-width: 479.98px) {
    article.page-article h1 {
        font-size: clamp(var(--t-lg), 7.5vw, var(--t-xl));
        line-height: 1.1;
    }
}

.article-meta,
article.page-article .meta,
article.case-study .meta {
    display: block;
    font-size: var(--t-sm);
    color: var(--muted);
    margin-bottom: var(--s-4);
    padding-bottom: var(--s-3);
    border-bottom: 1px solid var(--line);
}

/* === TYPOGRAPHY (in articles & content) === */
article h2, article h3, article h4,
.markdown h2, .markdown h3, .markdown h4 {
    font-weight: 600;
    line-height: 1.2;
    margin: var(--s-5) 0 var(--s-2);
}

article h2, .markdown h2 { font-size: var(--t-lg); }
article h3, .markdown h3 { font-size: var(--t-md); margin: var(--s-4) 0 var(--s-2); }
article h4, .markdown h4 { font-size: var(--t-base); margin: var(--s-4) 0 var(--s-1); }

article p, .markdown p { margin-bottom: var(--s-3); line-height: 1.7; color: var(--ink-2); }

article a, .markdown a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    article a:hover, .markdown a:hover {
        color: var(--accent);
        text-decoration-color: var(--accent);
    }
}

article :is(h2, h3) > a, .markdown :is(h2, h3) > a { display: inline-flex; align-items: center; min-height: 44px; }

article strong, .markdown strong { font-weight: 600; color: var(--ink); }
article em, .markdown em { font-style: italic; }
article ul, article ol, .markdown ul, .markdown ol { margin: var(--s-3) 0; padding-left: var(--s-3); }
article li, .markdown li { margin: var(--s-1) 0; line-height: 1.7; color: var(--ink-2); }

/* U24: без толстой декоративной левой полосы — спокойная поверхность + hairline */
article blockquote, .markdown blockquote {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    margin: var(--s-4) 0;
    color: var(--ink-2);
    font-size: var(--t-base);
    line-height: 1.65;
}

article blockquote p:last-child, .markdown blockquote p:last-child { margin-bottom: 0; }

article hr, .markdown hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: var(--s-5) auto;
    max-width: 96px;
}

article img, .markdown img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--s-4) 0;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
}

article video, .markdown video {
    max-width: 100%;
    width: 100%;
    border-radius: var(--r-md);
    margin: var(--s-4) 0;
    border: 1px solid var(--line);
}

article code, .markdown code {
    font-family: var(--font-mono);
    background: var(--bg-alt);
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    font-size: 0.92em; /* raw: относительный к окружающему тексту */
    color: var(--ink);
    border: 1px solid var(--line);
    overflow-wrap: anywhere;
}

article pre, .markdown pre {
    background: var(--bg-invert);
    color: var(--on-invert);
    padding: var(--s-3);
    margin: var(--s-4) 0;
    border-radius: var(--r-sm);
    border: 1px solid rgba(246, 244, 239, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: var(--t-sm);
    line-height: 1.6;
    font-family: var(--font-mono);
}

article pre code, .markdown pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* Таблицы из markdown */
.table-wrap {
    margin: var(--s-4) 0;
}

.table-scroll {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--s-4) 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    transition: box-shadow var(--transition-fast);
}

.table-wrap > .table-scroll {
    margin: 0;
}

.table-scroll.is-scrollable:not(.is-scrolled-end) {
    box-shadow: inset -24px 0 24px -20px rgba(22, 21, 19, 0.24);
}

html.dark .table-scroll.is-scrollable:not(.is-scrolled-end) {
    box-shadow: inset -24px 0 24px -20px rgba(0, 0, 0, 0.65);
}

.table-scroll__hint {
    display: none;
    margin-top: var(--s-1);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    text-align: right;
}

.table-scroll.is-scrollable:not(.is-scrolled-end) + .table-scroll__hint {
    display: block;
}

.table-scroll > table,
article .table-scroll > table,
.markdown .table-scroll > table { margin: 0; }
.table-scroll table { min-width: 40rem; }

article table, .markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-4) 0;
    font-size: var(--t-base);
}

article thead, .markdown thead {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}

article th, .markdown th {
    font-weight: 600;
    text-align: left;
    padding: var(--s-2) var(--s-3);
    color: var(--ink);
}

article td, .markdown td {
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    color: var(--ink-2);
}

article tbody tr:last-child td, .markdown tbody tr:last-child td { border-bottom: none; }

@media (hover: hover) and (pointer: fine) {
    article tbody tr:hover, .markdown tbody tr:hover { background: var(--bg-alt); }
}

@media (max-width: 767.98px) {
    article th, .markdown th,
    article td, .markdown td {
        padding: var(--s-1) var(--s-2);
    }

    /* /ceny/: превращаем прайс-таблицы в читаемые вертикальные карточки */
    body.is-pricing-page .table-scroll {
        overflow-x: visible;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    body.is-pricing-page .table-scroll table {
        min-width: 0;
        display: block;
    }

    body.is-pricing-page .table-scroll thead {
        display: none;
    }

    body.is-pricing-page .table-scroll tbody {
        display: flex;
        flex-direction: column;
        gap: var(--s-2);
    }

    body.is-pricing-page .table-scroll tr {
        display: flex;
        flex-direction: column;
        gap: var(--s-1);
        padding: var(--s-3);
        background: var(--bg-elevated);
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        box-shadow: var(--shadow-sm);
    }

    body.is-pricing-page .table-scroll td {
        display: flex;
        flex-direction: column;
        gap: var(--s-0);
        padding: var(--s-1) 0 0;
        border-bottom: none;
        border-top: 1px solid var(--line);
    }

    body.is-pricing-page .table-scroll td:first-child {
        padding-top: 0;
        border-top: none;
        font-size: var(--t-md);
        font-weight: 600;
        color: var(--ink);
        line-height: 1.25;
    }

    body.is-pricing-page .table-scroll td:not(:first-child)::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: var(--t-xs);
        font-weight: 500;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--muted);
    }

    body.is-pricing-page .table-scroll__hint {
        display: none !important;
    }
}

/* Markdown stats-row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: var(--s-3) 0 var(--s-4);
    padding: 0;
    border: none;
    list-style: none;
}

.stats-row > * {
    display: block;
    padding: var(--s-2) 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: var(--t-xs);
    font-weight: 500;
    color: var(--muted);
    text-align: left;
    border-left: none !important;
    border-right: none !important;
}

@media (max-width: 767.98px) { .stats-row { grid-template-columns: repeat(2, 1fr); gap: var(--s-2); } }

/* === BREADCRUMB === */
.breadcrumb {
    max-width: var(--reading);
    margin: var(--s-4) auto var(--s-2);
    padding: 0 var(--gutter);
    font-size: var(--t-sm);
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb > span:not(.sep) {
    padding-block: var(--s-0);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
}

@media (hover: hover) and (pointer: fine) {
    .breadcrumb a:hover { color: var(--accent); }
}

.breadcrumb .sep { margin: 0 var(--s-1); color: var(--muted-2); }

/* === ARTICLE NAV === */
.article-nav {
    max-width: var(--reading);
    margin: var(--s-5) auto var(--s-5);
    padding: var(--s-4) var(--gutter) 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: var(--s-2);
    font-size: var(--t-base);
}

.article-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    max-width: 48%;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
    .article-nav a:hover { color: var(--accent); }
}

/* === CASE STUDY IMAGES === */
.case-study img {
    border-radius: var(--r-md);
    box-shadow: none;
    border: 1px solid var(--line);
    margin: var(--s-4) 0;
}

.case-study img[alt*="Главная"],
.case-study img[alt*="hero"],
.case-study img[alt*="Результат"] {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    border-radius: var(--r-md);
}

.case-study img[alt*="Мобильная"],
.case-study img[alt*="mobile"] {
    max-width: min(320px, 100%);
    margin: var(--s-4) auto;
    border-radius: var(--r-lg);
    border: 6px solid var(--ink);
}

.blog-logo-watermark { display: none !important; }

/* === FORM (#contact-form) === */
#contact-form {
    margin: 0;
    padding: clamp(var(--s-3), 4vw, var(--s-4));
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

#contact-form p { margin-bottom: var(--s-3); }
#contact-form p:last-child { margin-bottom: 0; }

#contact-form label {
    display: block;
    font-weight: 500;
    font-size: var(--t-sm);
    color: var(--ink-2);
    margin-bottom: var(--s-1);
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    font-family: inherit;
    font-size: var(--t-base);
    width: 100%;
    padding: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--ink);
    box-sizing: border-box;
    -webkit-appearance: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

#contact-form textarea { resize: vertical; min-height: 120px; }

#contact-form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

#contact-form button {
    font-family: inherit;
    font-size: var(--t-sm);
    font-weight: 600;
    width: 100%;
    min-height: 44px;
    padding: var(--s-2) var(--s-3);
    margin-top: var(--s-1);
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
}

#contact-form button:disabled { opacity: 0.6; transform: none; cursor: default; }
#contact-form button:active:not(:disabled) { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    #contact-form button:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
}

/* === FOOTER === */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg);
    margin-top: 0;
}

.site-footer__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--s-5) var(--gutter) var(--s-4);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
}

@media (min-width: 768px) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-4);
    }
}

@media (min-width: 1000px) {
    .site-footer__inner {
        grid-template-columns: 2fr repeat(4, 1fr);
        gap: var(--s-4);
    }
}

.site-footer__brand p {
    font-size: var(--t-sm);
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
    max-width: 40ch;
}

.site-footer__brand h2,
.site-footer__brand .site-footer__heading {
    font-size: var(--t-md);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--ink);
    margin: 0 0 var(--s-2);
    max-width: none;
    text-wrap: balance;
}

.site-footer__col h3,
.site-footer__col .site-footer__col-title {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 var(--s-2);
}

.site-footer__acc-head {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.site-footer__acc-head::-webkit-details-marker { display: none; }

.site-footer__acc-icon {
    font-size: var(--t-md);
    line-height: 1;
    transition: transform var(--transition-fast);
}

.site-footer__col--acc[open] .site-footer__acc-icon {
    transform: rotate(45deg);
}

@media (max-width: 767.98px) {
    .site-footer__col--acc {
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        padding-block: var(--s-0);
    }
    .site-footer__col--acc + .site-footer__col--acc {
        border-top: none;
        margin-top: calc(var(--s-4) * -1);
    }
    .site-footer__col--acc[open] ul {
        padding-bottom: var(--s-2);
    }
}

@media (min-width: 768px) {
    .site-footer__acc-head {
        margin-top: calc(var(--s-1) * -1);
        margin-bottom: var(--s-0);
        pointer-events: none;
        cursor: default;
    }
    .site-footer__acc-icon { display: none; }
}

.site-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer__col a {
    font-size: var(--t-sm);
    color: var(--ink-3);
    text-decoration: none;
    transition: color var(--transition-fast);
    line-height: 1.45;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
}

@media (hover: hover) and (pointer: fine) {
    .site-footer__col a:hover { color: var(--accent); }
}

.site-footer__bottom {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--s-3) var(--gutter);
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    justify-content: space-between;
    font-size: var(--t-xs);
    color: var(--muted);
}

@media (max-width: 767.98px) {
    .site-footer__bottom {
        padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom, 0px));
    }
}

.site-footer__bottom a {
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .site-footer__bottom a:hover { color: var(--accent); text-decoration: underline; }
}

/* === THEME TOGGLE === */
#theme-toggle {
    position: fixed;
    bottom: var(--s-3);
    right: var(--s-3);
    z-index: 90;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink);
    transition: opacity var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    box-shadow: var(--shadow-sm);
}

html.cookie-open #theme-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.88);
}

#theme-toggle:active { transform: scale(0.95); }

@media (hover: hover) and (pointer: fine) {
    #theme-toggle:hover { border-color: var(--line-2); transform: translateY(-2px); }
}

#theme-toggle .tt-sun { display: block; }
#theme-toggle .tt-moon { display: none; }
html.dark #theme-toggle .tt-sun { display: none; }
html.dark #theme-toggle .tt-moon { display: block; }

@media (max-width: 767.98px) {
    #theme-toggle { display: none; }
}

/* === COMPARE TABLE === */
.compare-table {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow-x: auto;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

.compare-table__head {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}

.compare-table__row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    border-bottom: 1px solid var(--line);
}

.compare-table__row:last-child { border-bottom: none; }

.compare-table__col {
    padding: var(--s-3);
    font-size: var(--t-base);
    line-height: 1.5;
    border-right: 1px solid var(--line);
}

.compare-table__col:last-child { border-right: none; }
.compare-table__col--feat { font-weight: 500; color: var(--ink); }

.compare-table__head .compare-table__col {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    padding-block: var(--s-2);
}

.compare-table__head strong {
    font-size: var(--t-md);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.compare-table__head span {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compare-table__col--ours { background: var(--bg-elevated); color: var(--ink); position: relative; }
.compare-table__col--theirs { color: var(--muted); }
.compare-table__check { color: var(--accent); font-weight: 700; margin-right: var(--s-1); }
.compare-table__mobile-tag {
    display: none;
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--s-0);
}
.compare-table__val { display: block; }

@media (max-width: 767.98px) {
    .compare-table__head { display: none; }
    .compare-table__row { grid-template-columns: 1fr; }
    .compare-table__col { border-right: none; border-bottom: 1px solid var(--line); padding: var(--s-2) var(--s-3); }
    .compare-table__col:last-child { border-bottom: none; }
    .compare-table__row:last-child .compare-table__col:last-child { border-bottom: none; }
    .compare-table__col--feat { font-weight: 600; background: var(--bg-alt); }
    .compare-table__mobile-tag { display: block; }
}

/* === FAQ === */
.faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item details { width: 100%; }

.faq-item__q {
    cursor: pointer;
    list-style: none;
    padding: var(--s-3) var(--s-1) var(--s-3) 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    font-size: var(--t-md);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
    user-select: none;
    transition: color var(--transition-fast);
}

.faq-item__q > span:first-child {
    min-width: 0;
    overflow-wrap: break-word;
}

@media (hover: hover) and (pointer: fine) {
    .faq-item__q:hover { color: var(--accent); }
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--t-md);
    font-weight: 400;
    color: var(--ink);
    transition: transform var(--transition-med), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.faq-item details[open] .faq-item__icon {
    transform: rotate(45deg);
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

.faq-item__a {
    padding-bottom: var(--s-3);
    color: var(--ink-3);
    font-size: var(--t-base);
    line-height: 1.6;
    max-width: 68ch;
}

.faq-item__a p { margin: 0; }

/* === SCROLL REVEAL === */
html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}

html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html.js .reveal { opacity: 1; transform: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === HELPERS === */
.text-center { text-align: center; }
.muted { color: var(--muted); }
.divider { max-width: var(--container); margin: 0 auto; height: 1px; background: var(--line); }

@media (max-width: 767.98px) {
    .section--tight { padding: var(--s-4) var(--gutter); }
    .stats__num { font-size: var(--t-xl); }
    article.page-article { margin: var(--s-4) auto; }
}

@media (max-width: 479.98px) {
    :root { --gutter: 20px; }
}

/* === SELECTION & FOCUS === */
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

.section--invert :focus-visible,
.cta-band :focus-visible,
.service-hero :focus-visible {
    outline-color: var(--on-invert);
}

/* === MARKDOWN === */
.markdown {
    font-size: var(--t-base);
    line-height: 1.7;
    color: var(--ink-2);
}

.markdown > * + * { margin-top: var(--s-3); }

/* === SERVICE LANDING === */
.service-hero {
    background: var(--bg-invert);
    color: var(--on-invert);
    padding-block: clamp(var(--s-5), 7vw, var(--s-6));
    position: relative;
    overflow: hidden;
}

html.dark .service-hero {
    border-bottom: 1px solid var(--line);
}

.service-hero__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    align-items: flex-start;
}

.service-hero__inner .eyebrow { color: var(--on-invert-muted); }

.service-hero__title {
    font-size: clamp(var(--t-3xl), 5vw, var(--t-5xl));
    color: var(--on-invert);
    margin: 0;
    max-width: 19ch;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.service-hero__lead {
    font-size: var(--t-md);
    color: var(--on-invert-muted);
    line-height: 1.5;
    max-width: 58ch;
    margin: 0;
}

.service-hero__cta-row {
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
    margin-top: var(--s-1);
}

.service-hero__metrics {
    list-style: none;
    margin: var(--s-4) 0 0;
    padding: var(--s-3) 0 0;
    border-top: 1px solid rgba(246, 244, 239, 0.14);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-3);
    width: 100%;
    font-size: var(--t-sm);
    color: var(--on-invert-muted);
}

@media (min-width: 768px) {
    .service-hero__metrics { grid-template-columns: repeat(4, 1fr); }
}

.service-hero__metrics li { display: flex; flex-direction: column; gap: var(--s-0); }

.service-hero__metrics strong {
    color: var(--on-invert);
    font-weight: 700;
    font-size: clamp(var(--t-xl), 2.4vw, var(--t-2xl));
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* === STACK GRID === */
.stack-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
    .stack-grid { grid-template-columns: repeat(3, 1fr); }
    .stack-grid[data-grid~="d2"] { grid-template-columns: repeat(2, 1fr); }
}

.stack-cell {
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin: -1px 0 0 -1px;
    background: var(--bg-elevated);
    min-height: 140px;
}

.stack-cell__name {
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.stack-cell__desc {
    font-size: var(--t-base);
    color: var(--ink-3);
    line-height: 1.5;
}

/* === SERVICE PROJECT CARD === */
.service-project__footer {
    margin-top: auto;
    padding-top: var(--s-3);
    border-top: 1px solid rgba(246, 244, 239, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    flex-wrap: wrap;
}

.service-project__metric { display: flex; flex-direction: column; gap: var(--s-0); }

.service-project__metric strong {
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--on-invert);
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.service-project__metric span { font-size: var(--t-xs); color: var(--on-invert-muted); }

.service-project__link {
    font-size: var(--t-sm);
    color: var(--on-invert);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(246, 244, 239, 0.34);
    transition: border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
    .service-project__link:hover { border-bottom-color: var(--accent); color: var(--accent); }
}

.service-process .process__step { min-height: 220px; }

/* === AI CHAT WIDGET === */
.chat-backdrop {
    position: fixed;
    inset: 0;
    z-index: 205;
    background: rgba(15, 15, 14, 0.48);
}

.chat-backdrop[hidden] { display: none; }

@media (min-width: 768px) {
    .chat-backdrop { display: none; }
}

.chat-launcher {
    position: fixed;
    bottom: calc(var(--s-3) + 44px + var(--s-1)); /* raw: оверлей над #theme-toggle (44px) */
    right: var(--s-3);
    z-index: 95;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--ink);
    color: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: opacity var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

html.cookie-open .chat-launcher {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.88);
}

.chat-launcher:active { transform: scale(0.95); }

@media (hover: hover) and (pointer: fine) {
    .chat-launcher:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-2px); }
}

.chat-launcher__badge {
    position: absolute;
    top: -4px; /* raw: угловой бейдж поверх круглой кнопки чата */
    right: -4px; /* raw: угловой бейдж поверх круглой кнопки чата */
    min-width: 20px;
    height: 20px;
    padding: 0 var(--s-0);
    border-radius: var(--r-pill);
    background: var(--accent);
    color: var(--on-accent);
    border: 2px solid var(--bg);
    font-size: var(--t-2xs);
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-launcher__badge[hidden] { display: none; }

.chat-panel {
    position: fixed;
    bottom: calc(var(--s-3) + 44px + var(--s-1) + 52px + var(--s-1)); /* raw: оверлей над #theme-toggle и .chat-launcher */
    right: var(--s-3);
    z-index: 210;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100dvh - 170px));
    background: var(--bg-elevated);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-panel[hidden] { display: none; }

.chat-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    padding: var(--s-2);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.chat-panel__title {
    display: flex;
    align-items: baseline;
    gap: var(--s-1);
    font-size: var(--t-sm);
    font-weight: 600;
}

.chat-panel__sub {
    font-size: var(--t-2xs);
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chat-panel__close {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--line);
    color: var(--ink);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.chat-panel__close:active { transform: scale(0.95); }

@media (hover: hover) and (pointer: fine) {
    .chat-panel__close:hover { border-color: var(--line-2); }
}

.chat-panel__log {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: var(--s-2);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.chat-msg {
    max-width: 85%;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-md);
    font-size: var(--t-sm);
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.chat-msg--user {
    align-self: flex-end;
    background: var(--ink);
    color: var(--bg);
    border-bottom-right-radius: var(--r-xs);
}

.chat-msg--assistant {
    align-self: flex-start;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-bottom-left-radius: var(--r-xs);
}

.chat-msg--system {
    align-self: flex-start;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: var(--t-xs);
}

.chat-msg__time {
    display: block;
    margin-top: var(--s-0);
    font-size: var(--t-2xs);
    color: var(--muted);
    line-height: 1.2;
}

.chat-msg--user .chat-msg__time {
    color: var(--on-invert-muted);
    text-align: right;
}

.chat-msg__atts {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    margin-top: var(--s-1);
}

.chat-msg__att {
    font-family: inherit;
    font-size: var(--t-xs);
    font-weight: 500;
    color: var(--ink);
    background: var(--bg-elevated);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    padding: var(--s-1) var(--s-2);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.chat-msg__att:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .chat-msg__att:hover { border-color: var(--accent); }
}

.chat-typing { display: inline-flex; align-items: center; gap: var(--s-0); }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: 0.35; animation: chat-typing-wave 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-typing-wave {
    0%, 60%, 100% { opacity: 0.35; }
    30% { opacity: 1; }
}

.chat-panel__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
    padding: 0 var(--s-2) var(--s-2);
    flex-shrink: 0;
}

.chat-panel__chips[hidden] { display: none; }

.chat-chip {
    font-family: inherit;
    font-size: var(--t-xs);
    font-weight: 500;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: var(--s-1) var(--s-2);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.chat-chip:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .chat-chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
}

.chat-panel__form {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    padding: var(--s-1) var(--s-2);
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}

.chat-panel__form input {
    flex: 1;
    min-width: 0;
    font-family: inherit;
    font-size: var(--t-base);
    padding: var(--s-1) var(--s-2);
    border: none;
    background: transparent;
    color: var(--ink);
}

.chat-panel__form input:focus { outline: none; }

.chat-panel__send {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--on-accent);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.chat-panel__send:active { transform: scale(0.95); }
.chat-panel__send:disabled { opacity: 0.55; cursor: default; transform: none; }

@media (hover: hover) and (pointer: fine) {
    .chat-panel__send:hover:not(:disabled) { background: var(--accent-hover); transform: translateX(2px); }
}

.chat-panel__note {
    margin: 0;
    padding: 0 var(--s-2) var(--s-2);
    font-size: var(--t-2xs);
    color: var(--muted);
    line-height: 1.4;
    flex-shrink: 0;
}

.chat-panel__note a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
}

@media (max-width: 767.98px) {
    .chat-launcher {
        bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px));
        right: var(--s-2);
        width: 48px;
        height: 48px;
    }

    .chat-panel {
        inset: max(var(--s-2), env(safe-area-inset-top, 0px)) var(--s-1) 0;
        width: auto;
        height: auto;
        border-radius: var(--r-md) var(--r-md) 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .chat-panel__chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: var(--s-1);
    }

    .chat-panel__chips::-webkit-scrollbar { display: none; }
    .chat-chip { flex: none; white-space: nowrap; }

    html.chat-open,
    html.chat-open body {
        overflow: hidden;
    }
}

/* bp-exception: альбомная ориентация смартфонов для панели чата */
@media (max-height: 500px) {
    .chat-panel {
        inset: var(--s-1) var(--s-1) 0;
        width: auto;
        height: auto;
        border-radius: var(--r-md) var(--r-md) 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .chat-panel__head { padding: var(--s-1) var(--s-2); }
    .chat-panel__chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: var(--s-1);
    }
    .chat-panel__chips::-webkit-scrollbar { display: none; }
    .chat-chip { flex: none; white-space: nowrap; }
    .chat-panel__note { padding-bottom: var(--s-1); }
}

/* === AI SCHEMA === */
.aischeme {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    padding: var(--s-3);
    margin: var(--s-4) 0;
}

.aischeme__row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: var(--s-2);
    align-items: center;
}

.aischeme__label {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.aischeme__tiles { display: flex; flex-wrap: wrap; gap: var(--s-1); }

.aischeme__tile {
    border: 1px solid var(--line);
    background: var(--bg-alt);
    border-radius: var(--r-pill);
    padding: var(--s-0) var(--s-2);
    font-size: var(--t-xs);
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}

.aischeme__core {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-2);
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.aischeme__core strong { font-size: var(--t-base); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.aischeme__core span { font-size: var(--t-xs); color: var(--muted); line-height: 1.5; }
.aischeme__core--human { background: var(--bg-alt); }

.aischeme__arrow {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    letter-spacing: 0.06em;
    color: var(--muted-2);
    padding: var(--s-1) 0 var(--s-1) var(--s-6);
}

@media (max-width: 767.98px) {
    .aischeme__row { grid-template-columns: 1fr; gap: var(--s-1); }
    .aischeme__arrow { padding-left: 0; }
}

/* === ROI CALCULATOR === */
.roi {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    padding: clamp(var(--s-3), 3.5vw, var(--s-4));
    margin: var(--s-4) 0;
}

.roi__head { margin-bottom: var(--s-3); }

.roi__eyebrow {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: var(--s-0);
}

.roi .roi__title { margin: 0 !important; font-size: var(--t-lg); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }

.roi__controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-2);
}

@media (min-width: 768px) {
    .roi__controls { grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-3); }
}

.roi__field { display: block; }

.roi__field-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-2);
    font-size: var(--t-sm);
    color: var(--muted);
    margin-bottom: var(--s-1);
}

.roi__field-label output {
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.roi__field input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.roi__result {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-2);
    border-block: 1px solid var(--line);
    padding-block: var(--s-3);
    margin-block: var(--s-3);
}

@media (min-width: 768px) {
    .roi__result { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
}

.roi__result-item { display: flex; flex-direction: column; gap: var(--s-0); }

.roi__result-label {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.roi__result-value {
    font-size: clamp(var(--t-md), 2.4vw, var(--t-xl));
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.roi__cta { margin-bottom: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.roi__note { margin: 0; font-size: var(--t-base); color: var(--muted); line-height: 1.5; }

.roi__presets {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
    margin-bottom: var(--s-3);
}

.roi__preset {
    font-family: var(--font-sans);
    font-size: var(--t-base);
    font-weight: 500;
    color: var(--ink-2);
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    padding: 0 var(--s-2);
    min-height: 44px;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.roi__preset:hover { border-color: var(--accent); color: var(--ink); }
.roi__preset[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.roi__select {
    width: 100%;
    min-height: 44px;
    padding: 0 var(--s-2);
    font-family: var(--font-sans);
    font-size: var(--t-base);
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
}

.roi__field--full { grid-column: 1 / -1; }

@media (min-width: 768px) {
    .roi__result--3 { grid-template-columns: repeat(3, 1fr); }
}

.roi__compare-wrap {
    margin-bottom: var(--s-3);
}

.roi__compare-title {
    margin: 0 0 var(--s-1) !important;
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink-2);
}

.roi__compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--t-sm);
    font-variant-numeric: tabular-nums;
}

.roi__compare-table th,
.roi__compare-table td {
    text-align: left;
    padding: var(--s-1) var(--s-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.roi__compare-table th {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.roi__compare-table tr.is-selected td {
    background: var(--accent-soft);
    font-weight: 600;
    color: var(--ink);
}

article a.btn, .markdown a.btn { text-decoration: none; }
article a.btn--primary, .markdown a.btn--primary { color: var(--on-accent); }
article a.btn--ghost, .markdown a.btn--ghost { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
    article a.btn--ghost:hover, .markdown a.btn--ghost:hover { color: var(--bg); }
}

/* === LIVE STATS (реальные данные /stats.json) === */
.live-stats[hidden] { display: none; }
.live-stats__inner { max-width: var(--container); margin-inline: auto; padding: 0 var(--gutter) var(--s-5); }
.live-stats__head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }

.live-stats__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: var(--r-pill);
    padding: var(--s-0) var(--s-2);
}

.live-stats__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-online);
}

.live-stats__caption { font-size: var(--t-xs); color: var(--muted); }

/* === SKIP-LINK === */
.skip-link {
    position: absolute;
    left: var(--s-2);
    top: calc(var(--s-5) * -1);
    z-index: 200;
    padding: var(--s-1) var(--s-2);
    background: var(--accent);
    color: var(--on-accent);
    border-radius: var(--r-pill);
    font-size: var(--t-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: top var(--transition-fast);
}

html.user-tabbing .skip-link:focus-visible { top: var(--s-2); }

@media (max-width: 767.98px) {
    .markdown p, .markdown li { hyphens: auto; }
}

@media (prefers-contrast: more) {
    :root { --muted: #45423D; --ink-3: #2B2926; }
    html.dark { --muted: #C9C4BA; --ink-3: #E4E0D8; }
}

/* === PLANS (тарифные карточки /services/152-fz/) === */
.plans {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    align-items: stretch;
}

@media (min-width: 768px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
    .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .plans[data-grid~="d2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plans[data-grid~="d3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .plans[data-grid~="d4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.plan {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    position: relative;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .plan:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
}

.plan--featured {
    background: var(--bg-invert);
    color: var(--on-invert);
    border-color: var(--bg-invert);
}

html.dark .plan--featured { border-color: var(--accent); }

.plan__badge {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.plan--featured .plan__badge {
    color: var(--accent-on-invert);
}

.plan__name { margin: 0; font-size: var(--t-md); font-weight: 600; letter-spacing: -0.015em; color: inherit; }

.plan__price {
    font-size: var(--t-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.plan__price small { font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.plan--featured .plan__price small { color: var(--on-invert-muted); }

article.plan .plan__for,
.plan__for { margin: 0; font-size: var(--t-base); line-height: 1.5; color: var(--ink-3); }
article.plan--featured .plan__for,
.plan--featured .plan__for { color: var(--on-invert-muted); }

article.plan .plan__list,
.plan__list { list-style: none; margin: 0; padding: 0; font-size: var(--t-base); }
article.plan .plan__list li,
.plan__list li { margin: 0; padding: var(--s-1) 0; border-top: 1px solid var(--line); line-height: 1.45; color: var(--ink-2); }
article.plan--featured .plan__list li,
.plan--featured .plan__list li { border-top-color: rgba(246, 244, 239, 0.14); color: var(--on-invert); }

.plan__cta { margin-top: auto; padding-top: var(--s-2); }
.plan__cta .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding: var(--s-1) var(--s-2);
}
.plans--cols-4 .plan__price {
    font-size: clamp(var(--t-md), 2.1vw, var(--t-xl));
    white-space: normal;
}

@media (max-width: 479.98px) {
    .service-hero__title {
        font-size: clamp(var(--t-xl), 10vw, var(--t-2xl));
        hyphens: auto;
        overflow-wrap: break-word;
    }
    .stats__num { font-size: clamp(var(--t-md), 6vw, var(--t-lg)); }
}

/* === partials/lead-form.html === */
.lf-embed {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    padding: clamp(var(--s-3), 4vw, var(--s-4));
    margin: var(--s-4) 0;
    transition: border-color var(--transition-med), box-shadow var(--transition-med);
}

.lf-embed::before,
.lf-embed::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-med);
}

.lf-embed::before {
    background: radial-gradient(
        420px circle at var(--mx, 50%) var(--my, 50%),
        color-mix(in srgb, var(--accent) 8%, transparent),
        transparent 62%
    );
}

.lf-embed::after {
    padding: 1px;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        color-mix(in srgb, var(--accent) 55%, transparent),
        transparent 65%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.lf-embed > * {
    position: relative;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .lf-embed:hover::before,
    .lf-embed:hover::after { opacity: 1; }
}

.lf-embed h3,
.lf-embed .lf-embed__title { margin: 0 0 var(--s-1); font-size: clamp(var(--t-md), 3vw, var(--t-lg)); font-weight: 600; line-height: 1.25; letter-spacing: -0.018em; }
.ns-hero__sub { margin: 0 0 var(--s-3); font-size: clamp(var(--t-md), 2.4vw, var(--t-xl)); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.ns-hero__sub em { font-style: normal; color: var(--muted); }
.lf-embed__sub { color: var(--ink-3); margin: 0 0 var(--s-3); }
.lf-embed__field { margin-top: var(--s-2); }
.lf-embed__field:first-of-type { margin-top: 0; }
.lf-embed label {
    display: block;
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ink-2);
    margin: var(--s-2) 0 var(--s-0);
    transition: color var(--transition-fast), transform var(--transition-fast);
}
.lf-embed__field label { margin: 0 0 var(--s-0); }
.lf-embed__field:focus-within label {
    color: var(--accent);
    transform: translateX(2px); /* raw: микросдвиг активного label */
}

.lf-embed input[type=text],
.lf-embed textarea {
    width: 100%;
    padding: var(--s-2);
    font: inherit;
    font-size: var(--t-base);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--ink);
    box-sizing: border-box;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .lf-embed input[type=text]:hover,
    .lf-embed textarea:hover {
        border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
    }
}

.lf-embed input[type=text]:focus,
.lf-embed textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.lf-embed__consent {
    position: relative;
    display: flex;
    min-height: 44px;
    gap: var(--s-1);
    align-items: flex-start;
    font-size: var(--t-xs);
    font-weight: 400;
    color: var(--muted);
    margin-top: var(--s-2);
    line-height: 1.45;
    cursor: pointer;
}

.lf-embed__consent input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.lf-embed__cb {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px; /* raw: оптическое выравнивание флажка по первой строке текста */
    border-radius: var(--r-xs);
    border: 1px solid color-mix(in srgb, var(--ink) 28%, var(--line));
    background: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lf-embed__cb svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: var(--on-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lf-embed__cb path {
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    transition: stroke-dashoffset 240ms var(--ease-out) 40ms;
}

.lf-embed__consent input:checked + .lf-embed__cb {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.06);
}

.lf-embed__consent input:checked + .lf-embed__cb path {
    stroke-dashoffset: 0;
}

.lf-embed__consent input:focus-visible + .lf-embed__cb {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.lf-embed__consent small, .contact-consent__label small { font-size: inherit; }
.lf-embed__consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.lf-embed button[type="submit"] {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    margin-top: var(--s-2);
    width: 100%;
    min-height: 44px;
    padding: var(--s-2) var(--s-4);
    font: inherit;
    font-size: var(--t-base);
    font-weight: 600;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-med), opacity var(--transition-fast);
}

.lf-embed button[type="submit"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 255, 255, 0.22) 48%,
        transparent 75%
    );
    transform: translateX(-120%);
    transition: transform 620ms var(--ease-out);
    pointer-events: none;
}

.lf-embed__arrow {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.lf-embed__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: lf-spin 650ms linear infinite;
    display: none;
}

.lf-embed button[type="submit"].is-loading .lf-embed__spinner { display: inline-block; }
.lf-embed button[type="submit"].is-loading .lf-embed__arrow { display: none; }

.lf-embed button[type="submit"]:disabled { opacity: 0.72; cursor: default; transform: none; }
.lf-embed button[type="submit"]:active:not(:disabled) { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .lf-embed button[type="submit"]:hover:not(:disabled) {
        background: var(--accent-hover);
        box-shadow: var(--shadow-md);
    }
    .lf-embed button[type="submit"]:hover:not(:disabled)::before {
        transform: translateX(120%);
    }
    .lf-embed button[type="submit"]:hover:not(:disabled) .lf-embed__arrow {
        transform: translateX(4px);
    }
}

.lf-embed__ok {
    display: none;
    animation: lf-ok-enter 360ms var(--ease-out) forwards;
}
.lf-embed__ok[hidden], .lf-embed__err[hidden] { display: none; }
.lf-embed__ok b { font-size: var(--t-md); }
.lf-embed__ok-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s-2);
}
.lf-embed__ok-badge svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lf-embed__ok-badge path {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: lf-draw-check 420ms var(--ease-out) 120ms forwards;
}

.lf-embed__err {
    margin-top: var(--s-2);
    padding: var(--s-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--ink);
    font-size: var(--t-base);
    line-height: 1.5;
}
.lf-embed__err p { margin: 0; }
.lf-embed__err a { color: var(--accent); text-decoration: underline; }

.lf-embed.is-shaking {
    animation: lf-shake 360ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes lf-spin { to { transform: rotate(360deg); } }
@keyframes lf-ok-enter {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lf-draw-check { to { stroke-dashoffset: 0; } }
@keyframes lf-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
    .lf-embed,
    .lf-embed::before,
    .lf-embed::after,
    .lf-embed label,
    .lf-embed input[type=text],
    .lf-embed textarea,
    .lf-embed__cb,
    .lf-embed__cb path,
    .lf-embed button[type="submit"],
    .lf-embed button[type="submit"]::before,
    .lf-embed__arrow,
    .lf-embed__ok,
    .lf-embed__ok-badge path,
    .lf-embed.is-shaking {
        transition: none;
        animation: none;
    }
    .lf-embed__ok-badge path { stroke-dashoffset: 0; }
}

/* === partials/related-cases.html & related-links.html === */
.related-cases,
.case-related {
    max-width: var(--reading);
    margin: var(--s-4) auto 0;
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
}
main > .related-cases:last-child,
main > .case-related:last-child,
main > .tg-sub:last-child,
main > .reading:last-child {
    margin-bottom: var(--s-5);
}

.related-cases__label,
.case-related__label {
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-family: var(--font-mono);
    margin-bottom: var(--s-2);
}

.related-cases__list,
.case-related__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.related-cases__list a,
.case-related__list a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .related-cases__list a:hover,
    .case-related__list a:hover { color: var(--accent); border-color: var(--accent); }
}

.related-cases__metric { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: var(--s-0); }

/* === partials/tg-subscribe.html === */
.tg-sub {
    position: relative;
    max-width: var(--reading);
    margin: var(--s-4) auto 0;
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-alt);
}

.tg-sub__label {
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-family: var(--font-mono);
    margin-bottom: var(--s-1);
}

.tg-sub__text { margin: 0 0 var(--s-2); font-size: var(--t-base); line-height: 1.55; color: var(--ink-2); }
.tg-sub__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.tg-sub__btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: var(--s-1);
    padding: var(--s-1) var(--s-3);
    border: 1px solid var(--ink);
    border-radius: var(--r-pill);
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
    font-size: var(--t-sm);
    font-weight: 600;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.tg-sub__btn:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .tg-sub__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
}

.tg-sub__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink);
    font-size: var(--t-sm);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .tg-sub__link:hover { color: var(--accent); border-bottom-color: var(--accent); }
}

@media (max-width: 767.98px) {
    .tg-sub__actions { width: 100%; }
    .tg-sub__btn { flex: 1; justify-content: center; }
}

/* === BLOG BYLINE & AUTHOR CARD === */
.article-byline {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    max-width: var(--reading);
    margin: var(--s-2) auto var(--s-3);
    padding: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
}

.article-byline__avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    line-height: 0;
    border: 1px solid var(--line);
    transition: transform var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .article-byline__avatar:hover { transform: scale(1.04); }
}

.article-byline__avatar img, .article-byline__avatar picture { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border: 0; border-radius: 0; }
.article-byline__meta { display: flex; flex-direction: column; gap: var(--s-0); min-width: 0; flex: 1; }
.article-byline__line { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-0); font-size: var(--t-sm); line-height: 1.4; }
.article-byline__line--muted { color: var(--muted); font-size: var(--t-xs); }

.article-byline__author {
    color: var(--ink);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .article-byline__author:hover { color: var(--accent); border-bottom-color: var(--accent); }
}

.article-byline__role { color: var(--muted); }

/* Author card (без торчащего абсолютного бейджа) */
.author-card {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    max-width: var(--reading);
    margin: var(--s-5) auto var(--s-4);
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
}

.author-card__tag {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: var(--s-0);
}

.author-card__photo {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    line-height: 0;
    border: 1px solid var(--line);
}

.author-card__photo img, .author-card__photo picture { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border: 0; border-radius: 0; }
.author-card__body { flex: 1; min-width: 0; }
.author-card__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-1); }

.author-card__name {
    font-size: var(--t-md);
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .author-card__name:hover { color: var(--accent); }
}

.author-card__role { color: var(--muted); font-size: var(--t-sm); }
.author-card__bio { margin: 0 0 var(--s-2); color: var(--ink-2); line-height: 1.55; font-size: var(--t-base); }
.author-card__bio a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.author-card__cta { display: flex; flex-wrap: wrap; gap: var(--s-1); }

.author-card__btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: var(--s-1) var(--s-3);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    color: var(--ink);
    text-decoration: none;
    font-size: var(--t-sm);
    font-weight: 500;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.author-card__btn:active { transform: scale(0.97); }
.author-card__btn--primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

@media (hover: hover) and (pointer: fine) {
    .author-card__btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
    .author-card__btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
}

@media (max-width: 767.98px) {
    .author-card { flex-direction: column; gap: var(--s-2); }
    .author-card__photo { width: 72px; height: 72px; }
    .author-card__cta { width: 100%; }
    .author-card__btn { flex: 1; justify-content: center; }
}

/* === CODE HEADER === */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-invert);
    padding: 0 var(--s-2);
    font-size: var(--t-xs);
    color: var(--on-invert-muted);
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    border: 1px solid rgba(246, 244, 239, 0.1);
    border-bottom: none;
    margin: var(--s-4) auto 0;
    font-family: var(--font-mono);
    max-width: var(--reading);
}

.code-header .lang { text-transform: lowercase; }

.code-header .copy-btn {
    background: none;
    border: none;
    color: var(--on-invert-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--t-xs);
    padding: 0 var(--s-1);
    min-height: 44px;
    border-radius: var(--r-xs);
    display: flex;
    align-items: center;
    gap: var(--s-0);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .code-header .copy-btn:hover { background: rgba(246, 244, 239, 0.1); color: var(--on-invert); }
}

.code-header + .highlight { margin-top: 0; max-width: var(--reading); margin-inline: auto; }
.code-header + .highlight pre { border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 0; }

/* === 404 PAGE === */
.nf {
    min-height: calc(100dvh - 380px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(var(--s-4), 8vw, var(--s-6)) var(--gutter);
}

.nf__inner { max-width: 720px; width: 100%; text-align: center; }

.nf__eyebrow {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: clamp(var(--s-2), 3vw, var(--s-3));
}

.nf__code {
    display: flex;
    justify-content: center;
    line-height: 0.9;
    font-weight: 700;
    font-size: clamp(120px, 26vw, 240px); /* raw: декоративная цифра 404 крупнее шкалы --t-* */
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink);
    user-select: none;
    margin-bottom: clamp(var(--s-3), 4vw, var(--s-4));
}

.nf__code span:nth-child(2) { -webkit-text-stroke: 0; color: var(--accent); }

.nf__title { font-size: clamp(var(--t-lg), 3.5vw, var(--t-xl)); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--s-2); }
.nf__path { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted-2); margin: 0 0 var(--s-0); word-break: break-all; }
.nf__path s { text-decoration-color: var(--muted-2); }
.nf__sub { color: var(--ink-3); font-size: var(--t-base); margin: 0 auto var(--s-1); max-width: 46ch; }
.nf__hint { font-size: var(--t-base); margin: 0 0 var(--s-1); }
.nf__hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }

.nf__cta {
    display: flex;
    gap: var(--s-2);
    justify-content: center;
    flex-wrap: wrap;
    margin: clamp(var(--s-3), 4vw, var(--s-4)) 0 clamp(var(--s-4), 6vw, var(--s-5));
}

@media (max-width: 479.98px) {
    .nf__cta .btn { width: 100%; }
}

.nf__links { text-align: left; border-top: 1px solid var(--line); }

.nf__link {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-height: 44px;
    padding: var(--s-2) var(--s-1);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    transition: background-color var(--transition-fast);
}

.nf__link-text { font-weight: 600; font-size: var(--t-base); letter-spacing: -0.01em; transition: transform var(--transition-fast), color var(--transition-fast); }
.nf__link-desc { color: var(--muted); font-size: var(--t-base); display: none; }

@media (hover: hover) and (pointer: fine) {
    .nf__link:hover { background: var(--bg-alt); }
    .nf__link:hover .nf__link-text { transform: translateX(4px); color: var(--accent); }
}

@media (min-width: 768px) { .nf__link-desc { display: block; } }

/* === CONTACT PAGE & REQUISITES CARD (/contact/) === */
.contact-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--s-6);
}

.contact-page .breadcrumb {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.contact-head {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}

.contact-head__title {
    margin: 0 0 var(--s-2);
    font-size: clamp(var(--t-2xl), 4.2vw, var(--t-4xl));
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.contact-head__lead {
    margin: 0;
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-3);
    max-width: 56ch;
}

.contact-jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    align-items: start;
}

.contact-layout__form .lf-embed {
    margin: 0;
    scroll-margin-top: calc(var(--header-h) + var(--s-3));
}

.contact-layout__side {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-width: 0;
}

@media (min-width: 1000px) {
    .contact-jump {
        display: none;
    }
    .contact-layout {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: var(--s-4);
    }
    .contact-layout__form {
        position: sticky;
        top: calc(var(--header-h) + var(--s-3));
    }
}

.contact-channels {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.contact-channels__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-1) var(--s-2);
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--line);
    background: var(--bg-alt);
}

.contact-channels__head .req-card__geo {
    padding: 0;
    margin: 0;
}

.contact-channels__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contact-channels__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    padding: var(--s-1) var(--s-2) var(--s-1) var(--s-3);
    border-bottom: 1px solid var(--line);
}

.contact-channels__row:last-child {
    border-bottom: none;
}

.contact-channels__link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--s-0);
    min-height: 44px;
    min-width: 0;
    flex: 1 1 auto;
    padding: var(--s-1) 0;
    text-decoration: none;
    color: var(--ink);
    transition: color var(--transition-fast);
}

.contact-channels__val {
    font-size: var(--t-base);
    font-weight: 500;
    color: inherit;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.contact-channels__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.contact-channels__copy:active {
    transform: scale(0.95);
}

.contact-channels__copy.is-copied {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    .contact-channels__link:hover {
        color: var(--accent);
    }
    .contact-channels__copy:hover {
        color: var(--ink);
        background: var(--bg-alt);
        border-color: var(--line);
    }
}

.req-card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    margin-top: 0;
    overflow: hidden;
    scroll-margin-top: calc(var(--header-h) + var(--s-3));
}

.req-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--line);
    background: var(--bg-alt);
}

.req-card__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.req-card__copy {
    min-height: 44px;
    font-family: inherit;
    font-size: var(--t-xs);
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--ink);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    padding: var(--s-1) var(--s-2);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.req-card__copy:active { transform: scale(0.97); }

.req-card__copy.is-copied {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

@media (hover: hover) and (pointer: fine) {
    .req-card__copy:hover { background: var(--ink); color: var(--bg); }
    .req-card__copy.is-copied:hover { background: var(--accent); color: var(--on-accent); }
}

.req-card__name-btn {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-2);
    width: 100%;
    min-height: 44px;
    padding: var(--s-3) var(--s-3) var(--s-0);
    background: transparent;
    border: none;
    text-align: left;
    font: inherit;
    color: var(--ink);
    cursor: copy;
    position: relative;
    transition: background-color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.req-card__name-btn:active { background: var(--bg-alt); }

@media (hover: hover) and (pointer: fine) {
    .req-card__name-btn:hover { background: var(--bg-alt); }
}

.req-card__name {
    font-size: var(--t-md);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ink);
    line-height: 1.25;
}

.req-card__name-btn.is-copied::after {
    content: attr(data-copied);
    position: absolute;
    top: var(--s-2);
    right: var(--s-3);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--bg-elevated);
    padding: 0 var(--s-0);
}

.req-card__name-btn.is-copied .req-card__ico,
.req-card__cell.is-copied .req-card__ico {
    opacity: 0;
}

.req-card__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.req-card__geo { font-size: var(--t-sm); color: var(--muted); padding: var(--s-0) var(--s-3) var(--s-1); margin: 0; }
.req-card__geo a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; transition: color var(--transition-fast); }
@media (hover: hover) and (pointer: fine) {
    .req-card__geo a:hover { color: var(--accent); }
}
.req-card__hint { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); padding: 0 var(--s-3) var(--s-2); margin: 0; }
.req-card__grid { display: grid; grid-template-columns: 1fr; margin: 0; border-top: 1px solid var(--line); }

.req-card__cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-height: 44px;
    padding: var(--s-2);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: copy;
    transition: background-color var(--transition-fast);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.req-card__cell .req-card__ico {
    position: absolute;
    top: var(--s-2);
    right: var(--s-2);
}

.req-card__cell:last-child { border-bottom: none; }
.req-card__cell:active { background: var(--bg-alt); }

@media (hover: hover) and (pointer: fine) {
    .req-card__cell:hover { background: var(--bg-alt); }
    .req-card__cell:hover .req-card__ico,
    .req-card__name-btn:hover .req-card__ico { color: var(--ink); }
}

.req-card__cell dt,
.req-card__k { font-family: var(--font-mono); font-size: var(--t-2xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-0); padding-right: var(--s-3); }
.req-card__cell dd,
.req-card__v { font-size: var(--t-base); font-weight: 500; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.req-card__cell.is-copied::after {
    content: attr(data-copied);
    position: absolute;
    top: var(--s-2);
    right: var(--s-2);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

@media (min-width: 480px) {
    .req-card__grid { grid-template-columns: 1fr 1fr; }
    .req-card__cell { padding: var(--s-2) var(--s-3); }
    .req-card__cell:nth-child(odd):not(.req-card__cell--wide) { border-right: 1px solid var(--line); }
    .req-card__cell--wide { grid-column: 1 / -1; }
    .req-card__cell:nth-last-child(-n+2):not(.req-card__cell--wide) { border-bottom: none; }
    .req-card__cell--wide + .req-card__cell--wide:last-child { border-bottom: none; }
}

/* === CONTACT CONSENT & MISC === */
#contact-form .contact-consent { margin-top: var(--s-2); }
.contact-consent__label { display: flex; align-items: flex-start; min-height: 44px; gap: var(--s-1); font-size: var(--t-sm); line-height: 1.45; cursor: pointer; }
.contact-consent__box { margin-top: var(--s-0); flex-shrink: 0; }
.lead-wrap { max-width: var(--reading); }
.ind-case-link { margin-top: var(--s-4); }

/* === СЕТКИ БЕЗ ДЫР (DESIGN.md, «Сетки») === */
@media (max-width: 767.98px) {
    [data-grid~="m2"] > :last-child:nth-child(2n+1) { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 999.98px) {
    [data-grid~="t2"] > :last-child:nth-child(2n+1) { grid-column: 1 / -1; }
    [data-grid~="t3"] > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
    [data-grid~="t3"] > :last-child:nth-child(3n+2) { grid-column: span 2; }
    [data-grid~="t4"] > :last-child:nth-child(4n+1) { grid-column: 1 / -1; }
    [data-grid~="t4"] > :nth-last-child(2):nth-child(4n+1),
    [data-grid~="t4"] > :last-child:nth-child(4n+2),
    [data-grid~="t4"] > :last-child:nth-child(4n+3) { grid-column: span 2; }
}
@media (min-width: 1000px) {
    [data-grid~="d2"] > :last-child:nth-child(2n+1) { grid-column: 1 / -1; }
    [data-grid~="d3"] > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
    [data-grid~="d3"] > :last-child:nth-child(3n+2) { grid-column: span 2; }
    [data-grid~="d4"] > :last-child:nth-child(4n+1) { grid-column: 1 / -1; }
    [data-grid~="d4"] > :nth-last-child(2):nth-child(4n+1),
    [data-grid~="d4"] > :last-child:nth-child(4n+2),
    [data-grid~="d4"] > :last-child:nth-child(4n+3) { grid-column: span 2; }
}

/* =====================================================
   SERVICE PAGES (редакционный светлый UX/UI + интерактив)
   ===================================================== */

/* Хлебные крошки по ширине контейнера страницы услуги */
.breadcrumb--wide {
    max-width: var(--container);
    margin: var(--s-2) auto 0;
    padding: 0 var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

/* Светлый редакционный Hero страницы услуги */
.svc-hero {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--s-3) var(--gutter) clamp(var(--s-4), 5vw, var(--s-5));
}

.svc-hero--catalog {
    padding-top: clamp(var(--s-4), 4.5vw, var(--s-5));
}

.svc-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
    align-items: start;
}

@media (min-width: 1000px) {
    .svc-hero__grid {
        grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
        gap: var(--s-5);
        align-items: start;
    }
}

.svc-hero__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.svc-hero__title {
    margin: 0;
    font-size: clamp(var(--t-2xl), 4.8vw, var(--t-4xl));
    line-height: 1.03;
    letter-spacing: -0.03em;
    max-width: 20ch;
    color: var(--ink);
}

@media (max-width: 479.98px) {
    .svc-hero {
        padding-top: var(--s-2);
        padding-bottom: var(--s-4);
    }
    .svc-hero__title {
        font-size: clamp(var(--t-xl), 9vw, var(--t-2xl));
        line-height: 1.06;
    }
}

.svc-hero__lead {
    margin: 0;
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-2);
    max-width: 56ch;
    text-wrap: pretty;
}

@media (max-width: 479.98px) {
    .svc-hero__lead {
        font-size: var(--t-base);
        line-height: 1.55;
    }
}

.svc-hero__actions {
    margin-top: var(--s-1);
}

@media (max-width: 479.98px) {
    .svc-hero__actions .btn { width: 100%; }
}

/* Редакционная сводка справа в hero */
.svc-summary {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .svc-summary {
        padding: var(--s-4);
    }
}

.svc-summary__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: 1px solid var(--line);
    margin-bottom: var(--s-3);
}

.svc-summary__label,
.svc-summary__date {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.svc-summary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
    margin: 0;
}

.svc-summary__item {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    min-width: 0;
}

.svc-summary__val {
    font-size: clamp(var(--t-md), 2vw, var(--t-lg));
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.svc-summary__desc {
    margin: 0;
    font-size: var(--t-sm);
    line-height: 1.4;
    color: var(--muted);
}

/* Якорная навигация по разделам услуги */
.svc-subnav {
    position: relative;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-alt);
}

@media (max-width: 999.98px) {
    .svc-subnav::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: var(--s-4);
        background: linear-gradient(to right, transparent, var(--bg-alt));
        pointer-events: none;
    }
    .svc-subnav__track {
        padding-right: var(--s-4);
    }
}

.svc-subnav__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--s-1) var(--gutter);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.svc-subnav__inner::-webkit-scrollbar {
    display: none;
}

.svc-subnav__track {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    width: max-content;
}

.svc-subnav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ink-3);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.svc-subnav__link.is-active {
    background: var(--bg-elevated);
    border-color: var(--line);
    color: var(--ink);
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .svc-subnav__link:hover {
        color: var(--ink);
        background: var(--bg-elevated);
    }
}

/* Каталог /services/: верх карточки с ценой и сроком + фильтрация без дыр */
.service-cell[hidden] { display: none; }
.service-cell.is-span-full { grid-column: 1 / -1; }

.service-cell__top {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.service-cell__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.service-cell__meta span {
    display: inline-flex;
    align-items: center;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    background: var(--bg-alt);
    border: 1px solid var(--line);
}

/* Сноска и выделенная заметка-гарантия */
.svc-note {
    margin: var(--s-3) 0 0;
    max-width: 68ch;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--muted);
}

.svc-callout {
    margin-top: var(--s-4);
    padding: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.svc-callout p {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--t-base);
    line-height: 1.55;
}

/* === ИНТЕРАКТИВНЫЕ МОДУЛИ СТРАНИЦ УСЛУГ === */
.svc-widget--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    align-items: stretch;
}

.svc-widget--split > *,
.svc-scenario-panel > *,
.svc-faq > *,
.svc-partner > * {
    min-width: 0;
}

@media (min-width: 1000px) {
    .svc-widget--split {
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        gap: var(--s-4);
    }
}

.svc-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .svc-panel {
        padding: var(--s-4);
    }
}

.svc-panel--result {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: var(--s-2);
}

.svc-panel__title {
    margin: 0;
    font-size: var(--t-lg);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.2;
    color: var(--ink);
}

.svc-panel__sub {
    margin: var(--s-1) 0 0;
    font-size: var(--t-md);
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--ink);
}

.svc-panel__lead {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
}

.svc-panel__note {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--muted);
}

/* Шаговые табы архитектуры (roi-ai) */
.svc-steps-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-1);
}

@media (min-width: 768px) {
    .svc-steps-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.svc-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--s-0);
    min-height: 52px;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-2);
    font-family: inherit;
    font-size: var(--t-sm);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.svc-tab-btn:active { transform: scale(0.97); }

.svc-tab-btn__num {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--accent);
}

.svc-tab-btn.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.svc-tab-btn.is-active .svc-tab-btn__num {
    color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    .svc-tab-btn:not(.is-active):hover {
        border-color: var(--line-2);
        color: var(--ink);
    }
}

.svc-flow-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.svc-flow-card[hidden] { display: none; }

.svc-flow-card__meta {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.svc-flow-card__title {
    margin: 0;
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
}

.svc-flow-card__desc {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
}

.svc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
}

.svc-chip {
    display: inline-flex;
    align-items: center;
    padding: var(--s-0) var(--s-2);
    border-radius: var(--r-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    font-size: var(--t-xs);
    font-weight: 500;
    color: var(--ink-2);
}

.svc-sample {
    padding: var(--s-2);
    border-radius: var(--r-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.svc-sample__label {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.svc-sample__text {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink);
}

/* Пресеты и переключатели-пилюли */
.svc-presets,
.svc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
}

.svc-preset-btn,
.svc-tab-pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-2);
    font-family: inherit;
    font-size: var(--t-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.svc-preset-btn:active,
.svc-tab-pill:active { transform: scale(0.97); }

.svc-preset-btn.is-active,
.svc-tab-pill.is-active {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
    .svc-preset-btn:not(.is-active):hover,
    .svc-tab-pill:not(.is-active):hover {
        border-color: var(--line-2);
        color: var(--ink);
    }
}

/* Ползунки с гарантированной тач-зоной >= 44px */
.svc-range-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
    padding: var(--s-1) 0;
}

.svc-range-field input[type="range"] {
    width: 100%;
    min-height: 24px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Контрастный блок итогового расчёта внутри интерактива */
.svc-result-box {
    background: var(--bg-invert);
    color: var(--on-invert);
    border-radius: var(--r-md);
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .svc-result-box {
        padding: var(--s-4);
    }
}

.svc-result-box--tall {
    flex: 1;
}

html.dark .svc-result-box {
    border: 1px solid var(--line);
}

.svc-result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
}

@media (min-width: 480px) {
    .svc-result-grid:not(.svc-result-grid--stack) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.svc-result-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.svc-result-grid--stack .svc-result-item + .svc-result-item {
    padding-top: var(--s-2);
    border-top: 1px solid rgba(246, 244, 239, 0.14);
}

.svc-result-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--on-invert-muted);
}

.svc-result-val {
    font-size: clamp(var(--t-md), 1.8vw, var(--t-lg));
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--on-invert);
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}

.svc-result-grid--stack .svc-result-item:first-child .svc-result-val {
    font-size: clamp(var(--t-lg), 2.3vw, var(--t-xl));
}

.svc-result-actions .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
}

.svc-result-heading {
    margin: 0;
    font-size: clamp(var(--t-md), 2.2vw, var(--t-lg));
    font-weight: 700;
    line-height: 1.2;
    color: var(--on-invert);
}

.svc-result-desc {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--on-invert-muted);
}

.svc-result-rec {
    padding-top: var(--s-2);
    border-top: 1px solid rgba(246, 244, 239, 0.14);
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.svc-result-list {
    list-style: none;
    margin: 0;
    padding: var(--s-2) 0 0;
    border-top: 1px solid rgba(246, 244, 239, 0.14);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.svc-result-list li {
    font-size: var(--t-base);
    line-height: 1.45;
    color: var(--on-invert);
    padding-left: var(--s-2);
    position: relative;
}

.svc-result-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-on-invert);
    font-weight: 700;
}

.svc-result-actions {
    margin-top: auto;
    padding-top: var(--s-1);
}

/* Чекбоксы диагностики и опций */
.svc-checks {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.svc-checks--compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-2);
}

@media (min-width: 768px) {
    .svc-checks--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.svc-check {
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
    padding: var(--s-2);
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg);
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.svc-check input[type="checkbox"] {
    margin-top: var(--s-0);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.svc-check__body {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.svc-check__title {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
}

.svc-check__desc {
    font-size: var(--t-base);
    color: var(--ink-3);
    line-height: 1.45;
}

.svc-check:has(input:checked) {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

@media (hover: hover) and (pointer: fine) {
    .svc-check:hover {
        border-color: var(--line-2);
    }
}

/* Радио-карточки конфигуратора */
.svc-radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.svc-radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-3);
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg);
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.svc-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.svc-radio-card.is-active {
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--accent);
}

.svc-radio-card:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.svc-radio-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
}

.svc-radio-card__head strong {
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--ink);
}

.svc-radio-card__price {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.svc-radio-card__desc {
    font-size: var(--t-base);
    line-height: 1.45;
    color: var(--ink-3);
}

@media (hover: hover) and (pointer: fine) {
    .svc-radio-card:not(.is-active):hover {
        border-color: var(--line-2);
    }
}

/* Сценарии и превью диалога/программы */
.svc-scenario-panel {
    margin-top: var(--s-3);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    box-shadow: var(--shadow-sm);
}

.svc-scenario-panel[hidden] { display: none; }

@media (min-width: 768px) {
    .svc-scenario-panel {
        padding: var(--s-4);
    }
}

@media (min-width: 1000px) {
    .svc-scenario-panel {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: var(--s-4);
        align-items: start;
    }
}

.svc-scenario-panel__copy {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.svc-bullet-list {
    list-style: none;
    margin: var(--s-1) 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.svc-bullet-list li {
    position: relative;
    padding-left: var(--s-2);
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink-2);
}

.svc-bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: var(--s-1);
    transform: translateY(2px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.svc-scenario-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    padding-top: var(--s-2);
    border-top: 1px solid var(--line);
}

.svc-scenario-meta__item {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.svc-scenario-meta__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.svc-scenario-meta__item strong {
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--ink);
}

.svc-scenario-actions {
    margin-top: var(--s-1);
}

.svc-dialogue {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}

.svc-dialogue__head {
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--line);
    background: var(--bg-alt);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.svc-dialogue__body {
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.svc-msg {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    padding: var(--s-2);
    border-radius: var(--r-sm);
    max-width: 92%;
}

.svc-msg--client {
    align-self: flex-end;
    background: var(--bg-alt);
    border: 1px solid var(--line);
}

.svc-msg--bot {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
}

.svc-msg--system {
    align-self: stretch;
    max-width: 100%;
    background: var(--accent-soft);
    border: 1px solid var(--line);
}

.svc-msg__role {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.svc-msg--system .svc-msg__role {
    color: var(--accent);
}

.svc-msg__text {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.45;
    color: var(--ink);
}

/* Асимметричный FAQ на страницах услуг */
.svc-faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
}

@media (min-width: 1000px) {
    .svc-faq {
        grid-template-columns: 4fr 8fr;
        gap: var(--s-5);
        align-items: start;
    }
    .svc-faq__intro {
        position: sticky;
        top: var(--header-h);
    }
}

.svc-faq__intro {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

/* Партнёрский блок (Sprintbox на /services/server/) */
.svc-partner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    padding: var(--s-4);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 1000px) {
    .svc-partner {
        grid-template-columns: 7fr 5fr;
        gap: var(--s-5);
        align-items: center;
    }
}

.svc-partner__copy {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.svc-partner__title {
    margin: 0;
    font-size: clamp(var(--t-lg), 2.8vw, var(--t-2xl));
    line-height: 1.1;
}

.svc-partner__lead {
    margin: 0;
    font-size: var(--t-md);
    line-height: 1.5;
    color: var(--ink-2);
    max-width: 50ch;
}

.svc-partner__note {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.svc-partner__pin {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.svc-partner__pin strong {
    font-size: var(--t-lg);
    color: var(--accent);
    letter-spacing: 0.04em;
}

.svc-partner__note p {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink-3);
}

/* Контекст выбранного тарифа / расчёта в lead-form */
.lf-embed__context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-1) var(--s-2);
    padding: var(--s-1) var(--s-2);
    margin-bottom: var(--s-2);
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: var(--t-sm);
    color: var(--ink);
}

.lf-embed__context[hidden] { display: none; }

.lf-embed__context-text {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    line-height: 1.4;
}

.lf-embed .lf-embed__context-clear {
    flex-shrink: 0;
    width: auto;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0 var(--s-1);
    background: transparent;
    border: none;
    border-radius: var(--r-sm);
    color: var(--accent);
    font-family: inherit;
    font-size: var(--t-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.lf-embed .lf-embed__context-clear:active { opacity: 0.7; }

@media (hover: hover) and (pointer: fine) {
    .lf-embed .lf-embed__context-clear:hover { color: var(--accent-hover); }
}

/* Смежные направления внизу страницы услуги */
.svc-related__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .svc-related__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .svc-related__grid[data-grid~="d3"] { grid-template-columns: repeat(3, 1fr); }
    .svc-related__grid[data-grid~="d2"] { grid-template-columns: repeat(2, 1fr); }
}

.svc-related__card {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--ink);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.svc-related__card:active {
    background: var(--bg-alt);
    transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
    .svc-related__card:hover {
        border-color: var(--line-2);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.svc-related__title {
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
}

.svc-related__desc {
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink-3);
    flex: 1;
}

/* =====================================================
   BLOG ARTICLE (современное редакционное чтение)
   ===================================================== */

/* Индикатор прогресса чтения вверху экрана (GPU transform) */
.blog-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 110;
    pointer-events: none;
    background: transparent;
}

.blog-progress__bar {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform-origin: left center;
    transform: scaleX(0);
    will-change: transform;
}

/* Редакционная шапка статьи */
.blog-head {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--s-3) var(--gutter) 0;
}

.blog-head__title {
    margin: 0 0 var(--s-4);
    max-width: 24ch;
    font-size: clamp(var(--t-xl), 4.2vw, var(--t-3xl));
    line-height: 1.07;
    letter-spacing: -0.028em;
    color: var(--ink);
    text-wrap: balance;
}

@media (max-width: 479.98px) {
    .blog-head {
        padding-top: var(--s-2);
    }
    .blog-head__title {
        font-size: clamp(var(--t-lg), 8.2vw, var(--t-xl));
        line-height: 1.1;
        margin-bottom: var(--s-3);
    }
}

/* Авторская строка в шапке статьи */
.blog-byline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-3);
    padding: var(--s-2) 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.blog-byline__author-wrap {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    min-width: 0;
}

.blog-byline__avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    line-height: 0;
    border: 1px solid var(--line);
    background: var(--bg-alt);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.blog-byline__avatar picture,
.blog-byline__avatar img,
.blog-author__photo picture,
.blog-author__photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 46% 32%;
    transform: scale(1.22);
    margin: 0;
    border: 0;
    border-radius: 0;
}

@media (hover: hover) and (pointer: fine) {
    .blog-byline__avatar:hover {
        border-color: var(--accent);
        transform: scale(1.04);
    }
}

.blog-byline__meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.blog-byline__line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-1);
    font-size: var(--t-sm);
    line-height: 1.35;
}

.blog-byline__line--muted {
    font-size: var(--t-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.blog-byline__name {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    margin: calc(var(--s-1) * -1) 0;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .blog-byline__name:hover { color: var(--accent); }
}

.blog-byline__role { color: var(--muted); }

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    min-height: 44px;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink-2);
    font-family: inherit;
    font-size: var(--t-sm);
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.blog-share-btn:active { transform: scale(0.97); }
.blog-share-btn.is-copied {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

@media (hover: hover) and (pointer: fine) {
    .blog-share-btn:hover {
        border-color: var(--line-2);
        color: var(--ink);
    }
}

/* Двухколоночная редакционная оболочка статьи */
.blog-shell {
    max-width: var(--container);
    margin-inline: auto;
    padding: clamp(var(--s-4), 4.5vw, var(--s-5)) var(--gutter) clamp(var(--s-5), 6vw, var(--s-6));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
    align-items: start;
}

@media (min-width: 1000px) {
    .blog-shell {
        grid-template-columns: minmax(0, 740px) minmax(240px, 280px);
        justify-content: space-between;
        gap: var(--s-5);
    }
    .blog-shell--solo {
        grid-template-columns: minmax(0, 740px);
    }
}

.blog-main {
    min-width: 0;
}

/* Мобильное раскрывающееся оглавление */
.blog-toc-mobile {
    margin-bottom: var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    padding: 0 var(--s-3);
}

@media (min-width: 1000px) {
    .blog-toc-mobile { display: none; }
}

.blog-toc-mobile__summary {
    cursor: pointer;
    list-style: none;
    min-height: 44px;
    padding: var(--s-2) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
}

.blog-toc-mobile__summary::-webkit-details-marker { display: none; }

.blog-toc-mobile[open] .faq-item__icon {
    transform: rotate(45deg);
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

.blog-toc-mobile__count {
    font-family: var(--font-mono);
    font-weight: 400;
    color: var(--muted);
    font-size: var(--t-xs);
    margin-left: var(--s-0);
    font-variant-numeric: tabular-nums;
}

.blog-toc-mobile__list {
    list-style: none;
    margin: 0;
    padding: var(--s-1) 0 var(--s-2);
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.blog-toc-mobile__link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: var(--s-1) 0;
    font-size: var(--t-sm);
    line-height: 1.4;
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color var(--transition-fast);
}

.blog-toc-mobile__list li:last-child .blog-toc-mobile__link {
    border-bottom: none;
}

/* Липкий десктопный сайдбар: оглавление + связанная услуга */
.blog-aside {
    display: none;
}

@media (min-width: 1000px) {
    .blog-aside {
        display: flex;
        flex-direction: column;
        gap: var(--s-3);
        position: sticky;
        top: var(--s-6);
        max-height: calc(100dvh - 128px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.blog-toc {
    padding: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.blog-toc__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-2);
    padding-bottom: var(--s-2);
    margin-bottom: var(--s-1);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.blog-toc__status {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.blog-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.blog-toc__link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: var(--s-1) 0 var(--s-1) var(--s-2);
    font-size: var(--t-sm);
    line-height: 1.35;
    color: var(--muted);
    text-decoration: none;
    border-left: 1px solid var(--line);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.blog-toc__link.is-active {
    color: var(--ink);
    font-weight: 600;
    border-left-color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    .blog-toc__link:hover {
        color: var(--accent);
    }
}

.blog-toc__foot {
    margin-top: var(--s-2);
    padding-top: var(--s-1);
    border-top: 1px solid var(--line);
}

.blog-top-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.04em;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .blog-top-btn:hover { color: var(--accent); }
}

.blog-aside-card {
    padding: var(--s-3);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.blog-aside-card__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.blog-aside-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.blog-aside-card__link {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    min-height: 44px;
    text-decoration: none;
    color: var(--ink);
}

.blog-aside-card__link strong {
    font-size: var(--t-base);
    font-weight: 600;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .blog-aside-card__link:hover strong { color: var(--accent); }
}

/* Типографика и комфорт чтения тела статьи */
.blog-body {
    font-size: var(--t-base);
    line-height: 1.74;
    color: var(--ink-2);
}

/* Первый блок статьи (tldr, абзац) встаёт вровень с сайдбаром */
.blog-body > :first-child { margin-top: 0; }

.blog-body > p:first-of-type {
    font-size: var(--t-md);
    line-height: 1.56;
    color: var(--ink);
    margin-bottom: var(--s-4);
}

@media (max-width: 479.98px) {
    .blog-body > p:first-of-type {
        font-size: var(--t-base);
        line-height: 1.65;
    }
}

.blog-body p {
    margin-bottom: var(--s-3);
    line-height: 1.74;
    color: var(--ink-2);
    text-wrap: pretty;
}

.blog-body h2 {
    position: relative;
    margin: var(--s-5) 0 var(--s-2);
    padding-top: var(--s-4);
    padding-right: calc(var(--s-4) + var(--s-1));
    border-top: 1px solid var(--line);
    font-size: clamp(var(--t-lg), 2.4vw, var(--t-xl));
    line-height: 1.16;
    letter-spacing: -0.022em;
    color: var(--ink);
    scroll-margin-top: var(--s-6);
}

@media (max-width: 767.98px) {
    .blog-body h2 {
        padding-right: 0;
    }
    .blog-heading-anchor {
        display: none;
    }
}

@media (max-width: 479.98px) {
    .blog-body h2 {
        font-size: clamp(var(--t-md), 6.2vw, var(--t-lg));
        line-height: 1.22;
    }
}

.blog-body h3 {
    margin: var(--s-4) 0 var(--s-2);
    font-size: var(--t-md);
    line-height: 1.3;
    color: var(--ink);
    scroll-margin-top: var(--s-6);
}

.blog-heading-anchor {
    position: absolute;
    top: calc(var(--s-4) - var(--s-0));
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    font-weight: 500;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.blog-heading-anchor.is-copied {
    opacity: 1;
    color: var(--accent);
    background: var(--accent-soft);
}

@media (hover: hover) and (pointer: fine) {
    .blog-body h2:hover .blog-heading-anchor,
    .blog-heading-anchor:focus-visible {
        opacity: 1;
        color: var(--accent);
    }
}

.blog-body ul,
.blog-body ol {
    margin: var(--s-3) 0;
    padding-left: var(--s-3);
}

.blog-body li {
    margin: var(--s-1) 0;
    padding-left: var(--s-0);
    line-height: 1.72;
}

.blog-body ul li::marker {
    color: var(--accent);
}

.blog-body ol li::marker {
    color: var(--accent);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.blog-body blockquote {
    padding: var(--s-3) var(--s-4);
    margin: var(--s-4) 0;
    color: var(--ink);
}

@media (max-width: 479.98px) {
    .blog-body blockquote {
        padding: var(--s-3);
    }
}

/* Таблицы в блоге: аккуратный ритм и индикатор горизонтальной прокрутки */
.blog-body .table-scroll {
    position: relative;
    transition: box-shadow var(--transition-fast);
}

.blog-body .table-scroll.is-scrollable:not(.is-scrolled-end) {
    box-shadow: inset -24px 0 24px -20px rgba(22, 21, 19, 0.24);
}

html.dark .blog-body .table-scroll.is-scrollable:not(.is-scrolled-end) {
    box-shadow: inset -24px 0 24px -20px rgba(0, 0, 0, 0.65);
}

.blog-body table th,
.blog-body table td {
    padding: var(--s-2);
    line-height: 1.48;
    font-variant-numeric: tabular-nums;
}

.blog-body .code-header,
.blog-body .code-header + .highlight {
    max-width: none;
    margin-inline: 0;
}

/* Карточка автора внизу статьи */
.blog-author {
    margin-top: var(--s-5);
    padding: var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    box-shadow: var(--shadow-sm);
}

.blog-author__photo {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    line-height: 0;
    border: 1px solid var(--line);
    background: var(--bg-alt);
}

.blog-author__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.blog-author__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
}

.blog-author__name {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: calc(var(--s-1) * -1) 0;
    font-size: var(--t-lg);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ink);
    text-decoration: none;
    transition: color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .blog-author__name:hover { color: var(--accent); }
}

.blog-author__role {
    font-size: var(--t-sm);
    color: var(--muted);
}

.blog-author__bio {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.58;
    color: var(--ink-2);
}

.blog-author__bio a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 4px;
}

.blog-author__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

@media (max-width: 767.98px) {
    .blog-author {
        flex-direction: column;
        padding: var(--s-3);
    }
    .blog-author__photo {
        width: 72px;
        height: 72px;
    }
}

/* Навигация к соседним статьям */
.blog-pager {
    margin-top: var(--s-4);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .blog-pager {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.blog-pager__card {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    text-decoration: none;
    color: var(--ink);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-pager__card--next {
    text-align: right;
    align-items: flex-end;
}

@media (max-width: 767.98px) {
    .blog-pager__card--next {
        text-align: left;
        align-items: flex-start;
    }
}

.blog-pager__card:active {
    background: var(--bg-alt);
    transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
    .blog-pager__card:hover {
        border-color: var(--line-2);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }
    .blog-pager__card:hover .blog-pager__title {
        color: var(--accent);
    }
}

/* === РУССКАЯ ТИПОГРАФИКА НА СМАРТФОНАХ === */
.blog-body,
.markdown,
blockquote {
    hanging-punctuation: first last;
}

@media (max-width: 767.98px) {
    :where(main) p:not(.eyebrow):not(.kicker):not(.section-head__num):not(.hero__lead),
    .markdown li,
    .blog-body li,
    .service-cell__desc,
    .case-card__desc,
    .why__desc,
    .faq-item__a,
    .plan__list li,
    .svc-flow-card__desc,
    .svc-related__desc,
    .about-inspector__desc,
    .about-sim__card-desc,
    .about-sec__box p {
        hyphens: auto;
        -webkit-hyphens: auto;
        hyphenate-limit-chars: 6 3 3;
    }
}

.blog-pager__dir {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.blog-pager__title {
    font-size: var(--t-base);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    transition: color var(--transition-fast);
}

/* Блок Telegram внутри финальной полосы статьи */
.blog-tg-box {
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.blog-tg-box__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.blog-tg-box__text {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-2);
}

.blog-more__meta {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* =====================================================
   РЕДАКЦИОННЫЕ ШОРТКОДЫ БЛОГА (инфодизайн в стиле BRAND.md)
   tldr, compare, dialog, note: поверхность + hairline 1px,
   без толстых цветных левых полос.
   ===================================================== */

/* 1. Врезка «Коротко» (tldr) */
.ed-tldr {
    margin: var(--s-4) 0;
    padding: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.ed-tldr__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
    margin-bottom: var(--s-2);
    padding-bottom: var(--s-1);
    border-bottom: 1px solid var(--line);
}

.ed-tldr__label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.ed-tldr__meta {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.ed-tldr__body,
.ed-note__body,
.ed-compare__body,
.ed-dialog__msg {
    font-size: var(--t-base);
    line-height: 1.65;
    color: var(--ink-2);
}

.ed-tldr__body > *:first-child,
.ed-note__body > *:first-child,
.ed-compare__body > *:first-child,
.ed-dialog__msg > *:first-child {
    margin-top: 0;
}

.ed-tldr__body > *:last-child,
.ed-note__body > *:last-child,
.ed-compare__body > *:last-child,
.ed-dialog__msg > *:last-child {
    margin-bottom: 0;
}

/* 2. Спокойная врезка границ и оговорок (note) */
.ed-note {
    margin: var(--s-4) 0;
    padding: var(--s-3);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.ed-note__label {
    margin-bottom: var(--s-1);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

/* 3. Карточка сравнения «Было / Стало» (compare) */
.ed-compare {
    margin: var(--s-4) 0;
}

.ed-compare__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
}

@media (min-width: 768px) {
    .ed-compare__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ed-compare__col {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.ed-compare__col--before {
    background: var(--bg-alt);
}

.ed-compare__col--after {
    background: var(--bg-elevated);
}

.ed-compare__label {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    background: var(--bg);
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.ed-compare__label--accent {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
    color: var(--accent);
}

.ed-compare__caption {
    margin-top: var(--s-2);
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--muted);
}

/* 4. Оформление переписки (dialog) */
.ed-dialog {
    margin: var(--s-4) 0;
    padding: var(--s-3);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.ed-dialog__head {
    margin-bottom: var(--s-2);
    padding-bottom: var(--s-1);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.ed-dialog__list {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.ed-dialog__turn {
    padding: var(--s-2) var(--s-3);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.ed-dialog__turn--ours {
    background: var(--bg-elevated);
}

.ed-dialog__speaker {
    margin-bottom: var(--s-0);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.ed-dialog__turn--ours .ed-dialog__speaker {
    color: var(--accent);
}

.ed-dialog__note {
    margin-top: var(--s-3);
    padding-top: var(--s-2);
    border-top: 1px solid var(--line);
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
}

@media (max-width: 479.98px) {
    .ed-tldr,
    .ed-note,
    .ed-compare__col,
    .ed-dialog {
        padding: var(--s-2);
    }
    .ed-dialog__turn {
        padding: var(--s-2);
    }
}

/* =====================================================
   ABOUT PAGE (/about/): Personal Corp, 6 AI-ролей,
   симулятор задачи, 7 слоёв защиты и стек
   ===================================================== */

.about-hero {
    padding-block: var(--s-3) var(--s-4);
}

.about-hero .about-hero__title {
    max-width: 24ch;
    font-size: clamp(var(--t-xl), 5.2vw, var(--t-4xl));
    line-height: 1.04;
}

.about-hero .hero__body {
    margin-top: var(--s-3);
    padding-top: var(--s-3);
}

@media (max-width: 479.98px) {
    .about-hero {
        padding-block: var(--s-2) var(--s-4);
    }
    .about-hero .about-hero__title {
        font-size: clamp(var(--t-lg), 8.2vw, var(--t-xl));
        line-height: 1.06;
    }
    .about-hero .hero__body {
        margin-top: var(--s-2);
        padding-top: var(--s-2);
        gap: var(--s-3);
    }
    .about-hero .hero__copy {
        gap: var(--s-2);
    }
}

/* Шапки секций /about/: 1 колонка до 1000px (без дыры над H2 и узких лидов), выравнивание по верху на десктопе */
.about-section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
    align-items: start;
    margin-bottom: var(--s-3);
}

.about-section-head .section-head__lead {
    max-width: 58ch;
}

.about-section-head .section-head__side {
    align-items: flex-start;
    text-align: left;
}

@media (min-width: 1000px) {
    .about-section-head {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: var(--s-4);
        margin-bottom: var(--s-4);
    }
    .about-section-head .section-head__lead {
        max-width: 52ch;
    }
}

.about-hero .hero__facts li {
    animation: hero-rise 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.about-hero .hero__facts li:nth-child(1) { animation-delay: 110ms; }
.about-hero .hero__facts li:nth-child(2) { animation-delay: 165ms; }
.about-hero .hero__facts li:nth-child(3) { animation-delay: 220ms; }
.about-hero .hero__facts li:nth-child(4) { animation-delay: 275ms; }

@keyframes about-frame-reveal {
    from {
        clip-path: inset(0 0 8% 0 round var(--r-lg));
        transform: translateY(10px);
    }
    to {
        clip-path: inset(0 0 0% 0 round var(--r-lg));
        transform: none;
    }
}

@keyframes about-img-settle {
    from { transform: scale(1.045); }
    to { transform: scale(1); }
}

.about-portrait .hero__photo-frame {
    animation: about-frame-reveal 620ms cubic-bezier(0.16, 1, 0.3, 1) 40ms both;
}

.about-portrait .hero__photo-frame img {
    animation: about-img-settle 760ms cubic-bezier(0.16, 1, 0.3, 1) 40ms both;
}

/* Прогресс чтения (MagicUI ScrollProgress у верхней кромки экрана) */
.about-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px; /* raw: тонкая линия прогресса чтения у верхней кромки */
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transform-origin: left center;
    transform: scaleX(0);
    pointer-events: none;
    z-index: 120;
}

.about-portrait__meta {
    margin-top: var(--s-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-3);
    font-size: var(--t-sm);
    color: var(--muted);
    line-height: 1.35;
}

.about-portrait__id {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.about-portrait__id b {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
}

.about-portrait__links .hero__link {
    gap: var(--s-1);
}

.about-portrait__links .hero__link svg {
    flex: none;
    transition: transform var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .about-portrait__links .hero__link:hover svg {
        transform: translate(2px, -2px);
    }
}

.about-anchor {
    scroll-margin-top: calc(var(--about-header-h, var(--header-h)) + var(--s-2));
}

/* --- 1. Интерактивная архитектура Personal Corp --- */
.about-arch {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    align-items: stretch;
}

.about-arch > * {
    min-width: 0;
}

@media (min-width: 1000px) {
    .about-arch {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        gap: var(--s-4);
    }
}

.about-arch__map {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .about-arch__map {
        padding: var(--s-4);
    }
}

.about-arch__map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: 1px solid var(--line);
}

.about-arch__map-label,
.about-arch__map-counter {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

@property --about-beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes about-border-beam {
    to {
        --about-beam-angle: 360deg;
    }
}

.about-arch__tablist {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-arch__map.is-reveal-pending .about-node {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
}

.about-arch__map.is-reveal-pending .about-circuit {
    opacity: 0;
}

.about-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-0);
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.about-node > * {
    position: relative;
    z-index: 1;
}

.about-node:active {
    transform: scale(0.97);
}

.about-node--founder {
    flex-direction: row;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    background: var(--bg-alt);
}

.about-node__icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    color: var(--ink);
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.about-node__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.about-node__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-1);
}

.about-node__badge {
    display: inline-flex;
    align-items: center;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.about-node__head {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-0) var(--s-1);
}

.about-node__code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.about-node__trigger {
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    color: var(--muted);
    text-align: left;
    line-height: 1.3;
}

.about-node__name {
    font-size: var(--t-base);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
}

.about-node__short {
    font-size: var(--t-sm);
    line-height: 1.35;
    color: var(--muted);
}

.about-node.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.about-node.is-active .about-node__name {
    color: var(--bg);
}

.about-node.is-active .about-node__short,
.about-node.is-active .about-node__trigger {
    color: var(--on-invert-muted);
}

.about-node.is-active .about-node__code {
    color: var(--accent-on-invert);
}

.about-node.is-active .about-node__icon {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.about-node.is-active .about-node__badge {
    background: color-mix(in srgb, var(--accent-on-invert) 20%, transparent);
    color: var(--accent-on-invert);
}

html.dark .about-node.is-active {
    background: var(--bg-invert);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    color: var(--on-invert);
}

html.dark .about-node.is-active .about-node__name {
    color: var(--on-invert);
}

/* Тонкий Border Beam по кромке активной карточки (Magic UI pattern, пауза вне экрана) */
@media (min-width: 480px) {
    .about-node.is-active::after {
        content: '';
        position: absolute;
        inset: -1px; /* raw: перекрывает 1px бордер активной карточки */
        border-radius: inherit;
        padding: 1.5px; /* raw: толщина световой обводки Border Beam */
        background: conic-gradient(
            from var(--about-beam-angle),
            transparent 0deg,
            transparent 292deg,
            color-mix(in srgb, var(--accent-on-invert) 35%, transparent) 318deg,
            var(--accent-on-invert) 344deg,
            color-mix(in srgb, var(--accent-on-invert) 58%, var(--on-invert)) 354deg,
            transparent 360deg
        );
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude;
        pointer-events: none;
        animation: about-border-beam 5.6s linear infinite;
    }

    .about-arch__map.is-offscreen .about-node.is-active::after {
        animation-play-state: paused;
    }
}

/* Magic Card spotlight под курсором (только на точных указателях) */
@media (hover: hover) and (pointer: fine) {
    .about-node::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(220px circle at var(--nx, -240px) var(--ny, -240px), color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%);
        opacity: 0;
        transition: opacity var(--transition-med);
        pointer-events: none;
        z-index: 0;
    }

    .about-node.is-active::before {
        background: radial-gradient(240px circle at var(--nx, -240px) var(--ny, -240px), color-mix(in srgb, var(--accent-on-invert) 16%, transparent), transparent 72%);
    }

    .about-node:hover::before {
        opacity: 1;
    }

    .about-node:not(.is-active):hover {
        border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
        background: var(--bg-elevated);
    }

    html.dark .about-node::before {
        background: radial-gradient(220px circle at var(--nx, -240px) var(--ny, -240px), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
    }

    html.dark .about-node:not(.is-active):hover {
        border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
        background: var(--bg-alt);
    }
}

/* Адаптивная SVG-магистраль связей ко всем 6 ролям (desktop >= 1000px) */
.about-circuit {
    display: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.about-circuit__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.about-circuit__track {
    fill: none;
    stroke: var(--line);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.about-circuit__active {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity var(--transition-med);
}

.about-circuit__active.is-active {
    opacity: 0.44;
}

.about-circuit__active--founder.is-active {
    opacity: 0.36;
}

.about-circuit__beam-glow {
    fill: none;
    stroke: var(--accent);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.about-circuit__beam-core {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.about-circuit__beam-head {
    fill: none;
    stroke: var(--accent-hover);
    stroke-width: 3.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

html.dark .about-circuit__beam-head {
    stroke: color-mix(in srgb, var(--accent) 26%, var(--on-invert));
}

.about-circuit__ripple {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.75;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}

.about-circuit__port {
    fill: var(--bg-elevated);
    stroke: var(--line);
    stroke-width: 1.5;
    transition: fill var(--transition-fast), stroke var(--transition-fast);
}

.about-circuit__port.is-active,
.about-circuit__port.is-lit {
    fill: var(--accent);
    stroke: var(--accent);
}

.about-circuit__hub {
    fill: var(--accent);
    stroke: var(--bg-elevated);
    stroke-width: 2;
}

.about-arch__roles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
}

@media (max-width: 999.98px) {
    .about-arch__map {
        padding: var(--s-2);
        gap: var(--s-2);
    }
    .about-arch__map-head {
        padding-bottom: var(--s-1);
    }
    .about-circuit {
        display: none;
    }
    .about-arch__tablist {
        flex-direction: row;
        align-items: center;
        gap: var(--s-1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-right: var(--s-4);
        mask-image: linear-gradient(to right, #000 calc(100% - var(--s-4)), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--s-4)), transparent 100%);
    }
    .about-arch__tablist::-webkit-scrollbar {
        display: none;
    }
    .about-arch__roles {
        display: contents;
    }
    .about-node,
    .about-node--founder {
        flex: 0 0 auto;
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: var(--s-1);
        padding: var(--s-1) var(--s-2);
        border-radius: var(--r-pill);
        white-space: nowrap;
    }
    .about-node__icon {
        width: var(--s-3);
        height: var(--s-3);
    }
    .about-node__icon svg {
        width: 14px; /* raw: компактная иконка внутри пилюли 44px */
        height: 14px; /* raw: компактная иконка внутри пилюли 44px */
    }
    .about-node__body {
        flex-direction: row;
        align-items: center;
        gap: var(--s-1);
    }
    .about-node__head {
        width: auto;
        align-items: center;
    }
    .about-node__short,
    .about-node__trigger,
    .about-node__badge {
        display: none;
    }
    .about-arch__footer {
        padding-top: var(--s-1);
    }
}

@media (min-width: 1000px) {
    .about-arch__tablist {
        gap: var(--s-3);
    }
    .about-circuit {
        display: block;
    }
    .about-arch__roles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--s-3);
        row-gap: var(--s-2);
    }
    .about-node:not(.about-node--founder) {
        padding: var(--s-3) var(--s-2);
        gap: var(--s-1);
    }
}

.about-arch__footer {
    margin-top: auto;
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
}

.about-arch__hint {
    margin: 0;
    font-size: var(--t-xs);
    color: var(--muted);
    line-height: 1.4;
}

.about-arch__pager {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    flex: none;
}

.about-arch__pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.about-arch__pager-btn:active {
    transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
    .about-arch__pager-btn:hover {
        border-color: var(--line-2);
        background: var(--ink);
        color: var(--bg);
    }
}

/* Правая колонка: контрастный инспектор роли (grid-stacking: 0px layout shift) */
.about-inspector {
    position: relative;
    overflow: hidden;
    background: var(--bg-invert);
    color: var(--on-invert);
    border-radius: var(--r-md);
    padding: var(--s-3);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    box-shadow: var(--shadow-md);
}

@media (hover: hover) and (pointer: fine) {
    .about-inspector::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(380px circle at var(--spot-x, 50%) var(--spot-y, 20%), rgba(217, 119, 74, 0.09), transparent 72%);
        opacity: 0;
        transition: opacity 280ms var(--ease-out);
        pointer-events: none;
    }
    .about-inspector:hover::before {
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .about-inspector {
        padding: var(--s-4);
    }
}

html.dark .about-inspector {
    border: 1px solid var(--line);
}

.about-inspector__panel {
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.about-inspector__panel.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.about-inspector__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: 1px solid rgba(246, 244, 239, 0.14);
}

.about-inspector__contour {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-on-invert);
}

.about-inspector__trigger {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--on-invert-muted);
}

.about-inspector__title {
    margin: 0;
    font-size: clamp(var(--t-lg), 2.4vw, var(--t-xl));
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--on-invert);
}

.about-inspector__desc {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--on-invert);
}

.about-inspector__io {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
}

.about-inspector__io-box {
    min-width: 0;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    background: rgba(246, 244, 239, 0.05);
    border: 1px solid rgba(246, 244, 239, 0.14);
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

@media (min-width: 768px) {
    .about-inspector__io-box {
        display: grid;
        grid-template-columns: minmax(0, 0.22fr) minmax(0, 0.78fr);
        gap: var(--s-2);
        align-items: baseline;
    }
}

.about-inspector__io-label,
.about-inspector__guard-head,
.about-inspector__trace-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--on-invert-muted);
}

.about-inspector__io-box p,
.about-inspector__guard p {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--on-invert);
}

.about-inspector__guard {
    padding: var(--s-2);
    border-radius: var(--r-sm);
    background: rgba(217, 119, 74, 0.1);
    border: 1px solid rgba(217, 119, 74, 0.34);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.about-inspector__guard-head {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    color: var(--accent-on-invert);
}

.about-inspector__trace {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.about-code {
    margin: 0;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    background: rgba(15, 15, 14, 0.55);
    border: 1px solid rgba(246, 244, 239, 0.14);
    color: var(--on-invert);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    line-height: 1.55;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .about-code {
        padding: var(--s-2) var(--s-3);
    }
}

.about-code code {
    font-family: inherit;
    font-size: inherit;
    background: transparent;
    padding: 0;
    color: inherit;
}

.about-code--light {
    background: var(--bg-invert);
    border-color: var(--line);
    color: var(--on-invert);
}

.about-inspector__actions {
    margin-top: auto;
    padding-top: var(--s-1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
}

.about-inspector__actions .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
}

.about-inspector__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--on-invert);
    text-decoration: underline;
    text-decoration-color: rgba(246, 244, 239, 0.45);
    text-underline-offset: 4px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .about-inspector__link:hover {
        color: var(--accent-on-invert);
        text-decoration-color: var(--accent-on-invert);
    }
}

/* --- 2. Интерактивный симулятор прохождения задачи --- */
.about-sim {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.about-sim__panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .about-sim__panels {
        padding: var(--s-4);
    }
}

.about-sim__panel {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.about-sim__panel.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.about-sim__panel[hidden] {
    display: none;
}

.about-sim__progress-track {
    width: 100%;
    height: var(--s-0);
    border-radius: var(--r-pill);
    background: var(--bg-alt);
    overflow: hidden;
}

.about-sim__progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform-origin: left center;
    transform: scaleX(0.25);
    transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-sim__steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-1);
}

@media (min-width: 768px) {
    .about-sim__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s-2);
    }
}

@media (min-width: 1000px) {
    .about-sim__steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.about-sim__step-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-0);
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-2);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.about-sim__step-btn:active {
    transform: scale(0.97);
}

.about-sim__step-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-1);
}

.about-sim__step-num {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.about-sim__actor-pill {
    display: inline-flex;
    align-items: center;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 767.98px) {
    .about-sim__steps {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--s-1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-right: var(--s-4);
        mask-image: linear-gradient(to right, #000 calc(100% - var(--s-4)), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--s-4)), transparent 100%);
    }
    .about-sim__steps::-webkit-scrollbar {
        display: none;
    }
    .about-sim__step-btn {
        flex: 0 0 auto;
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: var(--s-1);
        padding: var(--s-1) var(--s-2);
        border-radius: var(--r-pill);
        white-space: nowrap;
    }
    .about-sim__step-meta {
        width: auto;
    }
    .about-sim__actor-pill {
        display: none;
    }
}

.about-sim__actor-pill--human {
    background: var(--accent-soft);
    color: var(--accent);
}

.about-sim__actor-pill--ai {
    background: var(--bg-alt);
    color: var(--ink-2);
}

.about-sim__step-name {
    font-size: var(--t-sm);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.about-sim__step-btn.is-done {
    border-color: var(--line);
    background: var(--bg-alt);
}

.about-sim__step-btn.is-done .about-sim__step-num {
    color: var(--accent);
}

.about-sim__step-btn.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.about-sim__step-btn.is-active .about-sim__step-name {
    color: var(--bg);
}

.about-sim__step-btn.is-active .about-sim__step-num {
    color: var(--accent-on-invert);
}

.about-sim__step-btn.is-active .about-sim__actor-pill--human {
    background: rgba(217, 119, 74, 0.22);
    color: var(--accent-on-invert);
}

.about-sim__step-btn.is-active .about-sim__actor-pill--ai {
    background: rgba(246, 244, 239, 0.14);
    color: var(--on-invert);
}

html.dark .about-sim__step-btn.is-active {
    background: var(--bg-invert);
    border-color: var(--accent);
    color: var(--on-invert);
}

html.dark .about-sim__step-btn.is-active .about-sim__step-name {
    color: var(--on-invert);
}

@media (hover: hover) and (pointer: fine) {
    .about-sim__step-btn:not(.is-active):hover {
        border-color: var(--line-2);
    }
}

.about-sim__stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border-radius: var(--r-md);
}

.about-sim__card {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    padding: var(--s-3);
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.about-sim__panel.is-active .about-sim__card.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.about-sim__card[hidden] {
    display: none;
}

.about-sim__card > * {
    min-width: 0;
}

@media (min-width: 1000px) {
    .about-sim__card {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: var(--s-4);
        padding: var(--s-4);
    }
}

.about-sim__card-main,
.about-sim__card-side {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.about-sim__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-2);
}

.about-sim__actor-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--s-0) var(--s-2);
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
}

.about-sim__actor-tag--human {
    background: var(--accent-soft);
    color: var(--accent);
}

.about-sim__actor-tag--ai {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    color: var(--ink);
}

.about-sim__time,
.about-sim__index {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.about-sim__card-title {
    margin: 0;
    font-size: clamp(var(--t-md), 2vw, var(--t-lg));
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
}

.about-sim__card-desc {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
}

.about-sim__artifact {
    margin-top: auto;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.about-sim__artifact-label,
.about-sim__log-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.about-sim__artifact p {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.45;
    color: var(--ink);
}

.about-sim__log {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    flex: 1;
}

.about-sim__log .about-code {
    flex: 1;
}

.about-sim__nav {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.about-sim__nav .btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.about-sim__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
}

.about-sim__summary-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3) var(--s-4);
}

.about-sim__summary-item {
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
}

.about-sim__summary-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-sim__summary-item strong {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
}

.about-sim__summary-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
}

/* --- 3. Сравнение форматов --- */
.about-compare {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.about-compare .compare-table[hidden] {
    display: none;
}

/* --- 4. Интерактивные 7 слоёв безопасности --- */
.about-sec {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    align-items: start;
}

.about-sec > * {
    min-width: 0;
}

@media (min-width: 1000px) {
    .about-sec {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        gap: var(--s-4);
    }
}

.about-sec__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.about-sec__rail {
    display: none;
}

@media (min-width: 1000px) {
    .about-sec__list {
        padding-left: var(--s-2);
    }
    .about-sec__rail {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 2px; /* raw: тонкий трек глубины слоёв */
        border-radius: var(--r-pill);
        background: var(--line);
        pointer-events: none;
    }
    .about-sec__rail-thumb {
        display: block;
        width: 100%;
        height: var(--s-5);
        border-radius: var(--r-pill);
        background: var(--accent);
        transform-origin: top center;
        transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
    }
}

.about-sec__btn {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--s-0) var(--s-2);
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 480px) {
    .about-sec__btn {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
}

.about-sec__btn:active {
    transform: scale(0.98);
}

.about-sec__num {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.about-sec__name {
    font-size: var(--t-base);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.about-sec__tag {
    grid-column: 2;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    justify-self: start;
}

@media (min-width: 480px) {
    .about-sec__tag {
        grid-column: auto;
        justify-self: end;
    }
}

@media (max-width: 999.98px) {
    .about-sec__list {
        flex-direction: row;
        align-items: center;
        gap: var(--s-1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-right: var(--s-4);
        mask-image: linear-gradient(to right, #000 calc(100% - var(--s-4)), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--s-4)), transparent 100%);
    }
    .about-sec__list::-webkit-scrollbar {
        display: none;
    }
    .about-sec__btn {
        flex: 0 0 auto;
        width: auto;
        display: inline-flex;
        align-items: center;
        gap: var(--s-1);
        min-height: 44px;
        padding: var(--s-1) var(--s-2);
        border-radius: var(--r-pill);
        white-space: nowrap;
    }
    .about-sec__tag {
        display: none;
    }
}

.about-sec__btn.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.about-sec__btn.is-active .about-sec__name {
    color: var(--bg);
}

.about-sec__btn.is-active .about-sec__num {
    color: var(--accent-on-invert);
}

.about-sec__btn.is-active .about-sec__tag {
    background: rgba(246, 244, 239, 0.12);
    border-color: rgba(246, 244, 239, 0.22);
    color: var(--on-invert);
}

html.dark .about-sec__btn.is-active {
    background: var(--bg-invert);
    border-color: var(--accent);
    color: var(--on-invert);
}

html.dark .about-sec__btn.is-active .about-sec__name {
    color: var(--on-invert);
}

@media (hover: hover) and (pointer: fine) {
    .about-sec__btn:not(.is-active):hover {
        border-color: var(--line-2);
    }
}

.about-sec__detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .about-sec__detail {
        padding: var(--s-4);
    }
}

.about-sec__panel {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.about-sec__panel.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.about-sec__panel[hidden] {
    display: none;
}

.about-sec__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: 1px solid var(--line);
}

.about-sec__badge {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.about-sec__code-tag {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--muted);
}

.about-sec__title {
    margin: 0;
    font-size: clamp(var(--t-md), 2.1vw, var(--t-lg));
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
}

.about-sec__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
}

.about-sec__box {
    min-width: 0;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    background: var(--bg);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

@media (min-width: 768px) {
    .about-sec__box {
        display: grid;
        grid-template-columns: minmax(0, 0.26fr) minmax(0, 0.74fr);
        gap: var(--s-2);
        align-items: baseline;
    }
}

.about-sec__box--accent {
    background: var(--bg-alt);
}

.about-sec__box-label,
.about-sec__code-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-sec__box--accent .about-sec__box-label {
    color: var(--accent);
}

.about-sec__box p {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.5;
    color: var(--ink-2);
}

.about-sec__code-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.about-sec__foot {
    padding-top: var(--s-1);
}

/* --- 5. Стек с фильтрацией + хронология 2015–2026 --- */
.about-stack {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.about-stack__cell[hidden] {
    display: none;
}

.about-stack__cell.is-span-full {
    grid-column: 1 / -1;
}

.about-stack__tag {
    display: inline-flex;
    align-self: flex-start;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-timeline {
    margin-top: clamp(var(--s-5), 6vw, var(--s-6));
    padding-top: clamp(var(--s-4), 5vw, var(--s-5));
    border-top: 1px solid var(--line);
}

.about-timeline__year {
    font-family: var(--font-mono);
    font-size: var(--t-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* --- 6. Юридический спойлер в Lead Band --- */
.about-legal {
    margin-top: var(--s-3);
    border-top: 1px solid var(--line);
    padding-top: var(--s-2);
}

.about-legal__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    min-height: 44px;
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.about-legal__summary::-webkit-details-marker {
    display: none;
}

.about-legal[open] .faq-item__icon {
    transform: rotate(45deg);
}

.about-legal__body {
    padding-top: var(--s-2);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.about-legal__body p {
    margin: 0;
    font-size: var(--t-base);
    line-height: 1.55;
    color: var(--ink-3);
}

@media (max-width: 479.98px) {
    .about-arch__map,
    .about-inspector,
    .about-sim__panels,
    .about-sim__card,
    .about-sec__detail {
        padding: var(--s-2);
    }
    .about-sim__nav .btn,
    .about-sim__summary-actions .btn,
    .about-inspector__actions .btn {
        width: 100%;
    }
}

/* =====================================================
   HOME INTERACTIVE (agn-xedi): Motion, микродемо, трасса шагов, телеметрия
   ===================================================== */

/* 1. Hero: акцентный shimmer, magnetic CTA, 3D-tilt портрета, живая полоска телеметрии */
@keyframes home-accent-sheen {
    0% { background-position: 180% 0; }
    100% { background-position: -60% 0; }
}

.home-accent {
    background-image: linear-gradient(
        105deg,
        var(--accent) 0%,
        var(--accent) 42%,
        color-mix(in srgb, var(--accent) 45%, var(--on-invert)) 50%,
        var(--accent) 58%,
        var(--accent) 100%
    );
    background-size: 240% 100%;
    background-position: 180% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: home-accent-sheen 1.25s var(--ease-out) 0.25s 1 forwards;
}

.home-cta-primary {
    position: relative;
    overflow: hidden;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .home-cta-primary::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(
            110deg,
            transparent 28%,
            color-mix(in srgb, var(--on-accent) 26%, transparent) 50%,
            transparent 72%
        );
        transform: translate3d(-120%, 0, 0);
        transition: transform 620ms var(--ease-out);
        pointer-events: none;
    }
    .home-cta-primary:hover::after {
        transform: translate3d(120%, 0, 0);
    }
}

.home-portrait-frame {
    transform-style: preserve-3d;
    will-change: transform;
}

.home-portrait-frame img {
    will-change: transform;
}

.home-portrait-frame__glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        280px circle at var(--gx, 50%) var(--gy, 30%),
        color-mix(in srgb, var(--on-invert) 18%, transparent),
        transparent 68%
    );
    opacity: 0;
    transition: opacity var(--transition-med);
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .home-portrait-frame:hover .home-portrait-frame__glare {
        opacity: 1;
    }
}

.home-hero-pulse[hidden] {
    display: none;
}

.home-hero-pulse {
    margin-top: var(--s-2);
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    max-width: 100%;
    padding: var(--s-0) var(--s-2);
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    line-height: 1.35;
    color: var(--muted);
    overflow: hidden;
}

.home-hero-pulse__tag {
    color: var(--ink);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: none;
}

.home-hero-pulse__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 2. Сетка услуг: Magic Card Border-Glow + 6 SVG-микродемо */
.home-svc-cell {
    overflow: hidden;
}

.home-svc-cell > * {
    position: relative;
    z-index: 1;
}

.home-action-arrow {
    flex: none;
    margin-left: var(--s-0);
    transition: transform var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .home-svc-cell::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(
            300px circle at var(--sx, -320px) var(--sy, -320px),
            color-mix(in srgb, var(--accent) 9%, transparent),
            transparent 72%
        );
        opacity: 0;
        transition: opacity var(--transition-med);
        pointer-events: none;
        z-index: 0;
    }
    .home-svc-cell::after {
        content: '';
        position: absolute;
        inset: 0;
        padding: 1.5px; /* raw: толщина световой кромки Magic Card */
        background: radial-gradient(
            220px circle at var(--sx, -320px) var(--sy, -320px),
            color-mix(in srgb, var(--accent) 68%, transparent),
            transparent 70%
        );
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude;
        opacity: 0;
        transition: opacity var(--transition-med);
        pointer-events: none;
        z-index: 2;
    }
    html.dark .home-svc-cell::before {
        background: radial-gradient(
            300px circle at var(--sx, -320px) var(--sy, -320px),
            color-mix(in srgb, var(--accent) 14%, transparent),
            transparent 72%
        );
    }
    .home-services.is-pointer-in .home-svc-cell::before,
    .home-services.is-pointer-in .home-svc-cell::after {
        opacity: 1;
    }
    .home-svc-cell:hover {
        background: var(--bg-elevated);
    }
    .home-svc-cell:hover .home-action-arrow,
    .home-cases .case-card:hover .home-action-arrow {
        transform: translate3d(4px, 0, 0);
    }
}

.home-services.is-reveal-pending .home-svc-cell {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
}

.svc-demo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-1);
    min-height: 44px;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--bg-alt);
    font-family: var(--font-mono);
    font-size: var(--t-2xs);
    line-height: 1;
    color: var(--muted);
    overflow: hidden;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

html.dark .svc-demo {
    background: var(--bg);
}

@media (hover: hover) and (pointer: fine) {
    .home-svc-cell:hover .svc-demo {
        border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    }
}

/* Микродемо 1: мини-диалог AI-агента */
.svc-demo__msg {
    display: inline-flex;
    align-items: center;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    white-space: nowrap;
}

.svc-demo__msg--in {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    color: var(--ink-3);
}

.svc-demo__msg--out {
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
    color: var(--accent);
    font-weight: 600;
    transition: transform var(--transition-med);
}

@media (hover: hover) and (pointer: fine) {
    .home-svc-cell:hover .svc-demo__msg--out {
        transform: translate3d(-2px, -1px, 0);
    }
}

/* Микродемо 2 и 3: пайплайн с SVG-лучом */
.svc-demo--pipe {
    gap: var(--s-0);
}

.svc-demo__node {
    flex: none;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink-3);
    font-weight: 500;
}

.svc-demo__node--accent {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.svc-demo__wire {
    flex: 1;
    min-width: 14px; /* raw: минимальный отрезок шины между узлами */
    height: 10px; /* raw: компактная высота SVG-шины микродемо */
    display: block;
}

.svc-demo__track {
    fill: none;
    stroke: var(--line);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.svc-demo__beam {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 28 110;
    stroke-dashoffset: 28;
    opacity: 0;
}

/* Микродемо 4: GEO AI-цитата */
.svc-demo--geo {
    gap: var(--s-1);
}

.svc-demo__geo-q {
    flex: none;
    color: var(--muted);
}

.svc-demo__geo-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    min-width: 24px; /* raw: компактные полосы текста в GEO-демо */
}

.svc-demo__geo-bars i {
    display: block;
    height: 3px; /* raw: тонкий скелет строки в микродемо */
    border-radius: var(--r-pill);
    background: var(--line);
}

.svc-demo__geo-bars i:last-child {
    width: 68%;
}

.svc-demo__cite {
    flex: none;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    transition: transform var(--transition-med);
}

@media (hover: hover) and (pointer: fine) {
    .home-svc-cell:hover .svc-demo__cite {
        transform: scale(1.04);
    }
}

/* Микродемо 5: спарклайн рекламы */
.svc-demo--ads {
    gap: var(--s-2);
}

.svc-demo__spark {
    flex: 1;
    width: 100%;
    height: 26px; /* raw: компактная высота спарклайна */
    display: block;
    overflow: visible;
}

.svc-demo__spark-area {
    fill: color-mix(in srgb, var(--accent) 14%, transparent);
}

.svc-demo__spark-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100 100;
    stroke-dashoffset: 0;
}

.svc-demo__spark-dot {
    fill: var(--accent);
    stroke: var(--bg-elevated);
    stroke-width: 1.5;
}

.svc-demo__pill {
    flex: none;
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Микродемо 6: каркас сайта */
.svc-demo--web {
    gap: var(--s-2);
}

.svc-demo__browser {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-0);
    padding: var(--s-0) var(--s-1);
    border-radius: var(--r-xs);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
}

.svc-demo__dots {
    display: inline-flex;
    gap: var(--s-0);
}

.svc-demo__dots i {
    width: 4px; /* raw: микро-точка окна браузера */
    height: 4px; /* raw: микро-точка окна браузера */
    border-radius: 50%;
    background: var(--line);
}

.svc-demo__dots i:first-child {
    background: var(--accent);
}

.svc-demo__blocks {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: var(--s-0);
}

.svc-demo__blocks i {
    display: block;
    height: 10px; /* raw: мини-блок макета внутри браузера */
    border-radius: 2px; /* raw: скругление мини-блока макета */
    background: var(--bg-alt);
    border: 1px solid var(--line);
    transition: transform var(--transition-med), border-color var(--transition-fast);
}

html.dark .svc-demo__blocks i {
    background: var(--bg);
}

@media (hover: hover) and (pointer: fine) {
    .home-svc-cell:hover .svc-demo__blocks i:first-child {
        border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
        transform: translate3d(0, -1px, 0);
    }
    .home-svc-cell:hover .svc-demo__blocks i:last-child {
        transform: translate3d(0, 1px, 0);
    }
}

/* 3. Трасса шагов процесса (1 -> 2 -> 3 -> 4) */
.home-process-wrap {
    position: relative;
}

.home-process__rail {
    display: none;
}

@media (min-width: 1000px) {
    .home-process__rail {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px; /* raw: тонкая магистраль прогресса над шагами */
        background: var(--line);
        pointer-events: none;
        z-index: 2;
    }
    .home-process__fill {
        display: block;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 68%, var(--on-invert)));
        transform-origin: left center;
        transform: scaleX(0);
    }
    .home-process .process__step {
        position: relative;
        border-top-color: transparent;
        transition: opacity var(--transition-fast);
    }
    .home-process .process__step::before {
        content: '';
        position: absolute;
        top: -4px; /* raw: центрирует узел 10px на линии 2px */
        left: 0;
        width: 10px; /* raw: узел шага на линии прогресса */
        height: 10px; /* raw: узел шага на линии прогресса */
        border-radius: 50%;
        background: var(--bg-alt);
        border: 2px solid var(--line);
        z-index: 3;
        transition: background-color var(--transition-med), border-color var(--transition-med), transform var(--transition-med);
    }
    .home-process .process__step.is-reached::before {
        background: var(--accent);
        border-color: var(--accent);
    }
    .home-process .process__step.is-current::before {
        transform: scale(1.25);
    }
    .home-process .process__num {
        display: inline-block;
        width: fit-content;
        transition: transform var(--transition-med);
    }
    .home-process .process__time {
        transition: color var(--transition-fast);
    }
    .home-process .process__step.is-current .process__time {
        color: var(--accent);
    }
}

.home-process-wrap.is-reveal-pending .process__step {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
}

/* 4. Работаете напрямую: скользящий вертикальный индикатор вдоль списка */
.home-why-wrap {
    position: relative;
}

.home-why__indicator {
    display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
    .home-why-wrap {
        padding-left: var(--s-3);
    }
    .home-why__indicator {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px; /* raw: тонкий линейный маркер активного пункта */
        background: var(--accent);
        border-radius: var(--r-pill);
        clip-path: inset(0px 0px 100% 0px round 999px);
        opacity: 0;
        transition: clip-path 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity var(--transition-fast);
        pointer-events: none;
    }
    .home-why-wrap .why__item {
        transition: opacity var(--transition-fast);
    }
    .home-why-wrap .why__title {
        transition: color var(--transition-fast);
    }
    .home-why-wrap .why__item.is-active .why__title {
        color: var(--accent);
    }
}

/* 4b. Панель Live-метрик с Border Beam */
.live-stats__panel {
    position: relative;
    padding: var(--s-4);
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 767.98px) {
    .live-stats__panel {
        padding: var(--s-3);
    }
}

@media (min-width: 480px) {
    .live-stats__panel::after {
        content: '';
        position: absolute;
        inset: -1px; /* raw: перекрывает 1px бордер панели телеметрии */
        border-radius: inherit;
        padding: 1.5px; /* raw: толщина световой обводки Border Beam */
        background: conic-gradient(
            from var(--about-beam-angle),
            transparent 0deg,
            transparent 296deg,
            color-mix(in srgb, var(--accent) 32%, transparent) 320deg,
            var(--accent) 345deg,
            color-mix(in srgb, var(--accent) 55%, var(--on-invert)) 354deg,
            transparent 360deg
        );
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude;
        pointer-events: none;
        animation: about-border-beam 6.4s linear infinite;
    }
    .live-stats.is-offscreen .live-stats__panel::after {
        animation-play-state: paused;
    }
}

.live-stats .stats__num {
    font-variant-numeric: tabular-nums;
}

/* 5. Кейсы: каскадный вход + Magic Card spotlight + стрелка */
.home-cases.is-reveal-pending .case-card {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
}

.home-cases .case-card {
    position: relative;
}

.home-cases .case-card__cta {
    display: inline-flex;
    align-items: center;
}

@media (hover: hover) and (pointer: fine) {
    .home-cases .case-card::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(
            320px circle at var(--cx, -340px) var(--cy, -340px),
            color-mix(in srgb, var(--accent) 10%, transparent),
            transparent 70%
        );
        opacity: 0;
        transition: opacity var(--transition-med);
        pointer-events: none;
        z-index: 2;
    }
    html.dark .home-cases .case-card::before {
        background: radial-gradient(
            320px circle at var(--cx, -340px) var(--cy, -340px),
            color-mix(in srgb, var(--accent) 14%, transparent),
            transparent 70%
        );
    }
    .home-cases .case-card:hover::before {
        opacity: 1;
    }
}

/* 5b. Блог: скользящая GPU-подложка на clip-path */
.home-posts-wrap {
    position: relative;
}

.home-posts__glider {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .home-posts__glider {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 0;
        background: var(--bg-alt);
        opacity: 0;
        pointer-events: none;
        transition: clip-path 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity var(--transition-fast);
    }
    .home-posts-wrap .post-list {
        position: relative;
        z-index: 1;
    }
    .home-posts-wrap.has-glider .post-list li:hover {
        background: transparent;
    }
    .home-posts-wrap .post-list li:hover .date,
    .home-posts-wrap .post-list li:hover .reading-time {
        color: var(--accent);
    }
}

/* 5c. Форма заявки: пробуждение Border Beam при фокусе */
.home-lead-form .lf-embed {
    position: relative;
}

@media (min-width: 480px) {
    .home-lead-form .lf-embed::after {
        content: '';
        position: absolute;
        inset: -1px; /* raw: перекрывает 1px бордер карточки формы */
        border-radius: inherit;
        padding: 1.5px; /* raw: толщина световой обводки Border Beam при фокусе */
        background: conic-gradient(
            from var(--about-beam-angle),
            transparent 0deg,
            transparent 292deg,
            color-mix(in srgb, var(--accent) 34%, transparent) 318deg,
            var(--accent) 344deg,
            color-mix(in srgb, var(--accent) 55%, var(--on-invert)) 354deg,
            transparent 360deg
        );
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude;
        opacity: 0;
        transition: opacity var(--transition-med);
        pointer-events: none;
        animation: about-border-beam 5.2s linear infinite;
        animation-play-state: paused;
    }
    .home-lead-form .lf-embed:focus-within::after {
        opacity: 1;
        animation-play-state: running;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-circuit__beams,
    .about-circuit__ripple,
    .about-node.is-active::after,
    .live-stats__panel::after,
    .home-lead-form .lf-embed::after,
    .home-posts__glider,
    .home-why__indicator,
    .svc-demo__beam {
        display: none;
    }
    .home-accent {
        animation: none !important;
        background-image: none;
        color: var(--accent);
    }
    .about-arch__map.is-reveal-pending .about-node,
    .about-arch__map.is-reveal-pending .about-circuit,
    .home-services.is-reveal-pending .home-svc-cell,
    .home-process-wrap.is-reveal-pending .process__step,
    .home-cases.is-reveal-pending .case-card {
        opacity: 1;
        transform: none;
    }
    .home-process__fill {
        transform: scaleX(1);
    }
    .about-hero .hero__facts li,
    .about-portrait .hero__photo-frame,
    .about-portrait .hero__photo-frame img {
        animation: none !important;
    }
    .about-scroll-progress,
    .about-sim__progress-fill,
    .about-sec__rail-thumb,
    .about-node,
    .about-node::before,
    .about-node__icon,
    .about-arch__pager-btn,
    .about-inspector::before,
    .about-sim__step-btn,
    .about-sec__btn,
    .about-circuit__active,
    .about-circuit__port,
    .about-portrait__links .hero__link svg,
    .home-cta-primary::after,
    .home-action-arrow,
    .home-svc-cell::before,
    .home-svc-cell::after,
    .home-cases .case-card::before,
    .home-portrait-frame__glare {
        transition: none !important;
    }
}
