/* Токены подключаются в site_head.php (charisma-tokens.css). */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body.ch-site {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ch-page);
    background-image: var(--ch-gradient-page);
    background-attachment: fixed;
    color: var(--ch-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body.ch-site.is-menu-open {
    overflow: hidden;
}

.ch-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Фоновые орбы */
.ch-page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ch-page-bg::before,
.ch-page-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.ch-page-bg::before {
    width: 480px;
    height: 480px;
    top: -12%;
    left: -8%;
    background: rgba(124, 58, 237, 0.45);
    animation: chOrbA 16s ease-in-out infinite;
}

.ch-page-bg::after {
    width: 400px;
    height: 400px;
    top: 8%;
    right: -6%;
    background: rgba(37, 99, 235, 0.32);
    animation: chOrbB 20s ease-in-out infinite;
}

@keyframes chOrbA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(32px, 24px) scale(1.06); }
}

@keyframes chOrbB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-28px, 20px) scale(1.08); }
}

/* Шапка */
.ch-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: var(--ch-header-glass);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--ch-border);
    transition:
        padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease,
        background 0.35s ease;
}

.ch-header.is-scrolled {
    padding: 10px 0;
    background: rgba(4, 6, 12, 0.94);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ch-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ch-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.ch-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ch-gradient-brand);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ch-logo:hover .ch-logo-icon {
    transform: scale(1.05) rotate(-4deg);
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.5);
}

.ch-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ch-logo-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ch-text);
}

.ch-logo-sub {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ch-muted);
}

.ch-logo--compact .ch-logo-text,
.ch-logo--footer .ch-logo-text {
    display: none;
}

.ch-nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ch-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ch-muted);
    text-decoration: none;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.ch-nav-link i {
    font-size: 12px;
    opacity: 0.85;
}

.ch-nav-link:hover {
    color: var(--ch-accent-soft);
    background: rgba(99, 102, 241, 0.12);
}

.ch-nav-link.is-active {
    color: var(--ch-accent-soft);
    background: rgba(99, 102, 241, 0.18);
    font-weight: 600;
}

.ch-nav-cta {
    margin-left: 8px;
}

.ch-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ch-border);
    border-radius: 10px;
    background: var(--ch-input);
    color: var(--ch-text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.ch-menu-toggle:hover {
    border-color: var(--ch-accent);
    color: var(--ch-accent-soft);
}

/* Мобильное меню */
.ch-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ch-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.ch-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 92vw);
    height: 100%;
    z-index: 9999;
    background: var(--ch-surface);
    border-left: 1px solid var(--ch-border);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.ch-menu-drawer.is-open {
    transform: translateX(0);
}

.ch-menu-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.ch-menu-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--ch-border);
    border-radius: 10px;
    background: transparent;
    color: var(--ch-text);
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.ch-menu-close:hover {
    border-color: var(--ch-accent);
    color: var(--ch-accent-soft);
}

.ch-menu-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ch-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    color: var(--ch-text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.ch-menu-link i {
    width: 20px;
    color: var(--ch-muted);
    transition: color 0.25s ease;
}

.ch-menu-link:hover,
.ch-menu-link.is-active {
    background: rgba(99, 102, 241, 0.14);
    color: var(--ch-accent-soft);
}

.ch-menu-link:hover i,
.ch-menu-link.is-active i {
    color: var(--ch-accent-soft);
}

.ch-menu-link--accent {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Основной контент */
.ch-main {
    position: relative;
    z-index: 1;
    padding-top: 88px;
    min-height: calc(100vh - 200px);
    animation: chPageIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* Кнопки */
.ch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition:
        transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
        box-shadow 0.28s ease,
        filter 0.28s ease,
        background 0.28s ease;
}

.ch-btn--primary {
    background: var(--ch-gradient-brand);
    color: #fff;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.38);
}

.ch-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.45);
    filter: brightness(1.05);
}

.ch-btn--ghost {
    background: rgba(99, 102, 241, 0.1);
    color: var(--ch-accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.ch-btn--ghost:hover {
    background: rgba(99, 102, 241, 0.18);
    transform: translateY(-2px);
}

.ch-btn--telegram {
    background: linear-gradient(135deg, #0088cc, #24a1de);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 136, 204, 0.3);
}

.ch-btn--telegram:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.ch-btn--sm {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
}

.ch-btn:disabled,
.ch-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Герой портала */
.ch-portal-hero {
    padding: 48px 0 56px;
    text-align: center;
}

.ch-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ch-purple);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 999px;
    animation: chBadgeGlow 3.5s ease-in-out infinite;
}

@keyframes chBadgeGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
    50% { box-shadow: 0 0 24px 2px rgba(168, 85, 247, 0.22); }
}

.ch-portal-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--ch-text);
    margin-bottom: 16px;
}

.ch-portal-title em {
    font-style: normal;
    background: linear-gradient(90deg, var(--ch-accent-soft), var(--ch-purple), var(--ch-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: chGradientShift 6s linear infinite;
}

@keyframes chGradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.ch-portal-lead {
    font-size: 1.05rem;
    color: var(--ch-muted);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.ch-portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

/* Сетка быстрых действий */
.ch-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 56px;
}

.ch-action-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 24px;
    border-radius: var(--border-radius-lg);
    background: var(--ch-card);
    border: 1px solid var(--ch-border);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.ch-action-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ch-action-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.ch-action-card:hover::before {
    opacity: 1;
}

.ch-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: var(--ch-gradient-brand);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ch-action-card:hover .ch-action-icon {
    transform: scale(1.08) rotate(-4deg);
}

.ch-action-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ch-text);
    position: relative;
}

.ch-action-card p {
    font-size: 14px;
    color: var(--ch-muted);
    line-height: 1.55;
    position: relative;
}

.ch-action-arrow {
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--ch-accent-soft);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: gap 0.25s ease;
}

.ch-action-card:hover .ch-action-arrow {
    gap: 10px;
}

/* Мини-фичи */
.ch-features-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 56px;
}

.ch-feature-pill {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid var(--ch-border-soft);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.ch-feature-pill:hover {
    border-color: rgba(129, 140, 248, 0.4);
    transform: translateY(-3px);
}

.ch-feature-pill i {
    color: var(--ch-accent-soft);
    font-size: 1.1rem;
    margin-top: 2px;
}

.ch-feature-pill strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ch-text);
    margin-bottom: 4px;
}

.ch-feature-pill span {
    font-size: 13px;
    color: var(--ch-muted);
    line-height: 1.5;
}

/* Заголовки страниц */
.ch-page-hero {
    padding: 32px 0 40px;
    text-align: center;
}

.ch-page-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ch-text);
    margin-bottom: 12px;
}

.ch-page-hero h1::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    margin: 16px auto 0;
    border-radius: 2px;
    background: var(--ch-gradient-brand);
}

.ch-page-hero p {
    color: var(--ch-muted);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
}

.ch-section {
    padding: 24px 0 64px;
}

.ch-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ch-text);
    margin-bottom: 20px;
    text-align: center;
}

/* Тарифы */
.ch-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto 32px;
}

.ch-price-card {
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
    border-radius: var(--border-radius-lg);
    background: var(--ch-card);
    border: 1px solid var(--ch-border);
    text-align: center;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.ch-price-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: var(--shadow-lg);
}

.ch-price-card.is-featured {
    border-color: rgba(129, 140, 248, 0.55);
    background: linear-gradient(155deg, rgba(79, 70, 229, 0.28) 0%, rgba(18, 24, 38, 0.98) 50%);
    animation: chFeaturedPulse 5s ease-in-out infinite;
}

@keyframes chFeaturedPulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2), var(--shadow); }
    50% { box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.45), 0 0 40px rgba(99, 102, 241, 0.18); }
}

.ch-price-badge {
    align-self: center;
    margin-bottom: 12px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ch-accent);
    border-radius: 999px;
}

.ch-price-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ch-muted);
    margin-bottom: 8px;
}

.ch-price-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--ch-accent-soft);
    line-height: 1;
    margin-bottom: 20px;
}

.ch-price-amount small {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ch-muted);
}

.ch-price-card .ch-btn {
    width: 100%;
    margin-top: auto;
}

.ch-price-features {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    text-align: left;
    flex: 1;
}

.ch-price-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ch-muted);
    margin-bottom: 10px;
}

.ch-price-features li i {
    color: var(--success);
    margin-top: 3px;
}

.ch-note {
    text-align: center;
    font-size: 14px;
    color: var(--ch-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ch-note i {
    color: var(--ch-accent);
}

/* Скачивание */
.ch-download-panel {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 36px;
    border-radius: var(--border-radius-lg);
    background: var(--ch-card);
    border: 1px solid var(--ch-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
}

.ch-tabs {
    display: inline-flex;
    padding: 6px;
    margin-bottom: 32px;
    background: var(--ch-input);
    border: 1px solid var(--ch-border);
    border-radius: 12px;
}

.ch-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ch-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.ch-tab:hover {
    color: var(--ch-accent-soft);
}

.ch-tab.is-active {
    background: var(--ch-card-solid);
    color: var(--ch-accent-soft);
    box-shadow: var(--shadow);
}

.ch-device-panel {
    display: none;
    animation: chFadeUp 0.45s ease;
}

.ch-device-panel.is-active {
    display: block;
}

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

.ch-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.ch-status-pill--ok {
    color: var(--success);
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.ch-status-pill--err {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.ch-download-device-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--ch-text);
}

.ch-download-device-lead {
    font-size: 15px;
    color: var(--ch-muted);
    margin-bottom: 4px;
}

.ch-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.ch-download-foot {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--ch-border-soft);
    text-align: center;
    font-size: 14px;
    color: var(--ch-muted);
}

.ch-download-foot a {
    color: var(--ch-accent-soft);
    font-weight: 600;
}

.ch-version-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.ch-version-cell {
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    background: rgba(7, 9, 16, 0.5);
    border: 1px solid var(--ch-border-soft);
}

.ch-version-cell dt {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ch-muted);
    margin-bottom: 6px;
}

.ch-version-cell dd {
    font-size: 15px;
    font-weight: 600;
    color: var(--ch-text);
}

.ch-instructions {
    margin-top: 24px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: rgba(7, 9, 16, 0.45);
    border-left: 3px solid var(--ch-accent);
}

.ch-instructions h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--ch-text);
}

.ch-instructions h4 i {
    color: var(--ch-accent-soft);
}

.ch-instructions p {
    font-size: 14px;
    color: var(--ch-muted);
    line-height: 1.65;
}

.ch-placeholder {
    text-align: center;
    padding: 32px 16px;
}

.ch-placeholder p {
    margin-top: 14px;
    color: var(--ch-muted);
    font-size: 15px;
}

.ch-placeholder a {
    color: var(--ch-accent-soft);
    font-weight: 600;
}

/* Партнёрка */
.ch-partner-card {
    max-width: 880px;
    margin: 0 auto 48px;
    padding: 28px 32px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(37, 99, 235, 0.08));
    border: 1px solid var(--ch-border);
}

.ch-partner-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--ch-text);
}

.ch-partner-card p {
    font-size: 14px;
    color: var(--ch-muted);
    line-height: 1.65;
    margin-bottom: 12px;
}

.ch-partner-card a {
    color: var(--ch-accent-soft);
    font-weight: 600;
}

.ch-partner-code {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--ch-border);
    font-family: ui-monospace, monospace;
    font-size: 13px;
    word-break: break-all;
    color: var(--ch-text);
}

/* Telegram CTA */
.ch-tg-banner {
    max-width: 880px;
    margin: 0 auto 48px;
    padding: 32px 36px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.25), rgba(36, 161, 222, 0.15));
    border: 1px solid rgba(36, 161, 222, 0.35);
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.ch-tg-banner i.fa-telegram {
    font-size: 2.5rem;
    color: #38bdf8;
}

.ch-tg-banner-text h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--ch-text);
}

.ch-tg-banner-text p {
    font-size: 14px;
    color: var(--ch-muted);
}

/* Контент-страницы (privacy и т.д.) */
.ch-doc-wrap {
    padding: 24px 0 72px;
}

.ch-doc-card {
    padding: 28px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    background: var(--ch-card);
    border: 1px solid var(--ch-border);
    box-shadow: var(--shadow);
}

/* Reveal — контент виден сразу; анимация только при работающем JS */
.ch-reveal,
.ch-stagger > * {
    opacity: 1;
    transform: translateY(0);
}

html.ch-js-ready .ch-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

html.ch-js-ready .ch-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

html.ch-js-ready .ch-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

html.ch-js-ready .ch-stagger > *.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ch-stagger > *:nth-child(1) { transition-delay: 0.04s; }
.ch-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.ch-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.ch-stagger > *:nth-child(4) { transition-delay: 0.22s; }
.ch-stagger > *:nth-child(5) { transition-delay: 0.28s; }
.ch-stagger > *:nth-child(6) { transition-delay: 0.34s; }

/* Модалка скачивания */
.ch-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ch-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.ch-modal {
    width: 100%;
    max-width: 440px;
    padding: 40px 32px;
    border-radius: var(--border-radius-lg);
    background: var(--ch-card-solid);
    border: 1px solid var(--ch-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ch-modal-overlay.is-open .ch-modal {
    transform: translateY(0) scale(1);
}

.ch-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--ch-muted);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.25s ease, background 0.25s ease;
}

.ch-modal-close:hover {
    color: var(--ch-accent-soft);
    background: rgba(99, 102, 241, 0.12);
}

.ch-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ch-gradient-brand);
    color: #fff;
    font-size: 1.75rem;
}

.ch-modal h3 {
    text-align: center;
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: var(--ch-text);
}

.ch-modal-lead {
    text-align: center;
    color: var(--ch-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ch-modal-tip {
    padding: 14px 16px;
    border-radius: var(--border-radius);
    background: rgba(7, 9, 16, 0.55);
    border: 1px solid var(--ch-border);
    font-size: 13px;
    color: var(--ch-muted);
    margin-bottom: 16px;
}

.ch-modal-countdown {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--ch-accent-soft);
    animation: chCountPulse 1s ease-in-out infinite;
}

@keyframes chCountPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Футер */
.ch-footer {
    position: relative;
    z-index: 1;
    margin-top: 48px;
    padding: 56px 0 32px;
    background: var(--footer-bg);
    border-top: 1px solid var(--ch-border-soft);
}

.ch-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.ch-footer-tagline {
    margin-top: 14px;
    font-size: 14px;
    color: var(--ch-muted);
    line-height: 1.6;
    max-width: 280px;
}

.ch-footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.ch-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--ch-text);
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease;
}

.ch-social:hover {
    background: var(--ch-accent);
    transform: translateY(-3px);
}

.ch-footer-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--ch-text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ch-footer-link {
    display: block;
    color: var(--ch-muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.ch-footer-link:hover {
    color: var(--ch-text);
    transform: translateX(4px);
}

.ch-footer-bottom {
    padding-top: 28px;
    border-top: 1px solid var(--ch-border-soft);
    text-align: center;
    font-size: 13px;
    color: var(--ch-muted);
}

/* Адаптив */
@media (max-width: 960px) {
    .ch-nav-desktop {
        display: none;
    }

    .ch-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ch-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 640px) {
    .ch-main {
        padding-top: 80px;
    }

    .ch-download-panel {
        padding: 28px 20px;
    }

    .ch-tabs {
        width: 100%;
        flex-direction: column;
    }

    .ch-tab {
        width: 100%;
        justify-content: center;
    }

    .ch-tg-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ch-reveal,
    .ch-stagger > *,
    html.ch-js-ready .ch-reveal,
    html.ch-js-ready .ch-stagger > * {
        opacity: 1 !important;
        transform: none !important;
    }

    .ch-main {
        animation: none;
    }
}

/* ═══════ Реферальная программа на лендинге ═══════════════════ */

.ch-ref-section { position: relative; }

.ch-ref-hero { text-align: center; margin-bottom: 56px; }

.ch-ref-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: var(--ch-accent-soft);
    font-size: 0.92rem; font-weight: 600;
    margin-bottom: 24px;
}
.ch-ref-badge-icon { font-size: 1.1rem; filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.7)); }
.ch-ref-badge strong { color: var(--ch-purple); font-weight: 800; }

.ch-ref-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800; line-height: 1.2; letter-spacing: -0.025em;
    color: var(--ch-text); margin: 0 0 16px;
}

.ch-ref-gradient {
    background: linear-gradient(135deg, #c084fc 0%, #6366f1 50%, #3b82f6 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

.ch-ref-lead {
    font-size: 1.1rem; line-height: 1.6;
    color: var(--ch-muted); max-width: 640px; margin: 0 auto;
}

.ch-ref-steps {
    display: grid; grid-template-columns: 1fr; gap: 18px;
    margin-bottom: 56px;
}
@media (min-width: 720px) { .ch-ref-steps { grid-template-columns: repeat(3, 1fr); } }

.ch-ref-step {
    position: relative; padding: 24px;
    background: var(--ch-card);
    border: 1px solid var(--ch-border); border-radius: 16px;
    transition: transform 0.3s, border-color 0.3s;
}
.ch-ref-step:hover { transform: translateY(-4px); border-color: rgba(129, 140, 248, 0.5); }

.ch-ref-step-num {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--ch-gradient-brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 800;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.ch-ref-step h4 {
    font-size: 1.15rem; font-weight: 700; color: var(--ch-text);
    margin: 0 0 8px;
}
.ch-ref-step p { color: var(--ch-muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }

.ch-ref-h3 {
    text-align: center; font-size: 1.5rem; font-weight: 700;
    color: var(--ch-text); margin: 0 0 24px; letter-spacing: -0.015em;
}

.ch-ref-tiers {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    margin-bottom: 48px;
}
@media (min-width: 720px) { .ch-ref-tiers { grid-template-columns: repeat(5, 1fr); } }

.ch-ref-tier {
    text-align: center; padding: 18px 14px;
    background: var(--ch-card);
    border: 1px solid var(--ch-border); border-radius: 16px;
    transition: transform 0.25s, box-shadow 0.25s;
}
.ch-ref-tier:hover { transform: translateY(-3px); }

.ch-ref-tier-icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.ch-ref-tier-name { font-size: 1rem; font-weight: 700; color: var(--ch-text); margin-bottom: 4px; }
.ch-ref-tier-cond { font-size: 0.8rem; color: var(--ch-muted); margin-bottom: 10px; }
.ch-ref-tier-pct  { font-size: 0.92rem; font-weight: 700; color: var(--ch-accent-soft); font-variant-numeric: tabular-nums; }

.ch-ref-tier--platinum {
    border-color: rgba(192, 132, 252, 0.5);
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.12), rgba(124, 58, 237, 0.08));
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.15);
}
.ch-ref-tier--platinum .ch-ref-tier-pct { color: #f3e8ff; }
.ch-ref-tier--gold {
    border-color: rgba(250, 204, 21, 0.4);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.08), rgba(234, 179, 8, 0.05));
}
.ch-ref-tier--gold .ch-ref-tier-pct { color: #fde047; }
.ch-ref-tier--silver { border-color: rgba(203, 213, 225, 0.35); }
.ch-ref-tier--bronze { border-color: rgba(202, 138, 4, 0.4); }
.ch-ref-tier--bronze .ch-ref-tier-pct { color: #fbbf24; }

.ch-ref-calc {
    background:
        radial-gradient(circle at top right, rgba(192, 132, 252, 0.15), transparent 60%),
        rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(192, 132, 252, 0.3);
    border-radius: 18px; padding: 24px 28px;
    margin-bottom: 36px;
}
.ch-ref-calc h4 { font-size: 1.15rem; font-weight: 700; color: var(--ch-text); margin: 0 0 10px; }
.ch-ref-calc p  { color: rgba(232, 238, 248, 0.85); font-size: 0.98rem; line-height: 1.6; margin: 0; }
.ch-ref-calc code {
    background: rgba(7, 9, 16, 0.5);
    padding: 2px 8px; border-radius: 6px;
    font-size: 0.88rem; color: var(--ch-accent-soft);
    border: 1px solid rgba(129, 140, 248, 0.25);
}
.ch-ref-highlight { color: var(--ch-purple); font-weight: 700; font-size: 1.05em; }

.ch-ref-cta {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
    margin-bottom: 20px;
}
.ch-btn--large {
    padding: 14px 28px !important;
    font-size: 1rem !important;
}

.ch-ref-tos {
    text-align: center; color: var(--ch-muted);
    font-size: 0.82rem; line-height: 1.5;
    max-width: 580px; margin: 0 auto; opacity: 0.75;
}
