/* =========================================================================
   Описание v3 — чат-интерфейс в стиле Apple HIG
   ========================================================================= */

:root {
    /* Палитра */
    --bg-page: #F5F5F7;
    --bg-card: #FFFFFF;
    --bg-bot:  #FFFFFF;
    --bg-user: #007AFF;

    --text-primary:   #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary:  #A1A1A6;
    --text-on-accent: #FFFFFF;

    --accent:         #007AFF;
    --accent-hover:   #0066D6;
    --accent-bg-soft: rgba(0, 122, 255, 0.08);

    --border:      #D1D1D6;
    --border-soft: #E5E5EA;

    --danger:  #FF3B30;
    --success: #34C759;

    /* Тени */
    --shadow-bubble:   0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.08);

    /* Скругления */
    --radius-bubble: 20px;
    --radius-card:   16px;
    --radius-button: 12px;
    --radius-pill:   999px;

    --transition-fast: 0.15s ease;
    --transition:      0.25s ease;

    /* Горизонтальные поля только шапки: на десктопе 12% ширины окна */
    --header-pad-x: max(16px, env(safe-area-inset-left, 0px));
    --header-pad-x-right: max(16px, env(safe-area-inset-right, 0px));

    /* Начало текста «Ktema» от левого края .header-inner: .brand-logo 40px + padding-right 11px */
    --brand-title-offset-x: 51px;

    /* Нижняя инкрустация под «плавающий» таб-бар как в интерфейсах Apple */
    --ktema-tabbar-slot: 0px;

    /* Панель разделов (segmented / tab bar в духе Apple) */
    --shell-nav-track: rgba(118, 118, 128, 0.11);
    --shell-nav-active-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 3px 8px rgba(0, 0, 0, 0.04),
        inset 0 0.33px 0 rgba(255, 255, 255, 0.65);
}

@media (min-width: 900px) {
    :root {
        --header-pad-x: max(12vw, env(safe-area-inset-left, 0px));
        --header-pad-x-right: max(12vw, env(safe-area-inset-right, 0px));
    }
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* hidden — fallback для WKWebView, где второй парсится clip некорректно */
    overflow-x: hidden;
    overflow-x: clip;
}

h1, h2, h3 {
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 20px; }

.hint, .text-secondary {
    font-size: 13px;
    color: var(--text-secondary);
}

/* =========================================================================
   Шапка
   ========================================================================= */
.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    /* hidden: старые WebView Telegram / часть WKWebView; clip — когда поддерживается */
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100vw;
}

/* Генератор: высота ровно под окно — иначе flex:1 у ленты не даёт overflow, реплики не уезжают вверх при скролле */
.app-shell--generator-layout {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

.app-shell--generator-layout .generator-page {
    min-height: 0;
    overflow: hidden;
}

.app-shell--generator-layout .generator-page-inner {
    min-height: 0;
    overflow: hidden;
}

.app-header-zone {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 10000;
}

.app-header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: max(10px, env(safe-area-inset-top)) var(--header-pad-x-right) 10px var(--header-pad-x);
    flex-shrink: 0;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-brand {
    min-width: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 2px;
    min-width: 0;
}

.site-nav-link {
    position: relative;
    border: none;
    background: transparent;
    margin: 0;
    padding: 14px 12px 14px;
    font: inherit;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgba(29, 29, 31, 0.78);
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}

.site-nav-link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transform: translateY(2px) scaleX(0.6);
    transform-origin: center;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.site-nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.site-nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.28);
}

.site-nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
    background: transparent;
}

.site-nav-link.active::after {
    opacity: 1;
    transform: translateY(0) scaleX(1);
}

.site-nav-link--cta {
    color: #ffffff;
    font-weight: 600;
    padding: 10px 18px;
    margin: 0;
    border-radius: 980px;
    background: var(--text-primary);
    box-shadow: none;
}

.site-nav-link--cta::after { display: none; }

.site-nav-link--cta:hover {
    color: #ffffff;
    background: #000000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.site-nav-link--cta.active {
    color: #ffffff;
    background: var(--text-primary);
}

.header-cta {
    align-self: center;
}

.site-nav-authed,
.header-authed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.header-authed .balance-pill--site-nav {
    background: var(--accent-bg-soft);
    color: var(--accent);
}

.header-logout {
    border-radius: 980px;
    padding: 8px;
}

.balance-pill--site-nav {
    padding: 6px 12px;
    gap: 8px;
    border: none;
    cursor: pointer;
    font: inherit;
    flex-shrink: 0;
}

.balance-pill--site-nav svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.balance-pill-site-nav-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.22;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}

.balance-pill-site-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.88;
}

.site-nav-profile {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: min(300px, 36vw);
    min-width: 0;
}

.user-email--site-nav {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.header-trailing {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    justify-self: end;
    min-width: 0;
}

.header-burger {
    display: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    color: var(--text-primary);
    transition:
        background var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.header-burger:hover {
    background: rgba(0, 0, 0, 0.06);
}

.header-burger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.28);
}

.header-burger-bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.app-header--scrolled {
    box-shadow:
        0 10px 34px rgba(0, 0, 0, 0.07),
        0 1px 0 rgba(0, 0, 0, 0.04);
}

.brand-hit {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    width: auto;
    box-sizing: border-box;
    max-width: min(320px, calc(100vw - 120px));
}

.brand-hit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.header-user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-block {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

/* Apple-style squircle с минималистичной иконкой дома */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow:
        0 2px 8px rgba(0, 122, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-mark__svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
}

.brand-mark--footer {
    box-shadow:
        0 4px 16px rgba(10, 132, 255, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand {
    display: inline-block;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui,
        sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1;
    color: var(--text-primary);
    /* Микро-смещение для оптического центрирования с squircle (буквы DM Sans слегка top-heavy) */
    transform: translateY(0.5px);
}

/* Legacy — старый класс пина больше не должен влиять (на случай кэша) */
.brand-logo-pin { display: none !important; }

/* Legacy-классы (для других мест, где могут встречаться) */
.brand-text-stack { display: inline; }
.brand-logo { color: var(--accent); }
.brand-tagline {
    display: block;
    margin: 3px 0 0;
    padding: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui,
        sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    max-width: 22em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--accent-bg-soft);
    color: var(--accent);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    border: none;
}
.balance-pill:hover { opacity: 0.85; }
.balance-pill svg { width: 16px; height: 16px; }

.try-free-pill {
    background: var(--accent-bg-soft);
    color: var(--accent);
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}
.try-free-pill:hover { opacity: 0.85; }

.user-email { font-size: 13px; color: var(--text-secondary); }

.icon-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.icon-button:hover { background: var(--bg-page); color: var(--text-primary); }
.icon-button svg { width: 18px; height: 18px; }

.header-brand .brand {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.028em;
    line-height: 1;
}

.brand-tagline--header { display: none; }

/* О сервисе / Тарифы */
.static-shell {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 28px max(20px, env(safe-area-inset-left)) max(80px, calc(48px + env(safe-area-inset-bottom, 0px))) max(20px, env(safe-area-inset-right));
    min-width: 0;
}

.static-shell-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.static-hero-title {
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.15;
}

.static-lead {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.static-points {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.static-point-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text-primary);
}

.static-cta {
    align-self: flex-start;
    width: auto;
}

.static-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.static-actions .button-primary,
.static-actions .button-secondary {
    width: auto;
}

.tariffs-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tariff-card {
    padding: 18px 20px;
}

.tariff-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tariff-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.tariff-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.tariff-meta {
    margin: 0 0 12px;
}

.tariff-list {
    margin: 0;
    padding-left: 1.2em;
    line-height: 1.5;
}

.tariff-list li {
    margin-bottom: 6px;
}

.button-text {
    background: none;
    border: none;
    color: var(--accent);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}
.button-text:hover { background: var(--accent-bg-soft); }

/* =========================================================================
   Чат (сообщения генератора; контейнер — .generator-chat-stream в index.html)
   ========================================================================= */

.message {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    max-width: 100%;
    min-width: 0;
    animation: msg-in 0.25s ease;
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.message.from-user { flex-direction: row-reverse; }

.avatar {
    width: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
    background: none;
    border-radius: 0;
    padding: 0 0 1px;
    color: var(--accent);
}

.avatar-mark {
    width: 30px;
    height: auto;
    display: block;
}
.message.from-user .avatar { display: none; }

.bubble {
    padding: 14px 18px;
    border-radius: var(--radius-bubble);
    background: var(--bg-bot);
    color: var(--text-primary);
    box-shadow: var(--shadow-bubble);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    max-width: 80%;
    min-width: 0;
}
.bubble-tight { padding: 12px 16px; }

.message.from-bot .bubble  { border-bottom-left-radius: 6px; }
.message.from-user .bubble {
    background: var(--bg-user);
    color: var(--text-on-accent);
    border-bottom-right-radius: 6px;
    font-weight: 500;
}

/* Заголовок-вопрос внутри сообщения бота */
.bubble .q-title {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 500;
}

/* Чипсы внутри сообщения бота */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-soft);
    background: var(--bg-page);
    color: var(--text-primary);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.chip:hover:not(:disabled) {
    background: var(--border-soft);
}
.chip.selected {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}
.chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* =========================================================================
   Сообщение-форма (для второго шага гибрида)
   ========================================================================= */
.form-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 6px;
}
.form-fields-grid .field-fullwidth { grid-column: 1 / -1; }

.field {
    margin-bottom: 4px;
}
.field-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    font-weight: 500;
}

.input,
.select,
.textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
    font: inherit;
    font-size: 15px;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
    outline: none;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
}
.input:focus,
.select:focus,
.textarea:focus {
    border-bottom-color: var(--accent);
}
.input::placeholder,
.textarea::placeholder { color: var(--text-tertiary); }

.textarea {
    resize: vertical;
    min-height: 56px;
    line-height: 1.4;
}
.select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2386868B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 24px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}
.checkbox-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    flex-shrink: 0;
}
.checkbox-row input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-row input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-row span { font-size: 14px; }

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}

/* =========================================================================
   Кнопка-отправка (сообщение от пользователя)
   ========================================================================= */
.send-button {
    background: var(--bg-user);
    color: var(--text-on-accent);
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-bubble);
    border-bottom-right-radius: 6px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-bubble);
    transition: opacity var(--transition-fast);
}
.send-button:hover:not(:disabled) { opacity: 0.92; }
.send-button:active { transform: scale(0.98); }
.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.send-button svg { width: 16px; height: 16px; }

/* =========================================================================
   Размытый результат
   ========================================================================= */
.result-bubble {
    position: relative;
}
.result-text {
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-primary);
}
.result-text.blurred {
    filter: blur(9px);
    user-select: none;
    pointer-events: none;
    min-height: 120px;
    opacity: 0.92;
}
.result-blur-overlay {
    position: absolute;
    inset: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 16px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    pointer-events: auto;
}
.lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-bubble);
}
.lock-icon svg { width: 24px; height: 24px; }
.paywall-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}
.lock-hint {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.35;
    max-width: 260px;
}
.paywall-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 300px;
    margin-top: 4px;
}
.paywall-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    background: var(--bg-page);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast),
        box-shadow var(--transition-fast), transform 0.1s ease;
    box-shadow: var(--shadow-bubble);
}
.paywall-card:hover {
    border-color: var(--accent);
    background: var(--accent-bg-soft);
}
.paywall-card:active {
    transform: scale(0.99);
}
.paywall-card-accent {
    border-color: rgba(0, 122, 255, 0.35);
    background: var(--accent-bg-soft);
}
.paywall-card-accent:hover {
    border-color: var(--accent);
    background: rgba(0, 122, 255, 0.14);
}
.paywall-card-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.paywall-card-label {
    font-size: 15px;
    font-weight: 600;
}
.paywall-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}
.paywall-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.result-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.result-actions .button {
    height: 36px;
    padding: 0 14px;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
}

/* =========================================================================
   Кнопки
   ========================================================================= */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-button);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}
.button:active { opacity: 0.7; }
.button:disabled {
    background: var(--border-soft) !important;
    color: var(--text-tertiary) !important;
    cursor: not-allowed;
}
.button-primary {
    background: var(--accent);
    color: #FFFFFF;
    width: 100%;
}
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary {
    background: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}
.button-secondary:hover:not(:disabled) { background: var(--border-soft); }
.button-ghost {
    background: transparent;
    color: var(--text-primary);
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
}
.button-ghost:hover:not(:disabled) { background: var(--bg-page); }

/* =========================================================================
   Тост и модалки
   ========================================================================= */
.copied-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    box-shadow: var(--shadow-elevated);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 200;
}
.copied-toast.visible { opacity: 1; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: fade-in 0.15s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-elevated);
    padding: 32px;
    width: 100%;
    max-width: 440px;
    animation: modal-in 0.2s ease;
}

.modal-backdrop--legal {
    align-items: flex-start;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}

.modal--offer {
    max-width: min(720px, calc(100vw - 32px));
    max-height: none;
    margin: 0 auto 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal--offer .modal-header--row {
    padding: 20px 22px 16px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}

.modal--offer .modal-header--row h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.offer-doc-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 22px 26px;
    max-height: min(72vh, 640px);
}

.offer-doc {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-primary);
    text-align: left;
}

.offer-doc-inner .offer-doc-main-title,
.privacy-doc-inner .offer-doc-main-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 6px;
    line-height: 1.35;
}

.offer-doc-inner .offer-doc-subtitle,
.privacy-doc-inner .offer-doc-subtitle {
    font-weight: 600;
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.4;
}

.offer-doc-inner .offer-doc-section h3,
.privacy-doc-inner .offer-doc-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 10px;
    line-height: 1.35;
}

.offer-doc-inner .offer-doc-section:first-of-type h3,
.privacy-doc-inner .offer-doc-section:first-of-type h3 {
    margin-top: 0;
}

.offer-doc-inner p,
.privacy-doc-inner p {
    margin: 0 0 10px;
}

.offer-doc-inner ul,
.privacy-doc-inner ul {
    margin: 6px 0 12px;
    padding-left: 1.25em;
}

.offer-doc-inner li,
.privacy-doc-inner li {
    margin-bottom: 6px;
}

.offer-doc-inner .offer-definitions,
.privacy-doc-inner .offer-definitions {
    margin: 8px 0 0;
}

.offer-doc-inner .offer-definitions dt,
.privacy-doc-inner .offer-definitions dt {
    font-weight: 600;
    margin-top: 12px;
}

.offer-doc-inner .offer-definitions dt:first-child,
.privacy-doc-inner .offer-definitions dt:first-child {
    margin-top: 0;
}

.offer-doc-inner .offer-definitions dd,
.privacy-doc-inner .offer-definitions dd {
    margin: 4px 0 0;
    padding-left: 0;
}

.offer-doc-inner .offer-requisites,
.privacy-doc-inner .offer-requisites {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 0;
}

.offer-doc-inner .offer-requisites li,
.privacy-doc-inner .offer-requisites li {
    margin-bottom: 8px;
}

.offer-doc-inner a,
.privacy-doc-inner a {
    color: var(--l-accent, #007aff);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.offer-doc-inner a:hover,
.privacy-doc-inner a:hover {
    text-decoration-thickness: 2px;
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Личный кабинет — Apple-style (объекты, профиль, история) */
.cabinet-shell {
    flex: 1;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 28px max(20px, env(safe-area-inset-left))
             max(120px, calc(80px + env(safe-area-inset-bottom)))
             max(20px, env(safe-area-inset-right));
    color: var(--text-primary);
}

.cabinet-shell-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cabinet-hero {
    margin-bottom: 4px;
}

.cabinet-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0 0 8px;
}

.cabinet-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 5vw, 34px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.cabinet-lead {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.cabinet-lead--tight {
    font-size: 15px;
    padding: 0 2px;
}

.cabinet-seg {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-soft);
}

.cabinet-seg__btn {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cabinet-seg__btn:hover {
    color: var(--text-primary);
}

.cabinet-seg__btn--active {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.cabinet-error {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 59, 48, 0.09);
    color: #d70015;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 59, 48, 0.18);
}

.cabinet-error:not(:empty) {
    display: block;
}

.cabinet-hint {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 159, 10, 0.12);
    color: #7a4a00;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    border: 1px solid rgba(255, 159, 10, 0.35);
    margin-bottom: 4px;
}

.cabinet-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cabinet-panel-status {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 4px;
}

.cabinet-empty {
    text-align: center;
    padding: 36px 24px;
    border-radius: 22px;
    border: 1px dashed var(--border-soft);
    background: rgba(0, 0, 0, 0.02);
}

.cabinet-empty__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.cabinet-empty__text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-secondary);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.cabinet-object-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cabinet-object-card {
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cabinet-object-card__head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.cabinet-object-card__head:hover {
    background: rgba(0, 0, 0, 0.02);
}

.cabinet-object-card__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cabinet-object-card__label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--text-primary);
}

.cabinet-object-card__meta {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cabinet-object-card__time {
    font-size: 12.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

.cabinet-object-card__chev {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: transform 0.22s ease;
}

.cabinet-object-card__body {
    padding: 0 18px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cabinet-gen-list {
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cabinet-gen-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cabinet-gen-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cabinet-gen-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 980px;
    background: rgba(10, 132, 255, 0.1);
    color: #0a84ff;
}

.cabinet-gen-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.cabinet-gen-preview {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-primary);
}

.cabinet-gen-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cabinet-link-btn {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #0a84ff;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cabinet-link-btn:hover {
    opacity: 0.85;
}

.cabinet-settings-group {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--border-soft);
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.cabinet-settings-group--danger {
    border-color: rgba(255, 59, 48, 0.22);
    background: rgba(255, 59, 48, 0.03);
}

.cabinet-settings-h {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.cabinet-settings-h--danger {
    color: #d70015;
}

.cabinet-settings-hint {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.cabinet-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
    font-size: 15px;
}

.cabinet-settings-k {
    color: var(--text-tertiary);
    font-weight: 500;
    min-width: 72px;
}

.cabinet-settings-v {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.cabinet-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: #f5f5f7;
    font: inherit;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-primary);
    resize: vertical;
    min-height: 132px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cabinet-textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: rgba(10, 132, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.cabinet-textarea-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.cabinet-muted {
    color: var(--text-tertiary);
}

.cabinet-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cabinet-danger-label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.cabinet-danger-input {
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 59, 48, 0.35);
    font: inherit;
    font-size: 15px;
}

.cabinet-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 980px;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #d70015;
    color: #ffffff;
    transition: filter 0.15s ease, transform 0.12s ease;
}

.cabinet-danger-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

.cabinet-danger-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.history-card--cabinet {
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

/* Legacy класс при старых вложенных ссылках */
.cabinet-history {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px max(20px, env(safe-area-inset-left)) max(120px, calc(80px + env(safe-area-inset-bottom))) max(20px, env(safe-area-inset-right));
}

.cabinet-history-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================================================================
   Блог / статьи — Apple-style (список + режим чтения с TOC)
   ========================================================================= */

/* Общая палитра акцентов карточек/обложек */
.blog-shell {
    --blog-accent: #0a84ff;
    --blog-accent-soft: rgba(10, 132, 255, 0.10);
    --blog-accent-strong: rgba(10, 132, 255, 0.22);
    --blog-cover: linear-gradient(145deg, rgba(10, 132, 255, 0.85), rgba(94, 92, 230, 0.78));
    --blog-card-shadow: 0 1px 2px rgba(15, 17, 21, 0.05), 0 22px 48px -28px rgba(15, 17, 21, 0.32);
    --blog-card-shadow-hover: 0 1px 2px rgba(15, 17, 21, 0.06), 0 32px 64px -28px rgba(15, 17, 21, 0.4);
    --blog-radius: 22px;
    --header-h: 72px;

    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px max(24px, env(safe-area-inset-left))
             max(96px, calc(64px + env(safe-area-inset-bottom)))
             max(24px, env(safe-area-inset-right));
    min-width: 0;
    color: var(--text-primary);
    position: relative;
}

[data-accent="orange"] {
    --blog-accent: #ff7f2a;
    --blog-accent-soft: rgba(255, 127, 42, 0.12);
    --blog-accent-strong: rgba(255, 127, 42, 0.28);
    --blog-cover: linear-gradient(145deg, #ffb98a 0%, #ff7f2a 60%, #d95a14 100%);
}
[data-accent="green"] {
    --blog-accent: #1da25a;
    --blog-accent-soft: rgba(29, 162, 90, 0.12);
    --blog-accent-strong: rgba(29, 162, 90, 0.28);
    --blog-cover: linear-gradient(145deg, #74dca7 0%, #2bbd6c 60%, #138744 100%);
}
[data-accent="purple"] {
    --blog-accent: #5e5ce6;
    --blog-accent-soft: rgba(94, 92, 230, 0.12);
    --blog-accent-strong: rgba(94, 92, 230, 0.28);
    --blog-cover: linear-gradient(145deg, #b6b1ff 0%, #5e5ce6 60%, #3b39c4 100%);
}
[data-accent="amber"] {
    --blog-accent: #d4920b;
    --blog-accent-soft: rgba(212, 146, 11, 0.14);
    --blog-accent-strong: rgba(212, 146, 11, 0.28);
    --blog-cover: linear-gradient(145deg, #ffd97c 0%, #f1b430 55%, #c8870a 100%);
}
[data-accent="blue"] {
    --blog-accent: #0a84ff;
    --blog-accent-soft: rgba(10, 132, 255, 0.10);
    --blog-accent-strong: rgba(10, 132, 255, 0.26);
    --blog-cover: linear-gradient(145deg, #8cc6ff 0%, #0a84ff 60%, #0058c2 100%);
}

/* === Прогресс-бар чтения (фиксирован в самом верху, поверх шапки) === */
.blog-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(15, 17, 21, 0.04);
    z-index: 11050;
    pointer-events: none;
}

.blog-progress__bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--blog-accent, #0a84ff), #5e5ce6);
    box-shadow: 0 0 14px rgba(10, 132, 255, 0.45);
    transition: width 0.12s linear;
    width: 0;
}

/* === HERO списка === */
.blog-listing {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.blog-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 28px;
    align-items: end;
    padding: 8px 0 4px;
}

.blog-hero__left {
    min-width: 0;
}

.blog-hero__eyebrow {
    margin: 0 0 12px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--blog-accent);
}

.blog-hero__title {
    margin: 0 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

.blog-hero__title-accent {
    background: linear-gradient(120deg, var(--blog-accent), #5e5ce6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-hero__lead {
    margin: 0;
    max-width: 38rem;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* === Поиск === */
.blog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 14px 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 17, 21, 0.08);
    background: var(--bg-card);
    box-shadow: 0 1px 2px rgba(15, 17, 21, 0.04);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-search:focus-within {
    border-color: rgba(10, 132, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.16);
}

.blog-search--filled {
    border-color: rgba(10, 132, 255, 0.35);
}

.blog-search__ico {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.blog-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font: inherit;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
}

.blog-search__input::placeholder {
    color: var(--text-tertiary);
}

.blog-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.blog-search__clear {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 17, 21, 0.08);
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.blog-search__clear:hover {
    background: rgba(15, 17, 21, 0.14);
}

/* === Состояние «ничего не найдено» === */
.blog-empty {
    padding: 36px 28px;
    border-radius: var(--blog-radius);
    background: var(--bg-card);
    border: 1px solid rgba(15, 17, 21, 0.08);
    text-align: center;
}

.blog-empty__title {
    margin: 0 0 8px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.blog-empty__sub {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.blog-empty__reset {
    background: none;
    border: none;
    padding: 0;
    color: var(--blog-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-empty__reset:hover {
    text-decoration-thickness: 2px;
}

/* === Featured (большая карточка) === */
.blog-featured {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.3fr);
    gap: 0;
    border-radius: var(--blog-radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(15, 17, 21, 0.07);
    box-shadow: var(--blog-card-shadow);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    color: inherit;
    text-align: left;
}

.blog-featured:hover,
.blog-featured:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--blog-card-shadow-hover);
    outline: none;
}

.blog-featured__art {
    position: relative;
    min-height: 220px;
    background: var(--blog-cover);
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-featured__art::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.32), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.18), transparent 55%);
    pointer-events: none;
}

.blog-featured__art-glyph {
    position: relative;
    z-index: 1;
    width: 96px;
    height: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.blog-featured__art-glyph svg {
    width: 56px;
    height: 56px;
    display: block;
}

.blog-featured__body {
    padding: 28px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.blog-featured__title {
    margin: 4px 0 6px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.blog-featured__excerpt {
    margin: 0 0 4px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.blog-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--blog-accent);
}

.blog-featured__cta svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.blog-featured:hover .blog-featured__cta svg {
    transform: translateX(4px);
}

/* === Карточки сетки === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--blog-radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(15, 17, 21, 0.07);
    box-shadow: var(--blog-card-shadow);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: left;
    color: inherit;
}

.blog-card:hover,
.blog-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--blog-card-shadow-hover);
    outline: none;
}

.blog-card__cover {
    position: relative;
    min-height: 132px;
    background: var(--blog-cover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.95);
}

.blog-card__cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 60%),
        radial-gradient(circle at 80% 85%, rgba(0, 0, 0, 0.15), transparent 60%);
    pointer-events: none;
}

.blog-card__cover-glyph {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
}

.blog-card__cover-glyph svg {
    width: 36px;
    height: 36px;
    display: block;
}

.blog-card__body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.blog-card__category,
.blog-featured__body .blog-card__category {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card__title {
    margin: 4px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    /* Ограничиваем 3 строками для ровной сетки */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    margin: 4px 0 0;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__meta {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
}

.blog-card__dot {
    color: var(--text-tertiary);
}

/* === РЕЖИМ ЧТЕНИЯ === */
.blog-reader-shell {
    width: 100%;
}

.blog-reader-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.blog-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border: 1px solid transparent;
    border-radius: 99px;
    background: var(--bg-card);
    box-shadow: 0 1px 2px rgba(15, 17, 21, 0.05);
    color: var(--text-primary);
    font: inherit;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.blog-back:hover {
    border-color: rgba(15, 17, 21, 0.14);
    transform: translateX(-2px);
}

.blog-back svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.blog-reader {
    background: var(--bg-card);
    border: 1px solid rgba(15, 17, 21, 0.07);
    border-radius: 28px;
    box-shadow: var(--blog-card-shadow);
    overflow: hidden;
}

.blog-reader__head {
    padding: 44px clamp(28px, 5vw, 64px) 32px;
    background:
        linear-gradient(180deg, var(--blog-accent-soft) 0%, transparent 100%);
    border-bottom: 1px solid rgba(15, 17, 21, 0.06);
}

.blog-reader__category {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 99px;
    background: var(--blog-accent-strong);
    color: var(--blog-accent);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.blog-reader__title {
    margin: 18px 0 14px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.blog-reader__excerpt {
    margin: 0 0 16px;
    max-width: 42rem;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.blog-reader__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Разметка контент + sticky оглавление */
.blog-reader__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 36px;
    padding: 36px clamp(28px, 5vw, 64px) 18px;
    align-items: start;
}

.blog-reader__content {
    min-width: 0;
}

.blog-reader__body {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-primary);
}

/* TOC */
.blog-toc {
    position: sticky;
    top: calc(var(--header-h, 64px) + 16px);
    align-self: start;
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: rgba(245, 245, 247, 0.7);
    border: 1px solid rgba(15, 17, 21, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-height: calc(100vh - var(--header-h, 64px) - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.blog-toc__label {
    margin: 0 0 12px;
    padding: 0 4px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.blog-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.blog-toc__btn {
    width: 100%;
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font: inherit;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.blog-toc__btn:hover {
    background: rgba(15, 17, 21, 0.05);
    color: var(--text-primary);
}

.blog-toc__num {
    flex-shrink: 0;
    width: 24px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.blog-toc__text {
    flex: 1;
    min-width: 0;
}

.blog-toc__item--active .blog-toc__btn {
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    font-weight: 600;
}

.blog-toc__item--active .blog-toc__num {
    color: var(--blog-accent);
}

/* CTA внизу статьи */
.blog-reader__cta {
    margin: 16px clamp(28px, 5vw, 64px) clamp(28px, 5vw, 44px);
    padding: 26px 28px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--blog-accent-soft), rgba(94, 92, 230, 0.06));
    border: 1px solid var(--blog-accent-strong);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.blog-reader__cta-title {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.blog-reader__cta-sub {
    margin: 0 0 6px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 36rem;
}

.blog-reader__cta-btn {
    width: auto;
    padding: 0 22px;
}

/* Pager prev/next */
.blog-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.blog-pager__filler {
    display: block;
}

.blog-pager__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 22px;
    border-radius: 20px;
    border: 1px solid rgba(15, 17, 21, 0.08);
    background: var(--bg-card);
    box-shadow: 0 1px 2px rgba(15, 17, 21, 0.05);
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    border-top: 3px solid var(--blog-accent);
    font: inherit;
}

.blog-pager__item:hover,
.blog-pager__item:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--blog-card-shadow-hover);
    border-color: rgba(15, 17, 21, 0.14);
    outline: none;
}

.blog-pager__item--next {
    text-align: right;
    align-items: flex-end;
}

.blog-pager__dir {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blog-accent);
}

.blog-pager__dir svg {
    width: 14px;
    height: 14px;
}

.blog-pager__title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Типографика статей блога (разметка из window.__KTEMA_ARTICLE_*) */
.blog-prose {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-prose > p {
    margin: 0;
}

.blog-prose h4 {
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.38;
    color: var(--text-primary);
    margin: 22px 0 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-soft);
}

.blog-prose h4:first-of-type {
    margin-top: 2px;
}

.blog-prose .blog-hook {
    font-weight: 600;
    color: var(--text-primary);
    margin: -4px 0 2px !important;
    line-height: 1.45;
}

.blog-prose ul {
    margin: -4px 0 2px;
    padding-left: 1.35em;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-prose li {
    padding-left: 0.08em;
    line-height: 1.5;
}

.blog-prose ul.blog-cta-list {
    gap: 8px;
    border-left: 3px solid var(--accent);
    padding-left: 1.25em;
    margin-left: 3px;
    background: var(--accent-bg-soft);
    padding-top: 12px;
    padding-bottom: 12px;
    padding-right: 12px;
    border-radius: 0 var(--radius-bubble) var(--radius-bubble) 0;
}

.blog-prose .blog-vs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 2px;
}

.blog-prose .blog-vs-row {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--bg-page);
    line-height: 1.52;
}

.blog-prose .blog-vs-icon {
    display: inline-block;
    margin-right: 8px;
    vertical-align: -0.1em;
}

.blog-prose .blog-vs-row--bad {
    border-left: 4px solid #c62828;
}

.blog-prose .blog-vs-row--good {
    border-left: 4px solid #2e7d32;
}

.blog-prose .blog-vs-note {
    font-size: 0.92em;
    color: var(--text-tertiary);
    font-weight: 500;
}

.blog-prose .blog-vs-row--solo {
    margin-top: 2px;
}

.blog-prose .blog-audience-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 4px 0 2px;
}

.blog-prose .blog-audience-card {
    padding: 14px 16px;
    border-radius: var(--radius-bubble);
    border: 1px solid var(--border-soft);
    background: var(--accent-bg-soft);
    font-size: 14px;
    line-height: 1.52;
}

.blog-prose .blog-audience-card p {
    margin: 0;
}

.blog-prose .blog-audience-card p + p {
    margin-top: 8px;
}

.blog-prose .blog-audience-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    color: var(--accent);
    margin: 0 0 8px;
}

@media (max-width: 560px) {
    .blog-prose .blog-audience-pair {
        grid-template-columns: 1fr;
    }
}

/* Статья: формулы заголовков + примеры */
.blog-prose .blog-formula-trio {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 4px;
}

.blog-prose .blog-formula-card {
    padding: 14px 16px;
    border-radius: var(--radius-bubble);
    border: 1px solid var(--border-soft);
    background: var(--accent-bg-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.blog-prose .blog-formula-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.35;
}

.blog-prose .blog-formula-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 10px;
    line-height: 1.45;
}

.blog-prose .blog-formula-example {
    margin: 0;
    padding: 11px 13px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.blog-prose h5.blog-prose-subhead {
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 18px 0 8px;
    padding: 0;
    border: none;
}

.blog-prose h4 + h5.blog-prose-subhead {
    margin-top: 8px;
}

.blog-prose ul.blog-headline-examples {
    list-style: none;
    padding-left: 0;
    margin: 4px 0 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-prose ul.blog-headline-examples li {
    padding: 10px 12px 10px 14px;
    margin: 0;
    border-radius: 10px;
    background: var(--bg-page);
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--accent);
    line-height: 1.45;
    font-size: 14px;
}

/* Статья: плюсы / минусы нейросети */
.blog-prose .blog-pro-con-item {
    margin: 0 0 14px;
    padding: 0 0 0 2px;
}

.blog-prose .blog-pro-con-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.35;
}

.blog-prose .blog-pro-con-item--cons {
    padding-left: 14px;
    border-left: 3px solid rgba(198, 40, 40, 0.55);
}

.blog-prose .blog-pro-con-item:not(.blog-pro-con-item--cons) {
    padding-left: 14px;
    padding-right: 8px;
    border-left: 3px solid rgba(46, 125, 50, 0.45);
}

/* Статья: шаблоны объявлений */
.blog-prose .blog-template-card {
    margin: 14px 0 0;
    padding: 16px 18px 18px;
    border-radius: var(--radius-bubble);
    border: 1px dashed var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-bubble);
}

.blog-prose .blog-template-card:first-of-type {
    margin-top: 6px;
}

.blog-prose h4.blog-template-heading {
    margin: 0 0 12px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.blog-prose .blog-template-card p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.54;
}

.blog-prose .blog-template-card p:last-child {
    margin-bottom: 0;
}

.blog-prose ul.blog-template-ul {
    margin: 0 0 12px;
    padding-left: 1.2em;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-prose ul.blog-template-ul li {
    padding-left: 0.12em;
    line-height: 1.5;
    font-size: 14px;
}

.blog-prose .blog-examples-pair {
    display: grid;
    gap: 14px;
    margin: 4px 0 2px;
}

.blog-prose .blog-example-before,
.blog-prose .blog-example-after {
    padding: 14px 16px;
    border-radius: var(--radius-bubble);
    font-size: 14px;
    line-height: 1.54;
}

.blog-prose .blog-example-before {
    background: var(--bg-page);
    border: 1px dashed var(--border);
}

.blog-prose .blog-example-after {
    background: var(--accent-bg-soft);
    border: 1px solid var(--border-soft);
}

.blog-prose .blog-example-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 10px !important;
}

.blog-prose .blog-example-before p:last-child,
.blog-prose .blog-example-after p:last-child {
    margin-bottom: 0 !important;
}

.blog-prose .blog-prose-close {
    font-weight: 500;
    color: var(--text-primary);
}

.blog-prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.blog-prose-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.history-status-bubble {
    margin-bottom: 0;
}

.history-card {
    background: var(--bg-card);
    border-radius: var(--radius-bubble);
    box-shadow: var(--shadow-bubble);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.history-card-head {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 16px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: background var(--transition-fast);
}

.history-card-head:hover {
    background: var(--bg-page);
}

.history-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.history-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--accent-bg-soft);
    color: var(--accent);
}

.history-pill--soft {
    background: var(--bg-page);
    color: var(--text-secondary);
    font-weight: 500;
}

.history-pill--detail {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 500;
    border: 1px solid var(--border-soft);
}

.history-card-date {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.history-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.history-card-body {
    padding: 0 18px 18px;
    border-top: 1px solid var(--border-soft);
}

.history-description {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
    color: var(--text-primary);
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.history-card-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-header--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    gap: 12px;
    margin-bottom: 0;
}

.modal-header--row h2 {
    margin-bottom: 0;
    flex: 1;
}

.modal-close {
    flex-shrink: 0;
}

.modal-auth .auth-tabs {
    margin-bottom: 16px;
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}
.modal-header h2 { margin-bottom: 6px; }

/* Тарифы в попапе оплаты */
.plan-card {
    border: 2px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    margin-bottom: 12px;
}
.plan-card:hover { background: var(--bg-page); }
.plan-card.selected {
    border-color: var(--accent);
    background: var(--accent-bg-soft);
}
.plan-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.plan-name { font-weight: 600; font-size: 16px; }
.plan-price { color: var(--accent); font-weight: 600; }
.plan-meta { font-size: 13px; color: var(--text-secondary); }

/* Попап авторизации */
.auth-tabs {
    display: flex;
    background: var(--bg-page);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.auth-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-bubble);
}
.auth-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

.error-banner {
    background: rgba(255, 59, 48, 0.08);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin: 8px 0;
}

[x-cloak] { display: none !important; }

/* =========================================================================
   Кнопка «Назад» к шагу
   ========================================================================= */
.step-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.step-back:hover { background: var(--bg-page); color: var(--text-primary); }
.step-back svg { width: 14px; height: 14px; }

/* =========================================================================
   Онбординг-карточка
   ========================================================================= */
.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.onboarding-step {
    background: var(--bg-page);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
}
.onboarding-step-num {
    width: 24px;
    height: 24px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: var(--accent);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.onboarding-step-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.35;
}

/* =========================================================================
   Способы оплаты (карточки)
   ========================================================================= */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.method-card {
    border: 2px solid var(--border-soft);
    background: var(--bg-page);
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}
.method-card:hover { background: #FFFFFF; }
.method-card.selected {
    border-color: var(--accent);
    background: var(--accent-bg-soft);
}
.method-card svg { width: 26px; height: 26px; color: var(--text-primary); }
.method-card.selected svg { color: var(--accent); }

/* =========================================================================
   Inline-формы в чате (авторизация, оплата)
   ========================================================================= */
.inline-form {
    width: 100%;
    max-width: 460px;
}

/* Форма параметров: отступ при scrollIntoView под липкую шапку */
.parameters-form-bubble,
.parameters-complete-bubble {
    scroll-margin-top: calc(88px + env(safe-area-inset-top, 0px));
    max-width: 100%;
}

.parameters-form-bubble--collapsed {
    padding: 0;
    overflow: hidden;
}

.parameters-form-bubble--collapsed .parameters-collapsed-strip {
    margin: 0;
}

.parameters-collapsed-strip {
    padding: 0;
}

.parameters-collapsed-strip__btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: none;
    border-radius: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition-fast);
}

.parameters-collapsed-strip__btn:hover {
    background: rgba(0, 122, 255, 0.06);
}

.parameters-collapsed-strip__btn:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(0, 122, 255, 0.35);
}

.parameters-collapsed-strip__ico {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg-soft);
    color: var(--accent);
}

.parameters-collapsed-strip__ico svg {
    width: 20px;
    height: 20px;
}

.parameters-collapsed-strip__main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.parameters-collapsed-strip__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.parameters-collapsed-strip__sub {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.35;
}

.parameters-form-collapse-control {
    display: block;
    width: fit-content;
    margin: 4px 0 12px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    -webkit-tap-highlight-color: transparent;
}

.parameters-form-collapse-control:hover {
    color: var(--accent-hover);
}

.generator-chat-stream .parameters-collapsed-strip__title {
    color: var(--l-text);
}

.generator-chat-stream .parameters-collapsed-strip__sub {
    color: var(--l-muted);
}

.generator-chat-stream .parameters-collapsed-strip__ico {
    background: rgba(0, 122, 255, 0.12);
    color: var(--l-accent);
}

.generator-chat-stream .parameters-collapsed-strip__btn:hover {
    background: rgba(0, 122, 255, 0.07);
}

.generator-chat-stream .parameters-form-collapse-control {
    color: var(--l-accent);
}

/* Квартира: пошаговая анкета — прогресс и похвала */
.param-apartment-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 6px;
}

.param-progress__track {
    height: 6px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.param-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent) 0%, #5856d6 100%);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.param-progress__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 8px;
}

.param-progress__step {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.param-progress__remain {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.param-progress__dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.param-progress__dot {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.08);
    min-width: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.param-progress__dot--done {
    background: linear-gradient(90deg, rgba(0, 122, 255, 0.55), rgba(88, 86, 214, 0.5));
}

.param-progress__dot--current {
    background: var(--accent);
    transform: scaleY(1.35);
}

.param-batch-titles__main {
    margin-bottom: 4px !important;
}

.param-batch-titles__sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--text-secondary);
}

.param-praise {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(52, 199, 89, 0.35);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.09) 0%, rgba(0, 122, 255, 0.06) 100%);
}

.param-praise__check {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(52, 199, 89, 0.2);
    color: #248a3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.param-praise__check svg {
    width: 18px;
    height: 18px;
}

.param-praise__title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.param-praise__body {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.generator-chat-stream .param-praise__title {
    color: var(--l-text);
}

.generator-chat-stream .param-praise__body {
    color: var(--l-muted);
}

.generator-chat-stream .param-progress__step {
    color: var(--l-text);
}

.generator-chat-stream .param-progress__remain {
    color: var(--l-muted);
}

.generator-chat-stream .param-batch-titles__sub {
    color: var(--l-muted);
}

.generator-chat-stream .param-progress__track {
    background: rgba(0, 0, 0, 0.06);
}

.generator-chat-stream .param-progress__dot {
    background: rgba(0, 0, 0, 0.08);
}

/* Карточка «анкета заполнена» перед выбором стиля */
.parameters-done-hero {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.parameters-done-hero__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(52, 199, 89, 0.22), rgba(0, 122, 255, 0.18));
    color: #248a3d;
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.15);
}

.parameters-done-hero__icon svg {
    width: 22px;
    height: 22px;
}

.parameters-done-hero__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-bg-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.parameters-done-hero__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.25;
}

.parameters-done-hero__lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.parameters-done-next {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.parameters-done-next__line {
    flex: 1;
    height: 1px;
    min-width: 24px;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.35), transparent);
}

.parameters-done-next__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.parameters-done-next__target {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.parameters-done-summary {
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.02);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.parameters-done-summary__caption {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.parameters-done-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(240px, 40vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.parameters-done-list__item {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    gap: 10px 12px;
    align-items: start;
    font-size: 13px;
    line-height: 1.45;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.parameters-done-list__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.parameters-done-list__k {
    color: var(--text-secondary);
    font-weight: 500;
}

.parameters-done-list__v {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.parameters-done-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 480px) {
    .parameters-done-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
    }

    .parameters-done-actions__edit {
        margin-right: auto;
    }
}

.generator-chat-stream .parameters-done-hero__title {
    color: var(--l-text);
}

.generator-chat-stream .parameters-done-hero__lead {
    color: var(--l-muted);
}

.generator-chat-stream .parameters-done-summary {
    border-color: var(--l-border);
    background: rgba(255, 255, 255, 0.45);
}

.generator-chat-stream .parameters-done-list__item {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.generator-chat-stream .parameters-done-list__k {
    color: var(--l-muted);
}

.generator-chat-stream .parameters-done-list__v {
    color: var(--l-text);
}

.generator-chat-stream .parameters-done-next__line {
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.28), transparent);
}

.generator-chat-stream .parameters-done-next__label {
    color: var(--l-muted);
}

.generator-chat-stream .parameters-done-next__target {
    color: var(--l-accent);
}

.generator-chat-stream .parameters-done-hero__icon {
    color: #1a7f4c;
}

.parameters-done-summary__empty {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.generator-chat-stream .parameters-done-summary__empty {
    color: var(--l-muted);
}

.inline-form .auth-tabs { margin-bottom: 16px; }

.plan-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.plan-cards-row .plan-card { margin-bottom: 0; }

/* Гамбургер и упрощённая шапка на планшетах и мобильных */
@media (max-width: 900px) {
    .site-nav--desktop {
        display: none !important;
    }

    .header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px;
    }

    .header-brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .header-trailing {
        grid-column: 2;
        grid-row: 1;
    }

    .header-burger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* =========================================================================
   Mobile (≤ 640px) — единая область правил
   ========================================================================= */
@media (max-width: 640px) {
    .app-header-zone {
        z-index: 9900;
    }

    .app-header {
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
    }

    .header-inner {
        gap: 6px 8px;
    }

    .brand-block {
        flex: 1 1 auto;
        min-width: 0;
    }

    .brand-tagline {
        max-width: 100%;
    }

    .header-brand .brand {
        font-size: 17px;
        letter-spacing: -0.025em;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
    }

    .brand-lockup {
        gap: 9px;
    }

    .header-trailing {
        gap: 6px;
    }

    .header-cta {
        padding: 8px 14px;
        font-size: 13px;
    }

    .header-authed .balance-pill--site-nav {
        padding: 6px 10px;
    }

    .header-authed .user-email--site-nav {
        display: none;
    }

    .blog-shell {
        padding-bottom: max(36px, calc(28px + env(safe-area-inset-bottom, 0px)));
    }

    .cabinet-history {
        padding-bottom: max(36px, calc(28px + env(safe-area-inset-bottom, 0px)));
    }

    .static-shell {
        padding-top: 20px;
        padding-bottom: max(36px, calc(28px + env(safe-area-inset-bottom, 0px)));
    }

    .static-hero-title {
        font-size: 22px;
    }

    .copied-toast {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    /* Как в мессенджерах: колонка сообщения прижата к нижнему краю (аватар у «пятки» пузыря) */
    .message {
        align-items: flex-end;
    }

    .message.from-bot .bubble {
        max-width: calc(100% - 46px);
    }

    .message.from-user .bubble {
        max-width: min(92%, calc(100% - 12px));
    }

    /* Генератор: колонка чата — пузыри на всю доступную ширину (не сужаем вторым вычитанием) */
    .generator-page .generator-chat-stream .message.from-bot .bubble:not(.inline-form):not(.parameters-form-bubble):not(.parameters-complete-bubble):not(.result-bubble) {
        max-width: 100%;
    }

    .generator-page .generator-chat-stream .message.from-user .bubble {
        max-width: min(92%, 100%);
    }

    .chip {
        white-space: normal;
        text-align: center;
        height: auto;
        min-height: 38px;
        padding: 9px 14px;
    }

    .chips {
        gap: 8px;
    }

    .form-fields-grid { grid-template-columns: 1fr; }

    .inline-form {
        max-width: 100%;
    }

    .input,
    .select,
    .textarea {
        font-size: 16px;
    }

    .field-label {
        font-size: 13px;
    }

    .user-email { display: none; }
    .modal { padding: 22px 18px; border-radius: 18px; }
    .modal-header { margin-bottom: 18px; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }

    .onboarding-steps { grid-template-columns: 1fr; }
    .payment-methods { grid-template-columns: 1fr; }
    .method-card { flex-direction: row; padding: 12px; }
    .plan-cards-row { grid-template-columns: 1fr; }

    /* Блог — мобильная адаптация Apple-стиля */
    .blog-shell {
        padding-top: 24px;
        padding-bottom: max(48px, calc(36px + env(safe-area-inset-bottom)));
    }

    .blog-listing {
        gap: 26px;
    }

    .blog-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        align-items: stretch;
    }

    .blog-hero__title {
        font-size: clamp(28px, 8vw, 36px);
    }

    .blog-hero__lead {
        font-size: 15px;
    }

    .blog-search {
        height: 48px;
    }

    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured__art {
        min-height: 160px;
    }

    .blog-featured__art-glyph {
        width: 76px;
        height: 76px;
        border-radius: 18px;
    }

    .blog-featured__art-glyph svg {
        width: 42px;
        height: 42px;
    }

    .blog-featured__body {
        padding: 22px 22px 24px;
    }

    .blog-featured__title {
        font-size: 22px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-card__cover {
        min-height: 110px;
    }

    .blog-card__title {
        font-size: 16px;
    }

    /* Reader на мобильном — карточка раскрывается на всю ширину */
    .blog-reader {
        border-radius: 22px;
    }

    .blog-reader__head {
        padding: 28px 20px 22px;
    }

    .blog-reader__title {
        font-size: clamp(24px, 6.4vw, 30px);
    }

    .blog-reader__excerpt {
        font-size: 15px;
    }

    .blog-reader__layout {
        grid-template-columns: 1fr;
        padding: 22px 20px 8px;
        gap: 22px;
    }

    .blog-reader__body {
        font-size: 15.5px;
    }

    /* TOC под заголовком (collapsible-плашкой) — не sticky */
    .blog-toc {
        position: static;
        max-height: none;
        order: -1;
        margin-bottom: 4px;
        background: rgba(245, 245, 247, 0.85);
    }

    .blog-toc__list {
        gap: 0;
    }

    .blog-reader__cta {
        margin: 12px 20px 24px;
        padding: 22px 20px;
    }

    .blog-reader__cta-btn {
        width: 100%;
    }

    .blog-pager {
        grid-template-columns: 1fr;
    }

    .blog-pager__filler {
        display: none;
    }

    .blog-pager__item--next {
        text-align: left;
        align-items: flex-start;
    }

    /* Генератор: прячем «лендинговый» футер, чтобы окно чата заняло весь экран. Юр. ссылки доступны из меню. */
    .generator-page > .landing-footer {
        display: none;
    }

    .generator-page-inner {
        padding-top: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    /* Стрим чата: запрет «утаскивания» страницы при overscroll внутри чата. */
    .landing-chat-stream,
    .history-description,
    .offer-doc-scroll {
        overscroll-behavior: contain;
    }

    /* Большие тапы — минимум 44px высоты по HIG */
    .button {
        height: 50px;
        font-size: 16px;
    }

    .button-ghost {
        height: 44px;
    }

    .step-back {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Карточка успеха: иконка слева отдельно, текст ниже, чтобы заголовок не «прыгал» через всю ширину. */
    .parameters-done-hero {
        gap: 12px;
    }

    .parameters-done-hero__icon {
        width: 38px;
        height: 38px;
    }

    .parameters-done-hero__title {
        font-size: 17px;
    }

    .parameters-done-list__item {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        font-size: 13px;
    }

    .parameters-done-actions {
        flex-direction: column;
    }

    .parameters-done-actions .button {
        width: 100%;
    }

    /* Тарифы: карточки плотнее */
    .tariff-card {
        padding: 16px 16px;
    }

    .tariff-card-head {
        flex-wrap: wrap;
        align-items: baseline;
    }

    /* CTA на статичных страницах (тарифы, о сервисе) — на всю ширину для удобного тапа */
    .static-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .static-actions .button-primary,
    .static-actions .button-secondary {
        width: 100%;
    }

    /* Результат генерации: paywall-overlay в один столбец, без обрезанного контента */
    .result-blur-overlay {
        inset: 6px 8px;
        padding: 14px 10px;
    }

    .paywall-choices {
        max-width: 100%;
    }

    .paywall-card {
        padding: 14px 14px;
    }

    .lock-hint {
        max-width: 100%;
        font-size: 13px;
    }

    .result-actions .button {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    /* Модальное окно публичной оферты / политики на мобильном — максимально использует экран */
    .modal-backdrop--legal {
        padding: 0;
    }

    .modal--offer {
        max-width: 100%;
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        margin: 0;
    }

    .modal--offer .offer-doc-scroll {
        max-height: none;
        flex: 1 1 auto;
        padding: 14px 18px max(20px, env(safe-area-inset-bottom));
    }

    /* История генераций: метаданные и действия — в колонку */
    .history-card-head {
        gap: 8px 10px;
        padding: 14px 16px;
    }

    .history-card-meta {
        gap: 6px;
    }

    .history-card-date {
        font-size: 12px;
    }

    .history-card-body {
        padding: 0 16px 16px;
    }

    .history-card-actions .button {
        width: 100%;
    }

    /* Личный кабинет — сегменты, карточки, формы */
    .cabinet-shell {
        padding:
            20px max(16px, env(safe-area-inset-left, 0px))
            max(36px, calc(28px + env(safe-area-inset-bottom, 0px)))
            max(16px, env(safe-area-inset-right, 0px));
    }

    .cabinet-shell-inner {
        gap: 18px;
    }

    .cabinet-title,
    .cabinet-shell h1.cabinet-title {
        font-size: clamp(24px, 6.5vw, 30px);
        line-height: 1.12;
    }

    .cabinet-lead {
        font-size: 15px;
    }

    .cabinet-seg {
        gap: 6px;
        padding: 6px;
    }

    .cabinet-seg__btn {
        flex: 1 1 30%;
        min-width: 0;
        min-height: 44px;
        padding: 11px 8px;
        font-size: 13px;
        line-height: 1.25;
    }

    .cabinet-object-card__head {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }

    .cabinet-object-card__main {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
    }

    .cabinet-object-card__chev {
        order: 2;
        align-self: center;
    }

    .cabinet-object-card__time {
        order: 3;
        flex: 1 0 100%;
        white-space: normal;
        font-size: 12px;
    }

    .cabinet-object-card__body {
        padding: 0 16px 14px;
    }

    .cabinet-empty {
        padding: 28px 18px;
    }

    .cabinet-settings-group {
        padding: 16px 18px;
    }

    .cabinet-danger-input {
        max-width: 100%;
    }

    .cabinet-danger-btn {
        width: 100%;
    }

    .cabinet-shell .about-btn--primary {
        width: 100%;
        min-height: 44px;
    }

    /* Auth-форма не должна разъезжаться на узких экранах */
    .modal-auth .auth-tabs {
        margin-bottom: 14px;
    }

    /* Формы и сводки в чате генератора — на всю доступную ширину пузыря (вместо fit-content) */
    .generator-chat-stream .bubble.inline-form,
    .generator-chat-stream .bubble.parameters-form-bubble,
    .generator-chat-stream .bubble.parameters-complete-bubble {
        width: 100%;
        max-width: 100%;
        padding: 14px 16px;
    }

    .generator-chat-stream .bubble.inline-form > .field,
    .generator-chat-stream .bubble.parameters-form-bubble .field {
        margin-bottom: 6px;
    }
}

/* Очень узкие экраны (≤ 380px) — iPhone SE 1, старые смартфоны */
@media (max-width: 380px) {
    .header-burger {
        width: 42px;
        height: 42px;
    }

    .header-brand .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 26px;
        height: 26px;
    }

    .brand-lockup {
        gap: 8px;
    }

    .landing-h1 {
        font-size: 26px;
    }

    .landing-lead {
        font-size: 15px;
    }

    .landing-btn-primary {
        width: 100%;
        padding: 14px 18px;
        font-size: 15px;
    }

    .blog-reader__head,
    .blog-reader__layout,
    .blog-reader__cta {
        padding-left: 16px;
        padding-right: 16px;
        margin-left: 0;
        margin-right: 0;
    }

    .blog-prose .blog-vs-row,
    .blog-prose .blog-formula-card,
    .blog-prose .blog-template-card {
        padding: 12px;
    }

    .cabinet-seg__btn {
        font-size: 12.5px;
        padding: 10px 6px;
    }

    .cabinet-object-card__head {
        padding: 12px 14px;
    }
}

/* =========================================================================
   Лендинг Ktema — чат-first, всегда светлая тема (не зависит от prefers-color-scheme)
   ========================================================================= */

.mobile-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mobile-nav-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    padding:
        max(14px, env(safe-area-inset-top, 0px))
        max(20px, env(safe-area-inset-right, 0px))
        max(28px, env(safe-area-inset-bottom, 0px))
        22px;
    background: var(--drawer-bg);
    color: var(--drawer-text);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-drawer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--drawer-text);
}

.mobile-drawer-brand__text {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.028em;
    line-height: 1;
    transform: translateY(0.5px);
    color: var(--drawer-text);
}

.mobile-drawer-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: var(--drawer-close-bg);
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.mobile-drawer-close svg {
    width: 18px;
    height: 18px;
}

.mobile-drawer-close:hover {
    transform: scale(1.04);
}

.mobile-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    flex: 1 1 auto;
    min-height: 0;
}

.mobile-drawer-section-title {
    margin: 14px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.42);
}

.mobile-drawer-section-title:first-child {
    margin-top: 4px;
}

.mobile-drawer-link {
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 13px 14px;
    border-radius: 12px;
    color: inherit;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-drawer-link:hover {
    background: var(--drawer-link-hover);
}

.mobile-drawer-link--active {
    background: var(--accent-bg-soft);
    color: var(--accent);
    font-weight: 600;
}

.mobile-drawer-link--accent {
    margin-top: 12px;
    background: var(--text-primary);
    color: #ffffff;
    font-weight: 600;
    justify-content: center;
}

.mobile-drawer-link--accent:hover {
    background: #000000;
    color: #ffffff;
}

.mobile-drawer-link--subscription {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.mobile-drawer-subscription-val {
    font-weight: 600;
    color: var(--drawer-accent);
}

.mobile-drawer-profile {
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-drawer-profile-email {
    font-size: 14px;
    font-weight: 500;
    color: var(--drawer-text);
    word-break: break-word;
}

.mobile-drawer-link--logout {
    align-self: flex-start;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 15px;
    color: var(--text-secondary);
}

.mobile-drawer-legal {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-drawer-link--legal {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 10px 12px;
    text-decoration: none;
}

.mobile-drawer-link--mail {
    color: var(--accent);
    font-weight: 600;
}

:root {
    --drawer-bg: #ffffff;
    --drawer-text: #1d1d1f;
    --drawer-close-bg: rgba(0, 0, 0, 0.06);
    --drawer-link-hover: rgba(0, 0, 0, 0.05);
    --drawer-accent: #007aff;
}

.landing-page,
.generator-page {
    width: 100%;
    min-width: 0;
    color-scheme: light;
    --l-deep: #f5f5f7;
    --l-surface: rgba(255, 255, 255, 0.92);
    --l-surface-2: #e8e8ed;
    --l-border: rgba(0, 0, 0, 0.08);
    --l-text: #1d1d1f;
    --l-muted: rgba(29, 29, 31, 0.62);
    --l-accent: #007aff;
    --l-accent-2: #5856d6;
    --l-user-bg: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
    --l-shadow: 0 24px 56px rgba(0, 0, 0, 0.12);
    --l-pattern: radial-gradient(ellipse 70% 55% at 18% 22%, rgba(0, 122, 255, 0.11), transparent 52%),
        radial-gradient(ellipse 55% 45% at 88% 12%, rgba(88, 86, 214, 0.1), transparent 48%);
    color: var(--l-text);
}

.landing-page {
    flex: 1 0 auto;
    background: var(--l-deep);
}

.generator-page {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
    background-color: var(--l-deep);
    background-image: var(--l-pattern);
    /* Как у .app-header: та же ширина полосы контента, что и .header-inner → логотип / Ktema */
    padding-left: var(--header-pad-x);
    padding-right: var(--header-pad-x-right);
    box-sizing: border-box;
}

.generator-page::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
    background-size: 52px 52px;
}

.generator-page-inner {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px 0 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    gap: 12px;
}

/* === Apple-style верхняя полоска над окном чата === */
.generator-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--l-border);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.generator-topline__lead {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.generator-topline__pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
    animation: gen-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes gen-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18); }
    50%      { box-shadow: 0 0 0 6px rgba(52, 199, 89, 0.04); }
}

.generator-topline__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.generator-topline__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--l-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.generator-topline__sub {
    margin: 1px 0 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 12.5px;
    color: var(--l-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.generator-topline__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.generator-topline__balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 980px;
    background: rgba(0, 122, 255, 0.10);
    color: var(--l-accent);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
}

.generator-topline__balance svg { width: 14px; height: 14px; }

.generator-topline__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--l-border);
    background: #ffffff;
    color: var(--l-text);
    border-radius: 980px;
    font: inherit;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.generator-topline__btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.generator-topline__btn svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
    .generator-topline {
        padding: 8px 14px;
        border-radius: 14px;
    }
    .generator-topline__sub { display: none; }
    .generator-topline__btn-label { display: none; }
    .generator-topline__btn { padding: 8px 10px; }
}

.generator-page > .landing-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* =========================================================================
   ГЕНЕРАТОР — Apple-style чат и сообщения
   ========================================================================= */

/* Шрифт: единый Apple system stack для всего чата */
.generator-chat-stream {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 14px 18px 16px;
    gap: 10px;
    /* Тонкий gradient-вуаль — добавляет глубины без шума */
    background:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(10, 132, 255, 0.04), transparent 70%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(88, 86, 214, 0.04), transparent 60%);
    /* Apple-style тонкий скроллбар */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.generator-chat-stream::-webkit-scrollbar { width: 8px; }
.generator-chat-stream::-webkit-scrollbar-track { background: transparent; }
.generator-chat-stream::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.16);
    border-radius: 980px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.generator-chat-stream::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.28);
    background-clip: padding-box;
}

/* Сообщение: spring-style вход (subtle scale + lift) */
.generator-chat-stream .message {
    align-self: stretch;
    align-items: flex-end;
    animation: gen-msg-in 0.42s cubic-bezier(0.34, 1.46, 0.56, 1) both;
}

@keyframes gen-msg-in {
    0%   { opacity: 0; transform: translateY(10px) scale(0.97); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Аватар бота — Apple squircle с тонкой подсветкой */
.generator-page .generator-chat-stream .message .avatar {
    width: 32px !important;
    height: 32px !important;
    box-sizing: border-box !important;
    border-radius: 9px !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-end !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 !important;
    box-shadow:
        0 4px 12px rgba(10, 132, 255, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.generator-page .generator-chat-stream .message .avatar-mark {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px;
    display: block;
}

/* Пузыри — Apple-style: чистый белый bot, iMessage-blue user, плавные тени */
.generator-chat-stream .bubble {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.55;
    letter-spacing: -0.005em;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Бот: белая карточка с тонкой обводкой и более чистой геометрией */
.generator-chat-stream .message.from-bot .bubble {
    background: #ffffff;
    color: var(--l-text);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.generator-chat-stream .message.from-bot .bubble:not(.inline-form):not(.parameters-form-bubble):not(.parameters-complete-bubble):not(.result-bubble) {
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    max-width: min(100%, 34rem);
    width: fit-content;
    padding: 11px 14px;
}

/* User: iMessage-blue (gradient → плотный синий + лёгкое осветление сверху для глубины) */
.generator-chat-stream .message.from-user .bubble {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 40%),
        linear-gradient(135deg, #0a84ff 0%, #1f6feb 60%, #5856d6 100%);
    color: #ffffff;
    border-radius: 18px;
    border-bottom-right-radius: 6px;
    font-weight: 500;
    max-width: min(100%, 34rem);
    width: fit-content;
    padding: 11px 14px;
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.22);
    border: none;
}

/* Inline-формы (auth / parameters / params-complete): белая карточка большого размера */
.generator-chat-stream .bubble.inline-form,
.generator-chat-stream .bubble.parameters-form-bubble,
.generator-chat-stream .bubble.parameters-complete-bubble {
    max-width: min(100%, 480px);
    width: fit-content;
    padding: 18px 20px;
    border-radius: 22px;
    border-bottom-left-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.generator-chat-stream .bubble.parameters-form-bubble.parameters-form-bubble--collapsed {
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Результат: премиальная карточка с акцентной полосой сверху */
.generator-chat-stream .bubble.result-bubble {
    max-width: 100%;
    width: 100%;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    position: relative;
}

.generator-chat-stream .bubble.result-bubble::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #0a84ff 0%, #5856d6 50%, #ff375f 100%);
}

.generator-chat-stream .bubble.result-bubble > .result-text,
.generator-chat-stream .bubble.result-bubble > .result-blur-overlay,
.generator-chat-stream .bubble.result-bubble > .result-actions {
    margin: 0;
}

.generator-chat-stream .bubble.result-bubble > .result-text {
    padding: 18px 20px 8px;
}

.generator-chat-stream .bubble.result-bubble > .result-actions {
    padding: 0 20px 18px;
    margin-top: 12px;
}

.generator-chat-stream .bubble.result-bubble .result-blur-overlay {
    inset: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        0 12px 32px rgba(0, 0, 0, 0.06);
}

.generator-chat-stream .bubble.result-bubble .lock-icon {
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(10, 132, 255, 0.34);
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.generator-chat-stream .bubble.result-bubble .paywall-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.generator-chat-stream .bubble.result-bubble .paywall-card:hover {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.06), rgba(88, 86, 214, 0.06));
    border-color: var(--l-accent);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.16);
}

.generator-chat-stream .bubble.result-bubble .paywall-card-price {
    color: var(--l-accent);
}

.generator-chat-stream .bubble.result-bubble .paywall-title {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* Заголовок-вопрос внутри сообщения бота */
.generator-chat-stream .bubble .q-title {
    color: var(--l-text);
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
    line-height: 1.35;
}

/* Чипы в чате — Apple-pill с лёгкой тенью и активным состоянием как у segmented control */
.generator-chat-stream .chips {
    gap: 8px;
}

.generator-chat-stream .chip {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    color: var(--l-text);
    font-weight: 500;
    height: 38px;
    padding: 0 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.generator-chat-stream .chip:hover:not(:disabled) {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.generator-chat-stream .chip:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.generator-chat-stream .chip.selected {
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.32);
    font-weight: 600;
}

.generator-chat-stream .chip.selected:hover:not(:disabled) {
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.4);
}

/* Поля внутри inline-форм — Apple-style filled input с focus ring */
.generator-chat-stream .input,
.generator-chat-stream .select,
.generator-chat-stream .textarea {
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14.5px;
    color: var(--l-text);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.generator-chat-stream .input:hover:not(:disabled):not(:focus),
.generator-chat-stream .select:hover:not(:disabled):not(:focus),
.generator-chat-stream .textarea:hover:not(:disabled):not(:focus) {
    background: #ececef;
}

.generator-chat-stream .input:focus,
.generator-chat-stream .select:focus,
.generator-chat-stream .textarea:focus {
    background: #ffffff;
    border-color: rgba(10, 132, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.generator-chat-stream .field-label {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: -0.005em;
    color: var(--l-muted);
    margin-bottom: 6px;
}

.generator-chat-stream .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-color: #f5f5f7;
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.generator-chat-stream .select:focus {
    background-color: #ffffff;
}

.generator-chat-stream .textarea {
    line-height: 1.5;
    min-height: 64px;
}

/* Apple-style чекбокс с iOS-toggle-feel */
.generator-chat-stream .checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.20);
    border-radius: 6px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.generator-chat-stream .checkbox-row input[type="checkbox"]:hover {
    border-color: rgba(0, 0, 0, 0.32);
}

.generator-chat-stream .checkbox-row input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    border-color: transparent;
    transform: scale(1.04);
}

.generator-chat-stream .checkbox-row input[type="checkbox"]:checked::after {
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 10px;
    border-width: 0 2.4px 2.4px 0;
}

.generator-chat-stream .checkbox-row span {
    font-size: 14.5px;
    color: var(--l-text);
}

/* Кнопки внутри чата — Apple pill */
.generator-chat-stream .button {
    border-radius: 980px;
    height: 44px;
    padding: 0 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 14.5px;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.15s ease;
}

.generator-chat-stream .button-primary {
    background: linear-gradient(135deg, #0a84ff 0%, #1f6feb 60%, #5856d6 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(10, 132, 255, 0.28);
}

.generator-chat-stream .button-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0a84ff 0%, #1f6feb 60%, #5856d6 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(10, 132, 255, 0.38);
    filter: brightness(1.04);
}

.generator-chat-stream .button-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.generator-chat-stream .button-primary:disabled {
    background: #d2d2d7;
    color: #ffffff;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.generator-chat-stream .button-secondary {
    background: #f5f5f7;
    color: var(--l-text);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.generator-chat-stream .button-secondary:hover:not(:disabled) {
    background: #ececef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Step-back: чище, меньше визуального веса */
.generator-chat-stream .step-back {
    color: var(--l-accent);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 10px 5px 6px;
    border-radius: 980px;
    margin-bottom: 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.generator-chat-stream .step-back:hover {
    background: rgba(10, 132, 255, 0.08);
    color: #0066d6;
}

/* Onboarding-карточка приветствия: Apple-стиль с иконками-номерами */
.generator-chat-stream .onboarding-steps {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
}

.generator-chat-stream .onboarding-step {
    background: #f5f5f7;
    border-radius: 14px;
    padding: 14px 14px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.generator-chat-stream .onboarding-step:hover {
    background: #ececef;
    transform: translateX(2px);
}

.generator-chat-stream .onboarding-step-num {
    width: 28px;
    height: 28px;
    margin: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(10, 132, 255, 0.28);
}

.generator-chat-stream .onboarding-step-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--l-text);
    line-height: 1.35;
}

/* Auth-tabs — Apple iOS segmented control */
.generator-chat-stream .auth-tabs {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 4px;
}

.generator-chat-stream .auth-tab {
    color: var(--l-muted);
    font-weight: 500;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.generator-chat-stream .auth-tab.active {
    background: #ffffff;
    color: var(--l-text);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

/* Payment-methods — Apple карточки */
.generator-chat-stream .payment-methods {
    gap: 10px;
}

.generator-chat-stream .method-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f5f5f7;
    border-radius: 14px;
    padding: 14px 8px;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.generator-chat-stream .method-card:hover:not(.selected) {
    background: #ececef;
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.generator-chat-stream .method-card.selected {
    background: rgba(10, 132, 255, 0.08);
    border-color: var(--l-accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}

/* Plan-cards внутри чата — Apple карточки тарифов */
.generator-chat-stream .plan-cards-row {
    gap: 10px;
}

.generator-chat-stream .plan-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f5f5f7;
    border-radius: 14px;
    padding: 14px;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.generator-chat-stream .plan-card:hover:not(.selected) {
    background: #ececef;
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.generator-chat-stream .plan-card.selected {
    background: rgba(10, 132, 255, 0.06);
    border-color: var(--l-accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}

.generator-chat-stream .plan-card .plan-price {
    color: var(--l-accent);
    font-weight: 700;
}

/* Error-banner: Apple-style */
.generator-chat-stream .error-banner {
    background: rgba(255, 59, 48, 0.10);
    color: #d70015;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 500;
    margin: 10px 0 0;
    border: 1px solid rgba(255, 59, 48, 0.16);
}

/* Текст результата — typografica для AI-ответа */
.generator-chat-stream .result-text {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--l-text);
    white-space: pre-wrap;
    letter-spacing: -0.005em;
}

/* Пустое место сверху: при короткой переписке пузыри у низа окна */
.generator-page .generator-chat-stream::before {
    content: "";
    flex: 1 1 auto;
    min-height: 0;
}

/* Loading-пузырь: красивые анимированные точки */
.generator-chat-stream .bubble--loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--l-muted);
    font-weight: 500;
}

.generator-chat-stream .bubble-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.generator-chat-stream .bubble-dots > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    animation: bubble-dots-bounce 1.2s ease-in-out infinite;
}

.generator-chat-stream .bubble-dots > span:nth-child(2) { animation-delay: 0.18s; }
.generator-chat-stream .bubble-dots > span:nth-child(3) { animation-delay: 0.36s; }

@keyframes bubble-dots-bounce {
    0%, 80%, 100% { transform: translateY(0) scale(0.85); opacity: 0.4; }
    40%           { transform: translateY(-3px) scale(1);    opacity: 1; }
}

.generator-chat-stream .bubble-loading-text {
    font-size: 13.5px;
}

/* Apple-style полировка существующих внутренних элементов */
.generator-chat-stream .parameters-done-hero__title,
.generator-chat-stream .param-progress__step {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.generator-chat-stream .parameters-done-hero__icon {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.18), rgba(0, 132, 255, 0.18));
    color: #248a3d;
    box-shadow: 0 6px 18px rgba(52, 199, 89, 0.18);
}

.generator-chat-stream .parameters-done-hero__badge {
    background: rgba(10, 132, 255, 0.10);
    color: var(--l-accent);
}

.generator-chat-stream .parameters-form-collapse-control {
    border: 1px solid rgba(10, 132, 255, 0.20);
    background: rgba(10, 132, 255, 0.06);
    padding: 6px 12px;
    border-radius: 980px;
    font-size: 12.5px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.generator-chat-stream .parameters-form-collapse-control:hover {
    background: rgba(10, 132, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.32);
}

.generator-chat-stream .parameters-collapsed-strip__btn {
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #ffffff;
}

.generator-chat-stream .parameters-collapsed-strip__btn:hover {
    background: #f5f5f7;
}

.generator-chat-stream .parameters-collapsed-strip__title {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
    font-size: 14px;
    color: var(--l-text);
}

.generator-chat-stream .parameters-collapsed-strip__sub {
    color: var(--l-muted);
    font-size: 12.5px;
}

/* Прогресс-бар: gradient-fill, чище визуальный ритм */
.generator-chat-stream .param-progress__fill {
    background: linear-gradient(90deg, #0a84ff 0%, #5856d6 100%);
    box-shadow: 0 0 12px rgba(10, 132, 255, 0.32);
}

.generator-chat-stream .param-progress__dot--current {
    background: linear-gradient(90deg, #0a84ff, #5856d6);
}

/* Praise-карточка: Apple-success */
.generator-chat-stream .param-praise {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.10), rgba(10, 132, 255, 0.06));
    border-color: rgba(52, 199, 89, 0.26);
    border-radius: 16px;
    animation: praise-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes praise-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.generator-chat-stream .param-praise__check {
    background: linear-gradient(135deg, #34c759, #30d158);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.32);
}

/* Welcome-карточка: первое впечатление, premium */
.generator-chat-stream .message.from-bot .bubble.welcome-bubble {
    max-width: min(100%, 480px);
    width: fit-content;
    padding: 22px 22px 20px;
    border-radius: 24px;
    border-bottom-left-radius: 8px;
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(10, 132, 255, 0.06), transparent 70%),
        #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 12px 32px rgba(10, 132, 255, 0.08);
}

.generator-chat-stream .welcome-bubble__lead {
    margin: 0 0 6px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.3;
    color: var(--l-text);
}

.generator-chat-stream .welcome-bubble__hint {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--l-muted);
}

.generator-chat-stream .welcome-bubble__cta {
    margin-top: 18px;
    width: 100%;
}

/* Поддержка reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .generator-chat-stream .message {
        animation: none;
    }
    .generator-chat-stream .chip,
    .generator-chat-stream .button,
    .generator-chat-stream .method-card,
    .generator-chat-stream .plan-card,
    .generator-chat-stream .onboarding-step {
        transition: none;
    }
}

.landing-hero {
    position: relative;
    z-index: 2;
    isolation: isolate;
    /* Подложка на самой секции: в iOS Safari при overflow/clip позже слой absolute-фона
       иногда некорректно композится и „просвечивает“ фон блока ниже (.landing-insights). */
    background-color: var(--l-deep);
    min-height: auto;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: visible;
    padding-bottom: 48px;
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--l-deep);
    background-image: var(--l-pattern);
}

.landing-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
    background-size: 52px 52px;
}

.landing-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px max(20px, env(safe-area-inset-left)) 7px max(20px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: clamp(18px, 3vw, 36px);
    align-items: start;
}

@media (max-width: 900px) {
    .landing-hero-inner {
        grid-template-columns: 1fr;
        padding-top: 36px;
        align-content: start;
    }

    .landing-hero-inner > * {
        min-width: 0;
    }

    .landing-hero-copy {
        order: 1;
    }

    .landing-hero-chat {
        order: 2;
    }
}

@keyframes landing-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.landing-reveal {
    opacity: 0;
    animation: landing-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.landing-reveal--1 {
    animation-delay: 0.06s;
}

.landing-reveal--2 {
    animation-delay: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
    .landing-reveal {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.landing-reveal-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.landing-reveal-scroll.landing-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .landing-reveal-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.landing-chat-window {
    border-radius: 22px;
    border: 1px solid var(--l-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* 100vh сначала: стабильнее в старых WebView; затем динамическая высота там, где есть */
    height: min(588px, calc(100vh - 88px));
    max-height: min(588px, calc(100vh - 88px));
    height: min(588px, calc(100dvh - 88px));
    max-height: min(588px, calc(100dvh - 88px));
    min-height: 0;
}

/* Окно чата генератора: после базовых правил .landing-chat-window — иначе фиксированная высота 588px ломает flex-растяжение */
.landing-chat-window.generator-chat-window {
    flex: 1 1 0%;
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin-left: 0;
    min-height: 0;
    height: auto;
    max-height: none;
}

@media (max-width: 900px) {
    .landing-chat-window {
        /* iOS Safari: backdrop-filter некорректно семплит нижний контент —
           визуально подтягивает фон блока ниже (.landing-insights). Без blur — стабильно. */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--l-surface-2);

        height: min(548px, calc(100vh - 112px));
        max-height: min(548px, calc(100vh - 112px));
        height: min(548px, calc(100dvh - 112px));
        max-height: min(548px, calc(100dvh - 112px));
    }

    .generator-page-inner {
        padding-top: 16px;
        padding-bottom: 20px;
    }
}

.landing-chat-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--l-border);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--l-muted);
    flex-shrink: 0;
    background: rgba(250, 250, 252, 0.7);
}

.landing-chat-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
}

.landing-chat-dot:nth-child(1) {
    background: #ff5f57;
}

.landing-chat-dot:nth-child(2) {
    background: #febc2e;
}

.landing-chat-dot:nth-child(3) {
    background: #28c840;
}

.landing-chat-title {
    margin-left: auto;
    margin-right: auto;
    padding-right: 52px;
    color: var(--l-text);
}

.landing-chat-stream {
    flex: 1 1 0%;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Hero на лендинге: как в мессенджере — пустота сверху, нить у низа; при переполнении новые реплики уходят вверх */
.landing-hero-chat .landing-chat-stream::before {
    content: "";
    flex: 1 1 auto;
    min-height: 0;
}

.landing-turn {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    max-width: 100%;
}

.landing-turn--user {
    flex-direction: row-reverse;
}

.landing-turn-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: min(100%, 520px);
}

.landing-turn-main--fluid {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

/* Узкие пузыри под текст: без width:100% у пузыря (иначе растягивается на всю колонку) */
.landing-turn-msg {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: min(100%, 34rem);
    min-width: 0;
}

.landing-turn-msg .landing-bubble {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 13px;
}

/*
 * Лендинг, окно чата: пузырь по ширине текста; по вертикали — намного меньше 1 lh с каждой стороны
 * (раньше min(1lh,20px) давало до ~40px padding на короткой строке).
 */
.landing-chat-stream .landing-turn-msg .landing-bubble.landing-bubble--user,
.landing-chat-stream
    .landing-turn-msg
    .landing-bubble.landing-bubble--bot:not(.landing-bubble--form):not(.landing-bubble--result):not(.landing-bubble--typing):not(.landing-bubble--compact) {
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 100%;
    padding-inline: clamp(9px, 0.58lh, 13px);
    padding-block: 7px;
    padding-block: clamp(5px, 0.38lh, 10px);
    white-space: normal;
}

/* Стриминг «печати» первого сообщения: span + каретка, без большой высоты */
.landing-chat-stream
    .landing-turn-msg
    .landing-bubble.landing-bubble--compact.landing-bubble--bot:not(.landing-bubble--form):not(.landing-bubble--result) {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    column-gap: 4px;
    box-sizing: border-box;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 100%;
    padding-inline: clamp(9px, 0.52lh, 12px);
    padding-block: 5px;
    padding-block: clamp(4px, 0.3lh, 8px);
    white-space: normal;
}

.landing-chat-stream .landing-turn-msg .landing-bubble.landing-bubble--typing {
    padding-inline: clamp(10px, 0.65lh, 15px);
    padding-block: 6px;
    padding-block: clamp(5px, 0.4lh, 10px);
}

.landing-turn--user .landing-turn-msg {
    align-self: flex-end;
}

/* Формы и результат — на всю доступную ширину колонки */
.landing-turn-block--wide {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.landing-turn-block--wide .landing-bubble {
    width: 100%;
    box-sizing: border-box;
}

.landing-turn--user .landing-turn-main {
    align-items: flex-end;
}

.landing-turn-avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(0, 122, 255, 0.35), rgba(108, 99, 255, 0.25));
    color: #ffffff;
    border: 1px solid var(--l-border);
}

.landing-turn-avatar svg {
    display: block;
}

.landing-turn-avatar--pulse {
    animation: landing-avatar-pulse 1.6s ease-in-out infinite;
}

@keyframes landing-avatar-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 122, 255, 0);
        transform: scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-turn-avatar--pulse {
        animation: none;
    }
}

.landing-bubble {
    padding: 12px 14px;
    border-radius: 16px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

.landing-bubble--bot {
    background: var(--l-surface-2);
    color: var(--l-text);
    border-bottom-left-radius: 6px;
}

.landing-bubble--user {
    background: var(--l-user-bg);
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.landing-bubble--form,
.landing-bubble--result {
    white-space: normal;
}

.landing-bubble--compact.landing-bubble--bot {
    padding-inline: 14px;
    padding-block: 11px 12px;
}

.landing-bubble--compact {
    white-space: normal;
}

@media (max-width: 420px) {
    .landing-turn-msg {
        max-width: min(100%, 28rem);
    }
}

.landing-bubble-stack {
    margin: 0;
}

.landing-bubble-stack p {
    margin: 0;
}

.landing-bubble--collapsible:not(.is-expanded) .landing-bubble-stack {
    max-height: 11.25rem;
    overflow: hidden;
    position: relative;
}

.landing-bubble--collapsible:not(.is-expanded) .landing-bubble-stack::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.75rem;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--l-surface-2));
}

.landing-bubble--user.landing-bubble--collapsible:not(.is-expanded) .landing-bubble-stack::after {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35));
}

.landing-msg-toggle {
    margin-top: 8px;
    padding: 6px 10px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 122, 255, 0.14);
    color: var(--l-accent);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        transform var(--transition-fast);
}

.landing-msg-toggle:hover {
    background: rgba(0, 122, 255, 0.22);
}

.landing-chat-foot {
    flex-shrink: 0;
    padding: 8px 14px 12px;
    border-top: 1px solid var(--l-border);
}

.landing-chat-foot-hint {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    color: var(--l-muted);
    text-align: center;
    margin: 0;
}

.landing-hero-stream-error {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    color: var(--danger);
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 69, 58, 0.12);
}

.chips.chips--landing {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
}

.landing-form-lead {
    margin: 0 0 12px;
    font-weight: 600;
    color: var(--l-text);
}

.landing-hero-form-scroll {
    max-height: min(240px, 38vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.landing-hero-form-scroll .field {
    margin-bottom: 10px;
}

.landing-form-submit {
    width: 100%;
    margin-top: 4px;
}

.landing-result-split {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--l-border);
}

.landing-result-clear,
.landing-result-full {
    margin: 0;
    padding: 12px 14px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.landing-result-clear {
    background: rgba(0, 0, 0, 0.04);
}

.landing-result-blur-zone {
    position: relative;
    min-height: 5rem;
}

.landing-result-blur-text {
    margin: 0;
    padding: 12px 14px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    filter: blur(8px);
    user-select: none;
    opacity: 0.65;
}

.landing-result-blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 14px;
    text-align: center;
    background: rgba(245, 245, 247, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.landing-result-lock-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--l-text);
}

.landing-result-lock-ico svg {
    width: 22px;
    height: 22px;
}

.landing-result-lock-title {
    margin: 0;
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--l-text);
}

.landing-result-lock-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--l-muted);
    max-width: 22rem;
}

.landing-btn-inline {
    margin-top: 4px;
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--l-accent) 0%, var(--l-accent-2) 100%);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        opacity var(--transition-fast);
}

.landing-btn-inline:hover:not(:disabled) {
    transform: translateY(-1px);
}

.landing-btn-inline:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.landing-hero-result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.landing-reaction-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--l-border);
    background: #ffffff;
    color: var(--l-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.landing-reaction-btn:hover:not(:disabled) {
    color: var(--l-accent);
    border-color: rgba(0, 122, 255, 0.35);
}

.landing-reaction-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.landing-reaction-btn--on {
    color: var(--l-accent);
    border-color: rgba(0, 122, 255, 0.45);
    background: rgba(0, 122, 255, 0.12);
}

.landing-restart-btn {
    margin-left: auto;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px dashed var(--l-border);
    background: transparent;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--l-muted);
    cursor: pointer;
}

.landing-restart-btn:hover:not(:disabled) {
    color: var(--l-text);
    border-style: solid;
}

.landing-restart-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 520px) {
    .landing-restart-btn {
        margin-left: 0;
        width: 100%;
        margin-top: 4px;
    }
}

.landing-bubble--typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
}

.landing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--l-muted);
    animation: landing-bounce 1.05s ease-in-out infinite;
}

.landing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.landing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes landing-bounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-dot {
        animation: none;
        opacity: 0.75;
    }
}

.landing-caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -2px;
    background: var(--l-accent);
    animation: landing-caret 1s step-end infinite;
}

@keyframes landing-caret {
    50% {
        opacity: 0;
    }
}

.landing-hero-copy {
    padding: 8px 0;
}

.landing-eyebrow {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--l-accent);
    margin-bottom: 14px;
}

.landing-h1 {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(34px, 5.5vw, 56px);
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin-bottom: 18px;
    color: var(--l-text);
}

.landing-h1 em {
    font-style: normal;
    background: linear-gradient(120deg, #0066d6 0%, #5856d6 50%, #ff375f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-lead {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: clamp(16px, 1.9vw, 19px);
    line-height: 1.55;
    color: var(--l-muted);
    margin-bottom: 24px;
    max-width: 38rem;
}

.landing-btn-primary {
    border: none;
    cursor: pointer;
    font: inherit;
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 26px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--l-accent) 0%, var(--l-accent-2) 100%);
    box-shadow: 0 14px 34px rgba(0, 122, 255, 0.38);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        filter var(--transition-fast);
}

.landing-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.landing-btn-primary:active {
    transform: translateY(0);
}

/* Подсветка как у столбца AI в блоке «insights» (keyframes landing-ai-bar-ring) */
.landing-btn-primary--ai-glow {
    position: relative;
    z-index: 0;
}

.landing-btn-primary--ai-glow::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 19px;
    z-index: -1;
    pointer-events: none;
    animation: landing-ai-bar-ring 2.4s ease-in-out infinite;
}

.landing-section-inner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 72px max(20px, env(safe-area-inset-left)) 80px max(20px, env(safe-area-inset-right));
}

.landing-h2 {
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.2vw, 32px);
    line-height: 1.18;
    letter-spacing: -0.025em;
    margin-bottom: 36px;
    text-align: center;
    color: var(--l-text);
}

.landing-h3 {
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--l-text);
}

.landing-features .landing-card p {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--l-muted);
}

.landing-bento {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(130px, auto);
    gap: 16px;
}

.landing-card {
    padding: 22px 22px 24px;
    border-radius: 18px;
    border: 1px solid var(--l-border);
    background: var(--l-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition:
        transform var(--transition),
        border-color var(--transition-fast),
        box-shadow var(--transition);
}

.landing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 122, 255, 0.35);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .landing-card:hover {
        transform: none;
    }
}

.landing-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--l-accent);
    background: rgba(0, 122, 255, 0.12);
    border: 1px solid rgba(0, 122, 255, 0.22);
}

.landing-card--wide {
    grid-column: span 2;
    grid-row: span 1;
}

.landing-card--tall {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 960px) {
    .landing-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-card--wide {
        grid-column: span 2;
    }

    .landing-card--tall {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 560px) {
    .landing-bento {
        grid-template-columns: 1fr;
    }

    .landing-card--wide,
    .landing-card--tall {
        grid-column: span 1;
    }

    .landing-section-inner {
        padding-top: 52px;
        padding-bottom: 56px;
    }

    .landing-cta-band {
        padding-top: 52px;
        padding-bottom: 64px;
    }

    .landing-cta-sub {
        font-size: 15px;
    }

    .landing-footer {
        padding-top: 28px;
    }

    .landing-footer-links {
        gap: 8px 14px;
        font-size: 13px;
    }

    .landing-footer-a {
        font-size: 13px;
    }

    .landing-testimonials {
        gap: 14px;
    }

    .landing-t-msg-body {
        padding: 14px 16px;
    }
}

/* --- Лендинг: блок сравнения с графиками (insights), всегда светлый --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    box-shadow: var(--l-shadow);
}

.landing-insights {
    position: relative;
    z-index: 1;
    color-scheme: light;
    background: var(--l-deep);
    color: var(--l-text);
    padding: 40px 0 160px;
    overflow: hidden;
}

.landing-insights-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
}

.landing-insights .landing-line-tip rect {
    fill: rgba(255, 255, 255, 0.96);
    stroke: rgba(0, 0, 0, 0.1);
}

.landing-insights .landing-line-tip text {
    fill: #1d1d1f;
}

.landing-insights .landing-line-chart-svg > g > rect {
    stroke: rgba(0, 0, 0, 0.1);
}

.landing-insights .landing-line-chart-grid {
    stroke: rgba(0, 0, 0, 0.07);
}

.landing-insights .landing-line-path--plain {
    stroke: rgba(29, 29, 31, 0.45);
}

.landing-insights .landing-line-points-ai circle {
    fill: #0a84ff;
    stroke: #ffffff;
    stroke-width: 1.5;
}

.landing-insights .landing-line-leg--plain i {
    border-color: rgba(29, 29, 31, 0.45);
}

.landing-insights .landing-bar-fill--manual .landing-bar-fill-inner {
    background: rgba(0, 0, 0, 0.12);
}

.landing-insights .landing-bar-fill--form .landing-bar-fill-inner {
    background: rgba(0, 0, 0, 0.2);
}

.landing-insights .landing-eff-fill--plain .landing-eff-fill-inner {
    background: rgba(0, 0, 0, 0.14);
}

.landing-insights-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
    box-sizing: border-box;
}

.landing-insights-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-align: center;
    margin: 0 0 14px;
    color: var(--l-text);
}

.landing-insights-accent {
    color: #0a84ff;
}

.landing-insights-sub {
    margin: 0 auto 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.45;
    text-align: center;
    max-width: 38rem;
    color: var(--l-muted);
}

.landing-insights-panel-title {
    margin: 0 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    color: var(--l-text);
}

.landing-insights-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: 20px;
    column-gap: 5px;
    align-items: stretch;
}

.landing-insights-chart--speed {
    grid-column: 1 / span 5;
}

.landing-insights-chart--effect {
    grid-column: 7 / span 5;
}

.landing-insights-chart--timeline {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .landing-insights {
        padding: 20px 0 80px;
    }

    .landing-insights-chart--speed,
    .landing-insights-chart--effect {
        grid-column: 1 / -1;
    }

    .glass-panel.landing-insights-panel {
        padding: 18px 16px;
        border-radius: 20px;
    }

    .landing-insights-inner {
        padding-left: max(18px, env(safe-area-inset-left));
        padding-right: max(18px, env(safe-area-inset-right));
    }

    .landing-insights-sub {
        font-size: 14px;
        margin-bottom: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-insights .landing-bar-fill-inner,
    .landing-insights .landing-eff-fill-inner {
        transition-duration: 0.01ms;
    }

    .landing-insights--animate .landing-line-path--plain,
    .landing-insights--animate .landing-line-path--ai {
        transition-duration: 0.01ms;
    }

    .landing-bar-col--ai .landing-bar-track::after {
        animation: none !important;
    }

    .landing-btn-primary--ai-glow::after {
        animation: none;
        opacity: 0.75;
        box-shadow:
            0 0 0 2px rgba(10, 132, 255, 0.28),
            0 0 22px rgba(10, 132, 255, 0.2);
    }
}

@keyframes landing-ai-bar-ring {
    0%,
    100% {
        opacity: 0.45;
        box-shadow:
            0 0 0 1px rgba(10, 132, 255, 0.18),
            0 0 18px rgba(10, 132, 255, 0.12);
    }

    50% {
        opacity: 1;
        box-shadow:
            0 0 0 2px rgba(10, 132, 255, 0.35),
            0 0 28px rgba(10, 132, 255, 0.28);
    }
}

.landing-bar-chart--triplet {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-height: 0;
}

.landing-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    text-align: center;
}

.landing-bar-col--ai {
    position: relative;
}

.landing-bar-col--ai .landing-bar-track {
    position: relative;
}

.landing-bar-col--ai .landing-bar-track::after {
    content: '';
    position: absolute;
    inset: -8px -5px -4px -5px;
    border-radius: 14px;
    pointer-events: none;
    z-index: 0;
}

.landing-insights--animate .landing-bar-col--ai .landing-bar-track::after {
    animation: landing-ai-bar-ring 2.4s ease-in-out infinite;
}

.landing-bar-value {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--l-text);
    margin-bottom: 8px;
    min-height: 1.2em;
    line-height: 1.25;
}

.landing-bar-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 12px;
    color: var(--l-muted);
    margin-top: 10px;
    line-height: 1.35;
}

.landing-bar-track {
    --landing-bar-cap: 180px;
    height: var(--landing-bar-cap);
    width: 100%;
    max-width: 72px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
}

.landing-bar-fill {
    position: relative;
    z-index: 1;
    width: 100%;
    flex: 0 0 calc(var(--landing-bar-cap) * var(--bar-rel, 1));
    min-height: 5px;
    border-radius: 10px 10px 4px 4px;
    overflow: hidden;
    align-self: flex-end;
}

.landing-bar-fill-inner {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-bar-fill--manual .landing-bar-fill-inner {
    background: rgba(255, 255, 255, 0.15);
}

.landing-bar-fill--form .landing-bar-fill-inner {
    background: rgba(255, 255, 255, 0.25);
}

.landing-bar-fill--ai .landing-bar-fill-inner {
    background: linear-gradient(180deg, #0a84ff 0%, #0063d1 100%);
}

.landing-insights--animate .landing-bar-col[data-bar-index='0'] .landing-bar-fill-inner {
    transform: scaleY(1);
    transition-delay: 0s;
}

.landing-insights--animate .landing-bar-col[data-bar-index='1'] .landing-bar-fill-inner {
    transform: scaleY(1);
    transition-delay: 0.1s;
}

.landing-insights--animate .landing-bar-col[data-bar-index='2'] .landing-bar-fill-inner {
    transform: scaleY(1);
    transition-delay: 0.2s;
}

.landing-eff-chart {
    --landing-eff-h: 140px;
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
}

.landing-eff-group {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.landing-eff-metric {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 12px;
    color: var(--l-muted);
    text-align: center;
    line-height: 1.3;
}

.landing-eff-pair {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    width: 100%;
    justify-content: center;
}

.landing-eff-col {
    flex: 1;
    max-width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.landing-eff-val {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 12px;
    color: var(--l-text);
    white-space: nowrap;
}

.landing-eff-track {
    width: 100%;
    height: var(--landing-eff-h);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
}

.landing-eff-fill {
    width: 100%;
    height: calc(var(--landing-eff-h) * var(--bar-fr, 0.5));
    min-height: 4px;
    border-radius: 8px 8px 3px 3px;
    overflow: hidden;
    align-self: flex-end;
}

.landing-eff-fill-inner {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-eff-fill--plain .landing-eff-fill-inner {
    background: rgba(255, 255, 255, 0.15);
}

.landing-eff-fill--ai .landing-eff-fill-inner {
    background: linear-gradient(180deg, #0a84ff 0%, #0063d1 100%);
}

.landing-insights--animate .landing-eff-group[data-eff-group='0'] .landing-eff-fill-inner {
    transform: scaleY(1);
    transition-delay: 0s;
}

.landing-insights--animate .landing-eff-group[data-eff-group='1'] .landing-eff-fill-inner {
    transform: scaleY(1);
    transition-delay: 0.15s;
}

.landing-insights--animate .landing-eff-group[data-eff-group='2'] .landing-eff-fill-inner {
    transform: scaleY(1);
    transition-delay: 0.3s;
}

@media (max-width: 768px) {
    .landing-bar-chart--triplet {
        gap: 6px;
    }

    .landing-bar-track {
        --landing-bar-cap: 140px;
        max-width: 56px;
    }

    .landing-bar-value {
        font-size: 12px;
    }

    .landing-bar-label {
        font-size: 10px;
    }

    .landing-eff-chart {
        --landing-eff-h: 110px;
        gap: 10px;
    }

    .landing-eff-col {
        max-width: 44px;
    }

    .landing-eff-val {
        font-size: 10px;
    }

    .landing-eff-metric {
        font-size: 10px;
    }

    .landing-insights-panel-title {
        font-size: 13px;
    }
}

.landing-line-chart-wrap {
    width: 100%;
    overflow: visible;
}

.landing-line-chart-svg {
    width: 100%;
    height: auto;
    max-height: clamp(260px, 42vw, 320px);
    display: block;
}

.landing-line-path-ai-glow {
    filter: drop-shadow(0 0 8px rgba(10, 132, 255, 0.5));
}

.landing-line-path {
    transition: none;
}

.landing-insights--animate .landing-line-path--ai {
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0s;
}

.landing-insights--animate .landing-line-path--plain {
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.3s;
}

.landing-line-tip {
    opacity: 0;
    transition: opacity 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .landing-line-hit:hover .landing-line-tip,
    .landing-line-hit:focus-visible .landing-line-tip {
        opacity: 1;
    }
}

.landing-line-x-labels {
    margin-top: 6px;
    padding: 0 8px 0 max(8px, 5.5%);
    box-sizing: border-box;
}

.landing-line-x-ticks {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 11px;
    color: var(--l-muted);
    max-width: 628px;
    margin: 0 auto;
}

.landing-line-x-tick {
    min-width: 1.4em;
    text-align: center;
}

.landing-line-ai-values-row {
    display: none;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 6px;
    margin-top: 12px;
    max-width: 628px;
    margin-left: auto;
    margin-right: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 11px;
    color: var(--l-muted);
}

@media (max-width: 768px), (hover: none), (pointer: coarse) {
    .landing-line-ai-values-row {
        display: flex;
    }
}

.landing-line-mv-ai {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.2em;
    text-align: center;
    color: var(--l-text);
}

.landing-line-mv-ai small {
    display: block;
    font-size: 9px;
    color: var(--l-muted);
    font-weight: 400;
    margin-top: 2px;
}

.landing-line-mv-ai strong {
    font-weight: 600;
    color: #0a84ff;
}

.landing-line-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 13px;
    color: var(--l-muted);
}

.landing-line-leg-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.landing-line-leg-item i {
    width: 28px;
    height: 0;
    border-top: 2px solid;
    font-size: 0;
    line-height: 0;
    display: inline-block;
    flex-shrink: 0;
}

.landing-line-leg--ai i {
    border-color: #0a84ff;
    box-shadow: 0 0 8px rgba(10, 132, 255, 0.45);
    border-radius: 1px;
}

.landing-line-leg--plain i {
    border-color: rgba(29, 29, 31, 0.45);
    border-top-style: dashed;
}

/* === HERO actions / meta — Apple-style === */
.landing-hero-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 22px;
}

.landing-btn-primary--apple {
    background: #1d1d1f;
    color: #ffffff;
    border-radius: 980px;
    box-shadow: none;
    padding: 14px 26px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.01em;
}

.landing-btn-primary--apple:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    filter: none;
}

.landing-btn-link {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--l-accent);
    padding: 10px 6px;
    border-radius: 8px;
    transition: color var(--transition-fast);
}

.landing-btn-link:hover {
    color: #0051d5;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.landing-btn-link--inv {
    color: #ffffff;
}

.landing-btn-link--inv:hover {
    color: #67d4ff;
}

.landing-hero-meta {
    list-style: none;
    margin: 28px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--l-border);
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}

.landing-hero-meta li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    color: var(--l-muted);
}

.landing-hero-meta__num {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--l-text);
    line-height: 1;
}

/* === Apple-style секции главной === */
.landing-section-head {
    text-align: center;
    margin: 0 auto clamp(36px, 5vw, 56px);
    max-width: 760px;
}

.landing-section-eyebrow {
    margin: 0 0 12px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--l-accent);
}

.landing-h2--apple {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    margin-bottom: 0;
    color: var(--l-text);
}

/* === Аудитория === */
.landing-audience {
    background: #ffffff;
    border-top: 1px solid var(--l-border);
}

.landing-audience-grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.landing-aud-card {
    --card-accent: #0066d6;
    --card-tint:   rgba(0, 102, 214, 0.08);
    background: #fbfbfd;
    border: 1px solid var(--l-border);
    border-radius: 22px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.landing-aud-card[data-accent="indigo"] { --card-accent: #5856d6; --card-tint: rgba(88, 86, 214, 0.10); }
.landing-aud-card[data-accent="teal"]   { --card-accent: #0a9396; --card-tint: rgba(10, 147, 150, 0.10); }
.landing-aud-card[data-accent="orange"] { --card-accent: #ff7a1a; --card-tint: rgba(255, 122, 26, 0.10); }

.landing-aud-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.landing-aud-card__glyph {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--card-tint);
    color: var(--card-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.landing-aud-card__glyph svg { width: 24px; height: 24px; }

.landing-aud-card__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--l-text);
}

.landing-aud-card__text {
    margin: 0;
    font-size: 15px;
    color: var(--l-muted);
    line-height: 1.55;
}

/* === Социальные доказательства — Apple-style === */
.landing-social {
    background: #fbfbfd;
    border-top: 1px solid var(--l-border);
    border-bottom: 1px solid var(--l-border);
}

.landing-testimonials {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 960px) {
    .landing-testimonials {
        grid-template-columns: 1fr;
    }
}

.landing-t-card {
    margin: 0;
    background: #ffffff;
    border: 1px solid var(--l-border);
    border-radius: 22px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.landing-t-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.landing-t-card__quote {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--l-text);
    font-weight: 500;
    letter-spacing: -0.005em;
}

.landing-t-card__cap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.landing-t-card__cap strong {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    display: block;
    color: var(--l-text);
}

.landing-t-role {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    color: var(--l-muted);
}

.landing-t-face {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "DM Sans", system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
}

.landing-t-face--a { background: linear-gradient(145deg, #ff9a9e, #fad0c4); }
.landing-t-face--m { background: linear-gradient(145deg, #89f7fe, #66a6ff); }
.landing-t-face--e { background: linear-gradient(145deg, #fbc2eb, #a18cd1); }

/* === Большая CTA-полоса в Apple-style === */
.landing-cta-strip {
    padding:
        clamp(64px, 9vw, 110px)
        max(20px, env(safe-area-inset-left))
        clamp(72px, 10vw, 120px)
        max(20px, env(safe-area-inset-right));
    background: #0b0b0d;
    color: #ffffff;
    text-align: center;
}

.landing-cta-strip__inner {
    max-width: 760px;
    margin: 0 auto;
}

.landing-cta-strip__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1.1;
    color: #ffffff;
}

.landing-cta-strip__sub {
    margin: 16px auto 28px;
    font-size: clamp(15px, 1.6vw, 17px);
    color: rgba(255, 255, 255, 0.66);
    max-width: 520px;
}

.landing-cta-strip__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
}

.landing-cta-strip__actions .landing-btn-primary--apple {
    background: #ffffff;
    color: #0b0b0d;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.landing-cta-strip__actions .landing-btn-primary--apple:hover {
    background: #f5f5f7;
    color: #000000;
}

@media (max-width: 640px) {
    .landing-cta-strip__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .landing-cta-strip__actions .landing-btn-primary--apple {
        width: 100%;
    }
    .landing-hero-actions { flex-wrap: wrap; }
    .landing-hero-meta { gap: 14px 24px; padding-top: 18px; margin-top: 22px; }
    .landing-hero-meta__num { font-size: 19px; }
}

.landing-footer {
    padding: 36px max(20px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-right));
    border-top: 1px solid var(--l-border);
}

.landing-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    justify-items: center;
    text-align: center;
}

@media (min-width: 720px) {
    .landing-footer-inner {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        justify-items: stretch;
        text-align: left;
    }

    .landing-footer-brand {
        justify-self: start;
    }

    .landing-footer-contact {
        justify-self: end;
    }

    .landing-footer-copy {
        grid-column: 1 / -1;
        justify-self: center;
        text-align: center;
    }
}

.landing-footer-brand {
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--l-text);
}

.landing-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
}

@media (min-width: 720px) {
    .landing-footer-links {
        justify-content: center;
    }
}

.landing-footer-a {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    color: var(--l-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.landing-footer-a:hover {
    color: var(--l-accent);
    border-bottom-color: rgba(0, 122, 255, 0.35);
}

.landing-footer-contact .landing-footer-a {
    font-weight: 500;
    color: var(--l-text);
}

.landing-footer-copy {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    color: var(--l-muted);
    margin: 0;
}

@media (max-width: 400px) {
    .site-nav-link {
        padding: 12px 8px;
        font-size: 12.5px;
    }
}

/* =========================================================================
   О СЕРВИСЕ — отдельная страница в стиле Apple
   ========================================================================= */
.about-shell {
    flex: 1;
    width: 100%;
    color-scheme: light;
    --about-text:    #1d1d1f;
    --about-muted:   #6e6e73;
    --about-border:  rgba(0, 0, 0, 0.08);
    --about-soft:    #fbfbfd;
    --about-card:    #ffffff;
    --about-accent:  #0066d6;
    --about-shadow:  0 24px 60px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: var(--about-text);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.about-hero {
    max-width: 1040px;
    margin: 0 auto;
    padding:
        clamp(56px, 11vw, 120px)
        max(20px, env(safe-area-inset-left))
        clamp(36px, 6vw, 64px)
        max(20px, env(safe-area-inset-right));
    text-align: center;
}

.about-hero__eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--about-accent);
}

.about-hero__title {
    margin: 0 auto;
    max-width: 880px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.035em;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.06;
    color: var(--about-text);
}

.about-hero__title-line { display: block; }

.about-hero__title-accent {
    display: block;
    background: linear-gradient(120deg, #0066d6 0%, #5856d6 50%, #ff375f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-hero__lead {
    margin: 22px auto 0;
    max-width: 680px;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 1.55;
    color: var(--about-muted);
}

.about-hero__cta {
    margin-top: 28px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.about-btn {
    appearance: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    padding: 13px 22px;
    border-radius: 980px;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.about-btn--primary {
    background: var(--about-text);
    color: #ffffff;
}

.about-btn--primary:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.about-btn--ghost {
    background: rgba(0, 0, 0, 0.04);
    color: var(--about-text);
    border-color: rgba(0, 0, 0, 0.06);
}

.about-btn--ghost:hover {
    background: rgba(0, 0, 0, 0.08);
}

.about-btn--link {
    background: transparent;
    padding: 13px 6px;
    color: var(--about-accent);
}

.about-btn--link:hover {
    color: #0a4fb3;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.about-btn--large {
    font-size: 16px;
    padding: 16px 28px;
}

.about-hero__chip-row {
    margin: 28px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    max-width: 760px;
}

.about-hero__chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 980px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--about-muted);
    font-size: 13px;
    font-weight: 500;
}

/* Якорная навигация-под-герой */
.about-jump {
    position: sticky;
    top: 60px;
    z-index: 25;
    margin: 0 auto;
    padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right));
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--about-border);
    border-bottom: 1px solid var(--about-border);
}

.about-jump__btn {
    border: none;
    background: transparent;
    color: var(--about-muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 980px;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.about-jump__btn:hover {
    color: var(--about-text);
    background: rgba(0, 0, 0, 0.05);
}

.about-section {
    padding:
        clamp(64px, 9vw, 110px)
        max(20px, env(safe-area-inset-left))
        clamp(64px, 9vw, 110px)
        max(20px, env(safe-area-inset-right));
}

.about-section--soft {
    background: var(--about-soft);
}

.about-section__head {
    max-width: 880px;
    margin: 0 auto clamp(36px, 5vw, 56px);
    text-align: center;
}

.about-section__eyebrow {
    margin: 0 0 12px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--about-accent);
}

.about-section__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    color: var(--about-text);
}

/* Шаги */
.about-steps {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1120px;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.about-step {
    background: var(--about-card);
    border: 1px solid var(--about-border);
    border-radius: 22px;
    padding: 28px 26px 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.about-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--about-shadow);
}

.about-step__num {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--about-accent);
}

.about-step__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--about-text);
    line-height: 1.18;
}

.about-step__text {
    margin: 0;
    font-size: 15.5px;
    color: var(--about-muted);
    line-height: 1.55;
}

/* Для кого */
.about-audience-grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.about-audience-card {
    --card-accent: #0066d6;
    --card-tint: rgba(0, 102, 214, 0.08);
    background: var(--about-card);
    border: 1px solid var(--about-border);
    border-radius: 22px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.about-audience-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--about-shadow);
}

.about-audience-card[data-accent="indigo"] { --card-accent: #5856d6; --card-tint: rgba(88, 86, 214, 0.10); }
.about-audience-card[data-accent="teal"]   { --card-accent: #0a9396; --card-tint: rgba(10, 147, 150, 0.10); }
.about-audience-card[data-accent="orange"] { --card-accent: #ff7a1a; --card-tint: rgba(255, 122, 26, 0.10); }

.about-audience-card__glyph {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--card-tint);
    color: var(--card-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.about-audience-card__glyph svg {
    width: 26px;
    height: 26px;
}

.about-audience-card__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--about-text);
}

.about-audience-card__text {
    margin: 0;
    font-size: 15.5px;
    color: var(--about-muted);
    line-height: 1.55;
}

/* Возможности */
.about-features {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.about-feature {
    background: var(--about-soft);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.about-feature:hover {
    background: #f3f3f6;
    transform: translateY(-1px);
}

.about-feature__ico {
    font-size: 24px;
    line-height: 1;
}

.about-feature__title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--about-text);
}

.about-feature__text {
    margin: 0;
    font-size: 14.5px;
    color: var(--about-muted);
    line-height: 1.5;
}

/* Stats — тёмный «островок» */
.about-section--dark {
    background: #0b0b0d;
    color: #ffffff;
    padding-top: clamp(72px, 10vw, 120px);
    padding-bottom: clamp(72px, 10vw, 120px);
}

.about-stats-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: clamp(28px, 5vw, 60px);
}

@media (min-width: 900px) {
    .about-stats-inner {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
    }
}

.about-section__eyebrow--inv {
    color: #67d4ff;
}

.about-section__title--inv {
    color: #ffffff;
    text-align: left;
}

.about-stats-text {
    text-align: left;
}

.about-stats-text .about-section__eyebrow {
    text-align: left;
}

.about-stats-lead {
    margin: 18px 0 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.55;
    max-width: 480px;
}

.about-stats-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.about-stat {
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-stat__num {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1;
}

.about-stat__label {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.4;
}

/* FAQ */
.about-faq {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--about-border);
}

.about-faq__item {
    border-bottom: 1px solid var(--about-border);
}

.about-faq__q {
    list-style: none;
    cursor: pointer;
    padding: 22px 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--about-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    -webkit-tap-highlight-color: transparent;
}

.about-faq__q::-webkit-details-marker { display: none; }

.about-faq__q::after {
    content: "+";
    font-weight: 400;
    font-size: 22px;
    line-height: 1;
    color: var(--about-muted);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.about-faq__item[open] .about-faq__q::after {
    transform: rotate(45deg);
    color: var(--about-accent);
}

.about-faq__a {
    margin: 0 0 22px;
    font-size: 15.5px;
    color: var(--about-muted);
    line-height: 1.6;
    max-width: 700px;
}

.about-faq__inline {
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    color: var(--about-accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.about-faq__inline:hover { color: #0a4fb3; }

/* CTA-полоса */
.about-cta {
    padding:
        clamp(64px, 9vw, 110px)
        max(20px, env(safe-area-inset-left))
        clamp(72px, 10vw, 120px)
        max(20px, env(safe-area-inset-right));
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
    text-align: center;
}

.about-cta__inner {
    max-width: 720px;
    margin: 0 auto;
}

.about-cta__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1.1;
    color: var(--about-text);
}

.about-cta__sub {
    margin: 14px 0 28px;
    font-size: 17px;
    color: var(--about-muted);
}

.about-cta__actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 14px;
}

/* =========================================================================
   ГЛОБАЛЬНЫЙ ФУТЕР — Apple-style
   ========================================================================= */
.site-footer {
    background: #0b0b0d;
    color: rgba(255, 255, 255, 0.62);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    padding:
        56px
        max(24px, env(safe-area-inset-left))
        max(28px, env(safe-area-inset-bottom))
        max(24px, env(safe-area-inset-right));
    flex-shrink: 0;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 38px 42px;
    grid-template-columns: 1.4fr repeat(3, 1fr);
}

.site-footer__brand-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 320px;
}

.site-footer__brand {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-footer__brand-text {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.028em;
    color: #ffffff;
    line-height: 1;
    transform: translateY(0.5px);
}

.site-footer__tagline {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.site-footer__col-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.46);
}

.site-footer__link {
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    font: inherit;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer__link:hover {
    color: #ffffff;
}

.site-footer__link[disabled] {
    color: rgba(255, 255, 255, 0.34);
    cursor: not-allowed;
}

.site-footer__link[disabled]:hover {
    color: rgba(255, 255, 255, 0.34);
}

.site-footer__bottom {
    max-width: 1200px;
    margin: 38px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.site-footer__copy,
.site-footer__country {
    margin: 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 880px) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
    }
    .site-footer__brand-col {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 540px) {
    .site-footer {
        padding-top: 44px;
    }
    .site-footer__inner {
        gap: 28px 18px;
        grid-template-columns: 1fr 1fr;
    }
    .site-footer__bottom {
        margin-top: 28px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Скрываем старый landing-footer — он теперь не используется */
.landing-page > .landing-footer { display: none; }

/* =========================================================================
   О СЕРВИСЕ — мобильные адаптации
   ========================================================================= */
@media (max-width: 880px) {
    .about-jump {
        top: 56px;
        gap: 2px 4px;
        padding: 10px 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .about-jump::-webkit-scrollbar { display: none; }
    .about-jump__btn { white-space: nowrap; }
}

@media (max-width: 640px) {
    .about-hero {
        padding-top: clamp(40px, 9vw, 64px);
    }
    .about-hero__chip-row { gap: 6px 8px; }
    .about-hero__chip { font-size: 12px; padding: 6px 12px; }
    .about-section { padding-left: max(20px, env(safe-area-inset-left));
                     padding-right: max(20px, env(safe-area-inset-right)); }
    .about-step { padding: 22px 20px 24px; }
    .about-audience-card { padding: 22px; }
    .about-feature { padding: 18px; }
    .about-stats-grid { grid-template-columns: 1fr; }
    .about-section__title--inv { text-align: center; }
    .about-stats-text { text-align: center; }
    .about-stats-text .about-section__eyebrow { text-align: center; }
    .about-stats-lead { margin-left: auto; margin-right: auto; }
    .about-faq__q { font-size: 16px; padding: 18px 0; }
    .about-faq__a { font-size: 14.5px; margin-bottom: 18px; }
    .about-cta__actions { flex-direction: column; align-items: stretch; }
    .about-cta__actions .about-btn { width: 100%; }
}

/* =========================================================================
   ТАРИФЫ — отдельная страница в стиле Apple
   ========================================================================= */
.tariffs-shell {
    flex: 1;
    width: 100%;
    color-scheme: light;
    --tariff-text:    #1d1d1f;
    --tariff-muted:   #6e6e73;
    --tariff-border:  rgba(0, 0, 0, 0.08);
    --tariff-soft:    #fbfbfd;
    --tariff-card:    #ffffff;
    --tariff-accent:  #0066d6;
    --tariff-shadow:  0 28px 70px rgba(0, 0, 0, 0.12);
    background: #ffffff;
    color: var(--tariff-text);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.tariffs-hero {
    max-width: 880px;
    margin: 0 auto;
    padding:
        clamp(56px, 11vw, 110px)
        max(20px, env(safe-area-inset-left))
        clamp(28px, 5vw, 48px)
        max(20px, env(safe-area-inset-right));
    text-align: center;
}

.tariffs-hero__eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tariff-accent);
}

.tariffs-hero__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.035em;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.06;
    color: var(--tariff-text);
}

.tariffs-hero__title-accent {
    background: linear-gradient(120deg, #0066d6 0%, #5856d6 50%, #ff375f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tariffs-hero__lead {
    margin: 22px auto 0;
    max-width: 620px;
    font-size: clamp(15.5px, 1.6vw, 18px);
    line-height: 1.55;
    color: var(--tariff-muted);
}

/* === ТАРИФНЫЕ КАРТЫ === */
.tariffs-grid-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding:
        clamp(24px, 4vw, 48px)
        max(20px, env(safe-area-inset-left))
        clamp(56px, 8vw, 96px)
        max(20px, env(safe-area-inset-right));
}

.tariffs-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: stretch;
}

.tariff-tier {
    position: relative;
    background: var(--tariff-card);
    border: 1px solid var(--tariff-border);
    border-radius: 26px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.tariff-tier:hover {
    transform: translateY(-3px);
    box-shadow: var(--tariff-shadow);
}

.tariff-tier--featured {
    background: #0b0b0d;
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 30px 80px rgba(0, 102, 214, 0.18);
}

.tariff-tier--featured::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 26px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(0, 132, 255, 0.55), rgba(88, 86, 214, 0.0) 60%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.tariff-tier__ribbon {
    position: absolute;
    top: -12px;
    right: 24px;
    background: linear-gradient(135deg, #0084ff, #5856d6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 980px;
    box-shadow: 0 6px 18px rgba(0, 102, 214, 0.35);
}

.tariff-tier__head { display: flex; flex-direction: column; gap: 6px; }

.tariff-tier__badge {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 980px;
    background: rgba(0, 102, 214, 0.10);
    color: var(--tariff-accent);
}

.tariff-tier__badge--featured {
    background: rgba(255, 255, 255, 0.10);
    color: #67d4ff;
}

.tariff-tier__name {
    margin: 6px 0 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.05;
}

.tariff-tier--featured .tariff-tier__name { color: #ffffff; }

.tariff-tier__sub {
    margin: 0;
    font-size: 15px;
    color: var(--tariff-muted);
    line-height: 1.5;
}

.tariff-tier--featured .tariff-tier__sub { color: rgba(255, 255, 255, 0.66); }

.tariff-tier__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
}

.tariff-tier__price-currency {
    font-size: 22px;
    font-weight: 600;
    color: var(--tariff-muted);
}

.tariff-tier--featured .tariff-tier__price-currency { color: rgba(255, 255, 255, 0.6); }

.tariff-tier__price-num {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--tariff-text);
}

.tariff-tier--featured .tariff-tier__price-num { color: #ffffff; }

.tariff-tier__price-period {
    font-size: 14px;
    color: var(--tariff-muted);
    margin-left: 6px;
}

.tariff-tier--featured .tariff-tier__price-period { color: rgba(255, 255, 255, 0.6); }

.tariff-tier__per {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tariff-muted);
}

.tariff-tier--featured .tariff-tier__per { color: rgba(255, 255, 255, 0.66); }

.tariff-tier__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 980px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--tariff-text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.tariff-tier__cta:hover {
    background: rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}

.tariff-tier__cta--primary {
    background: #ffffff;
    color: #0b0b0d;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.tariff-tier__cta--primary:hover {
    background: #f5f5f7;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.tariff-tier__features {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tariff-tier__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--tariff-muted);
}

.tariff-tier--featured .tariff-tier__features li {
    color: rgba(255, 255, 255, 0.84);
}

.tariff-tier__features strong {
    color: var(--tariff-text);
    font-weight: 600;
}

.tariff-tier--featured .tariff-tier__features strong {
    color: #ffffff;
    font-weight: 600;
}

.tariff-tier__check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 102, 214, 0.10);
    color: var(--tariff-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

.tariff-tier__check--accent {
    background: linear-gradient(135deg, #0084ff, #5856d6);
    color: #ffffff;
}

.tariff-tier__note {
    margin: 0;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #67d4ff;
}

/* Микро-вариант: разовая покупка */
.tariff-single {
    margin-top: 24px;
    padding: 22px 26px;
    background: var(--tariff-soft);
    border: 1px solid var(--tariff-border);
    border-radius: 22px;
}

.tariff-single__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.tariff-single__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tariff-text);
}

.tariff-single__sub {
    margin: 0;
    font-size: 14px;
    color: var(--tariff-muted);
}

.tariff-single__right {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.tariff-single__price {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tariff-text);
}

.tariff-single__cta {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    color: var(--tariff-text);
    padding: 10px 18px;
    border-radius: 980px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.tariff-single__cta:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
}

/* === Универсальные section-заголовки === */
.tariffs-section__head {
    max-width: 820px;
    margin: 0 auto clamp(36px, 5vw, 56px);
    text-align: center;
}

.tariffs-section__eyebrow {
    margin: 0 0 12px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tariff-accent);
}

.tariffs-section__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    color: var(--tariff-text);
}

.tariffs-section__title-accent {
    background: linear-gradient(120deg, #0066d6, #5856d6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tariffs-section__lead {
    margin: 16px auto 0;
    font-size: 16px;
    color: var(--tariff-muted);
    line-height: 1.55;
    max-width: 620px;
}

/* === Кабинет Pro === */
.tariffs-cabinet {
    background: var(--tariff-soft);
    padding:
        clamp(64px, 9vw, 100px)
        max(20px, env(safe-area-inset-left))
        clamp(64px, 9vw, 100px)
        max(20px, env(safe-area-inset-right));
}

.tariffs-cabinet__grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cabinet-feat {
    background: var(--tariff-card);
    border: 1px solid var(--tariff-border);
    border-radius: 22px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cabinet-feat:hover {
    transform: translateY(-2px);
    box-shadow: var(--tariff-shadow);
}

.cabinet-feat__ico {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(0, 102, 214, 0.10);
    color: var(--tariff-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cabinet-feat__ico svg { width: 24px; height: 24px; }

.cabinet-feat__title {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--tariff-text);
}

.cabinet-feat__text {
    margin: 0;
    font-size: 14.5px;
    color: var(--tariff-muted);
    line-height: 1.55;
}

/* === Сравнение тарифов === */
.tariffs-compare {
    padding:
        clamp(64px, 9vw, 100px)
        max(20px, env(safe-area-inset-left))
        clamp(64px, 9vw, 100px)
        max(20px, env(safe-area-inset-right));
}

.tariffs-compare__table-wrap {
    max-width: 920px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: 22px;
    border: 1px solid var(--tariff-border);
    background: var(--tariff-card);
    -webkit-overflow-scrolling: touch;
}

.tariffs-compare__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    color: var(--tariff-text);
}

.tariffs-compare__table thead th {
    padding: 18px 16px;
    text-align: center;
    font-weight: 600;
    color: var(--tariff-muted);
    background: var(--tariff-soft);
    border-bottom: 1px solid var(--tariff-border);
}

.tariffs-compare__table thead .t-col--featured {
    background: linear-gradient(135deg, rgba(0, 132, 255, 0.10), rgba(88, 86, 214, 0.08));
    color: var(--tariff-accent);
}

.tariffs-compare__table tbody th {
    text-align: left;
    padding: 16px 18px;
    font-weight: 500;
    color: var(--tariff-muted);
    border-bottom: 1px solid var(--tariff-border);
    width: 38%;
}

.tariffs-compare__table tbody td {
    text-align: center;
    padding: 16px 14px;
    border-bottom: 1px solid var(--tariff-border);
    color: var(--tariff-text);
}

.tariffs-compare__table tbody tr:last-child th,
.tariffs-compare__table tbody tr:last-child td {
    border-bottom: none;
}

.tariffs-compare__table .t-col--featured {
    background: rgba(0, 132, 255, 0.04);
    color: var(--tariff-text);
    font-weight: 500;
}

.t-yes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 980px;
    background: rgba(0, 102, 214, 0.10);
    color: var(--tariff-accent);
    font-size: 12px;
    font-weight: 700;
}

.t-yes--featured {
    background: linear-gradient(135deg, #0084ff, #5856d6);
    color: #ffffff;
}

.t-no { color: rgba(0, 0, 0, 0.32); }

/* === FAQ === */
.tariffs-faq {
    background: var(--tariff-soft);
    padding:
        clamp(64px, 9vw, 100px)
        max(20px, env(safe-area-inset-left))
        clamp(64px, 9vw, 100px)
        max(20px, env(safe-area-inset-right));
}

.tariffs-faq__list {
    max-width: 820px;
    margin: 0 auto;
    border-top: 1px solid var(--tariff-border);
}

.tariffs-faq__item {
    border-bottom: 1px solid var(--tariff-border);
}

.tariffs-faq__q {
    list-style: none;
    cursor: pointer;
    padding: 22px 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--tariff-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    -webkit-tap-highlight-color: transparent;
}

.tariffs-faq__q::-webkit-details-marker { display: none; }

.tariffs-faq__q::after {
    content: "+";
    font-weight: 400;
    font-size: 22px;
    line-height: 1;
    color: var(--tariff-muted);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.tariffs-faq__item[open] .tariffs-faq__q::after {
    transform: rotate(45deg);
    color: var(--tariff-accent);
}

.tariffs-faq__a {
    margin: 0 0 22px;
    font-size: 15.5px;
    color: var(--tariff-muted);
    line-height: 1.6;
    max-width: 700px;
}

.tariffs-faq__inline {
    color: var(--tariff-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* === CTA внизу === */
.tariffs-cta {
    padding:
        clamp(64px, 9vw, 110px)
        max(20px, env(safe-area-inset-left))
        clamp(72px, 10vw, 120px)
        max(20px, env(safe-area-inset-right));
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
    text-align: center;
}

.tariffs-cta__inner {
    max-width: 720px;
    margin: 0 auto;
}

.tariffs-cta__title {
    margin: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1.1;
    color: var(--tariff-text);
}

.tariffs-cta__sub {
    margin: 14px 0 28px;
    font-size: 17px;
    color: var(--tariff-muted);
}

.tariffs-cta__actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 14px;
}

/* Mobile */
@media (max-width: 880px) {
    .tariff-tier { padding: 28px 24px; }
    .tariff-tier__name { font-size: 26px; }
    .tariff-tier__price-num { font-size: 48px; }
    .tariffs-compare__table thead th { padding: 14px 10px; font-size: 13px; }
    .tariffs-compare__table tbody th,
    .tariffs-compare__table tbody td { padding: 14px 10px; font-size: 13.5px; }
}

@media (max-width: 640px) {
    .tariffs-grid { grid-template-columns: 1fr; }
    .tariff-single__row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .tariff-single__right { width: 100%; justify-content: space-between; }
    .tariffs-faq__q { font-size: 15.5px; padding: 18px 0; }
    .tariffs-faq__a { font-size: 14.5px; margin-bottom: 18px; }
    .tariffs-cta__actions { flex-direction: column; align-items: stretch; }
    .tariffs-cta__actions .about-btn { width: 100%; }
}
