:root {
    --hdr-bg: rgba(255, 255, 255, 0.9);
    --hdr-border: rgba(2, 6, 23, 0.08);
    --text: #0f172a;
    --muted: #64748b;
    --accent: #2aa2de;
}
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--hdr-bg);
    backdrop-filter: saturate(1.05) blur(8px);
    -webkit-backdrop-filter: saturate(1.05) blur(8px);
    border-bottom: 1px solid var(--hdr-border);
}
.hdr-bar {
    max-width: 1170px; margin: 0 auto;
    display: grid; grid-template-columns: auto 1fr auto auto;
    gap: 16px; padding: 12px 0; align-items: center;
}
.hdr-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.hdr-brand__logo { width: 44px; height: 44px; object-fit: contain; }
.hdr-brand__name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }

.hdr-nav { display: flex; gap: clamp(10px, 3vw, 24px); align-items: center; justify-content: center; }
.hdr-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; opacity: .95; }
.hdr-nav a:hover { color: var(--accent); }

.hdr-cta {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 16px; border-radius: 10px; color: #000;
    background: #87d172; font-weight: 800; font-size: 16px;
    white-space: nowrap; box-shadow: 0 0 16px 4px rgba(135, 209, 114, 0.6);
}
.hdr-cta:hover { box-shadow: none; }

.hdr-burger {
    display: none; width: 44px; height: 44px; padding: 0;
    border-radius: 10px; border: 1px solid var(--hdr-border);
    background: #fff; cursor: pointer;
    align-items: center; justify-content: center;
}
.hdr-burger svg { width: 24px; height: 24px; color: var(--text); }

/* Полноэкранное меню — вне зависимости от высоты хедера */
.mm {
    position: fixed; inset: 0; z-index: 9999;
    display: none;
    background: #ffffff;
    overscroll-behavior: contain; /* не прокручиваем фон */
}
.mm[aria-hidden="false"] { display: block; }

.mm__panel {
    position: relative;
    box-sizing: border-box;
    width: 100%; height: 100%;
    padding: 20px; background: #ffffff;
    display: flex; flex-direction: column; gap: 12px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.mm__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mm-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mm-nav a {
    display: block; padding: 14px 10px; border-radius: 12px;
    text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; text-align: center;
    background: #f4f8fb; border: 1px solid #e5edf2;
}
.mm-nav a:hover { background: #e8f0f5; color: var(--accent); }
.mm-cta { margin-top: auto; display: grid; gap: 10px; }
.mm-cta .btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 16px; border-radius: 12px; font-weight: 800; background: #87d172; color: #000;
}
.mm-cta .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 16px; border-radius: 12px; font-weight: 800; background: #fff; color: var(--accent); border: 1px solid #cbd5e1;
}

@media (max-width: 980px) {
    .hdr-nav { display: none; }
    .hdr-cta { display: none; }
    .hdr-burger { display: inline-flex; }
    .hdr-bar { grid-template-columns: auto 1fr auto; padding: 10px 0; }
}
@media (max-width: 520px) {
    .hdr-brand__name { display: none; }
    .hdr-brand__logo { width: 38px; height: 38px; }
}


/* Анимация кнопки «Создать демо-бота» */

/* Двухшаговый прогресс на кнопке */
.btn-btn {
    position: relative;
}

.btn-btn.is-loading,
.btn-btn.is-verified {
    pointer-events: none;
}

.btn-btn.is-loading {
    opacity: .95;
}

.btn-btn.is-loading::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .18);
    border-top-color: rgba(0, 0, 0, .6);
    animation: bp-spin .8s linear infinite;
}

.btn-btn.is-verified {
    background: #16a34a; /* зелёный */
    color: #fff;
    box-shadow: 0 6px 18px rgba(22, 163, 74, .18);
}

.btn-btn.is-verified::before {
    content: "✓";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
}

/* Тост обработки */
.processing-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 99999;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px 10px 38px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
    font: 600 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.processing-toast::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    animation: bp-spin .8s linear infinite;
}

.processing-toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Стадия «успех»: меняем фон и иконку на галочку */
.processing-toast.is-ok {
    background: #16a34a;
}

.processing-toast.is-ok::before {
    content: "✓";
    border: none;
    width: auto;
    height: auto;
    margin-top: 0;
    animation: none;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
}

@keyframes bp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* END aнимация кнопки «Создать демо-бота» */

/* Токены и базовые */
.nx-wrap {
    --nx-text: #111827;
    --nx-muted: #6b7280;
    --nx-border: #e5e7eb;
    --nx-bg: #fff;
    --nx-accent: #4f46e5;
    --nx-green: #10b981;
    --nx-orange: #ff814a;
    --nx-shadow: 0 10px 30px rgba(17, 24, 39, .08);
}

.nx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.nx-title {
    margin: 0 0 12px;
    color: var(--nx-text);
    letter-spacing: -0.02em;
}

.nx-sub {
    margin: 0 0 28px;
    color: var(--nx-muted);
}

/* Карточки возможностей */
.nx-feats {
    margin: 28px 0 56px;
}

.nx-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 768px) {
    .nx-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.nx-card {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: var(--nx-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.nx-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(17, 24, 39, .12);
}

.nx-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: var(--nx-text);
}

.nx-card p {
    margin: 0 0 12px;
    color: var(--nx-muted);
}

.nx-list {
    margin: 0;
    padding-left: 18px;
    color: var(--nx-text);
}

.nx-list li {
    margin: 6px 0;
}

/* Иконки-преимущества */
.nx-advantages {
    margin: 20px 0 48px;
}

.nx-adv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .nx-adv-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .nx-adv-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.nx-adv {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, .06);
}

.nx-adv img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nx-adv p {
    margin: 0;
    font-size: 14px;
    color: var(--nx-text);
    line-height: 1.35;
}

/* Тарифы */
.nx-pricing {
    padding: 16px 0 8px;
}

.nx-pricing-head {
    text-align: center;
    margin-bottom: 20px;
}

.nx-pricing-head .nx-title {
    font-size: 28px;
}

.nx-pricing-head .nx-sub {
    font-size: 14px;
    max-width: 680px;
    margin: 0 auto;
}

.nx-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .nx-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.nx-plan {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    box-shadow: var(--nx-shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    position: relative;
}

.nx-plan--free {
    border-top: 3px solid var(--nx-orange);
}

.nx-plan--pro {
    border-top: 3px solid var(--nx-accent);
}

.nx-plan--prem {
    border-top: 3px solid var(--nx-green);
}

.nx-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #ff8b5c, #ff5cb6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
}

.nx-plan h3 {
    margin: 2px 0 6px;
    font-size: 20px;
}

.nx-plan .nx-note {
    color: var(--nx-muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.nx-price {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 6px 0 10px;
}

.nx-plan ul {
    margin: 10px 0 14px;
    padding-left: 18px;
    font-size: 14px;
    color: var(--nx-text);
}

.nx-plan li {
    margin: 6px 0;
}

.nx-off {
    color: #9ca3af;
    text-decoration: line-through;
}

.nx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: var(--nx-text);
    background: #fff;
}

.nx-btn--primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 6px 18px rgba(79, 70, 229, .25);
}

/* Сравнение (моб. карточки без горизонт-скролла) */
.nx-compare {
    margin: 22px 0 10px;
}

.nx-compare .nx-table-wrap {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    box-shadow: var(--nx-shadow);
    overflow: hidden;
}

.nx-compare table {
    width: 100%;
    border-collapse: collapse;
}

.nx-compare thead th {
    background: #f8fafc;
    color: var(--nx-text);
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--nx-border);
    font-weight: 700;
}

.nx-compare td, .nx-compare th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--nx-border);
    font-size: 14px;
    color: var(--nx-text);
    vertical-align: top;
}

.nx-compare tr:nth-child(odd) td {
    background: #fbfbfd;
}

.nx-compare .nx-section th {
    background: #eef2ff;
    color: #1f2937;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .06em;
    border-top: 1px solid var(--nx-border);
}

@media (max-width: 767px) {
    .nx-compare thead {
        display: none;
    }

    .nx-compare table, .nx-compare tbody, .nx-compare tr, .nx-compare td, .nx-compare th {
        display: block;
        width: 100%;
    }

    .nx-compare .nx-section {
        margin: 16px 0 8px;
    }

    .nx-compare .nx-section th {
        border: none;
        padding: 10px 0;
        border-radius: 0;
        background: transparent;
    }

    .nx-compare tr {
        background: #fff;
        border: 1px solid var(--nx-border);
        border-radius: 12px;
        margin: 10px 0;
        overflow: hidden;
    }

    .nx-compare tr td {
        border: none;
        border-bottom: 1px solid #f3f4f6;
    }

    .nx-compare tr td:last-child {
        border-bottom: none;
    }

    .nx-compare td.nx-feature {
        background: #f8fafc;
        font-weight: 700;
    }

    .nx-compare td:not(.nx-feature)::before {
        content: attr(data-title) " — ";
        color: var(--nx-muted);
        font-weight: 600;
        display: inline-block;
        min-width: 96px;
    }
}

/* Бонус */
.nx-bonus {
    margin: 18px 0 26px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
}

.nx-bonus h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.nx-bonus p {
    margin: 0;
    font-size: 14px;
    opacity: .95;
}

/* Таблица из PHP */
.nx-tariffs {
    margin: 28px 0 32px;
}

.nx-tariffs .nx-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--nx-shadow);
}

.nx-tariffs .nx-table th, .nx-tariffs .nx-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--nx-border);
    text-align: left;
    font-size: 14px;
}

.nx-tariffs .nx-table thead th {
    background: #f8fafc;
    font-weight: 700;
}

.nx-tariffs .nx-table tbody tr:hover {
    background: #fbfbfd;
}

@media (max-width: 640px) {
    .nx-tariffs .nx-table thead {
        display: none;
    }

    .nx-tariffs .nx-table, .nx-tariffs .nx-table tbody, .nx-tariffs .nx-table tr, .nx-tariffs .nx-table td {
        display: block;
        width: 100%;
    }

    .nx-tariffs .nx-table tr {
        border: 1px solid var(--nx-border);
        border-radius: 12px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    .nx-tariffs .nx-table td {
        border: none;
        border-bottom: 1px solid #f3f4f6;
    }

    .nx-tariffs .nx-table td:last-child {
        border-bottom: none;
    }

    .nx-tariffs .nx-table td[data-head]::before {
        content: attr(data-head) ": ";
        font-weight: 600;
        color: var(--nx-muted);
    }
}

/* CTA */
.nx-cta {
    display: flex;
    justify-content: center;
    margin: 18px 0 34px;
}

.nx-cta .nx-btn {
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 12px;
}

/* Аккордеоны */
.nx-acc {
    margin: 32px 0 60px;
}

.nx-acc details {
    border: 1px solid var(--nx-border);
    border-radius: 14px;
    background: #fff;
    padding: 10px 14px;
    box-shadow: 0 8px 18px rgba(17, 24, 39, .05);
    margin-bottom: 12px;
}

.nx-acc summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--nx-text);
}

.nx-acc summary::-webkit-details-marker {
    display: none;
}

.nx-acc details[open] {
    border-color: #c7d2fe;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .12);
}

.nx-acc .nx-acc-body {
    padding: 10px 0 6px;
    color: var(--nx-text);
}

.nx-acc .nx-acc-body ul {
    margin: 0;
    padding-left: 18px;
}

.nx-acc .nx-acc-body li {
    margin: 6px 0;
}

.nx-acc .nx-img-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--nx-border);
}

.nx-acc .nx-img-scroll img {
    display: block;
    height: auto;
}

/* Похожие кейсы в caseview */
.caseview-bottom { margin-top: 40px; border-top: 1px solid #e5e7eb; padding-top: 20px; }
.caseview-prevnext { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.caseview-prevnext a, .caseview-prevnext span {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px;
    background: #fff; color: #0f172a; text-decoration: none; font-weight: 700;
}
.caseview-prevnext span { opacity: .5; }
.caseview-related h3 { margin: 6px 0 14px; font-size: 18px; }
.caseview-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 12px; }
.caseview-related-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px;
    text-decoration: none; color: #0f172a;
    box-shadow: 0 6px 16px rgba(0,0,0,.05);
    transition: transform .15s ease, box-shadow .15s ease;
}
.caseview-related-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.08); }
.caseview-related-title { font-weight: 700; margin: 0 0 8px; font-size: 16px; }
.caseview-related-meta { font-size: 13px; color: #64748b; display: flex; gap: 10px; flex-wrap: wrap; }