:root {
    --bi-bg: #eeeae0;
    --bi-paper: rgba(255, 255, 255, 0.62);
    --bi-paper-strong: rgba(255, 255, 255, 0.78);
    --bi-text: #1a2e22;
    --bi-muted: #5a7865;
    --bi-line: rgba(40, 70, 50, 0.1);
    --bi-brand: #3d9e72;
    --bi-brand-dark: #1e5c3a;
    --bi-brand-light: #7ec49a;
    --bi-accent: #f4b350;
    --bi-shadow: 0 20px 52px rgba(40, 70, 50, 0.1);
    --bi-radius: 24px;
    --bi-radius-sm: 16px;
    --bi-shell: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.bi-site {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--bi-text);
    background:
        radial-gradient(ellipse at 15% 10%, rgba(160, 210, 180, 0.32) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 90%, rgba(220, 200, 170, 0.28) 0%, transparent 40%),
        radial-gradient(ellipse at 55% 50%, rgba(240, 235, 220, 0.4) 0%, transparent 60%),
        var(--bi-bg);
}

body.bi-modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.bi-shell {
    width: min(calc(100% - 32px), var(--bi-shell));
    margin: 0 auto;
}

/* =====================
   HEADER
   ===================== */
.bi-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 0;
    backdrop-filter: blur(24px);
    background: rgba(238, 234, 224, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.bi-header__inner,
.bi-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.bi-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Кнопка и поповер поддержки ─────────────────────────────────────────── */

.bi-support-wrap {
    position: relative;
}

.bi-support-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.bi-support-toggle:hover {
    background: rgba(255,255,255,0.25);
}

.bi-support-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(40,70,50,0.15);
    padding: 14px 16px;
    z-index: 200;
}

.bi-support-popover__title {
    margin: 0 0 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5a7865;
}

.bi-support-popover__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #1a2e22;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.13s;
}

.bi-support-popover__link:hover {
    background: #eeeae0;
}

.bi-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.bi-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, var(--bi-brand-light), var(--bi-brand-dark));
    box-shadow: 0 10px 24px rgba(61, 158, 114, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-weight: 900;
    letter-spacing: 0.06em;
}

.bi-logo__text {
    display: grid;
    gap: 2px;
}

.bi-logo__text strong {
    font-size: 1rem;
    color: var(--bi-text);
}

.bi-logo__text small {
    color: var(--bi-muted);
    font-size: 0.82rem;
}

.bi-main {
    min-height: calc(100vh - 174px);
}

/* =====================
   HERO SECTION
   ===================== */
.bi-hero {
    padding: 64px 0 80px;
}

.bi-hero__grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.bi-hero__content {
    position: relative;
    overflow: hidden;
    padding: 36px;
    border: 1.5px solid var(--bi-paper-strong);
    border-radius: var(--bi-radius);
    background: var(--bi-paper);
    box-shadow: var(--bi-shadow);
    backdrop-filter: blur(28px) saturate(1.5);
}

.bi-hero__content::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
}

.bi-hero__content::before {
    content: "";
    position: absolute;
    inset: auto auto -30px -30px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(126, 196, 154, 0.2), transparent 70%);
    pointer-events: none;
}

/* Legacy support for --simple modifier */
.bi-hero__content--simple {
    max-width: 860px;
    margin: 0 auto;
}

/* =====================
   STATS COLUMN
   ===================== */
.bi-hero__stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bi-stat-card {
    background: var(--bi-paper);
    backdrop-filter: blur(22px) saturate(1.4);
    border: 1.5px solid var(--bi-paper-strong);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: var(--bi-shadow);
    position: relative;
    overflow: hidden;
}

.bi-stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
}

.bi-stat-card__icon {
    font-size: 20px;
    margin-bottom: 6px;
    display: block;
}

.bi-stat-card__num {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--bi-text);
    letter-spacing: -0.04em;
    line-height: 1;
}

.bi-stat-card__label {
    font-size: 0.72rem;
    color: var(--bi-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* =====================
   FEATURES GRID
   ===================== */
.bi-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.bi-feat {
    background: var(--bi-paper);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1.5px solid var(--bi-paper-strong);
    border-radius: 20px;
    padding: 18px 16px;
    box-shadow: 0 8px 24px rgba(40, 70, 50, 0.08);
    position: relative;
    overflow: hidden;
}

.bi-feat::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.bi-feat__icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.bi-feat__title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--bi-text);
}

.bi-feat__desc {
    font-size: 0.78rem;
    color: var(--bi-muted);
    margin-top: 5px;
    line-height: 1.55;
}

/* =====================
   PAIN SECTION
   ===================== */
.bi-pain-section {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    padding: 36px;
    border: 1.5px solid var(--bi-paper-strong);
    border-radius: var(--bi-radius);
    background: var(--bi-paper);
    box-shadow: var(--bi-shadow);
    backdrop-filter: blur(22px) saturate(1.4);
}

.bi-pain-section::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
}

.bi-pain-section__title {
    margin: 0 0 22px;
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    letter-spacing: -0.03em;
    color: var(--bi-text);
}

.bi-pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.bi-pain-item {
    display: grid;
    gap: 12px;
    padding: 22px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(40, 70, 50, 0.06);
}

.bi-pain-item__problem {
    margin: 0;
    font-size: 0.92rem;
    color: var(--bi-muted);
    font-style: italic;
    line-height: 1.65;
}

.bi-pain-item__problem::before {
    content: "— ";
    font-style: normal;
    color: var(--bi-muted);
    opacity: 0.5;
}

.bi-pain-item__solution {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--bi-brand-dark);
    line-height: 1.55;
}

.bi-pain-item__solution::before {
    content: "→ ";
    color: var(--bi-brand);
}

@media (max-width: 860px) {
    .bi-pain-grid {
        grid-template-columns: 1fr;
    }

    .bi-pain-section {
        padding: 24px;
    }
}

/* =====================
   KICKER / EYEBROW
   ===================== */
.bi-kicker,
.bi-modal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(126, 196, 154, 0.2);
    color: #2d6644;
    border: 1px solid rgba(126, 196, 154, 0.35);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bi-hero h1 {
    max-width: 12ch;
    margin: 16px 0 12px;
    font-size: clamp(2.8rem, 6vw, 5.1rem);
    line-height: 0.94;
    letter-spacing: -0.055em;
    color: var(--bi-text);
}

.bi-hero__lead {
    max-width: 580px;
    margin: 0;
    color: var(--bi-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.bi-hero__actions,
.bi-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    align-items: center;
}

.bi-support-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--bi-muted);
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color .18s ease;
    white-space: nowrap;
    padding: 6px 4px;
}

.bi-support-link:hover,
.bi-support-link:focus {
    color: var(--bi-accent);
}

/* =====================
   ROUTING BLOCK
   ===================== */

.bi-routing-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 24px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(61,158,114,0.08) 0%, rgba(244,179,80,0.06) 100%);
    border: 1.5px solid rgba(61,158,114,0.25);
    border-radius: var(--bi-radius-sm);
}

.bi-routing-block__icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.bi-routing-block__body h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--bi-text);
}

.bi-routing-block__body p {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: var(--bi-muted);
    line-height: 1.5;
}

.bi-routing-block__btn {
    display: inline-block;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 18px;
}

/* =====================
   TELEGRAM BIND BLOCK
   ===================== */

.bi-tg-bind-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(41,128,185,0.06) 0%, var(--bi-paper-strong) 100%);
    border: 1.5px solid rgba(41,128,185,0.2);
    border-radius: var(--bi-radius-sm);
}

.bi-tg-bind-block__icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.bi-tg-bind-block__body h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--bi-text);
}

.bi-tg-bind-block__body p {
    margin: 0 0 10px;
    font-size: 0.88rem;
    color: var(--bi-muted);
    line-height: 1.5;
}

.bi-tg-code {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.bi-tg-code__label {
    font-size: 0.85rem;
    color: var(--bi-muted);
}

.bi-tg-code__value {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--bi-brand-dark);
    background: rgba(61,158,114,0.1);
    padding: 4px 12px;
    border-radius: 8px;
}

/* =====================
   TARIFF PLANS
   ===================== */

.bi-plans-sub {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: var(--bi-muted);
}

.bi-plans {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.bi-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 16px 16px;
    background: var(--bi-paper-strong);
    border: 1.5px solid var(--bi-line);
    border-radius: var(--bi-radius-sm);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    font-family: inherit;
}

.bi-plan:hover {
    border-color: var(--bi-brand);
    box-shadow: 0 4px 20px rgba(61, 158, 114, 0.15);
    transform: translateY(-2px);
}

.bi-plan--best {
    border-color: var(--bi-brand);
    background: linear-gradient(135deg, rgba(61,158,114,0.08) 0%, var(--bi-paper-strong) 100%);
}

.bi-plan__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bi-accent);
    color: #1a2e22;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bi-plan__badge--best {
    background: var(--bi-brand);
    color: #fff;
}

.bi-plan__period {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bi-text);
    line-height: 1.2;
}

.bi-plan__price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bi-brand-dark);
    line-height: 1.1;
}

.bi-plan__per {
    font-size: 0.8rem;
    color: var(--bi-muted);
}

.bi-plan__action {
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bi-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =====================
   BUTTONS — LIQUID GLASS
   ===================== */

/* BASE */
.bi-button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 28px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    letter-spacing: 0.01em;
}

/* PRIMARY — зелёный liquid glass */
.bi-button,
.bi-button--primary {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(170deg, #5ec48a 0%, #2d7a52 55%, #1e5c3a 100%);
    box-shadow:
        0 18px 44px rgba(45, 122, 82, 0.45),
        0 6px 16px rgba(45, 122, 82, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.18),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -2px 0 rgba(0, 0, 0, 0.18) inset;
}

/* Верхний блик */
.bi-button::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 52%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.06) 70%, transparent);
    border-radius: 20px 20px 60% 60% / 20px 20px 28px 28px;
    pointer-events: none;
}

/* Линза-блик */
.bi-button::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 52%;
    height: 9px;
    background: rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    filter: blur(5px);
    pointer-events: none;
}

.bi-button:hover,
.bi-button:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 24px 52px rgba(45, 122, 82, 0.52),
        0 8px 20px rgba(45, 122, 82, 0.32),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -2px 0 rgba(0, 0, 0, 0.18) inset;
}

.bi-button:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

/* TRIAL — вариант В: полупрозрачный зелёный, белый текст */
.bi-button--trial {
    color: #fff;
    text-shadow: 0 1px 6px rgba(15, 40, 25, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    background: rgba(50, 120, 80, 0.48);
    backdrop-filter: blur(22px) saturate(1.6);
    box-shadow:
        0 14px 36px rgba(40, 100, 65, 0.28),
        0 4px 12px rgba(40, 100, 65, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.22),
        0 2px 0 rgba(255, 255, 255, 0.28) inset,
        0 -1px 0 rgba(0, 0, 0, 0.12) inset;
}

.bi-button--trial::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.04) 70%, transparent);
}

.bi-button--trial::after {
    background: rgba(255, 255, 255, 0.35);
}

.bi-button--trial:hover,
.bi-button--trial:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 18px 44px rgba(40, 100, 65, 0.35),
        0 6px 16px rgba(40, 100, 65, 0.22),
        0 2px 0 rgba(255, 255, 255, 0.28) inset;
    background: rgba(50, 120, 80, 0.58);
}

/* GHOST — кнопка в хедере */
.bi-button--ghost {
    color: var(--bi-text);
    text-shadow: none;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(18px);
    box-shadow:
        0 6px 18px rgba(40, 70, 50, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.95) inset,
        0 -1px 0 rgba(40, 70, 50, 0.06) inset;
}

.bi-button--ghost::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, transparent);
}

.bi-button--ghost::after {
    background: rgba(255, 255, 255, 0.8);
}

.bi-button--ghost:hover,
.bi-button--ghost:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(40, 70, 50, 0.14), 0 2px 0 rgba(255, 255, 255, 0.95) inset;
    background: rgba(255, 255, 255, 0.65);
}

.bi-button--secondary {
    background: rgba(24, 34, 45, 0.06);
    color: var(--bi-text);
    box-shadow: none;
    border: none;
}

.bi-button--secondary::before,
.bi-button--secondary::after {
    display: none;
}

.bi-button--wide {
    width: 100%;
}

/* Badge внутри кнопки */
.bi-button__badge {
    background: rgba(244, 179, 80, 0.28);
    color: #5a2e00;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(244, 160, 50, 0.45);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* =====================
   HERO LIST
   ===================== */
.bi-hero__list,
.bi-footer p,
.bi-generic-page .entry-content {
    color: var(--bi-muted);
    line-height: 1.7;
}

.bi-hero__list {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.bi-hero__list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3a5844;
}

.bi-hero__list li + li {
    margin-top: 8px;
}

.bi-hero__list li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--bi-brand-light);
    box-shadow: 0 0 0 2px rgba(126, 196, 154, 0.2);
}

/* =====================
   MODAL
   ===================== */
.bi-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
}

/* Явно скрываем модалку — страхуемся от CSS-сбросов которые переопределяют [hidden] */
.bi-modal[hidden] {
    display: none !important;
    pointer-events: none;
}

.bi-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 22, 0.54);
}

.bi-modal__dialog {
    position: relative;
    width: min(calc(100% - 24px), 680px);
    max-height: calc(100vh - min(14vh, 100px));
    margin: min(7vh, 50px) auto;
    padding: 32px;
    border-radius: 28px;
    background: #f6f4ee;
    box-shadow: 0 28px 80px rgba(10, 18, 22, 0.25);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bi-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(40, 70, 50, 0.08);
    color: var(--bi-text);
    font-size: 1.6rem;
    cursor: pointer;
}

.bi-modal h2 {
    margin: 16px 0 10px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.bi-modal p {
    margin: 0;
    color: var(--bi-muted);
    line-height: 1.75;
}

.bi-payment-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.bi-form-field {
    display: grid;
    gap: 8px;
}

.bi-form-field span {
    font-size: 0.92rem;
    font-weight: 700;
}

.bi-form-field input {
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--bi-line);
    border-radius: 16px;
    background: #fff;
}

.bi-form-message {
    min-height: 24px;
    font-size: 0.92rem;
    color: #be4a27;
}

.bi-success-note {
    margin: 14px 0 0;
}

/* Экран проверки оплаты */
.bi-payment-checking {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 0 8px;
    color: var(--bi-muted);
    font-size: 1rem;
    font-weight: 600;
}

.bi-payment-checking__spinner {
    display: inline-block;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border: 3px solid rgba(61, 158, 114, 0.2);
    border-top-color: var(--bi-brand);
    border-radius: 50%;
    animation: bi-spin 0.75s linear infinite;
}

@keyframes bi-spin {
    to { transform: rotate(360deg); }
}

/* =====================
   INSTRUCTION
   ===================== */
.bi-instruction {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.bi-instruction h3 {
    margin: 0;
    font-size: 1.5rem;
}

.bi-instruction__step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--bi-line);
    border-radius: 20px;
    background: rgba(240, 238, 228, 0.72);
}

.bi-instruction__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bi-accent), #f08b4b);
    color: #221f1b;
    font-weight: 800;
}

.bi-instruction__step h4 {
    margin: 2px 0 12px;
    font-size: 1.05rem;
}

.bi-download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bi-download-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--bi-line);
    font-weight: 700;
}

/* Блок ключа с кнопкой копирования */
.bi-key-copy-wrap {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #162029;
}

.bi-instruction__key {
    display: block;
    padding: 16px 18px 12px;
    color: #a8d8b8;
    word-break: break-all;
    font-family: "Menlo", "Consolas", monospace;
    font-size: 0.82rem;
    line-height: 1.65;
    white-space: pre-wrap;
}

.bi-key-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.bi-key-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* QR-код */
.bi-instruction__qr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
}

.bi-instruction__qr img {
    width: 150px;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--bi-line);
    background: #fff;
}

.bi-instruction__qr-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--bi-muted);
}

/* Подшаги (happ) */
.bi-instruction__substeps {
    margin: 10px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 7px;
}

.bi-instruction__substeps li {
    font-size: 0.92rem;
    color: var(--bi-muted);
    line-height: 1.55;
}

/* Мета-шаг (дата активации) */
.bi-instruction__step--meta {
    background: rgba(61, 158, 114, 0.08);
    border-color: rgba(61, 158, 114, 0.2);
}

.bi-instruction__number--sm {
    font-size: 1.2rem;
    background: rgba(61, 158, 114, 0.2);
    color: var(--bi-brand);
}

/* Блок пробного периода */
.bi-instruction__trial-notice {
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(244, 179, 80, 0.12);
    border: 1px solid rgba(244, 160, 50, 0.3);
    color: #5a3e00;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.55;
}

/* =====================
   TOAST ПОСЛЕ ОПЛАТЫ
   ===================== */
.bi-return-notice {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: min(calc(100% - 32px), 560px);
    animation: bi-slide-up 0.35s ease;
}

@keyframes bi-slide-up {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.bi-return-notice__inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 22px;
    backdrop-filter: blur(24px);
}

.bi-return-notice--pending .bi-return-notice__inner {
    background: rgba(240, 250, 245, 0.95);
    border: 1.5px solid rgba(61, 158, 114, 0.3);
    box-shadow: 0 14px 40px rgba(40, 70, 50, 0.14);
}

.bi-return-notice--cancelled .bi-return-notice__inner {
    background: rgba(254, 246, 240, 0.95);
    border: 1.5px solid rgba(190, 80, 50, 0.25);
    box-shadow: 0 14px 40px rgba(80, 30, 20, 0.1);
}

.bi-return-notice__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.2rem;
}

.bi-return-notice--pending .bi-return-notice__icon {
    background: rgba(61, 158, 114, 0.15);
    color: var(--bi-brand);
}

.bi-return-notice--cancelled .bi-return-notice__icon {
    background: rgba(190, 80, 50, 0.1);
    color: #be4a27;
}

.bi-return-notice__body {
    flex: 1;
}

.bi-return-notice__body strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.bi-return-notice__body p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--bi-muted);
    line-height: 1.5;
}

.bi-return-notice__close {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(40, 70, 50, 0.06);
    color: var(--bi-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

/* =====================
   FOOTER
   ===================== */
.bi-footer {
    padding: 0 0 28px;
}

.bi-footer__inner {
    padding: 22px 26px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 32px rgba(40, 70, 50, 0.08);
}

.bi-footer p {
    max-width: 520px;
    margin: 6px 0 0;
    font-size: 0.88rem;
}

.bi-generic-page {
    padding: 32px 0 72px;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 980px) {
    .bi-hero__grid {
        grid-template-columns: 1fr;
    }

    .bi-hero__stats {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .bi-stat-card {
        min-width: 160px;
        flex: 1;
    }

    .bi-hero__content--simple {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .bi-header {
        padding: 14px 0;
    }

    /* Хедер — строка в ряд, кнопка не растягивается */
    .bi-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .bi-header__inner .bi-button {
        min-width: auto;
        width: auto;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .bi-footer__inner,
    .bi-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    /* Кнопки hero — full width */
    .bi-hero__actions .bi-button {
        width: 100%;
    }

    /* Ссылка поддержки — по центру под кнопками */
    .bi-hero__actions .bi-support-link {
        align-self: center;
        margin-top: 4px;
    }

    .bi-hero {
        padding: 38px 0 56px;
    }

    /* Герой — сначала контент, потом статы */
    .bi-hero__grid {
        display: flex;
        flex-direction: column;
    }

    .bi-hero__content {
        order: 1;
    }

    .bi-hero__stats {
        order: 2;
    }

    .bi-hero__content,
    .bi-generic-page article,
    .bi-modal__dialog {
        padding: 24px;
    }

    .bi-hero h1 {
        max-width: none;
        font-size: clamp(2.25rem, 12vw, 3.6rem);
    }

    .bi-modal__dialog {
        width: min(calc(100% - 16px), 680px);
        margin: 24px auto;
    }

    .bi-instruction__step {
        grid-template-columns: 1fr;
    }

    .bi-features {
        grid-template-columns: 1fr;
    }

    /* Статы — горизонтально в ряд, 3 колонки */
    .bi-hero__stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .bi-stat-card {
        min-width: unset;
        padding: 14px 10px;
    }

    .bi-stat-card__num {
        font-size: 1.2rem;
    }

    .bi-stat-card__icon {
        font-size: 1.2rem;
    }

    .bi-pain-grid {
        grid-template-columns: 1fr;
    }

    .bi-plans {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .bi-plan {
        padding: 14px 12px;
    }

    .bi-plan__price {
        font-size: 1.25rem;
    }
}
