/* ══════════════════════════════════════
   OmniSolver Code — Landing Page Styles
   Тёмная тема, звёзды/искорки, code aesthetic
   ══════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg: #06070c;
    --bg-card: #0c0d17;
    --bg-card-hover: #13152a;
    --bg-section-dark: #040510;
    --border: #191b30;
    --border-light: #262842;

    --text: #e8e8f4;
    --text-secondary: #9294b8;
    --text-muted: #8488ad;  /* было #585a82 (3.07:1, FAIL); ~5.2:1 на тёмном фоне — WCAG AA */

    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5541d9;
    --primary-glow: rgba(108, 92, 231, 0.25);

    --accent: #00cec9;
    --accent-light: #55efc4;
    --accent-glow: rgba(0, 206, 201, 0.2);

    --gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
    --gradient-text: linear-gradient(135deg, #a29bfe, #55efc4);
    --gradient-card: linear-gradient(145deg, rgba(108,92,231,0.08), rgba(0,206,201,0.05));

    --code-bg: #080914;
    --code-border: #191b30;

    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;

    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(108, 92, 231, 0.12);

    --transition: 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --container: 1200px;

    --font-code: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ── A11y: видимый фокус для клавиатурной навигации (WCAG 2.4.7).
   :focus-visible срабатывает ТОЛЬКО при навигации с клавиатуры — мышиные клики
   рамку не показывают, так что для обычных юзеров вид не меняется. ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}
/* Skip-link: видна только при фокусе с клавиатуры (пропустить навигацию) */
.skip-link {
    position: absolute;
    left: -9999px; top: 0;
    z-index: 100000;
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ── Minimalist scrollbar ── */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 92, 231, 0.4) transparent;
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.5), rgba(0, 206, 201, 0.5));
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.8), rgba(0, 206, 201, 0.8));
    background-clip: padding-box;
    border: 2px solid transparent;
}
::-webkit-scrollbar-corner { background: transparent; }
body.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.35), rgba(0, 206, 201, 0.35));
    background-clip: padding-box;
    border: 2px solid transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Background Effects ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(108, 92, 231, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

/* 2026-05-12: декорации фона сильно ослаблены — спокойный официальный тон.
   Раньше: 3 крупных glow-облака с blur(140px) + анимации float + canvas с
   частицами. Это превращало лендинг в «AI-шоу». Сейчас: один статичный
   очень мягкий градиент сверху, без движения, без частиц. */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(180px);
    pointer-events: none;
    z-index: 0;
    /* @media prefers-reduced-motion respected — no animation by default now */
}

.bg-glow-1 {
    width: 700px;
    height: 700px;
    background: rgba(108, 92, 231, 0.05);
    top: -300px;
    right: -200px;
}

/* Дополнительные glow-облака отключены ради спокойного фона. */
.bg-glow-2,
.bg-glow-3 { display: none !important; }

/* Particles-canvas полностью отключён. Был визуальным шумом. */
#particles-canvas { display: none !important; }

/* ── Container ── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.container-sm {
    max-width: 800px;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 0;
    background: rgba(6, 7, 12, 0.8);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border-bottom: 1px solid rgba(108, 92, 231, 0.08);
    transition: var(--transition);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.nav-logo-icon {
    flex-shrink: 0;
}

.nav-logo-accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text);
}

/* Nav support button */
.nav-support-wrap {
    position: relative;
}
.nav-support-popup {
    position: absolute;
    top: 100%;
    right: -40px;
    margin-top: 12px;
    width: 280px;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border);
    border-radius: 16px;
    z-index: 9999;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    animation: supportPopupIn 0.25s ease-out;
    overflow: hidden;
}
@keyframes supportPopupIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.support-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.support-popup-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.support-popup-close:hover { color: var(--text); }
.support-popup-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.support-popup-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary, #7364f5);
}
.support-popup-avatar-fallback {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7364f5, #10c4d6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    border: 3px solid var(--primary, #7364f5);
}
.support-popup-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-top: 4px;
}
.support-popup-username {
    font-size: 13px;
    color: var(--text-secondary);
}
.support-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: #2AABEE;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.support-popup-btn:hover { background: #1e96d1; }
.support-popup-desc {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    margin: 2px 0;
}

#nav-auth {
    margin-left: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 178px;
    min-height: 42px;
    justify-content: flex-end;
}

#nav-auth > * {
    transition: opacity 180ms ease, transform 180ms ease;
}

.nav-auth-hidden {
    display: none !important;
}

.nav-auth-flex {
    display: flex !important;
}

html:not([data-nav-auth-ready="1"]) #nav-auth > * {
    opacity: 0;
    transform: translateY(-2px);
    pointer-events: none;
}

.nav-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px 0 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
    transition: var(--transition);
}

.nav-user-badge:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.nav-user-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-sub-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.nav-logo-img {
    border-radius: 6px;
    flex-shrink: 0;
}

.nav-admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}
.nav-admin-link svg {
    width: 18px;
    height: 18px;
}

.nav-admin-link:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    color: var(--text);
}

.nav-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.nav-logout-btn svg {
    width: 18px;
    height: 18px;
}

.nav-logout-btn:hover {
    border-color: #f87171;
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.btn-primary:hover {
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.45);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(108, 92, 231, 0.3);
}

.btn-ghost {
    background: rgba(108, 92, 231, 0.06);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: rgba(108, 92, 231, 0.12);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Burger ── */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-burger.active span:nth-child(2) {
    opacity: 0;
}

.nav-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(9, 9, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 99;
    border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 16px;
    color: var(--text-secondary);
    padding: 8px 0;
}

/* ── Hero (legacy — overridden by HERO REDESIGN 2026-06 block below) ── */
/* Do not edit these; the redesign block at end-of-file takes precedence. */
.hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 100px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.18);
    font-size: 13px;
    color: var(--primary-light);
    margin-bottom: 28px;
    font-weight: 500;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(34px, 6vw, 60px);
    font-weight: 800;
    line-height: 1.06;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* ── Code Preview ── */
.hero-code-preview {
    max-width: 680px;
    margin: 0 auto 48px;
}

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    text-align: left;
    transition: var(--transition);
}

.code-window:hover {
    box-shadow: var(--shadow-lg), 0 0 80px rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.2);
}

.code-window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--code-border);
}

.code-window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-window-title {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.code-window-body {
    padding: 20px;
    font-family: var(--font-code);
    font-size: 13px;
    line-height: 1.7;
}

.code-chat-msg {
    margin-bottom: 16px;
}

.code-chat-msg:last-child {
    margin-bottom: 0;
}

.code-chat-role {
    font-weight: 600;
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
}

.code-chat-user .code-chat-role {
    color: var(--accent-light);
}

.code-chat-ai .code-chat-role {
    color: var(--primary-light);
}

.code-chat-user {
    color: var(--text-secondary);
    font-size: 13px;
}

.code-block-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 14px;
    overflow-x: auto;
}

.code-block {
    margin: 0;
    font-family: var(--font-code);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text);
}

.code-block .kw { color: #c792ea; }
.code-block .fn { color: #82aaff; }
.code-block .str { color: #c3e88d; }
.code-block .lib { color: #ffcb6b; }
.code-block .cm { color: #546e7a; }

/* ── Hero Stats ── */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-number {
    font-family: 'Sora', 'DM Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -0.02em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
    align-self: center;
}

/* ── Sections ── */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.section-dark {
    /* No overlay — shares the body background so sections merge seamlessly */
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    background: rgba(115, 100, 245, 0.1);
    border: 1px solid rgba(115, 100, 245, 0.15);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Steps ── */
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    transition: var(--transition);
}

.step:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: inline-block;
}

/* ═══════════════════════════════════
   Step icon wrap — shared container
   ═══════════════════════════════════ */
.step-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════
   Step icon scenes — minimal SVG style
   ═══════════════════════════════════ */
.anim-chat-scene,
.anim-bolt-scene,
.anim-rocket-scene {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bubble,
.bolt-emoji,
.rocket-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #7364f5);
    position: relative;
    z-index: 3;
}
.chat-bubble svg,
.bolt-emoji svg,
.rocket-emoji svg {
    stroke: var(--primary, #7364f5);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-bubble { animation: stepFloat 3s ease-in-out infinite; }
.bolt-emoji  { animation: stepPulse 2.5s ease-in-out infinite; }
.rocket-emoji { animation: stepFloat 3s ease-in-out infinite 0.3s; }

@keyframes stepFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes stepPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(115, 100, 245, 0.3)); }
}

/* Typing dots — subtle pulsing */
.chat-dot {
    position: absolute;
    bottom: 16px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary, #7364f5);
    opacity: 0;
    animation: stepDots 2.5s ease infinite;
}
.cd1 { left: 28px; animation-delay: 0s; }
.cd2 { left: 36px; animation-delay: 0.2s; }
.cd3 { left: 44px; animation-delay: 0.4s; }
@keyframes stepDots {
    0%, 20% { opacity: 0; transform: scale(0); }
    30% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1); }
    60% { opacity: 0; transform: scale(0); }
    100% { opacity: 0; }
}

/* Energy flow between steps */
.step-arrow {
    position: relative;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}
.energy-flow {
    position: relative;
    width: 40px;
    height: 4px;
}
.energy-dot {
    position: absolute;
    top: -1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary, #7364f5);
    box-shadow: 0 0 6px var(--primary, #7364f5);
    animation: energyMove 2s ease-in-out infinite;
}
.ed1 { animation-delay: 0s; }
.ed2 { animation-delay: 0.35s; }
.ed3 { animation-delay: 0.7s; }
.ef2 .energy-dot {
    background: var(--accent, #10c4d6);
    box-shadow: 0 0 6px var(--accent, #10c4d6);
}
@keyframes energyMove {
    0% { left: -4px; opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { left: 38px; opacity: 0; }
}

/* Hide old flame/spark/ring/glow elements */
.bolt-ring, .spark, .bolt-glow,
.flame, .rocket-glow { display: none; }

.step h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* old step-arrow overridden above */

/* ── Features Grid ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 30px;
    background: rgba(15, 17, 28, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
body.light-theme .feature-card {
    background: rgba(255, 255, 255, 0.72);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
    border-radius: 2px 2px 0 0;
}

.feature-card:hover {
    border-color: rgba(108, 92, 231, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.18);
    background: rgba(22, 25, 40, 0.62);
}
body.light-theme .feature-card:hover {
    background: rgba(255, 255, 255, 0.82);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(115, 100, 245, 0.08);
    color: var(--primary, #7364f5);
}
.feature-icon svg {
    stroke: var(--primary, #7364f5);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Feature icon hover glow */
.feature-card:hover .feature-icon {
    background: rgba(115, 100, 245, 0.14);
    box-shadow: 0 0 20px rgba(115, 100, 245, 0.15);
}

/* Subtle SVG animations — minimal & modern */
.fi-pencil { animation: icoFloat 3s ease-in-out infinite; }
.fi-wrench { animation: icoRotate 4s ease-in-out infinite; }
.fi-bug    { animation: icoPulse 2.5s ease-in-out infinite; }
.fi-server { animation: icoBlink 3s ease-in-out infinite; }
.fi-globe  { animation: icoFloat 3.5s ease-in-out infinite 0.2s; }
.fi-brain  { animation: icoGlow 2.5s ease-in-out infinite; }
.fi-folder { animation: icoFloat 3s ease-in-out infinite 0.4s; }
.fi-lock   { animation: icoPulse 3s ease-in-out infinite 0.3s; }
.fi-doc    { animation: icoFloat 3.2s ease-in-out infinite 0.1s; }

@keyframes icoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes icoRotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}
@keyframes icoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes icoBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes icoGlow {
    0%, 100% { filter: drop-shadow(0 0 0px transparent); }
    50% { filter: drop-shadow(0 0 8px rgba(115, 100, 245, 0.4)); }
}

/* Pricing list SVG icons */
.li-ico {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--primary, #7364f5);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -2px;
    flex-shrink: 0;
    opacity: 0.7;
}

.pricing-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Languages Showcase ── */
.languages-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lang-category {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.lang-category:hover {
    border-color: var(--border-light);
}

.lang-category-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.lang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-tag {
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(115, 100, 245, 0.08);
    border: 1px solid rgba(115, 100, 245, 0.12);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-code);
    transition: var(--transition);
}

.lang-tag:hover {
    color: var(--text);
    border-color: var(--primary);
    background: rgba(115, 100, 245, 0.15);
}

.lang-tag-accent {
    background: rgba(16, 196, 214, 0.1);
    border-color: rgba(16, 196, 214, 0.2);
    color: var(--accent-light);
}

/* ── Pricing ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.pricing-card {
    padding: 30px;
    background: rgba(15, 17, 28, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--border-light);
}

.pricing-card-popular {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.18), rgba(15, 17, 28, 0.55));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 0 40px rgba(108, 92, 231, 0.15), 0 0 80px rgba(108, 92, 231, 0.05);
    transform: scale(1.03);
}

.pricing-card-popular:hover {
    transform: scale(1.03) translateY(-6px);
    box-shadow: 0 0 50px rgba(108, 92, 231, 0.2), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card-ultra {
    border-color: rgba(0, 206, 201, 0.3);
    background: linear-gradient(180deg, rgba(0, 206, 201, 0.1), rgba(15, 17, 28, 0.55));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

body.light-theme .pricing-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}
body.light-theme .pricing-card-popular {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.14), rgba(255, 255, 255, 0.72));
}

.pricing-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: 100px;
    background: var(--gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

/* .pricing-emoji moved above with SVG-compatible styles */

.pricing-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 28px;
    font-weight: 800;
}

.pricing-per {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-period {
    font-size: 12px;
    color: var(--text-muted);
}

.pricing-features {
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pricing-features li::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: 600;
}
.pricing-features li.pricing-fable-line {
    margin: 2px 0 4px;
    padding: 7px 10px;
    border-radius: 9px;
    color: var(--text-secondary);
    background: rgba(192, 132, 252, .035);
    border: 1px solid rgba(192, 132, 252, .18);
}
.pricing-features li.pricing-fable-line::before {
    color: var(--accent);
}

/* 2026-06-04: токены таблично/компактно (нед/день/6ч столбцами) вместо строки. */
.pricing-features li:has(.pt-grid)::before { content: ''; }
.pt-grid {
    display: inline-flex;
    gap: 16px;
    vertical-align: middle;
    margin-left: 2px;
}
.pt-col { display: inline-flex; flex-direction: column; line-height: 1.2; }
.pt-col b { font-weight: 700; font-size: 13px; color: var(--text-primary, #fff); }
.pt-col i { font-style: normal; font-size: 10px; letter-spacing: .3px; color: var(--text-muted); text-transform: uppercase; }
body.light-theme .pt-col b { color: #111; }

/* ── FAQ ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-light);
}

.faq-chevron {
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 20px 18px;
}

/* ── CTA ── */
.section-cta {
    background: transparent;
    position: relative;
    padding: 80px 0;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 28px;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ── Footer ── */
.footer {
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
    z-index: 2;
    position: relative;
    background: var(--bg-section-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 700;
}

.footer-brand .footer-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--text);
}

/* ── Scroll animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .languages-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    #nav-auth { display: none; }
    .nav-burger { display: flex; }

    .container { padding: 0 18px; }
    html, body { max-width: 100%; overflow-x: clip; }

    .nav { padding: 10px 0; }
    .nav-inner {
        gap: 8px;
        min-width: 0;
    }
    .nav-logo {
        min-width: 0;
        flex: 1 1 auto;
        gap: 8px;
        font-size: 16px;
    }
    .nav-logo-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #nav-lang-slot {
        margin-left: 0;
        margin-right: 0;
        flex: 0 0 auto;
    }
    #nav-lang-slot .topbar-lang-btn {
        min-height: 40px;
        padding: 6px 9px;
        gap: 5px;
    }
    .nav-theme-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 12px;
        margin-left: 0;
    }
    .nav-theme-btn svg {
        width: 18px;
        height: 18px;
    }
    .nav-burger {
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-left: 0;
        border-radius: 12px;
        background: var(--bg-card);
        border: 1px solid var(--border);
    }

    .hero { padding: 100px 0 36px; }
    .hero-title,
    .hero-title span {
        max-width: 100%;
        font-size: 28px;
        letter-spacing: -0.01em;
        overflow-wrap: anywhere;
        word-break: normal;
    }
    .hero-subtitle {
        max-width: 100%;
        font-size: 15px;
        margin-bottom: 28px;
        overflow-wrap: anywhere;
    }

    /* Кнопки Hero — вертикально, во всю ширину */
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 36px;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 340px;
        justify-content: center;
        min-width: 0;
        white-space: normal;
        text-align: center;
    }
    .btn-lg { padding: 13px 24px; font-size: 15px; }

    /* Мобильное меню — touch-targets ≥44px */
    .mobile-menu { padding: 14px 18px 20px; gap: 4px; }
    .mobile-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 8px;
        border-radius: 10px;
    }
    .mobile-menu a:hover { background: rgba(255,255,255,0.05); }
    .mobile-menu .btn { justify-content: center; min-height: 48px; margin-top: 8px; }

    /* Hero code preview — без отрицательных margin */
    .hero-code-preview { margin: 0 0 32px; }

    .steps { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); margin: 0; }
    .step { max-width: 100%; }

    .features-grid { grid-template-columns: 1fr; }
    .languages-showcase { grid-template-columns: 1fr; }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
    .pricing-card { padding: 24px 20px; }
    .pricing-card-popular { transform: none; }
    .pricing-card-popular:hover { transform: translateY(-4px); }

    .hero-stats { gap: 16px; flex-wrap: wrap; justify-content: center; }
    .hero-stat-divider { display: none; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .footer-logo-row { justify-content: center; }
    .footer-col { align-items: center; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── 480px и ниже: компактный вид для маленьких телефонов ── */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .nav-logo { font-size: 15px; }
    .nav-logo-img { width: 26px; height: 26px; }
    #nav-lang-slot .topbar-lang-btn .lang-code,
    #nav-lang-slot .topbar-lang-btn .lang-chev {
        display: none;
    }
    #nav-lang-slot .topbar-lang-btn {
        width: 40px;
        justify-content: center;
        padding: 0;
    }

    .hero { padding: 86px 0 28px; }
    .hero-badge { font-size: 11px; padding: 5px 12px; }
    .hero-title,
    .hero-title span { font-size: 22px; letter-spacing: 0; }
    .hero-subtitle { font-size: 14px; margin-bottom: 20px; }
    .hero-actions { gap: 8px; margin-bottom: 28px; }
    .btn-lg { padding: 12px 14px; font-size: 14px; }
    .hero-actions .btn { max-width: 100%; }

    .hero-stats { gap: 12px; }
    .hero-stat-number { font-size: 22px; }
    .hero-stat-label { font-size: 11px; }

    .section-title { font-size: 20px !important; }
    .section-subtitle { font-size: 13px; }

    .pricing-grid { max-width: 100%; }
    .pricing-card { padding: 18px 16px; }
    .pricing-price { font-size: 28px; }
    .pricing-price-period { font-size: 12px; }
    .pricing-feature { font-size: 13px; }

    .cap-card { padding: 14px; }
    .cap-ico { width: 34px; height: 34px; border-radius: 8px; margin-bottom: 10px; }
    .cap-card h3 { font-size: 14px; }
    .cap-card p { font-size: 12px; }

    .how-step { padding: 16px; }
    .how-num { font-size: 13px; }
    .how-step h3 { font-size: 15px; }
    .how-step p { font-size: 13px; }

    .persona-card { padding: 16px; }

    .faq-q { font-size: 15px; }
    .faq-a { font-size: 13px; }

    .cta-title { font-size: 22px !important; }
    .cta-subtitle { font-size: 14px; }

    .footer { padding-top: 40px; }
    .footer-col { gap: 6px; }
    .footer-links a { font-size: 13px; }
}

/* ── Nav Theme Toggle Button ── */
.nav-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    margin-left: 4px;
}
.nav-theme-btn svg {
    width: 22px;
    height: 22px;
}
.nav-theme-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--border-light);
}
.nav-theme-btn .theme-icon-moon { display: none; }
.nav-theme-btn .theme-icon-sun { display: block; }
body.light-theme .nav-theme-btn .theme-icon-moon { display: block; }
body.light-theme .nav-theme-btn .theme-icon-sun { display: none; }

/* ── Nav lang slot ── */
#nav-lang-slot {
    margin-left: auto;
    margin-right: 4px;
}
#nav-lang-slot .topbar-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 52px;
    min-height: 32px;
    padding: 6px 9px;
    background: rgba(6, 7, 12, 0.82);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 11px;
    color: #f7f7fb;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    transition: var(--transition);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 22px rgba(0,0,0,0.20);
}
#nav-lang-slot .topbar-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    cursor: pointer;
    min-height: 36px;
}
#nav-lang-slot .topbar-lang-trigger:hover .topbar-lang-btn,
#nav-lang-slot .topbar-lang-trigger:focus-visible .topbar-lang-btn,
#nav-lang-slot .topbar-lang-trigger[aria-expanded="true"] .topbar-lang-btn {
    background: rgba(12, 13, 20, 0.97);
    border-color: rgba(162, 155, 254, 0.36);
    color: #fff;
}
#nav-lang-slot .topbar-lang-trigger:focus-visible {
    outline: 2px solid rgba(162, 155, 254, 0.75);
    outline-offset: 3px;
    border-radius: 13px;
}
#nav-lang-slot .lang-flag-holder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
#nav-lang-slot .lang-flag-fixed {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 4px 10px rgba(0,0,0,0.26);
}
#nav-lang-slot .lang-chev {
    opacity: 0.62;
    transition: transform var(--transition), opacity var(--transition);
}
#nav-lang-slot .topbar-lang-trigger:hover .lang-chev,
#nav-lang-slot .topbar-lang-trigger[aria-expanded="true"] .lang-chev {
    opacity: 1;
}
#nav-lang-slot .topbar-lang-trigger[aria-expanded="true"] .lang-chev {
    transform: rotate(180deg);
}
#nav-lang-slot .topbar-lang {
    position: relative;
}
#nav-lang-slot .topbar-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    display: none;
    flex-direction: column;
    min-width: 220px;
    max-width: 260px;
    max-height: min(340px, 70vh);
    z-index: 1000;
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,0.35));
    overflow: hidden;
}
#nav-lang-slot .topbar-lang-dropdown.show {
    display: flex;
}
#nav-lang-slot .lang-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-section-dark, var(--bg-card-hover));
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 6px;
    color: var(--text-muted);
    transition: border-color .15s, background .15s;
    flex-shrink: 0;
}
#nav-lang-slot .lang-search-wrap svg {
    flex-shrink: 0;
    display: block;
    align-self: center;
    opacity: 0.75;
}
#nav-lang-slot .lang-search-wrap:focus-within {
    border-color: var(--primary, #6366f1);
}
#nav-lang-slot .lang-search-wrap:focus-within svg {
    opacity: 1;
    color: var(--primary, #6366f1);
}
#nav-lang-slot .lang-search {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
    font-family: inherit;
    padding: 0;
    caret-color: var(--primary, #6366f1);
}
#nav-lang-slot .lang-search::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
#nav-lang-slot .lang-options-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 252px;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 1px;
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 92, 231, 0.45) transparent;
    padding-right: 2px;
}
#nav-lang-slot .lang-options-list::-webkit-scrollbar { width: 6px; }
#nav-lang-slot .lang-options-list::-webkit-scrollbar-track { background: transparent; margin: 2px 0; }
#nav-lang-slot .lang-options-list::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.35);
    border-radius: 10px;
    transition: background .15s;
}
#nav-lang-slot .lang-options-list::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.6);
}
#nav-lang-slot .topbar-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
    font-size: 13px;
    white-space: nowrap;
    text-align: left;
    transition: var(--transition);
}
#nav-lang-slot .topbar-lang-option span { flex: 1; }
#nav-lang-slot .topbar-lang-option .lang-check { color: var(--primary, #6366f1); flex-shrink: 0; }
#nav-lang-slot .topbar-lang-option:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}
#nav-lang-slot .topbar-lang-option.active {
    color: var(--primary-light, var(--primary));
    background: rgba(108, 92, 231, 0.12);
    font-weight: 600;
}
body.light-theme #nav-lang-slot .lang-search-wrap {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}
body.light-theme #nav-lang-slot .topbar-lang-btn {
    background: #ffffff;
    border-color: #d8dbe8;
    color: #24243a;
    box-shadow: 0 8px 20px rgba(24, 28, 55, 0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}
body.light-theme #nav-lang-slot .topbar-lang-trigger:hover .topbar-lang-btn,
body.light-theme #nav-lang-slot .topbar-lang-trigger:focus-visible .topbar-lang-btn,
body.light-theme #nav-lang-slot .topbar-lang-trigger[aria-expanded="true"] .topbar-lang-btn {
    background: #f6f7fb;
    border-color: rgba(115, 100, 245, 0.35);
    color: #17172b;
}
body.light-theme #nav-lang-slot .topbar-lang-dropdown {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}
body.light-theme #nav-lang-slot .topbar-lang-option {
    color: #1f2937;
}
body.light-theme #nav-lang-slot .topbar-lang-option:hover {
    background: #f3f4f6;
    color: #111827;
}
body.light-theme #nav-lang-slot .lang-search { color: #111827; }
body.light-theme #nav-lang-slot .lang-search::placeholder { color: #6b7280; }
body.light-theme #nav-lang-slot .lang-options-list {
    scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}
body.light-theme #nav-lang-slot .lang-options-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
}

@media (max-width: 768px) {
    #nav-lang-slot .topbar-lang-trigger {
        gap: 8px;
        min-height: 40px;
    }
    #nav-lang-slot .topbar-lang-btn {
        min-width: 52px;
        min-height: 34px;
    }
}

@media (max-width: 480px) {
    #nav-lang-slot .topbar-lang-trigger {
        gap: 7px !important;
        min-height: 40px !important;
    }
    #nav-lang-slot .topbar-lang-btn {
        width: auto !important;
        min-width: 52px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 9px !important;
    }
    #nav-lang-slot .topbar-lang-btn .lang-code,
    #nav-lang-slot .topbar-lang-btn .lang-chev {
        display: inline-flex !important;
    }
}

/* ── Light Theme ── */
body.light-theme {
    --bg: #f7f7fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f2f2f8;
    --bg-section-dark: #ededf4;
    --border: #dcdce8;
    --border-light: #ccccdc;
    --text: #1a1a2e;
    --text-secondary: #555578;
    --text-muted: #6a6a8a;  /* было #8888a8 (3.2:1 на белом, FAIL); ~5.1:1 — WCAG AA */
    --primary-glow: rgba(108, 92, 231, 0.1);
    --accent-glow: rgba(0, 206, 201, 0.08);
    --gradient-card: linear-gradient(145deg, rgba(108,92,231,0.04), rgba(0,206,201,0.02));
    --code-bg: #f2f2fa;
    --code-border: #dcdce8;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.06);
}
body.light-theme .bg-grid {
    opacity: 0.03;
}
body.light-theme .bg-glow {
    opacity: 0.15;
}

body.light-theme canvas#particles-canvas {
    opacity: 0.2;
}
body.light-theme .code-window {
    background: #f8f8ff;
    border-color: var(--border);
}
body.light-theme .code-window-header {
    background: #f0f0fa;
    border-color: var(--border);
}
body.light-theme .code-chat-ai .code-block-wrapper {
    background: #f0f0f8;
}
body.light-theme .code-chat-ai .code-block-wrapper pre {
    background: transparent;
    color: #333;
}
body.light-theme .code-chat-ai .code-block-wrapper .kw { color: #7c3aed; }
body.light-theme .code-chat-ai .code-block-wrapper .fn { color: #0369a1; }
body.light-theme .code-chat-ai .code-block-wrapper .str { color: #16a34a; }
body.light-theme .code-chat-ai .code-block-wrapper .lib { color: #0891b2; }
body.light-theme .code-chat-ai .code-block-wrapper .cmt { color: #9ca3af; }
body.light-theme .code-window-body { background: #fafafa; }
body.light-theme .code-chat-user { color: #333; }
body.light-theme .code-chat-role { color: #7364f5; }
body.light-theme .nav {
    background: rgba(245, 245, 250, 0.85);
    border-color: var(--border);
}
body.light-theme .pricing-card {
    background: var(--bg-card);
}
body.light-theme .faq-item {
    background: var(--bg-card);
    border-color: var(--border);
}
body.light-theme .mobile-menu {
    background: rgba(245, 245, 250, 0.95);
    border-color: var(--border);
}
body.light-theme .nav-theme-btn {
    color: var(--text);
    border-color: var(--border);
}
body.light-theme .hero-code-preview {
    background: #f8f8ff;
    border-color: var(--border);
}
body.light-theme .hero-stat {
    color: var(--text);
}
body.light-theme .hero-stat-divider {
    background: var(--border);
}
body.light-theme .pricing-card-popular {
    background: linear-gradient(180deg, rgba(115, 100, 245, 0.04), var(--bg-card));
    border-color: rgba(115, 100, 245, 0.25);
    box-shadow: 0 0 20px rgba(115, 100, 245, 0.06), 0 2px 12px rgba(0, 0, 0, 0.04);
}
body.light-theme .pricing-card-popular:hover {
    box-shadow: 0 0 24px rgba(115, 100, 245, 0.1), 0 4px 20px rgba(0, 0, 0, 0.06);
}
body.light-theme .pricing-card-ultra {
    background: linear-gradient(180deg, rgba(16, 196, 214, 0.03), var(--bg-card));
    border-color: rgba(16, 196, 214, 0.2);
}
body.light-theme .pricing-card {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
body.light-theme .pricing-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
body.light-theme .li-ico {
    stroke: #666;
    opacity: 0.6;
}
body.light-theme .pricing-emoji svg {
    opacity: 0.8;
}
body.light-theme .feature-card:hover {
    box-shadow: 0 4px 24px rgba(115, 100, 245, 0.08);
}
body.light-theme .feature-icon {
    background: rgba(115, 100, 245, 0.06);
}
body.light-theme .feature-card:hover .feature-icon {
    background: rgba(115, 100, 245, 0.1);
    box-shadow: 0 0 12px rgba(115, 100, 245, 0.08);
}
body.light-theme .nav-logout-btn {
    color: var(--text-secondary);
}
body.light-theme .nav-logout-btn:hover {
    color: var(--text);
}

/* Demo code blocks — dark theme default */
.demo-code-block {
    background: var(--code-bg);
    color: var(--text);
}
.demo-code-btn {
    background: var(--bg-hover) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}

/* Light theme: compare section code blocks */
body.light-theme #compare-grid > div { background: #fff; border-color: #e0e0e0; }
body.light-theme .demo-code-block { background: #f4f4f8 !important; color: #333 !important; }
body.light-theme .demo-code-btn { background: #eeeef2 !important; border-color: #d0d0d8 !important; color: #555 !important; }
body.light-theme .faq-answer { color: #555; }
body.light-theme .pricing-card { color: #333; }
body.light-theme .pricing-features li { color: #444; }
body.light-theme .pricing-card-popular .pricing-popular-badge { color: #fff; }
body.light-theme .pricing-header { color: #222; }
body.light-theme .pricing-name { color: #222; }
body.light-theme .pricing-price { color: #111; }

/* Theme switch: kill all per-element transitions/animations during the flip —
   the whole page crossfades as one snapshot via View Transitions API. */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition: none !important;
    animation: none !important;
}

/* Smooth simultaneous fade between old and new theme snapshots. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 220ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ══════════════════════════════════════════════════════════════════════
   STEP 2 REDESIGN — спокойные компоненты лендинга (2026-05-12)
   Стиль: тёмный фон, тонкие border'ы (1px rgba(255,255,255,0.08)),
   радиусы 10-12px, минимум градиентов, hover-only анимации,
   prefers-reduced-motion обязательно.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Hero preview: реалистичная копия чата ─────────────────────
   Заход 6 (2026-05-12): полностью повторяет визуальный язык реального
   /chat — sidebar слева, topbar с моделью, нормальные message-rows
   с аватарами 32px, agent-panel в стиле chat.css:2644, file-saved-
   block 1-в-1, input-bar 48px высотой. */
.hero-preview {
    margin: 48px auto 0;
    max-width: 1080px;
    padding: 0 16px;
    box-sizing: border-box;
}
/* ==========================================================
   .hpc-* - Hero Preview Chat (real-chat mirror)
   Layout: sidebar | main column -> topbar+scroll+input
   ========================================================== */
.hpc-frame {
    display: flex;
    background: var(--bg, #06070c);
    border: 1px solid var(--border, #191b30);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(115, 100, 245, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    height: 660px;
    text-align: left;
}
.hpc-frame, .hpc-frame * { text-align: left; }

/* Sidebar */
.hpc-side {
    width: 260px; flex-shrink: 0;
    background: var(--bg-card, #0c0d17);
    border-right: 1px solid var(--border, #191b30);
    display: flex; flex-direction: column;
    padding: 14px 12px; gap: 10px;
}
.hpc-side-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700;
    color: var(--text, #e8e8f4); padding: 0 4px 2px;
}
.hpc-side-logo b { color: #a78bfa; font-weight: 600; }
.hpc-side-logo img { border-radius: 5px; }
.hpc-side-new {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 14px;
    background: rgba(115, 100, 245, 0.10);
    border: 1px dashed rgba(115, 100, 245, 0.32);
    color: var(--primary-light, #a29bfe); border-radius: 10px;
    font-size: 13px; font-weight: 600;
    transition: background 140ms, border-color 140ms, color 140ms;
}
.hpc-side-new:hover {
    background: rgba(115, 100, 245, 0.16);
    border-color: rgba(115, 100, 245, 0.48);
    color: var(--text, #e8e8f4);
}
.hpc-side-chats {
    display: flex; flex-direction: column; gap: 2px;
    margin-top: 4px; flex: 1; overflow: hidden;
}
.hpc-side-chat {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 10px; border-radius: 8px;
    font-size: 13px; color: var(--text-secondary, #9ca3c7);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background 120ms, color 120ms;
}
.hpc-side-chat svg { color: var(--text-muted, #585a82); flex-shrink: 0; }
.hpc-side-chat:hover { background: var(--bg-hover, #13152a); color: var(--text, #e8e8f4); }
.hpc-side-chat.hpc-active {
    background: rgba(115, 100, 245, 0.12); color: var(--text, #e8e8f4);
}
.hpc-side-chat.hpc-active svg { color: var(--primary-light, #a29bfe); }
.hpc-side-foot {
    display: flex; flex-direction: column; gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border, #191b30);
}
/* Sidebar bottom pills — точная мимикрия .sub-sidebar-btn из реального чата */
.hpc-side-foot {
    display: flex; flex-direction: column; gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border, #191b30);
}
.hpc-side-pill {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary, #9ca3c7);
    background: transparent;
    cursor: pointer;
    transition: background 140ms, color 140ms, transform 140ms;
}
.hpc-side-pill:hover {
    background: var(--bg-hover, #13152a);
    color: var(--text, #e8e8f4);
}
.hpc-side-pill:hover .hpc-side-chev {
    color: rgba(255, 255, 255, 0.75);
    transform: translateX(2px);
}
.hpc-side-ico {
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    width: 18px; height: 18px;
}
.hpc-side-label { flex: 1; min-width: 0; }
.hpc-side-chev {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    transition: color 140ms, transform 140ms;
    line-height: 1;
}

/* Per-icon glow */
.hpc-side-pill-vault .hpc-side-ico {
    color: #5eead4;
    filter: drop-shadow(0 0 6px rgba(94, 234, 212, 0.40));
}
.hpc-side-pill-vault:hover .hpc-side-ico { color: #99f6e4; }
.hpc-side-pill-srv .hpc-side-ico {
    color: #a78bfa;
    filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.30));
}
.hpc-side-pill-srv:hover .hpc-side-ico { color: #c4b5fd; }
.hpc-sub-ico {
    filter: drop-shadow(0 0 6px rgba(162, 155, 254, 0.45));
}
.hpc-side-pill-sub:hover .hpc-sub-ico {
    filter: drop-shadow(0 0 10px rgba(162, 155, 254, 0.65));
}

/* Main */
.hpc-main {
    flex: 1; display: flex; flex-direction: column;
    min-width: 0; width: 100%;
    background: var(--bg, #06070c);
}
.hpc-top {
    display: flex; align-items: center; gap: 10px;
    min-height: 56px;
    padding: 12px 20px;
    background: rgba(7, 8, 14, 0.86);
    border-bottom: 1px solid var(--border, #191b30);
    backdrop-filter: blur(12px);
}
.hpc-top-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-muted, #585a82);
    cursor: pointer;
    transition: background 140ms, border-color 140ms, color 140ms;
}
.hpc-top-btn:hover {
    background: var(--bg-hover, #13152a);
    border-color: var(--border, #191b30);
    color: var(--text, #e8e8f4);
}
.hpc-top-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--text, #e8e8f4);
    font-size: 14px;
    font-weight: 700;
}
.hpc-top-logo img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
}
.hpc-top-title {
    flex: 1;
    min-width: 0;
    font-size: 13.5px; font-weight: 600;
    color: var(--text, #e8e8f4);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hpc-model {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: rgba(115, 100, 245, 0.08);
    border: 1px solid rgba(115, 100, 245, 0.20);
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px; font-weight: 600; color: var(--text-secondary, #9ca3c7);
    cursor: pointer; white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
    transition: background 140ms, border-color 140ms, color 140ms;
}
.hpc-model:hover {
    background: rgba(115, 100, 245, 0.18);
    border-color: rgba(115, 100, 245, 0.38);
    color: var(--text, #e8e8f4);
}
.hpc-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Scroll area — overflow auto, чтобы можно было прокрутить, но без скролла видно главное */
.hpc-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 20px 24px 12px;
    display: flex; flex-direction: column; gap: 14px;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(115,100,245,0.25) transparent;
}
.hpc-scroll::-webkit-scrollbar { width: 6px; }
.hpc-scroll::-webkit-scrollbar-thumb { background: rgba(115,100,245,0.25); border-radius: 3px; }
.hpc-scroll::-webkit-scrollbar-track { background: transparent; }

/* Messages */
.hpc-msg { display: flex; gap: 12px; align-items: flex-start; }
.hpc-msg-ai,
.hpc-msg-user {
    max-width: 960px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.hpc-msg-user { flex-direction: row-reverse; justify-content: flex-start; }
.hpc-ava {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.hpc-ava-user { background: linear-gradient(135deg, #6c5ce7, #00cec9); color: #fff; }
.hpc-ava-ai {
    background: #1e1e35; color: var(--primary-light, #a29bfe);
    border: 1px solid var(--border, #191b30);
}
.hpc-ava-blank { visibility: hidden; }
.hpc-ava-user-img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.hpc-bubble {
    background: rgba(115, 100, 245, 0.12);
    border: 1px solid rgba(115, 100, 245, 0.22);
    border-radius: 18px 18px 4px 18px;
    padding: 10px 16px; max-width: 70%;
    font-size: 13.5px; line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}
.hpc-bubble code {
    background: rgba(255, 255, 255, 0.10);
    color: #e9d5ff;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
}
.hpc-body { flex: 1; min-width: 0; }
.hpc-text {
    font-size: 13.5px; line-height: 1.44;
    color: var(--text, #e8e8f4);
}
.hpc-text code {
    background: rgba(115, 100, 245, 0.16); color: #c4b5fd;
    padding: 1px 6px; border-radius: 4px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
}
.hpc-link {
    color: var(--primary-light, #a29bfe);
    text-decoration: underline;
    text-decoration-color: rgba(162, 155, 254, 0.55);
    text-underline-offset: 2px;
    transition: color 140ms, text-decoration-color 140ms;
}
.hpc-link:hover {
    color: #c4b5fd;
    text-decoration-color: rgba(196, 181, 253, 0.9);
}

/* Agent panel — expandable (mirror of .agent-panel) */
.hpc-agent {
    display: flex; flex-direction: column;
    border: 1px solid rgba(176, 184, 222, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    overflow: hidden;
    align-self: stretch;
    max-width: 540px;
    transition: border-color 0.2s;
}
.hpc-agent:hover { border-color: rgba(183, 190, 228, 0.24); }
/* Рассуждения — classic lavender accent, like the real chat. */
.hpc-agent-think { border-color: rgba(115, 100, 245, 0.22); }
.hpc-agent-think:hover { border-color: rgba(115, 100, 245, 0.36); }
.hpc-agent-think .hpc-agent-i { color: var(--primary-light, #a29bfe); }
.hpc-agent-think .hpc-agent-t { color: var(--primary-light, #a29bfe); }
.hpc-think-wide {
    width: min(100%, 760px);
    max-width: 100%;
    min-height: 46px;
    border-radius: 10px;
    background: rgba(115, 100, 245, 0.09);
}
.hpc-think-wide .hpc-agent-head {
    min-height: 46px;
    padding: 11px 14px;
    font-size: 13px;
}
.hpc-think-compact {
    align-self: flex-start;
    width: auto;
    max-width: max-content;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
}
.hpc-think-compact .hpc-agent-head {
    padding: 7px 11px;
    gap: 7px;
    font-size: 12.5px;
}
.hpc-think-compact .hpc-agent-t {
    flex: 0 1 auto;
    white-space: nowrap;
    color: #99f6e4;
}
.hpc-agent-expandable { cursor: pointer; user-select: none; }
.hpc-agent-head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    font-size: 13px; color: #cbd5e1;
    transition: background 0.15s;
}
.hpc-agent-expandable:hover .hpc-agent-head { background: rgba(115,100,245,0.05); }
.hpc-agent-i { color: #a78bfa; flex-shrink: 0; }
.hpc-agent-t { font-weight: 600; flex: 1; }
.hpc-agent-n {
    font-size: 11px; color: #8b8ba8;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px; border-radius: 10px;
    flex-shrink: 0;
}
.hpc-agent-chev {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.hpc-agent.hpc-agent-collapsed .hpc-agent-chev { transform: rotate(-90deg); }

/* Body inside expanded agent panel */
.hpc-agent-steps {
    border-top: 1px solid rgba(176, 184, 222, 0.11);
    padding: 8px 10px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s, padding 0.25s;
    max-height: 600px;
    opacity: 1;
}
.hpc-agent.hpc-agent-collapsed .hpc-agent-steps {
    max-height: 0;
    opacity: 0;
    padding: 0 14px;
    border-top-color: transparent;
}
/* Натурально-текстовое саммари (для «Рассуждений») */
.hpc-summary {
    font-size: 12.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}
.hpc-summary code {
    background: rgba(115, 100, 245, 0.16);
    color: #c4b5fd;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
}
/* CLI tool-stripe list — точная копия реальных .cli-step-card строк */
.hpc-cli-list { padding: 6px 4px; }
.hpc-cli {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.4;
    transition: background 120ms;
}
.hpc-cli:hover { background: rgba(255, 255, 255, 0.03); }
.hpc-cli-num {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    color: rgba(74, 222, 128, 0.85);
    background: rgba(74, 222, 128, 0.10);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}
.hpc-cli-dot {
    flex-shrink: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.45);
}
.hpc-cli-badge {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(115, 100, 245, 0.16);
    color: #c4b5fd;
}
.hpc-cli-bash    { background: rgba(74, 222, 128, 0.14); color: #4ade80; }
.hpc-cli-write   { background: rgba(115, 100, 245, 0.18); color: #c4b5fd; }
.hpc-cli-read    { background: rgba(96, 165, 250, 0.14);  color: #60a5fa; }
.hpc-cli-edit    { background: rgba(251, 191, 36, 0.14);  color: #fbbf24; }
.hpc-cli-todo    { background: rgba(244, 114, 182, 0.14); color: #f472b6; }
.hpc-cli-title {
    flex: 1; min-width: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hpc-cli-time {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.40);
    font-variant-numeric: tabular-nums;
}

/* File attachment cards — как в реальном чате (JAR/ZIP/PY карточки) */
.hpc-attachments {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 10px;
}
.hpc-attach {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px 9px 9px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    min-width: 200px;
    max-width: 280px;
    flex: 1 1 180px;
    transition: border-color 140ms, background 140ms, transform 140ms;
    cursor: pointer;
}
.hpc-attach:hover {
    border-color: rgba(115, 100, 245, 0.40);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}
.hpc-attach-ext {
    flex-shrink: 0;
    width: 38px; height: 44px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    /* «уголок-загнут» */
    position: relative;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.30);
}
.hpc-attach-ext::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    border-style: solid;
    border-width: 0 7px 7px 0;
    border-color: transparent rgba(255, 255, 255, 0.18) transparent transparent;
    border-radius: 0 6px 0 0;
}
.hpc-attach-py    .hpc-attach-ext { background: linear-gradient(135deg, #1e40af, #3b82f6); box-shadow: 0 2px 8px rgba(30, 64, 175, 0.30); }
.hpc-attach-py-2  .hpc-attach-ext { background: linear-gradient(135deg, #047857, #10b981); box-shadow: 0 2px 8px rgba(4, 120, 87, 0.30); }
.hpc-attach-py-3  .hpc-attach-ext { background: linear-gradient(135deg, #7c3aed, #a78bfa); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.30); }
.hpc-attach-zip   .hpc-attach-ext { background: linear-gradient(135deg, #7c3aed, #c4b5fd); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.30); }
.hpc-attach-txt   .hpc-attach-ext { background: linear-gradient(135deg, #475569, #94a3b8); box-shadow: 0 2px 8px rgba(71, 85, 105, 0.30); }
.hpc-attach-jar   .hpc-attach-ext { background: linear-gradient(135deg, #15803d, #22c55e); box-shadow: 0 2px 8px rgba(21, 128, 61, 0.30); }
.hpc-attach-info {
    flex: 1;
    min-width: 0;
}
.hpc-attach-name {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}
.hpc-attach-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
    line-height: 1.2;
}
.hpc-attach-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.hpc-attach-act,
.hpc-attach-dl {
    flex-shrink: 0;
    width: 28px; height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.55);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 140ms, color 140ms;
    padding: 0;
}
.hpc-attach:hover .hpc-attach-act,
.hpc-attach-act:hover,
.hpc-attach:hover .hpc-attach-dl,
.hpc-attach-dl:hover { background: rgba(115, 100, 245, 0.16); color: #c4b5fd; }

/* Input bar */
.hpc-input {
    position: relative;
    display: flex; align-items: center; gap: 6px;
    margin: 10px 20px 16px;
    padding: 6px 10px;
    background: var(--bg-input, #090a13);
    border: 1px solid var(--border, #191b30);
    border-radius: var(--radius, 14px);
    min-height: 48px;
    min-width: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20);
    transition: border-color 140ms, box-shadow 140ms;
}
.hpc-input:focus-within,
.hpc-input:hover {
    border-color: var(--primary, #7364f5);
    box-shadow: 0 0 0 3px rgba(115, 100, 245, 0.10), 0 12px 32px rgba(0, 0, 0, 0.20);
}
.hpc-ib {
    width: 32px; height: 32px; padding: 0;
    background: transparent; border: none;
    color: rgba(255, 255, 255, 0.55);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 7px; cursor: default; flex-shrink: 0;
    transition: background 140ms, color 140ms;
}
.hpc-ib:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.hpc-ib-slash { cursor: pointer; }
.hpc-ib-send {
    margin-left: auto;
    color: #a78bfa;
}
.hpc-ib-send:hover { color: #c4b5fd; }
.hpc-mode {
    display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 5px 12px 5px 9px;
    background: rgba(115, 100, 245, 0.10);
    border: 1px solid rgba(115, 100, 245, 0.28);
    border-radius: 999px;
    color: var(--text-secondary, #9ca3c7); font-size: 12.5px; font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    max-width: 200px;
    cursor: pointer; flex-shrink: 0;
    transition: background 140ms, border-color 140ms, color 140ms;
}
.hpc-mode:hover { background: rgba(115,100,245,0.20); border-color: rgba(115,100,245,0.48); color: var(--text, #e8e8f4); }
.hpc-mode-i { display: inline-flex; align-items: center; line-height: 0; flex-shrink: 0; }
.hpc-mode-i svg { width: 16px; height: 16px; display: block; }
.hpc-mode span:not(.hpc-mode-i) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hpc-mode svg:last-child { width: 12px; height: 12px; opacity: 0.6; flex-shrink: 0; }
.hpc-mode[data-mode="ask"] { color: #a78bfa; border-color: rgba(167,139,250,0.32); background: rgba(167,139,250,0.08); }
.hpc-mode[data-mode="ask"]:hover { background: rgba(167,139,250,0.16); }
.hpc-mode[data-mode="auto-edit"] { color: #fbbf24; border-color: rgba(251,191,36,0.32); background: rgba(251,191,36,0.08); }
.hpc-mode[data-mode="auto-edit"]:hover { background: rgba(251,191,36,0.16); }
.hpc-mode[data-mode="plan"] { color: #60a5fa; border-color: rgba(96,165,250,0.32); background: rgba(96,165,250,0.08); }
.hpc-mode[data-mode="plan"]:hover { background: rgba(96,165,250,0.16); }
.hpc-mode[data-mode="auto"] { color: #4ade80; border-color: rgba(74,222,128,0.32); background: rgba(74,222,128,0.08); }
.hpc-mode[data-mode="auto"]:hover { background: rgba(74,222,128,0.16); }
.hpc-mode[data-mode="bypass"] { color: #f87171; border-color: rgba(248,113,113,0.32); background: rgba(248,113,113,0.08); }
.hpc-mode[data-mode="bypass"]:hover { background: rgba(248,113,113,0.18); }
.hpc-ph {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.32);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 0 4px;
}

/* Popovers */
/* `position: fixed` — popup не обрезается `overflow: hidden` родителя
 * (`.hpc-frame`). Координаты top/left ставит JS из getBoundingClientRect()
 * кнопки на момент клика. */
.hp-pop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    background: #16182a;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 11px;
    padding: 6px; min-width: 240px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    z-index: 9999;
}
.hp-pop.open { display: block; animation: hpPopIn 140ms ease-out; }
@keyframes hpPopIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.hp-slash-pop { min-width: 280px; }

/* ── Rich popup (icon + title + description), как в чате ───────────── */
.hp-pop-rich {
    min-width: 380px;
    max-width: 460px;
    padding: 8px;
}
.hp-pop-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
}
.hp-pop-head-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
    text-transform: none;
}
.hp-pop-hint {
    display: inline-flex;
    gap: 4px;
}
.hp-pop-hint kbd {
    display: inline-block;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    font: 600 10px ui-monospace, monospace;
    color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.hp-pop-group-title {
    padding: 8px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.40);
}
.hp-pop-rich .hp-pop-item {
    align-items: flex-start;
    padding: 10px 10px;
    gap: 12px;
    border-radius: 9px;
    border: 1px solid transparent;
}
.hp-pop-rich .hp-pop-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.hp-pop-rich .hp-pop-item.hp-pop-active {
    background: rgba(248, 113, 113, 0.06);
    border-color: rgba(248, 113, 113, 0.30);
    color: inherit;
}
.hp-pop-ico {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.hp-pop-rich .hp-pop-item.hp-pop-active .hp-pop-ico {
    background: rgba(248, 113, 113, 0.10);
    border-color: rgba(248, 113, 113, 0.30);
}
.hp-pop-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hp-pop-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}
.hp-pop-rich .hp-pop-item.hp-pop-active .hp-pop-name {
    color: #f87171;
}
.hp-pop-desc {
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.50);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
.hp-pop-cmd-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    line-height: 1.25;
}
.hp-pop-rich .hp-pop-key {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    min-width: 0;
    background: transparent;
    padding: 0;
}
.hp-pop-cmd-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
}

/* Light theme overrides for rich popup */
body.light-theme .hp-pop-rich {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .hp-pop-head-title,
body.light-theme .hp-pop-name,
body.light-theme .hp-pop-cmd-name,
body.light-theme .hp-pop-rich .hp-pop-key { color: #1a1a2e; }
body.light-theme .hp-pop-desc,
body.light-theme .hp-pop-group-title { color: rgba(26, 26, 46, 0.55); }
body.light-theme .hp-pop-ico {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .hp-pop-hint kbd {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.10);
    color: rgba(26, 26, 46, 0.75);
}
.hp-pop-title {
    font-size: 10.5px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 6px 10px 4px;
}
.hp-pop-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 10px;
    background: transparent; border: none; border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12.5px; text-align: left;
    cursor: pointer; transition: background 100ms;
}
.hp-pop-item:hover { background: rgba(255, 255, 255, 0.06); }
.hp-pop-item.hp-pop-active { background: rgba(74, 222, 128, 0.10); color: #4ade80; }
.hp-pop-key {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px; color: #c4b5fd;
    flex-shrink: 0; min-width: 80px;
}
.hp-pop-desc {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Hero preview popovers: mirror the real chat controls. */
.hp-mode-pop {
    width: 420px;
    max-width: calc(100vw - 24px);
    min-width: 0;
    background: #16182a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70), 0 0 0 1px rgba(255,255,255,0.03) inset;
    padding: 6px;
}
.hp-mode-pop.hp-pop-rich {
    max-width: calc(100vw - 24px);
}
.hp-mode-pop .hp-pop-head {
    padding: 10px 12px 8px;
    margin-bottom: 4px;
}
.hp-mode-pop .hp-pop-head-title {
    font-size: 14px;
    font-weight: 600;
}
.hp-mode-pop .hp-pop-item {
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    align-items: flex-start;
    border: 0;
    --hp-mode-c: #a78bfa;
    --hp-mode-bg: rgba(167,139,250,0.10);
    --hp-mode-active: rgba(167,139,250,0.14);
}
.hp-mode-pop .hp-pop-item[data-mode="auto-edit"] { --hp-mode-c: #fbbf24; --hp-mode-bg: rgba(251,191,36,0.10); --hp-mode-active: rgba(251,191,36,0.14); }
.hp-mode-pop .hp-pop-item[data-mode="plan"] { --hp-mode-c: #60a5fa; --hp-mode-bg: rgba(96,165,250,0.10); --hp-mode-active: rgba(96,165,250,0.14); }
.hp-mode-pop .hp-pop-item[data-mode="auto"] { --hp-mode-c: #4ade80; --hp-mode-bg: rgba(74,222,128,0.10); --hp-mode-active: rgba(74,222,128,0.14); }
.hp-mode-pop .hp-pop-item[data-mode="bypass"] { --hp-mode-c: #f87171; --hp-mode-bg: rgba(248,113,113,0.10); --hp-mode-active: rgba(248,113,113,0.14); }
.hp-mode-pop .hp-pop-item:hover { background: rgba(255,255,255,0.04); }
.hp-mode-pop .hp-pop-item.hp-pop-active {
    background: var(--hp-mode-active);
    color: inherit;
}
.hp-mode-pop .hp-pop-ico {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--hp-mode-bg);
    color: var(--hp-mode-c) !important;
}
.hp-mode-pop .hp-pop-ico svg {
    width: 22px;
    height: 22px;
    display: block;
}
.hp-mode-pop .hp-pop-name {
    margin: 2px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #e8e8f4);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hp-mode-pop .hp-pop-item.hp-pop-active .hp-pop-name { color: var(--hp-mode-c); }
.hp-mode-pop .hp-pop-desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted, #585a82);
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-slash-pop {
    width: min(640px, calc(100vw - 24px));
    max-width: min(640px, calc(100vw - 24px));
    max-height: 460px;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(20, 20, 28, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.hp-slash-pop.hp-pop-rich {
    max-width: min(640px, calc(100vw - 24px));
}
.hp-slash-pop .hp-pop-group-title {
    padding: 10px 14px 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.40);
}
.hp-slash-pop .hp-pop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    margin: 1px 4px;
    width: auto;
    box-sizing: border-box;
}
.hp-slash-pop .hp-pop-item:hover {
    background: rgba(255,255,255,0.06);
}
.hp-slash-pop .hp-pop-ico {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: rgba(115,100,245,0.10);
    color: #c4b5fd !important;
}
.hp-slash-pop .hp-pop-ico svg {
    width: 16px;
    height: 16px;
    display: block;
}
.hp-slash-pop .hp-pop-item:hover .hp-pop-ico {
    background: rgba(115,100,245,0.20);
    color: #e0d5ff !important;
}
.hp-slash-pop .hp-pop-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.hp-slash-pop .hp-pop-cmd-row {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hp-slash-pop .hp-pop-key {
    min-width: auto;
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    background: transparent;
    padding: 0;
}
.hp-slash-pop .hp-pop-cmd-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 400;
    color: rgba(255,255,255,0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hp-slash-pop .hp-pop-desc {
    max-width: 260px;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.40);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Light theme overrides */
body.light-theme .hpc-frame { background: #f7f7fc; border-color: #e0e0eb; box-shadow: 0 18px 48px rgba(20,20,50,0.10); }
body.light-theme .hpc-side { background: #f0f0f7; border-right-color: #e0e0eb; }
body.light-theme .hpc-side-logo { color: #1a1a2e; }
body.light-theme .hpc-side-chat { color: #6b6b85; }
body.light-theme .hpc-side-chat:hover { background: rgba(0,0,0,0.04); color: #1a1a2e; }
body.light-theme .hpc-side-chat.hpc-active { background: rgba(115,100,245,0.10); color: #6b5fd6; }
body.light-theme .hpc-side-foot { border-top-color: #e0e0eb; }
body.light-theme .hpc-side-pill { background: transparent; color: #1a1a2e; }
body.light-theme .hpc-side-pill:hover { background: rgba(0,0,0,0.04); }
body.light-theme .hpc-side-chev { color: rgba(0,0,0,0.30); }
body.light-theme .hpc-side-pill:hover .hpc-side-chev { color: rgba(0,0,0,0.60); }
body.light-theme .hpc-side-pill-vault .hpc-side-ico { color: #0d9488; filter: drop-shadow(0 0 4px rgba(13,148,136,0.20)); }
body.light-theme .hpc-side-pill-vault:hover .hpc-side-ico { color: #115e59; }
body.light-theme .hpc-side-pill-srv .hpc-side-ico { color: #6b5fd6; filter: drop-shadow(0 0 4px rgba(107,95,214,0.20)); }
body.light-theme .hpc-side-pill-srv:hover .hpc-side-ico { color: #4c3fc8; }
body.light-theme .hpc-main { background: #ffffff; }
body.light-theme .hpc-top { background: rgba(255,255,255,0.86); border-bottom-color: #e8e8f0; }
body.light-theme .hpc-top-btn { color: #8888a8; }
body.light-theme .hpc-top-btn:hover { background: #f0f0f7; border-color: #e0e0eb; color: #1a1a2e; }
body.light-theme .hpc-top-logo { color: #1a1a2e; }
body.light-theme .hpc-top-title { color: #1a1a2e; }
body.light-theme .hpc-model { background: rgba(115,100,245,0.08); border-color: rgba(115,100,245,0.20); color: #6b6b85; }
body.light-theme .hpc-model:hover { background: rgba(115,100,245,0.14); border-color: rgba(115,100,245,0.34); color: #1a1a2e; }
body.light-theme .hpc-bubble { color: #1a1a2e; background: rgba(115,100,245,0.06); border-color: rgba(115,100,245,0.20); }
body.light-theme .hpc-ava-ai { background: #f0f0f7; border-color: rgba(115,100,245,0.25); color: #6b5fd6; }
body.light-theme .hpc-text { color: #2a2a4a; }
body.light-theme .hpc-text code { background: rgba(115,100,245,0.10); color: #6b5fd6; }
body.light-theme .hpc-agent { background: #ffffff; border-color: #e2e7f1; }
body.light-theme .hpc-agent-think { border-color: rgba(115,100,245,0.24); }
body.light-theme .hpc-think-wide { background: rgba(115,100,245,0.07); }
body.light-theme .hpc-agent-think .hpc-agent-i { color: #6b5fd6; }
body.light-theme .hpc-agent-think .hpc-agent-t { color: #6b5fd6; }
body.light-theme .hpc-agent-head { color: #2a2a4a; }
body.light-theme .hpc-agent-t { color: #1a1a2e; }
body.light-theme .hpc-agent-n { background: rgba(0,0,0,0.05); color: #6b6b85; }
body.light-theme .hpc-agent-chev { color: #8888a8; }
body.light-theme .hpc-agent-steps { border-top-color: #e2e7f1; }
body.light-theme .hpc-summary { color: #555578; }
body.light-theme .hpc-summary code { background: rgba(115, 100, 245, 0.10); color: #6b5fd6; }
body.light-theme .hpc-cli:hover { background: rgba(0, 0, 0, 0.03); }
body.light-theme .hpc-cli-num { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
body.light-theme .hpc-cli-dot { background: #16a34a; box-shadow: 0 0 6px rgba(22, 163, 74, 0.40); }
body.light-theme .hpc-cli-bash  { background: rgba(22, 163, 74, 0.12);  color: #16a34a; }
body.light-theme .hpc-cli-write { background: rgba(115, 100, 245, 0.12); color: #6b5fd6; }
body.light-theme .hpc-cli-read  { background: rgba(37, 99, 235, 0.10);   color: #2563eb; }
body.light-theme .hpc-cli-edit  { background: rgba(217, 119, 6, 0.10);   color: #d97706; }
body.light-theme .hpc-cli-todo  { background: rgba(219, 39, 119, 0.10);  color: #db2777; }
body.light-theme .hpc-cli-title { color: #1a1a2e; }
body.light-theme .hpc-cli-time  { color: #8888a8; }
body.light-theme .hpc-bubble code { background: rgba(0, 0, 0, 0.08); color: #1a1a2e; }
body.light-theme .hpc-attach {
    background: #ffffff;
    border-color: #e0e0eb;
}
body.light-theme .hpc-attach:hover {
    background: #fafafe;
    border-color: rgba(115, 100, 245, 0.32);
}
body.light-theme .hpc-attach-name { color: #1a1a2e; }
body.light-theme .hpc-attach-meta { color: #8888a8; }
body.light-theme .hpc-attach-act,
body.light-theme .hpc-attach-dl { background: #f1f4fa; color: #687086; }
body.light-theme .hpc-attach:hover .hpc-attach-act,
body.light-theme .hpc-attach-act:hover,
body.light-theme .hpc-attach:hover .hpc-attach-dl,
body.light-theme .hpc-attach-dl:hover { background: #eaf0fb; color: #514bd0; }
body.light-theme .hpc-input { background: #fafafe; border-color: #e0e0eb; }
body.light-theme .hpc-ib { color: #6b6b85; }
body.light-theme .hpc-ib:hover { background: #f0f0f7; color: #1a1a2e; }
body.light-theme .hpc-ib-send { color: #6b5fd6; }
body.light-theme .hpc-ph { color: #b5b5c8; }
body.light-theme .hp-pop { background: #ffffff; border-color: #e0e0eb; box-shadow: 0 16px 40px rgba(20,20,50,0.12); }
body.light-theme .hp-pop-title { color: #6b6b85; }
body.light-theme .hp-pop-item { color: #2a2a4a; }
body.light-theme .hp-pop-item:hover { background: #f0f0f7; }
body.light-theme .hp-pop-item.hp-pop-active { background: rgba(74,222,128,0.12); color: #16a34a; }
body.light-theme .hp-pop-key { color: #6b5fd6; }
body.light-theme .hp-pop-desc { color: #8888a8; }

/* Mobile */
@media (max-width: 760px) {
    .hpc-frame { height: 560px; }
    .hpc-side { display: none; }
    .hpc-scroll { padding: 14px; }
    .hpc-bubble { max-width: 90%; font-size: 12.5px; }
    .hpc-fsb-actions { width: 100%; margin-left: 0; margin-top: 4px; }
}
@media (max-width: 480px) {
    .hpc-frame { height: 500px; }
    .hpc-scroll { padding: 10px; }
    .hpc-bubble { font-size: 12px; padding: 9px 12px; }
    .hpc-agent-steps { font-size: 11.5px; }
    .hpc-attach { padding: 8px 10px; gap: 8px; }
}

/* ── "Что можно делать" — 6 простых карточек ─────────────────────── */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 8px;
}
.cap-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px;
    transition: border-color 160ms, background 160ms;
}
.cap-card:hover {
    border-color: rgba(115, 100, 245, 0.32);
    background: rgba(255, 255, 255, 0.035);
}
.cap-ico {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(115, 100, 245, 0.10);
    color: #c4b5fd;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.cap-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.cap-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* ── "Как это работает" — 3 пронумерованных шага ──────────────────── */
.how-steps {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.how-step {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}
.how-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(115, 100, 245, 0.14);
    color: #c4b5fd;
    font-size: 15px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.how-body { flex: 1; min-width: 0; }
.how-body h3 {
    margin: 4px 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.how-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* ── "Для кого" — 3 персоны ──────────────────────────────────────── */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 8px;
}
.persona-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px;
}
.persona-ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(0, 206, 201, 0.10);
    color: #5eead4;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.persona-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.persona-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* ── Модели: 4 группы вместо 16 карточек ─────────────────────────── */
.models-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 8px;
}
.mg-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px;
}
.mg-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.mg-ico {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: rgba(115, 100, 245, 0.10);
    color: #c4b5fd;
    display: flex; align-items: center; justify-content: center;
}
.mg-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.mg-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}
.mg-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.models-note {
    margin: 24px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Mobile breakpoints ──────────────────────────────────────────── */
@media (max-width: 980px) {
    .cap-grid { grid-template-columns: repeat(2, 1fr); }
    .how-steps { grid-template-columns: 1fr; }
    .persona-grid { grid-template-columns: 1fr; }
    .models-groups { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .cap-grid { grid-template-columns: 1fr; gap: 10px; }
    .cap-card, .how-step, .persona-card, .mg-card { padding: 16px; }
    .hero-preview { margin-top: 32px; padding: 0 4px; }
    .hp-body { padding: 14px; }
    .hp-bubble { font-size: 12.5px; }
    .hp-code { font-size: 11.5px; padding: 8px 10px; }
}
@media (max-width: 390px) {
    .hero-preview { padding: 0; }
    .hpc-frame { border-radius: 12px; }
    .hp-msg-user .hp-bubble, .hp-msg-ai .hp-bubble { max-width: 100%; }
    .hpc-bubble { font-size: 11.5px; }
    .hpc-scroll { padding: 8px; }
}

/* ── Reduced motion — отключаем все нелинейные анимации ─────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .bg-glow-1 { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   LIGHT THEME FULL FIX (2026-05-12)
   Все компоненты из Шага 2 использовали rgba(255,255,255,...) — невидимы
   на белом фоне. Полностью переопределяем под светлую палитру: рамки
   #e0e0eb (видимые), карточки на #fff поверх #f7f7fc body, hover делает
   subtle-серый. Текст: #1a1a2e (text), #555578 (secondary), #8888a8 (muted).
   ══════════════════════════════════════════════════════════════════════ */

/* Old .hp-* light-theme overrides removed — replaced by .hpc-* above. */

/* ── Cap-grid (Что можно делать) ───────────────────────────── */
body.light-theme .cap-card {
    background: #ffffff;
    border-color: #e0e0eb;
}
body.light-theme .cap-card:hover {
    background: #fafafe;
    border-color: rgba(115, 100, 245, 0.32);
}
body.light-theme .cap-ico {
    background: rgba(115, 100, 245, 0.10);
    color: #6b5fd6;
}
body.light-theme .cap-card h3 { color: #1a1a2e; }
body.light-theme .cap-card p { color: #555578; }

/* ── How steps ─────────────────────────────────────────────── */
body.light-theme .how-step {
    background: #ffffff;
    border-color: #e0e0eb;
}
body.light-theme .how-num {
    background: rgba(115, 100, 245, 0.12);
    color: #6b5fd6;
}
body.light-theme .how-body h3 { color: #1a1a2e; }
body.light-theme .how-body p { color: #555578; }

/* ── Persona cards (Для кого) ─────────────────────────────── */
body.light-theme .persona-card {
    background: #ffffff;
    border-color: #e0e0eb;
}
body.light-theme .persona-ico {
    background: rgba(0, 206, 201, 0.12);
    color: #0d9488;
}
body.light-theme .persona-card h3 { color: #1a1a2e; }
body.light-theme .persona-card p { color: #555578; }

/* ── Models groups ─────────────────────────────────────────── */
body.light-theme .mg-card {
    background: #ffffff;
    border-color: #e0e0eb;
}
body.light-theme .mg-ico {
    background: rgba(115, 100, 245, 0.10);
    color: #6b5fd6;
}
body.light-theme .mg-card h3 { color: #1a1a2e; }
body.light-theme .mg-sub { color: #8888a8; }
body.light-theme .mg-text { color: #555578; }
body.light-theme .models-note { color: #6b6b85; }

/* ── Sections, badges, headers — fix contrast ──────────────── */
body.light-theme .section-badge {
    background: rgba(115, 100, 245, 0.10);
    border: 1px solid rgba(115, 100, 245, 0.22);
    color: #6b5fd6;
}
body.light-theme .section-dark {
    background: #f0f0f7;
}
body.light-theme .section-title { color: #1a1a2e; }
body.light-theme .section-subtitle { color: #6b6b85; }

/* ── Hero — gradient text + subtitle ───────────────────────── */
body.light-theme .hero-title { color: #1a1a2e; }
body.light-theme .hero-title .gradient-text {
    background: linear-gradient(135deg, #6c5ce7 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.light-theme .hero-subtitle { color: #555578; }
body.light-theme .hero-badge {
    background: rgba(115, 100, 245, 0.08);
    border: 1px solid rgba(115, 100, 245, 0.22);
    color: #6b5fd6;
}

/* ── Pricing — стрелка-badge popular ───────────────────────── */
body.light-theme .pricing-popular-badge {
    background: linear-gradient(135deg, #6c5ce7, #00cec9);
    color: #fff;
}
body.light-theme .pricing-name { color: #1a1a2e; }
body.light-theme .pricing-price { color: #1a1a2e; }
body.light-theme .pricing-per, body.light-theme .pricing-period { color: #6b6b85; }
body.light-theme .pricing-features li {
    color: #2a2a4a;
    border-bottom: 1px solid #f0f0f7;
}
body.light-theme .pricing-features svg.li-ico { stroke: #6b5fd6; }

/* ── FAQ ─────────────────────────────────────────────────── */
body.light-theme .faq-item {
    background: #ffffff;
    border: 1px solid #e0e0eb;
    border-radius: 12px;
    margin-bottom: 10px;
}
body.light-theme .faq-question { color: #1a1a2e; }
body.light-theme .faq-question:hover { background: #fafafe; }
body.light-theme .faq-chevron { stroke: #8888a8; }
body.light-theme .faq-answer { color: #555578; }
body.light-theme .faq-answer a { color: #6b5fd6; }
body.light-theme .faq-answer code {
    background: rgba(115, 100, 245, 0.08);
    color: #6b5fd6;
    border-radius: 4px;
    padding: 1px 5px;
}

/* ── Nav ──────────────────────────────────────────────────── */
body.light-theme .nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e8e8f0;
}
body.light-theme .nav-links a { color: #2a2a4a; }
body.light-theme .nav-links a:hover { color: #6b5fd6; }
body.light-theme .nav-logo-text { color: #1a1a2e; }
body.light-theme .nav-logo-accent { color: #6b5fd6; }
body.light-theme .nav-theme-btn {
    background: #f0f0f7;
    border: 1px solid #e0e0eb;
    color: #2a2a4a;
}
body.light-theme .nav-theme-btn:hover { background: #e8e8f0; }
body.light-theme .nav-burger span { background: #2a2a4a; }
body.light-theme .mobile-menu {
    background: #ffffff;
    border-top: 1px solid #e0e0eb;
}
body.light-theme .mobile-menu a { color: #2a2a4a; border-bottom: 1px solid #f0f0f7; }
body.light-theme .nav-support-link { color: #2a2a4a; }
body.light-theme .nav-support-link:hover { color: #6b5fd6; }
body.light-theme .support-popup {
    background: #ffffff;
    border: 1px solid #e0e0eb;
    box-shadow: 0 12px 40px rgba(20, 20, 50, 0.12);
}
body.light-theme .support-popup-header,
body.light-theme .support-popup-body { color: #2a2a4a; }
body.light-theme .support-popup-desc { color: #6b6b85; }
body.light-theme .support-popup-username { color: #1a1a2e; }

/* ── CTA section ──────────────────────────────────────────── */
body.light-theme .section-cta { background: #f0f0f7; }
body.light-theme .cta-title { color: #1a1a2e; }
body.light-theme .cta-subtitle { color: #555578; }

/* ── Footer ───────────────────────────────────────────────── */
body.light-theme .footer {
    background: #f7f7fc;
    border-top: 1px solid #e0e0eb;
}
body.light-theme .footer-desc,
body.light-theme .footer-col a,
body.light-theme .footer-col-title { color: #2a2a4a; }
body.light-theme .footer-col a:hover { color: #6b5fd6; }
body.light-theme .footer-bottom { border-top: 1px solid #e0e0eb; color: #6b6b85; }
body.light-theme .footer-pay-label { color: #6b6b85; }
/* ── Buttons ──────────────────────────────────────────────── */
body.light-theme .btn-ghost {
    background: #ffffff;
    border: 1px solid #e0e0eb;
    color: #2a2a4a;
}
body.light-theme .btn-ghost:hover {
    background: #fafafe;
    border-color: rgba(115, 100, 245, 0.35);
    color: #6b5fd6;
}
body.light-theme .btn-primary {
    background: linear-gradient(135deg, #6c5ce7, #00cec9);
    color: #ffffff;
    border: none;
}
body.light-theme .btn-primary:hover {
    background: linear-gradient(135deg, #5849c4, #00b0ad);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.25);
}

/* ── Bg-glow softer on light bg ───────────────────────────── */
body.light-theme .bg-glow-1 {
    background: rgba(108, 92, 231, 0.06);
    opacity: 1;
}

/* ── Hero badge dot ───────────────────────────────────────── */
body.light-theme .hero-badge-dot { background: #16a34a; }

/* ── Footer extension styles (вынесено из inline <style> в index.html, audit 2026-05-12) ── */
    .footer-ext{padding-top:48px}
    .footer-grid-ext{grid-template-columns:1.4fr repeat(4,1fr);gap:32px}
    .footer-pay-row{margin-top:18px}
    .footer-pay-label{display:block;font-size:11px;color:var(--text-muted,#4e4e6a);margin-bottom:10px;text-transform:uppercase;letter-spacing:.5px}
    .footer-pay-icons{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
    .pay-sbp-card{display:inline-flex;align-items:center;gap:10px;min-width:136px;height:42px;padding:0 14px 0 10px;background:rgba(255,255,255,.035);border:1px solid var(--border,#1a1a2e);border-radius:9px;color:var(--text,#e2e2f0)}
    .pay-sbp-badge{display:inline-flex;align-items:center;justify-content:center;width:42px;height:23px;background:#19b85a;border-radius:5px;color:#fff;font-size:10px;font-weight:800;letter-spacing:.15px;line-height:1}
    .pay-sbp-name{font-size:12px;font-weight:500;letter-spacing:.1px;white-space:nowrap}
    body.light-theme .pay-sbp-card{background:#fff;border-color:#e0e0eb;color:#2a2a4a}
    .footer-legal-req{margin:12px 0 0;font-size:11px;line-height:1.5;color:var(--text-muted,#4e4e6a)}
    .footer-legal-req a{color:var(--text-muted,#4e4e6a);text-decoration:underline;text-underline-offset:2px}
    .footer-legal-req a:hover{color:var(--text,#e2e2f0)}
    body.light-theme .footer-legal-req,body.light-theme .footer-legal-req a{color:#6b6b85}
    @media(max-width:900px){.footer-grid-ext{grid-template-columns:1fr 1fr;gap:24px}}

/* Mobile fit pass: final source-order overrides for phone nav and hero. */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip !important;
    }

    .nav {
        padding: 10px 0 !important;
        max-width: 100vw;
    }
    .nav-inner {
        width: 100%;
        min-width: 0;
        gap: 8px !important;
        flex-wrap: nowrap;
    }
    .nav-logo {
        flex: 1 1 0;
        min-width: 0;
        max-width: 150px;
        gap: 8px !important;
        font-size: 16px !important;
    }
    .nav-logo-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #nav-lang-slot {
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex: 0 0 auto;
    }
    #nav-lang-slot .topbar-lang-btn,
    .nav-theme-btn,
    .nav-burger {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 12px !important;
    }
    #nav-lang-slot .topbar-lang-btn {
        padding: 0 !important;
        justify-content: center;
    }
    .nav-theme-btn {
        margin-left: 0 !important;
    }
    .nav-theme-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    .nav-admin-link {
        display: none !important;
    }
    .nav-admin-link.nav-admin-link-mobile-on {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 12px !important;
        color: #fbbf24;
        background: rgba(251, 191, 36, 0.10);
        border: 1px solid rgba(251, 191, 36, 0.22);
        align-items: center;
        justify-content: center;
    }
    .nav-burger {
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-left: 0 !important;
        background: var(--bg-card);
        border: 1px solid var(--border);
    }

    .hero .container,
    .hero-title,
    .hero-subtitle,
    .hero-actions,
    .hero-preview {
        max-width: 100%;
        min-width: 0;
    }
    .hero {
        width: 100vw;
        max-width: 100vw;
        overflow: hidden;
    }
    .hero .container {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }
    .hero-title {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-title,
    .hero-title span,
    .gradient-text {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal;
    }
    .hero-title .gradient-text {
        display: block;
        width: min(100%, 15ch);
        margin-left: auto;
        margin-right: auto;
        word-break: break-word;
    }
    .hero-subtitle {
        width: min(100%, 34ch);
        margin-left: auto;
        margin-right: auto;
        overflow-wrap: break-word;
    }
    .hero-actions {
        width: 100%;
        max-width: calc(100vw - 28px);
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        white-space: normal !important;
        text-align: center;
    }
    .hero-preview {
        width: calc(100vw - 56px);
        max-width: calc(100vw - 56px);
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden;
    }
    .hpc-frame {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: min(620px, 76vh);
    }
    .hpc-side {
        display: none;
    }
    .hpc-top {
        min-height: 52px;
        padding: 9px 10px;
        gap: 8px;
    }
    .hpc-top-logo {
        display: none;
    }
    .hpc-top-title {
        flex: 1;
        font-size: 13px;
    }
    .hpc-model {
        padding: 6px 8px;
        max-width: 132px;
    }
    .hpc-model span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .hpc-top-actions .hpc-top-btn:not(:last-child) {
        display: none;
    }
    .hpc-scroll {
        padding: 14px 12px 10px;
        gap: 12px;
    }
    .hpc-input {
        margin: 8px 10px 12px;
    }
    .hpc-agent {
        max-width: 100%;
    }
    .hpc-msg {
        width: 100%;
        max-width: 100%;
        gap: 8px;
    }
    .hpc-ava {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .hpc-bubble {
        max-width: calc(100% - 52px) !important;
    }
    .hpc-msg-ai .hpc-body {
        max-width: calc(100% - 52px);
    }
    .hpc-cli-time {
        display: none;
    }
    .hpc-scroll,
    .hpc-msg,
    .hpc-body,
    .hpc-text,
    .hpc-bubble,
    .hpc-bubble code,
    .hp-bubble {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }
    .hpc-msg-user .hpc-bubble {
        max-width: calc(100% - 52px) !important;
    }
    .hpc-msg-ai .hpc-body {
        max-width: calc(100% - 52px) !important;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        max-width: 146px;
        font-size: 14.5px !important;
    }
    .nav-logo-img {
        width: 24px;
        height: 24px;
    }
    #nav-lang-slot .topbar-lang-btn .lang-code,
    #nav-lang-slot .topbar-lang-btn .lang-chev {
        display: none !important;
    }
    .hero-title,
    .hero-title span {
        font-size: 21px !important;
        line-height: 1.16;
    }
    .hero-subtitle {
        font-size: 14px !important;
    }
    .hero-preview {
        width: calc(100vw - 56px);
        max-width: calc(100vw - 56px);
    }
    .hpc-top {
        padding: 8px;
    }
    .hpc-top-actions {
        display: none;
    }
    .hpc-model {
        width: 34px;
        max-width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
        font-size: 11.5px;
    }
    .hpc-model span,
    .hpc-model svg:last-child {
        display: none;
    }
    .hpc-mode span,
    .hpc-ib-mic {
        display: none;
    }
    .hpc-input {
        gap: 4px;
        padding: 6px 8px;
    }
}

@media (max-width: 768px) {
    #nav-lang-slot .topbar-lang-trigger {
        gap: 8px !important;
        min-height: 40px !important;
    }
}

@media (max-width: 480px) {
    #nav-lang-slot .topbar-lang-trigger {
        gap: 7px !important;
        min-height: 40px !important;
    }
    #nav-lang-slot .topbar-lang-btn {
        width: auto !important;
        min-width: 52px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 9px !important;
    }
    #nav-lang-slot .topbar-lang-btn .lang-code,
    #nav-lang-slot .topbar-lang-btn .lang-chev {
        display: inline-flex !important;
    }
}

/* ==========================================================================
   HERO REDESIGN 2026-06b (Asymmetric 2-column)
   Left: text + trust-pills flush-left. Right: full-size mockup with bleed.
   GPU-only: transform/opacity/filter. prefers-reduced-motion supported.
   Overrides old .hero* rules (this block is lower in cascade).
   NOTE: .hero-preview-scene MUST stay transform-free (position:fixed popup compat).
   ========================================================================== */

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(36px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hero-badge-in {
    from { opacity: 0; transform: translateY(12px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hero-aurora-shift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(40px, -30px) scale(1.06); }
    66%  { transform: translate(-30px, 20px) scale(0.97); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes hero-beam-drift {
    0%   { opacity: 0.12; transform: translateX(-50px) rotate(0deg); }
    50%  { opacity: 0.22; transform: translateX(50px) rotate(2deg); }
    100% { opacity: 0.12; transform: translateX(-50px) rotate(0deg); }
}
/* Soft float: only translateY + gentle rotateY — NO rotateX (kills readability) */
@keyframes hero-float-soft {
    0%   { transform: perspective(1600px) rotateY(-2.5deg) translateY(0px); }
    50%  { transform: perspective(1600px) rotateY(-1.5deg) translateY(-10px); }
    100% { transform: perspective(1600px) rotateY(-2.5deg) translateY(0px); }
}
@keyframes btn-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes hero-callout-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-callout-float {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-3px); }
}

/* ── Section shell ─────────────────────────────────────────────────────── */
.hero {
    padding: 128px 0 72px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 780px;
}

/* ── Background layers ─────────────────────────────────────────────────── */
/* Sharp grid — damped intensity */
.hero-grid-overlay {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(108,92,231,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,92,231,0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 70% at 60% 40%, #000 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 60% 40%, #000 25%, transparent 75%);
}

/* Aurora glow — shifted right to frame the mockup, reduced opacity */
.hero-bg-aurora {
    position: absolute; inset: -80px; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 55% 50% at 70% 45%, rgba(108,92,231,0.13) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 30% 35%, rgba(0,206,201,0.08) 0%, transparent 60%);
    animation: hero-aurora-shift 22s ease-in-out infinite;
    filter: blur(36px);
}

/* Beam lines — reduced to 2 visible, damped */
.hero-bg-beams {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.hero-beam {
    position: absolute; width: 1px; top: -20%; bottom: -20%;
    background: linear-gradient(180deg, transparent, rgba(108,92,231,0.16), rgba(0,206,201,0.10), transparent);
    filter: blur(1px);
    animation: hero-beam-drift 16s ease-in-out infinite;
}
.hero-beam-1 { left: 48%; transform: rotate(-12deg) scaleX(2); animation-delay: 0s; }
.hero-beam-2 {
    left: 72%; transform: rotate(-8deg) scaleX(1.5); animation-delay: -6s;
    background: linear-gradient(180deg, transparent, rgba(0,206,201,0.14), rgba(108,92,231,0.08), transparent);
    filter: none;
}
.hero-beam-3 { left: 88%; transform: rotate(-18deg) scaleX(2); animation-delay: -11s; opacity: 0.7; }

/* ── Asymmetric 2-column grid ──────────────────────────────────────────── */
.hero-layout {
    display: grid;
    grid-template-columns: minmax(440px, 1.14fr) 0.9fr;
    gap: 44px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* ── LEFT column ───────────────────────────────────────────────────────── */
.hero-content-wrap {
    position: relative;
    z-index: 2;
    text-align: left;
}

/* Badge with gradient border */
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 100px;
    background: rgba(108,92,231,0.07); background-clip: padding-box;
    border: 1.5px solid transparent;
    position: relative; font-size: 12.5px; color: var(--primary-light);
    margin-bottom: 24px; font-weight: 500; letter-spacing: 0.04em;
    backdrop-filter: blur(12px);
}
.hero-badge::before {
    content: ''; position: absolute; inset: 0; border-radius: 100px; padding: 1.5px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* Title — large, flush-left */
.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(32px, 4vw, 52px); font-weight: 800; line-height: 1.15;
    margin-bottom: 20px; letter-spacing: -0.02em; color: var(--text);
    text-align: left;
}
.hero-title-lg {
    font-size: clamp(34px, 4.4vw, 58px);
}
.hero-title-line { display: inline-block; }

/* Subtitle */
.hero-subtitle {
    font-size: clamp(15px, 1.8vw, 18px); color: var(--text-secondary);
    max-width: 440px; margin: 0 0 28px; line-height: 1.65;
    text-align: left;
}

/* Actions row — flush left */
.hero-actions {
    display: flex; gap: 14px; justify-content: flex-start;
    flex-wrap: wrap; margin-bottom: 28px;
}

/* Primary CTA shimmer */
.hero-btn-cta.btn.btn-primary {
    position: relative; background: var(--gradient); background-size: 200% auto; border: none;
    box-shadow: 0 4px 20px rgba(108,92,231,0.38), 0 1px 0 rgba(255,255,255,0.12) inset;
    transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s ease, filter 0.22s ease;
    overflow: hidden;
}
.hero-btn-cta.btn.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    background-size: 200% 100%; background-position: -200% center; opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.hero-btn-cta.btn.btn-primary:hover {
    transform: translateY(-3px) scale(1.025);
    box-shadow: 0 10px 36px rgba(108,92,231,0.55), 0 1px 0 rgba(255,255,255,0.15) inset;
    filter: brightness(1.08);
}
.hero-btn-cta.btn.btn-primary:hover::after { opacity: 1; animation: btn-shimmer 0.8s linear; }
.hero-btn-cta.btn.btn-primary:active { transform: translateY(-1px) scale(1.01); }

/* Ghost CTA */
.hero-btn-tg.btn.btn-ghost {
    border-color: rgba(108,92,231,0.3); color: var(--text-secondary);
    transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}
.hero-btn-tg.btn.btn-ghost:hover {
    border-color: var(--primary-light); color: var(--text);
    transform: translateY(-3px); box-shadow: 0 6px 24px rgba(108,92,231,0.22);
}

/* Trust pills — glass capsules, quality of pricing-card */
.hero-trust {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 100px;
    background: rgba(15,17,28,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.22,1,0.36,1);
    cursor: default;
}
.hero-pill svg { color: var(--primary-light); flex-shrink: 0; }
.hero-pill:hover {
    border-color: var(--border-light);
    color: var(--text);
    transform: translateY(-2px);
}

/* ── RIGHT column — mockup ──────────────────────────────────────────────── */
/* CRITICAL: .hero-preview-scene MUST NOT have transform/perspective/filter/will-change.
   position:fixed popup positioning (getBoundingClientRect in landing-init.js:59-81)
   depends on this element NOT creating a containing block. */
.hero-preview-scene {
    position: relative;
    z-index: 2;
}

/* Ambient glow behind the mockup — pseudo, NOT on scene itself */
.hero-preview-scene::before {
    content: ''; position: absolute;
    left: -20px; top: 40px; right: -80px; bottom: -20px;
    background: radial-gradient(ellipse 70% 60% at 40% 40%, rgba(108,92,231,0.14) 0%, transparent 65%),
                radial-gradient(ellipse 50% 40% at 75% 60%, rgba(0,206,201,0.09) 0%, transparent 60%);
    pointer-events: none; z-index: 0; filter: blur(40px);
}

/* Shadow-double "depth" layer */
.hero-preview-scene::after {
    content: ''; position: absolute;
    left: 24px; top: 24px; right: -56px; bottom: -24px;
    border-radius: 20px;
    background: rgba(0,0,0,0.35);
    filter: blur(32px);
    pointer-events: none; z-index: 0;
}

/* Mockup — native full width, bleeds right past container edge */
.hero-preview.hero-preview-3d {
    width: 880px;
    max-width: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    transform-origin: center left;
    animation: hero-float-soft 11s ease-in-out infinite;
}
.hero-preview.hero-preview-3d:hover {
    animation-play-state: paused;
    transform: perspective(1600px) rotateY(0deg) translateY(-6px);
    transition: transform 0.55s cubic-bezier(0.22,1,0.36,1);
}

/* hpc-frame: multi-layer shadow gives depth, NO animated box-shadow keyframe */
.hero-preview.hero-preview-3d .hpc-frame {
    border-radius: 16px;
    border-color: rgba(108,92,231,0.22);
    box-shadow:
        0 40px 100px -20px rgba(0,0,0,0.7),
        0 0 0 1px rgba(108,92,231,0.16),
        0 0 80px -10px rgba(108,92,231,0.18);
}

/* Sidebar width override in hero (more room for chat content) */
.hero-preview .hpc-side { width: 224px; }

/* ── Floating callouts ─────────────────────────────────────────────────── */
.hero-callout {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 100px;
    background: rgba(10,12,22,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(108,92,231,0.22);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(108,92,231,0.1);
    pointer-events: none;
}
.hero-callout svg { flex-shrink: 0; }

/* Callout A — top-left, near sidebar/chat boundary, green Deploy.
   Use right-relative % (not fixed left px) so it tracks the mockup edge
   when the container is fluid between 1101-1200px. */
.hero-callout-a {
    top: 44px;
    right: 52%;
    color: var(--text);
    border-color: rgba(74,222,128,0.3);
    animation:
        hero-callout-in 0.6s 0.9s cubic-bezier(0.22,1,0.36,1) both,
        hero-callout-float 6s 1.6s ease-in-out infinite;
}
.hero-callout-a svg { color: #4ade80; }

/* Callout B — lower area, teal SSH status */
.hero-callout-b {
    bottom: 82px;
    left: 18px;
    border-color: rgba(0,206,201,0.3);
    animation:
        hero-callout-in 0.6s 1.1s cubic-bezier(0.22,1,0.36,1) both,
        hero-callout-float 7s 2s ease-in-out infinite;
}
.hero-callout-b svg { color: var(--accent); }
.hero-callout-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.hero-callout-dot-green { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,0.7); }

/* ── Staggered reveals ─────────────────────────────────────────────────── */
.hero-reveal-1 { animation: hero-fade-up 0.65s 0.10s cubic-bezier(0.22,1,0.36,1) both; }
.hero-reveal-2 { animation: hero-fade-up 0.7s  0.22s cubic-bezier(0.22,1,0.36,1) both; }
.hero-reveal-3 { animation: hero-fade-up 0.7s  0.34s cubic-bezier(0.22,1,0.36,1) both; }
.hero-reveal-4 { animation: hero-fade-up 0.7s  0.44s cubic-bezier(0.22,1,0.36,1) both; }
.hero-reveal-5 { animation: hero-fade-up 0.7s  0.54s cubic-bezier(0.22,1,0.36,1) both; }
/* Mockup rises with scale — earlier than trust pills, longer duration */
.hero-reveal-6 { animation: hero-rise   0.9s  0.40s cubic-bezier(0.22,1,0.36,1) both; }
/* Scene wrapper: opacity-only fade (NO transform — keeps position:fixed popup compat) */
.hero-reveal-scene { animation: hero-scene-fade 0.8s 0.35s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes hero-scene-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Light theme toning ─────────────────────────────────────────────────── */
body.light-theme .hero-grid-overlay {
    background-image:
        linear-gradient(rgba(108,92,231,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,92,231,0.028) 1px, transparent 1px);
}
body.light-theme .hero-bg-aurora {
    background:
        radial-gradient(ellipse 55% 50% at 70% 45%, rgba(108,92,231,0.06) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 30% 35%, rgba(0,206,201,0.04) 0%, transparent 60%);
}
body.light-theme .hero-beam {
    background: linear-gradient(180deg, transparent, rgba(108,92,231,0.07), rgba(0,206,201,0.05), transparent);
}
body.light-theme .hero-btn-cta.btn.btn-primary {
    box-shadow: 0 4px 16px rgba(108,92,231,0.28), 0 1px 0 rgba(255,255,255,0.5) inset;
}
body.light-theme .hero-preview-scene::before { opacity: 0.4; }
body.light-theme .hero-preview.hero-preview-3d .hpc-frame {
    box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(108,92,231,0.14);
}
body.light-theme .hero-pill {
    background: rgba(255,255,255,0.65);
    border-color: rgba(108,92,231,0.15);
}
body.light-theme .hero-callout {
    background: rgba(255,255,255,0.85);
    border-color: rgba(108,92,231,0.18);
    color: var(--text);
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hero-bg-aurora,
    .hero-beam,
    .hero-preview.hero-preview-3d,
    .hero-badge,
    .hero-reveal-1, .hero-reveal-2, .hero-reveal-3,
    .hero-reveal-4, .hero-reveal-5, .hero-reveal-6,
    .hero-reveal-scene,
    .hero-callout-a, .hero-callout-b {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .hero-btn-cta.btn.btn-primary,
    .hero-btn-tg.btn.btn-ghost,
    .hero-pill { transition: none !important; }
}

/* ── Callouts hidden early to avoid crowding the fluid-width 993-1100px band ── */
@media (max-width: 1100px) {
    .hero-callout { display: none; }
}

/* ── Tablet ≤992px — single column stack ────────────────────────────────── */
@media (max-width: 992px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hero-content-wrap {
        text-align: center;
    }
    .hero-title { text-align: center; }
    .hero-subtitle { margin: 0 auto 28px; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-trust { justify-content: center; }
    /* Mockup: back to centered flow */
    .hero-preview.hero-preview-3d {
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
        animation: none;
        transform: none;
    }
}

/* ── Mobile ≤768px ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero { padding: 110px 0 48px; min-height: auto; }
    .hero-actions { margin-bottom: 28px; }
    .hero-preview.hero-preview-3d { animation: none; transform: none; padding: 0; max-width: 100%; }
    .hero-preview.hero-preview-3d .hpc-side { transform: none; }
    .hero-preview.hero-preview-3d .hpc-main { transform: none; }
    .hero-preview .hpc-side { width: auto; }
    .hero-bg-aurora { animation-duration: 30s; }
}

/* ── Small phones ≤480px ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .hero { padding: 96px 0 40px; }
    .hero-actions { flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
    .hero-actions .btn { width: 100%; max-width: 340px; justify-content: center; }
    .hero-beam-1, .hero-beam-2, .hero-beam-3 { display: none; }
    .hero-bg-aurora { animation: none; }
}
/* == END HERO REDESIGN 2026-06b (Asymmetric 2-column) == */

/* ════════════════════════════════════════════════════════════════════
   PRICING COVERFLOW 2026-06 — «цирковое колесо» тарифов (pricing-coverflow.js)
   Активна только на широких экранах (JS снимает класс ≤880px → нативная сетка).
   CSP-safe: позиции через [data-pcf], без inline-style.
   ════════════════════════════════════════════════════════════════════ */
.pricing-grid.pricing-coverflow {
    display: block; position: relative;
    height: 640px; margin: 36px auto 0; max-width: 1300px;
    perspective: 2200px;
    grid-template-columns: none;
}
/* JS (rAF-орбита) выставляет transform/opacity/z-index покадрово → НЕТ CSS-transition,
   движение круговое и плавное (а не линейная интерполяция между слотами). */
.pricing-coverflow .pricing-card {
    position: absolute; top: 50%; left: 50%; width: 330px; margin: 0;
    transform-style: preserve-3d; backface-visibility: hidden; cursor: pointer;
    will-change: transform, opacity; transform: translate(-50%, -50%);
}
/* передняя (центральная) карточка — фирменное свечение + обычный курсор (CTA кликается) */
.pricing-coverflow .pricing-card.pcf-front {
    cursor: default;
    box-shadow: 0 36px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(108, 92, 231, .45), 0 0 70px rgba(108, 92, 231, .28);
}

/* ── контролы ── */
.pcf-controls {
    display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 30px;
}
.pcf-controls.pcf-hidden { display: none; }
.pcf-arrow {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: var(--text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .22s ease, transform .22s ease, border-color .22s ease, opacity .22s ease;
}
.pcf-arrow:hover { background: rgba(108, 92, 231, .2); border-color: rgba(108, 92, 231, .5); transform: scale(1.09); }
.pcf-arrow:disabled { opacity: .3; cursor: default; }
.pcf-arrow:disabled:hover { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); transform: none; }
.pcf-dots { display: flex; align-items: center; gap: 10px; }
.pcf-dot {
    width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .22); transition: width .3s ease, background .3s ease, border-radius .3s ease;
}
.pcf-dot:hover { background: rgba(255, 255, 255, .4); }
.pcf-dot-on { width: 28px; border-radius: 5px; background: var(--gradient); }

body.light-theme .pcf-arrow { border-color: rgba(15, 18, 40, .14); background: rgba(15, 18, 40, .03); }
body.light-theme .pcf-dot { background: rgba(15, 18, 40, .2); }

@media (prefers-reduced-motion: reduce) {
    .pricing-coverflow .pricing-card { transition: opacity .25s ease; will-change: auto; }
}

/* ════════════════════════════════════════════════════════════════════
   Mobile hardening pass — RLM-аудит 2026-06-17 [claude]. ТОЛЬКО ADDITIVE
   оверрайды: предотвращают горизонтальный скролл, поднимают тач-таргеты до
   44px (WCAG) и снимают тяжёлый blur на мобиле. Дизайн-намерения Codex не
   переписываем (используем min()/max-width, а не жёсткую смену раскладки).
   ════════════════════════════════════════════════════════════════════ */

/* P0 — анти-overflow: попапы и карточки никогда не шире вьюпорта */
.nav-support-popup, .hp-pop-rich, .support-popup, .hpc-pop, .pricing-card {
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
}
/* P0 — hero-grid с minmax(440px) распирал планшет 769–992px: пол → min(440px,100%) */
.hero-layout { grid-template-columns: minmax(min(440px, 100%), 1.14fr) 0.9fr; }
/* P0 — hero-preview зафиксирован на 880px: на узком контейнере ужимаем */
.hero-preview.hero-preview-3d { max-width: 100%; }
/* P0 — большой фоновый glow не должен расширять layout (iOS Safari) */
.bg-glow-1, .bg-glow-2 { contain: paint; }

/* P0 — rich-попап с min-width:380px на очень узких экранах */
@media (max-width: 420px) {
    .hp-pop-rich { min-width: 0; max-width: calc(100vw - 20px); }
}

/* P1 — тач-таргеты ≥44px на мобиле */
@media (max-width: 768px) {
    .nav-burger, .nav-theme-btn, .hpc-top-btn, .support-popup-close,
    .hpc-ib, .hpc-attach-act, .hpc-attach-dl, .lang-tag, .footer-col a {
        min-width: 44px;
        min-height: 44px;
    }
    .support-popup-close, .lang-tag, .footer-col a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    /* P1 — blur тяжёл для мобильных GPU: снимаем на карточках */
    .feature-card, .pricing-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* P1 — высоты фреймов/coverflow не должны превышать экран на маленьких */
@media (max-width: 480px) {
    .hpc-frame { height: min(500px, 72vh); }
    .pricing-grid.pricing-coverflow { height: min(640px, 80vh); }
    .pricing-coverflow .pricing-card { width: min(330px, calc(100vw - 48px)); }
}

/* P2 — hover-эффекты только для устройств с настоящим hover */
@media (hover: none) {
    .hero-pill:hover { transform: none; }
}
