/* ============================================================
   iBase — Design System
   Токены и стиль — по StormWall-прототипу.
   Фон: #08080C + aurora + nebula + stars + particles + grid + spotlight.
   ============================================================ */

/* === TOKENS === */
:root {
    --bg-base:      #08080C;
    --bg-surface:   #0F0F16;
    --bg-elevated:  #181822;
    --bg-hover:     #1F1F2C;

    --bg:           var(--bg-base);
    --bg-card:      var(--bg-surface);

    --border:       rgba(255, 255, 255, 0.07);
    --border-hover: rgba(99, 102, 241, 0.4);

    --text-primary:   #F4F4F5;
    --text-secondary: #A8A8B3;
    --text-dim:       #5F5F6E;

    --text:         var(--text-primary);
    --text-muted:   var(--text-secondary);

    --accent:        #6366F1;
    --accent-hover:  #818CF8;
    --accent-deep:   #4F46E5;
    --accent-soft:   rgba(99, 102, 241, 0.14);
    --accent-glow:   rgba(99, 102, 241, 0.4);

    --accent2:       #06B6D4;
    --accent2-hover: #22D3EE;
    --accent-teal:   #10B981;
    --accent-teal-hover: #34D399;

    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%);
    --grad-primary:     var(--gradient-primary);
    --grad-soft:        linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
    --grad-card:        linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent 40%);

    --glass:        rgba(15, 15, 22, 0.6);
    --glass-blur:   blur(20px) saturate(180%);
    --modal-bg:     #0F0F16;
    --toast-bg:     rgba(15, 15, 22, 0.95);
    --overlay:      rgba(0, 0, 0, 0.7);

    --c-green:  #10B981;
    --c-blue:   #3B82F6;
    --c-cyan:   #06B6D4;
    --c-purple: #A855F7;
    --c-yellow: #F59E0B;
    --c-orange: #F97316;
    --c-red:    #EF4444;
    --c-pink:   #EC4899;

    --error:    #EF4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --success:  #10B981;
    --warning:  #F59E0B;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --shadow:        0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-blue:   0 8px 32px rgba(99, 102, 241, 0.3);
    --shadow-modal:  0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* === БАЗА / ФИКСЫ СКРОЛЛА === */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-base);
    background-image: none;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

a { color: var(--accent2); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent2-hover); }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px;
    width: 100%;
}
@media (max-width: 1400px) { .container { padding: 0 40px; } }
@media (max-width: 900px)  { .container { padding: 0 20px; } }

/* === KEYFRAMES === */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroGlow {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.45)); }
    50%      { filter: drop-shadow(0 0 45px rgba(6, 182, 212, 0.6)); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.2); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gradShift {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .5; transform: scale(1.4); }
}
@keyframes realtimeFlash {
    0%   { color: var(--accent2); transform: scale(1.06); }
    100% { color: inherit; transform: scale(1); }
}

button, a, input, select, textarea {
    transition-property: background-color, border-color, color, box-shadow, transform, opacity;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   ФОНОВЫЕ СЛОИ
   ============================================================ */

.bg-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Убираем возможные старые псевдо-слои */
body::before,
body::after { content: none; }

#starCanvas,
#particleCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    margin: 0;
    padding: 0;
}
#starCanvas    { z-index: 0; }
#particleCanvas{ z-index: 1; }

/* --- Aurora --- */
.aurora {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    will-change: transform;
}
.aurora-blob.b1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #6366F1, transparent 70%);
    top: -200px; left: -100px;
    animation: aurora1 22s ease-in-out infinite;
}
.aurora-blob.b2 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, #06B6D4, transparent 70%);
    bottom: -300px; right: -150px;
    animation: aurora2 26s ease-in-out infinite;
}
.aurora-blob.b3 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #A855F7, transparent 70%);
    top: 40%; left: 50%;
    animation: aurora3 30s ease-in-out infinite;
}
@keyframes aurora1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(280px, 120px) scale(1.25); }
    50%      { transform: translate(120px, 320px) scale(1.1); }
    75%      { transform: translate(-80px, 180px) scale(0.95); }
}
@keyframes aurora2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-320px, -220px) scale(1.2); }
    66%      { transform: translate(180px, -80px) scale(0.9); }
}
@keyframes aurora3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    25%      { transform: translate(-70%, -30%) scale(1.3); }
    50%      { transform: translate(-30%, -70%) scale(1.15); }
    75%      { transform: translate(-60%, -50%) scale(0.9); }
}

/* --- Nebula --- */
.nebula {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(140px);
    opacity: 0.25;
    mix-blend-mode: screen;
}
.nebula.n1 {
    width: 900px; height: 500px;
    background: radial-gradient(ellipse, #4F46E5 0%, transparent 65%);
    top: 10%; right: -300px;
    animation: nebula1 40s ease-in-out infinite;
    transform: rotate(-25deg);
}
.nebula.n2 {
    width: 700px; height: 400px;
    background: radial-gradient(ellipse, #06B6D4 0%, transparent 65%);
    bottom: 5%; left: -200px;
    animation: nebula2 35s ease-in-out infinite;
    transform: rotate(15deg);
}
.nebula.n3 {
    width: 600px; height: 350px;
    background: radial-gradient(ellipse, #A855F7 0%, transparent 65%);
    top: 45%; left: 30%;
    animation: nebula3 50s ease-in-out infinite;
    transform: rotate(-10deg);
}
@keyframes nebula1 {
    0%, 100% { transform: translate(0, 0) rotate(-25deg) scale(1); }
    33%      { transform: translate(-100px, 80px) rotate(-15deg) scale(1.2); }
    66%      { transform: translate(50px, -30px) rotate(-35deg) scale(1.1); }
}
@keyframes nebula2 {
    0%, 100% { transform: translate(0, 0) rotate(15deg) scale(1); }
    33%      { transform: translate(130px, -60px) rotate(25deg) scale(1.25); }
    66%      { transform: translate(-50px, 80px) rotate(5deg) scale(1.1); }
}
@keyframes nebula3 {
    0%, 100% { transform: translate(-50%, -50%) rotate(-10deg) scale(1); }
    50%      { transform: translate(-40%, -60%) rotate(10deg) scale(1.35); }
}

/* --- Сетка --- */
.bg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
            mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
    from { background-position: 0 0; }
    to   { background-position: 60px 60px; }
}

/* --- Spotlight --- */
.spotlight {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 2;
    width: 700px; height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.6s;
    will-change: transform;
    mix-blend-mode: screen;
}
body:hover .spotlight { opacity: 1; }

/* Контент поверх фона */
.site-header,
main,
.site-footer {
    position: relative;
    z-index: 10;
}

/* === ХЕДЕР === */
.site-header {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), #06B6D4, var(--accent), transparent);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
    opacity: 0.5;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 1.4em;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 3s ease infinite;
}

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 600;
    position: relative;
}
.site-nav a:hover,
.site-nav a.active { color: var(--accent-hover); }
.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.25s ease;
    animation: gradShift 3s ease infinite;
}
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }

main { flex: 1; padding: 40px 0; }
.page-fade-in { animation: pageFadeIn 0.4s ease-out; }

/* === HERO === */
.hero { text-align: center; max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.hero-title {
    font-size: clamp(2.5em, 6vw, 4em);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroGlow 3s ease-in-out infinite, gradShift 4s ease infinite;
}
.hero-tagline { font-size: clamp(1.1em, 2.5vw, 1.5em); color: var(--text-secondary); margin-bottom: 40px; }
.hero-desc { font-size: 1.05em; line-height: 1.8; max-width: 600px; margin: 0 auto 32px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--radius-xl);
    font-size: 0.9em;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}
.badge:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-soft);
}
.badge-teal { color: var(--accent-teal); border-color: rgba(16, 185, 129, 0.3); }
.badge svg { flex-shrink: 0; opacity: 0.9; }
.hero-note { color: var(--text-dim); font-size: 0.9em; margin-top: 40px; }

/* === ФОРМЫ === */
.auth-form {
    max-width: 420px;
    margin: 0 auto;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.auth-form h1 {
    text-align: center;
    margin: 0 0 30px;
    font-size: 1.8em;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9em; font-weight: 600; }
.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* === КНОПКИ === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    animation: gradShift 3s ease infinite;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.btn:hover::before { transform: translateX(100%); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-blue); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

.btn-secondary {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    animation: none;
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--accent-soft);
    box-shadow: 0 8px 24px var(--accent-soft);
}

.btn-danger { background: transparent; border: 1px solid rgba(239, 68, 68, 0.3); color: var(--error); animation: none; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--error); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15); }

.btn-copy {
    padding: 11px 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: inherit;
    animation: gradShift 3s ease infinite;
}
.btn-copy:hover { transform: translateY(-1px); box-shadow: var(--shadow-blue); }
.btn-small { padding: 8px 14px; font-size: 0.85em; }

.btn svg, .btn-copy svg, .btn-danger svg, .btn-secondary svg { flex-shrink: 0; }

/* === АЛЕРТЫ === */
.alert { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 20px; font-size: 0.9em; border: 1px solid transparent; }
.alert-error   { background: var(--error-bg); border-color: rgba(239, 68, 68, 0.3); color: var(--error); }
.alert-success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-info    { background: var(--accent-soft); border-color: rgba(99, 102, 241, 0.3); color: var(--accent-hover); }

.auth-footer { text-align: center; margin-top: 24px; color: var(--text-dim); font-size: 0.9em; }
.auth-footer a { color: var(--accent2); font-weight: 600; }

/* === FOOTER === */
.site-footer {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85em;
}

/* === СКРОЛЛБАР === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 5px;
    border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-corner { background: var(--bg-base); }
* { scrollbar-width: thin; scrollbar-color: var(--bg-elevated) var(--bg-base); }

/* === SPINNER === */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 6px;
}

/* === DROPDOWN === */
.dropdown { position: relative; }
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.2s;
}
.dropdown-toggle:hover { border-color: var(--accent); color: var(--accent-hover); box-shadow: 0 0 20px var(--accent-soft); }
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--modal-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 200;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    transition: all 0.15s;
}
.dropdown-menu a:hover { background: var(--bg-hover); color: var(--accent-hover); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* === MOBILE NAV === */
.nav-toggle {
    display: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent-hover); }
.nav-toggle svg { display: block; }

/* ============================================================
   DASHBOARD / CONNECT / KEYS / SETTINGS / PRICING / HOW / DOCS / FAQ
   ============================================================ */

.dashboard { max-width: 900px; margin: 0 auto; }
.dashboard h1 {
    margin-bottom: 30px;
    font-size: 2em;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}

.user-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.user-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0.6;
    animation: gradShift 4s ease infinite;
}
.user-card p { margin: 12px 0; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.user-card strong { color: var(--text-secondary); font-weight: 500; min-width: 100px; display: inline-block; }
.user-card .plan-badge {
    display: inline-block;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0 16px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}
.dashboard-actions { display: flex; gap: 15px; flex-wrap: wrap; }

.user-card-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.user-card-row:last-child { border-bottom: none; }
.user-card-label { color: var(--text-secondary); font-weight: 500; min-width: 100px; font-size: 0.9em; }
.user-card-value { color: var(--text-primary); font-size: 0.95em; word-break: break-word; }

.connect-page { width: 100%; }
.connect-page h1 {
    font-size: 2em;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.page-desc { color: var(--text-secondary); margin-bottom: 30px; }

.connect-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    width: 100%;
}
.connect-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0.6;
    animation: gradShift 4s ease infinite;
}
.connect-card h2 {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--accent2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8em;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.value-row { display: flex; gap: 10px; align-items: center; }
.value-row input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9em;
}
.value-row input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.connect-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.connect-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.connect-left { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.connect-right { position: sticky; top: 100px; }

.qr-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px; }
.qr-card h2 { color: var(--accent2); margin-bottom: 24px; width: 100%; text-align: center; font-size: 1.1em; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.qr-code {
    display: inline-flex;
    align-items: center; justify-content: center;
    background: #FFFFFF;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin: 0 auto 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
    line-height: 0; font-size: 0;
}
.qr-code canvas { display: block !important; width: 280px !important; height: 280px !important; margin: 0 !important; padding: 0 !important; border-radius: 4px; }
.qr-code img { display: none !important; }
.qr-hint { color: var(--text-dim); font-size: 0.85em; width: 100%; text-align: center; }

.keys-page { width: 100%; }
.keys-page h1 {
    font-size: 2em;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input {
    flex: 1; min-width: 200px;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit; font-size: 1em;
}
.inline-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.keys-list { display: flex; flex-direction: column; gap: 12px; }
.key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}
.key-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: -4px 0 0 var(--accent), 0 4px 20px var(--accent-soft);
}
.key-inactive { opacity: 0.5; }
.key-info { min-width: 0; flex: 1; }
.key-label { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.badge-small {
    font-size: 0.7em;
    padding: 3px 10px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border-radius: var(--radius-xl);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.key-token { font-family: 'SF Mono', 'Consolas', monospace; color: var(--accent2); font-size: 0.9em; margin-bottom: 4px; }
.key-meta { font-size: 0.8em; color: var(--text-dim); font-family: 'SF Mono', 'Consolas', monospace; }
.empty-state { color: var(--text-dim); text-align: center; padding: 40px 20px; font-size: 0.95em; animation: pageFadeIn 0.6s ease-out; }

.settings-page { width: 100%; }
.settings-page h1 {
    font-size: 2em;
    margin-bottom: 30px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.settings-page .field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit; font-size: 1em;
}
.settings-page .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.settings-page .field input[readonly] { opacity: 0.6; cursor: not-allowed; }
.settings-page form .btn { margin-top: 10px; }

.pricing-page { width: 100%; padding: 0; }
.page-subtitle { text-align: center; color: var(--text-secondary); max-width: 600px; margin: 0 auto 50px; font-size: 1.05em; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 60px; }
.pricing-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.pricing-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 60px var(--accent-soft);
}
.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-soft);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, var(--bg-surface) 100%);
}
.pricing-card-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.pricing-badge {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    box-shadow: 0 0 16px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}
.pricing-header { margin-bottom: 24px; }
.pricing-header h2 { font-size: 1.4em; color: var(--accent2); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.pricing-price { display: flex; align-items: baseline; gap: 6px; }
.price {
    font-size: 2.4em; font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 3s ease infinite;
}
.period { color: var(--text-dim); font-size: 0.9em; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.95em;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li svg { flex-shrink: 0; }

.how-page { width: 100%; padding: 0; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 60px; }
.how-step {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    transition: all 0.3s ease;
}
.how-step:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.how-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.2em;
    margin-bottom: 16px;
    box-shadow: 0 0 24px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}
.how-step h3 { color: var(--accent2); margin-bottom: 12px; font-size: 1.1em; }
.how-step p { color: var(--text-secondary); line-height: 1.7; font-size: 0.95em; }
.how-step code { background: var(--bg-base); padding: 2px 8px; border-radius: 6px; font-family: 'SF Mono', monospace; font-size: 0.85em; color: var(--accent-hover); }

.how-diagram {
    display: flex; justify-content: center; align-items: center;
    gap: 16px; padding: 40px 20px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 60px;
    flex-wrap: wrap;
}
.diagram-step { text-align: center; min-width: 80px; }
.diagram-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.diagram-icon svg { display: block; }
.diagram-label { color: var(--text-secondary); font-size: 0.85em; font-weight: 600; }
.diagram-arrow { color: var(--accent); font-size: 1.5em; font-weight: 700; }

.benefits-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.benefit-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
}
.benefit-card:hover { border-color: var(--border-hover); box-shadow: 0 0 40px var(--accent-soft); }
.benefit-card h3 { color: var(--accent2); margin-bottom: 8px; font-size: 1em; display: flex; align-items: center; gap: 8px; }
.benefit-card h3 svg { flex-shrink: 0; }
.benefit-card p { color: var(--text-secondary); font-size: 0.9em; line-height: 1.6; }

.docs-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 900px) {
    .docs-page {
        padding: 0 16px;
    }
}

.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.docs-card {
    display: block;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}
.docs-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 60px var(--accent-soft);
}
.docs-icon {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
}
.docs-icon svg { display: block; }
.docs-card h3 { color: var(--text-primary); margin-bottom: 8px; font-size: 1.1em; }
.docs-card:hover h3 { color: var(--accent-hover); }
.docs-card p { color: var(--text-secondary); font-size: 0.9em; }

.faq-section { max-width: 900px; margin: 80px auto 0; padding: 0 20px; }
.section-title {
    font-size: 2em;
    text-align: center;
    margin-bottom: 40px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item.open { border-color: var(--accent); box-shadow: 0 4px 30px var(--accent-soft); }
.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: color 0.2s ease;
    font-size: 1em;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.faq-question:hover { color: var(--accent-hover); }
.faq-item.open .faq-question { color: var(--accent-hover); }
.faq-icon {
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0; margin-left: 16px;
}
.faq-icon svg { display: block; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    padding: 0 24px;
}
.faq-item.open .faq-answer { max-height: 500px; opacity: 1; padding: 0 24px 20px; }
.faq-answer p { color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* ============================================================
   STORMWALL
   ============================================================ */

.stormwall-page { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.stormwall-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.stormwall-header h1 {
    font-size: 2em;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
    display: flex; align-items: center; gap: 12px;
}
.stormwall-status {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95em;
    color: var(--accent-teal);
    position: relative;
    overflow: hidden;
}
.stormwall-status::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.25), transparent);
    animation: shimmer 2.5s infinite;
}
.status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    position: relative; z-index: 1;
    box-shadow: 0 0 12px currentColor;
}

.stormwall-layout { display: grid; grid-template-columns: 1fr 400px; gap: 24px; align-items: start; margin-bottom: 30px; }
.stormwall-col-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stormwall-col-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; min-width: 0; }

.stormwall-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 0; width: 100%; }

.metric-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.metric-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.4s;
    animation: gradShift 3s ease infinite;
}
.metric-card::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 120px; height: 120px;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
    transition: all 0.5s ease;
}
.stormwall-metrics .metric-card:nth-child(1)::after { background: radial-gradient(circle, #6366F1, transparent 70%); }
.stormwall-metrics .metric-card:nth-child(2)::after { background: radial-gradient(circle, #10B981, transparent 70%); }
.stormwall-metrics .metric-card:nth-child(3)::after { background: radial-gradient(circle, #EF4444, transparent 70%); }
.stormwall-metrics .metric-card:nth-child(4)::after { background: radial-gradient(circle, #06B6D4, transparent 70%); }
.stormwall-metrics .metric-card:hover::after { opacity: 0.18; transform: scale(1.3); }
.metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.metric-card:hover::before { opacity: 1; }

.metric-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: transform 0.3s;
}
.metric-card:hover .metric-icon { transform: scale(1.08) rotate(-5deg); }
.metric-icon svg { display: block; }
.metric-body { min-width: 0; flex: 1; }
.metric-label { color: var(--text-dim); font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px; font-weight: 800; }
.metric-value {
    font-size: 1.5em; font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    transition: color 0.5s ease, transform 0.3s ease;
}
.metric-sub { color: var(--text-dim); font-size: 0.8em; margin-top: 4px; }

.metric-icon-battery { position: relative; color: var(--accent-teal); }
.metric-icon-battery.charging { animation: pulse 1.8s ease-in-out infinite; }
.battery-bolt {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #FCD34D;
    animation: pulse 0.8s ease-in-out infinite;
    pointer-events: none;
}
.metric-value-battery.charging {
    background: linear-gradient(90deg, #10B981, #34D399, #10B981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradShift 2s linear infinite;
}
.metric-icon-temp { color: var(--accent-teal); }
.metric-icon-temp.temp-hot { color: #EF4444; animation: pulse 1.2s ease-in-out infinite; }
.metric-icon-clients { color: var(--accent); }
.metric-value-clients.clients-pulse { animation: pulse 0.9s ease-out; }
.metric-value-uptime { color: var(--accent2); }
.metric-icon-uptime { color: var(--accent2); }

.stormwall-page input[type="text"],
.stormwall-page input[type="password"],
.stormwall-page select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95em;
    transition: all 0.2s ease;
}
.stormwall-page input[type="text"]:focus,
.stormwall-page input[type="password"]:focus,
.stormwall-page select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.stormwall-page input::placeholder { color: var(--text-dim); }
.stormwall-page input[readonly] { cursor: default; opacity: 0.85; }
.stormwall-page .connect-card { padding: 24px 28px; }
.stormwall-page .connect-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1em; margin-bottom: 8px; }
.card-hint { color: var(--text-secondary); font-size: 0.9em; margin-bottom: 20px; line-height: 1.6; }

.current-wifi {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.current-wifi::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.current-wifi-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.current-wifi-body { flex: 1; min-width: 0; }
.current-wifi-label { color: var(--text-dim); font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; font-weight: 800; }
.current-wifi-name { color: var(--text-primary); font-size: 1.05em; font-weight: 700; margin-bottom: 2px; }
.current-wifi-meta { color: var(--text-dim); font-size: 0.8em; font-family: 'SF Mono', 'Consolas', monospace; }
.current-wifi-right { display: flex; align-items: center; flex-shrink: 0; }

.signal-bars { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.signal-bar { width: 5px; background: var(--bg-elevated); border-radius: 2px; transition: all 0.3s ease; }
.signal-bar:nth-child(1) { height: 25%; }
.signal-bar:nth-child(2) { height: 50%; }
.signal-bar:nth-child(3) { height: 75%; }
.signal-bar:nth-child(4) { height: 100%; }
.signal-bar.active {
    background: var(--gradient-primary);
    background-size: 200% auto;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}

.wifi-list { display: flex; flex-direction: column; gap: 12px; }
.wifi-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.wifi-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-hover), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.wifi-item:hover {
    border-color: var(--border-hover);
    transform: translateX(6px);
    box-shadow: -4px 0 0 var(--accent), 0 4px 20px var(--accent-soft);
}
.wifi-item:hover::before { opacity: 1; }
.wifi-item.current {
    border-color: rgba(6, 182, 212, 0.5);
    background-image: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(6, 182, 212, 0.03));
}
.wifi-item.saved { border-color: rgba(16, 185, 129, 0.35); }

.wifi-item-info { min-width: 0; flex: 1; }
.wifi-item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.95em;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.wifi-item-meta { color: var(--text-dim); font-size: 0.8em; font-family: 'SF Mono', 'Consolas', monospace; }
.wifi-item .btn-copy { padding: 8px 14px; font-size: 0.8em; white-space: nowrap; }

.wifi-badge-good, .wifi-badge-ok, .wifi-badge-weak {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.68em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    vertical-align: middle;
}
.wifi-badge-good { background: rgba(16, 185, 129, 0.15); color: var(--accent-teal); border: 1px solid rgba(16, 185, 129, 0.3); }
.wifi-badge-ok   { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.wifi-badge-weak { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }

.stormwall-page .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stormwall-page .field { margin-bottom: 14px; }
.stormwall-page .field label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8em;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.stormwall-page .value-row { display: flex; gap: 8px; align-items: stretch; }
.stormwall-page .value-row input { flex: 1; }

.device-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    transition: all 0.3s ease;
}
.device-card:hover { border-color: var(--border-hover); box-shadow: 0 4px 20px var(--accent-soft); }
.device-card + .device-card { margin-top: 12px; }
.device-card + .field-hint { margin-top: 8px; }
.device-card-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: transform 0.3s;
}
.device-card:hover .device-card-icon { transform: scale(1.08) rotate(-5deg); }
.device-card-body { flex: 1; min-width: 0; }
.device-card-label { color: var(--text-dim); font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px; font-weight: 800; }
.device-card-value { font-family: 'SF Mono', 'Consolas', monospace; color: var(--text-primary); font-size: 0.95em; font-weight: 600; letter-spacing: 0.5px; word-break: break-all; }
.stormwall-page .btn { padding: 11px 22px; font-size: 0.95em; }
.stormwall-page .btn-copy { padding: 10px 14px; font-size: 0.9em; }

.speedtest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; width: 100%; animation: pageFadeIn 0.4s ease-out; }
.speedtest-item {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    min-height: 200px;
}
.speedtest-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0.6;
}
.speedtest-item:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow), 0 0 40px var(--accent-soft); }
.speedtest-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    flex-shrink: 0;
    transition: transform 0.3s;
}
.speedtest-item:hover .speedtest-icon { transform: scale(1.1) rotate(-5deg); }
.speedtest-icon svg { display: block; }
.speedtest-label { color: var(--text-dim); font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; font-weight: 800; }
.speedtest-value {
    font-size: 2.2em; font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 3s ease infinite;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.chart-container { position: relative; height: 250px; width: 100%; margin-top: 16px; }

.wifi-map {
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
    background: radial-gradient(circle at center, var(--accent-soft) 0%, var(--bg-base) 70%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 16px;
}
.wifi-map-svg { max-width: 100%; height: auto; }

.clients-list { display: flex; flex-direction: column; gap: 10px; }
.client-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.client-item:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.client-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.client-icon svg { display: block; }
.client-info { min-width: 0; flex: 1; }
.client-name { font-weight: 700; color: var(--text-primary); margin-bottom: 2px; font-size: 0.9em; }
.client-meta { color: var(--text-dim); font-size: 0.75em; font-family: 'SF Mono', 'Consolas', monospace; }
.client-traffic { color: var(--accent2); font-size: 0.8em; font-weight: 700; white-space: nowrap; }

.traffic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.traffic-item {
    display: flex; align-items: center; gap: 16px;
    padding: 20px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}
.traffic-item:hover { border-color: var(--border-hover); box-shadow: 0 4px 20px var(--accent-soft); }
.traffic-arrow {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.traffic-arrow svg { display: block; }
.traffic-label { color: var(--text-dim); font-size: 0.85em; margin-bottom: 4px; }
.traffic-value { font-size: 1.3em; font-weight: 800; color: var(--text-primary); }

.connections-list { display: flex; flex-direction: column; gap: 10px; }
.connection-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bg-base) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: pageFadeIn 0.5s ease-out backwards;
}
.connection-item:nth-child(1) { animation-delay: 0.05s; }
.connection-item:nth-child(2) { animation-delay: 0.1s; }
.connection-item:nth-child(3) { animation-delay: 0.15s; }
.connection-item:nth-child(4) { animation-delay: 0.2s; }
.connection-item:nth-child(5) { animation-delay: 0.25s; }
.connection-item:nth-child(6) { animation-delay: 0.3s; }
.connection-item:nth-child(7) { animation-delay: 0.35s; }
.connection-item:nth-child(8) { animation-delay: 0.4s; }
.connection-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: -4px 0 0 var(--accent), 0 4px 20px var(--accent-soft);
}
.connection-success { border-left: 3px solid var(--accent-teal); }
.connection-success:hover { box-shadow: -4px 0 0 var(--accent-teal), 0 4px 20px rgba(16, 185, 129, 0.15); border-color: var(--accent-teal); }
.connection-fail { border-left: 3px solid var(--error); }
.connection-fail:hover { box-shadow: -4px 0 0 var(--error), 0 4px 20px rgba(239, 68, 68, 0.15); border-color: var(--error); }
.connection-status {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    position: relative;
}
.connection-success .connection-status { background: rgba(16, 185, 129, 0.1); animation: pulse 2s ease-in-out infinite; }
.connection-fail .connection-status { background: rgba(239, 68, 68, 0.1); }
.connection-status svg { display: block; }
.connection-info { flex: 1; min-width: 0; }
.connection-ssid { font-weight: 700; color: var(--text-primary); font-size: 1.05em; margin-bottom: 4px; word-break: break-all; transition: color 0.2s; }
.connection-item:hover .connection-ssid { color: var(--accent-hover); }
.connection-success:hover .connection-ssid { color: var(--accent-teal); }
.connection-fail:hover .connection-ssid { color: var(--error); }
.connection-meta { font-size: 0.8em; color: var(--text-dim); font-family: 'SF Mono', 'Consolas', monospace; }
.connection-error { font-size: 0.8em; color: var(--error); margin-top: 6px; font-style: italic; opacity: 0.9; }
.connection-badge {
    font-size: 0.7em; font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
}
.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
    color: var(--accent-teal);
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}
.badge-fail {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.connection-skeleton {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}
.connection-skeleton::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, var(--accent-soft) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}
.skeleton-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-elevated); flex-shrink: 0; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; background: var(--bg-elevated); border-radius: 4px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.long { width: 70%; }
.skeleton-badge { width: 70px; height: 24px; border-radius: 12px; background: var(--bg-elevated); flex-shrink: 0; }

.connections-list-title {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent2);
    font-weight: 700;
}
.connections-list-title::before {
    content: '';
    width: 3px; height: 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    border-radius: 2px;
    animation: gradShift 3s ease infinite;
}

.speedtest-card { position: relative; overflow: hidden; }
.speedtest-btn {
    width: 100%; padding: 15px 24px;
    font-size: 1em;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: relative;
    overflow: hidden;
}
.speedtest-progress { margin-top: 16px; animation: pageFadeIn 0.3s ease-out; }
.speedtest-progress-bar { height: 6px; background: var(--bg-base); border-radius: 3px; overflow: hidden; margin-bottom: 10px; position: relative; }
.speedtest-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #6366F1, #06B6D4);
    border-radius: 3px;
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
}
.speedtest-progress-fill::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}
.speedtest-progress-label { font-size: 0.85em; color: var(--text-secondary); text-align: center; font-family: 'SF Mono', 'Consolas', monospace; }
.speedtest-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; animation: pageFadeIn 0.3s ease-out; }
.speedtest-step {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.speedtest-step-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    color: var(--text-dim);
    flex-shrink: 0;
    transition: all 0.3s;
}
.speedtest-step-body { flex: 1; min-width: 0; }
.speedtest-step-label { font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 2px; transition: color 0.3s; }
.speedtest-step-value { font-family: 'SF Mono', 'Consolas', monospace; font-size: 0.95em; color: var(--text-secondary); font-weight: 600; transition: color 0.3s; }
.speedtest-step.active { border-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), var(--bg-base)); box-shadow: 0 0 20px var(--accent-soft); }
.speedtest-step.active .speedtest-step-icon { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2)); color: var(--accent-hover); animation: pulse 1.5s ease-in-out infinite; }
.speedtest-step.active .speedtest-step-label { color: var(--accent-hover); }
.speedtest-step.active .speedtest-step-value { color: var(--text-primary); }
.speedtest-step.active::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366F1, #06B6D4);
    animation: pulse 2s ease-in-out infinite;
}
.speedtest-step.done { border-color: rgba(16, 185, 129, 0.4); background: linear-gradient(90deg, rgba(16, 185, 129, 0.06), var(--bg-base)); }
.speedtest-step.done .speedtest-step-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-teal); }
.speedtest-step.done .speedtest-step-label { color: var(--accent-teal); }
.speedtest-step.done .speedtest-step-value { color: var(--accent-teal); font-weight: 700; }
.speedtest-info {
    display: inline-block;
    font-size: 0.75em;
    color: var(--text-dim);
    font-family: 'SF Mono', 'Consolas', monospace;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    margin-top: 20px;
    border-left: 3px solid var(--accent);
    animation: pageFadeIn 0.4s ease-out;
}

[data-realtime] { transition: color 0.3s ease, transform 0.3s ease; }
.realtime-flash { animation: realtimeFlash 0.8s ease-out; }

/* ============================================================
   STORMWALL — ADD DEVICE
   ============================================================ */

.stormwall-add-page { width: 100%; }
.stormwall-add-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
.stormwall-add-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stormwall-add-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.stormwall-add-card-header {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.stormwall-add-icon {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.stormwall-add-icon::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.stormwall-add-icon svg { position: relative; z-index: 1; }
.stormwall-add-card-header h2 { font-size: 1.15em; color: var(--text-primary); margin: 0 0 4px; font-weight: 700; }
.stormwall-add-card-header p { color: var(--text-dim); font-size: 0.85em; margin: 0; line-height: 1.5; }
.stormwall-form .field { margin-bottom: 22px; }
.stormwall-form .field label { display: block; color: var(--text-secondary); font-size: 0.8em; margin-bottom: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim);
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}
.input-with-icon input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95em;
    transition: all 0.2s ease;
}
.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    background: var(--bg-elevated);
}
.input-with-icon input:focus ~ .input-icon,
.input-with-icon input:focus + .input-icon { color: var(--accent-hover); }
.input-with-icon input::placeholder { color: var(--text-dim); }
.input-with-icon input[type="password"],
.input-with-icon input#add-wifi-pass { padding-right: 52px; }

.input-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}
.input-action:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--accent-soft);
    box-shadow: 0 0 16px var(--accent-soft);
}
.input-action svg { display: block; }
.field-hint { display: block; color: var(--text-dim); font-size: 0.78em; margin-top: 8px; line-height: 1.5; }
.btn-submit { width: 100%; padding: 15px 24px; font-size: 1em; margin-top: 8px; gap: 10px; }
.btn-submit svg { flex-shrink: 0; }

.stormwall-info-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.stormwall-info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #F59E0B, #06B6D4, #F59E0B);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.stormwall-info-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}
.stormwall-info-card h3 { color: var(--text-primary); margin-bottom: 20px; font-size: 1.1em; font-weight: 700; }
.stormwall-steps { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 12px; }
.stormwall-steps li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-secondary); font-size: 0.9em; line-height: 1.5; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}
.stormwall-steps strong { color: var(--text-primary); font-weight: 700; }
.stormwall-info-note {
    display: flex; gap: 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}
.stormwall-info-note .note-icon { display: flex; flex-shrink: 0; margin-top: 1px; }
.stormwall-info-note strong { color: var(--warning); font-weight: 700; }

/* === INFO ROW === */
.info-list { display: flex; flex-direction: column; }
.info-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.info-row:last-child { border-bottom: none; }
.info-row:hover { background: var(--accent-soft); }
.info-row-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--accent-hover);
    flex-shrink: 0;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.info-row-icon::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 4s infinite;
}
.info-row-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; display: block; position: relative; z-index: 1; }
.info-row:hover .info-row-icon { border-color: rgba(99, 102, 241, 0.5); color: #FFFFFF; box-shadow: 0 4px 16px var(--accent-soft); transform: scale(1.05); }
.info-row-icon.green { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: var(--c-green); }
.info-row-icon.blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.3); color: var(--c-blue); }
.info-row-icon.purple { background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.3); color: var(--c-purple); }
.info-row-body { flex: 1; min-width: 0; }
.info-row-label { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); font-weight: 800; margin-bottom: 4px; }
.info-row-value {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
    word-break: break-all;
    line-height: 1.4;
}
.info-row-value.ok { color: var(--c-green); font-family: inherit; font-weight: 700; }
.info-row-value.mono { font-family: 'SF Mono', 'Consolas', monospace; }
.info-row-action {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
}
.info-row-action:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--accent-soft);
    box-shadow: 0 4px 16px var(--accent-soft);
    transform: scale(1.05);
}
.info-row-action svg { width: 16px; height: 16px; stroke-width: 2; display: block; }

/* === TIMELINE === */
.timeline { position: relative; padding-left: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline-item {
    position: relative;
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px 16px 64px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 22px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 3px solid var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
    z-index: 2;
}
.timeline-item.success::before { border-color: var(--c-green); box-shadow: 0 0 14px rgba(16, 185, 129, 0.5); }
.timeline-item.fail::before { border-color: var(--c-red); box-shadow: 0 0 14px rgba(239, 68, 68, 0.5); }
.timeline-item:hover { border-color: var(--border-hover); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 40px var(--accent-soft); transform: translateX(4px); }
.timeline-item.success { border-left: 3px solid var(--c-green); }
.timeline-item.fail { border-left: 3px solid var(--c-red); }
.timeline-icon { width: 40px; height: 40px; border-radius: var(--radius-md); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.timeline-item.success .timeline-icon { background: rgba(16, 185, 129, 0.15); color: var(--c-green); }
.timeline-item.fail .timeline-icon { background: rgba(239, 68, 68, 0.15); color: var(--c-red); }
.timeline-icon svg { width: 20px; height: 20px; stroke-width: 2.5; display: block; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-title { font-weight: 700; font-size: 1em; margin-bottom: 4px; color: var(--text-primary); }
.timeline-meta { font-size: 0.8em; color: var(--text-dim); font-family: 'SF Mono', 'Consolas', monospace; }
.timeline-badge {
    font-size: 0.72em; font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
}
.timeline-item.success .timeline-badge { background: rgba(16, 185, 129, 0.15); color: var(--c-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.timeline-item.fail .timeline-badge { background: rgba(239, 68, 68, 0.15); color: var(--c-red); border: 1px solid rgba(239, 68, 68, 0.3); }
.timeline-time { font-size: 0.78em; color: var(--text-dim); font-family: 'SF Mono', 'Consolas', monospace; white-space: nowrap; flex-shrink: 0; }

/* === STATUS GRID === */
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.status-card {
    display: flex; flex-direction: column; gap: 14px;
    padding: 24px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.status-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.4s;
    animation: gradShift 3s ease infinite;
}
.status-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow), 0 0 40px var(--accent-soft); transform: translateY(-3px); }
.status-card:hover::before { opacity: 1; }
.status-card.online { border-color: rgba(16, 185, 129, 0.3); }
.status-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; transition: transform 0.3s; }
.status-card:hover .status-icon { transform: scale(1.08) rotate(-5deg); }
.status-icon svg { width: 26px; height: 26px; stroke-width: 2; display: block; }
.status-icon.blue   { background: rgba(59, 130, 246, 0.15); color: var(--c-blue); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
.status-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green); box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
.status-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }
.status-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
.status-label { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 6px; font-weight: 800; }
.status-value { font-size: 1.05em; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.status-value.online { color: var(--c-green); }
.status-value.blue { color: var(--c-blue); }
.status-dot-mini { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; animation: pulse 2s ease-in-out infinite; }

/* === FLOW SCHEME === */
.flow-scheme {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
    padding: 40px 32px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; transition: transform 0.3s; }
.flow-node:hover { transform: translateY(-4px); }
.flow-icon { width: 64px; height: 64px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; position: relative; }
.flow-icon svg { width: 32px; height: 32px; stroke-width: 2; display: block; }
.flow-icon.client    { background: rgba(59, 130, 246, 0.15); color: var(--c-blue); border: 1px solid rgba(59, 130, 246, 0.4); }
.flow-icon.doh       { background: rgba(16, 185, 129, 0.15); color: var(--c-green); border: 1px solid rgba(16, 185, 129, 0.4); }
.flow-icon.iBase { background: rgba(99, 102, 241, 0.2); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.5); box-shadow: 0 0 28px var(--accent-glow); }
.flow-icon.vpn       { background: rgba(6, 182, 212, 0.15); color: var(--c-cyan); border: 1px solid rgba(6, 182, 212, 0.4); }
.flow-icon.internet  { background: rgba(16, 185, 129, 0.15); color: var(--c-green); border: 1px solid rgba(16, 185, 129, 0.4); }
.flow-label { font-size: 0.88em; color: var(--text-secondary); font-weight: 600; white-space: nowrap; }
.flow-arrow { flex: 1; min-width: 70px; height: 24px; display: flex; align-items: center; justify-content: center; padding: 0 10px; }
.flow-arrow svg { width: 100%; height: 24px; display: block; overflow: visible; }

/* === CARD TITLE ICON === */
.card-title-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary);
    background-size: 200% auto;
    box-shadow: 0 4px 14px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    animation: gradShift 4s ease infinite;
}
.card-title-icon::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.card-title-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; display: block; position: relative; z-index: 1; }
.card-title-icon.blue   { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.card-title-icon.green  { background: linear-gradient(135deg, #10B981, #34D399); }
.card-title-icon.cyan   { background: linear-gradient(135deg, #06B6D4, #22D3EE); }
.card-title-icon.purple { background: linear-gradient(135deg, #A855F7, #C084FC); }
.card-title-icon.yellow { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.card-title-icon.indigo { background: linear-gradient(135deg, #6366F1, #818CF8); }

/* === SVG-иконки === */
.badge svg { flex-shrink: 0; opacity: 0.9; }
.diagram-icon svg { display: block; }
.btn svg, .btn-copy svg, .btn-danger svg, .btn-secondary svg { flex-shrink: 0; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1200px) {
    .stormwall-layout { grid-template-columns: 1fr; }
    .stormwall-col-side { position: static; }
    .status-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .connect-layout { grid-template-columns: 1fr 340px; }
}
@media (max-width: 900px) {
    .connect-layout { grid-template-columns: 1fr; }
    .connect-right { position: static; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .how-steps { grid-template-columns: 1fr; }
    .benefits-grid { grid-template-columns: 1fr; }
    .diagram-arrow { display: none; }
    .docs-grid { grid-template-columns: 1fr; }
    .stormwall-metrics { grid-template-columns: repeat(2, 1fr); }
    .stormwall-add-wrapper { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
    .flow-scheme { flex-direction: column; gap: 20px; }
    .flow-arrow { transform: rotate(90deg); min-width: auto; height: auto; width: 70px; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .site-header { padding: 12px 0; }
    .site-header .container { flex-wrap: wrap; gap: 12px; position: relative; }
    .logo { font-size: 1.2em; }
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--modal-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 12px;
        margin-top: 8px;
        flex-direction: column;
        gap: 4px;
        box-shadow: var(--shadow);
        z-index: 200;
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 12px 16px; border-radius: var(--radius-md); font-size: 0.95em; width: 100%; }
    .site-nav a:hover { background: var(--bg-hover); }
    .site-nav a::after { display: none; }
    .dropdown { width: 100%; }
    .dropdown-toggle { width: 100%; justify-content: space-between; }
    .dropdown-menu { position: static; width: 100%; margin-top: 4px; box-shadow: none; border: none; background: var(--bg-base); }
    main { padding: 24px 0; }
    .hero { padding: 20px 0; }
    .hero-title { font-size: 2em; gap: 8px; }
    .hero-tagline { font-size: 1.05em; margin-bottom: 24px; }
    .hero-badges { gap: 8px; }
    .badge { padding: 8px 14px; font-size: 0.85em; }
    .auth-form { padding: 28px 20px; margin: 0 8px; }
    .auth-form h1 { font-size: 1.5em; }
    .form-group input { padding: 12px 14px; font-size: 16px; }
    .btn { padding: 12px 20px; font-size: 0.95em; }
    .connect-card { padding: 20px 18px; }
    .connect-card h2 { font-size: 1em; }
    .value-row { flex-direction: column; align-items: stretch; }
    .btn-copy { width: 100%; justify-content: center; }
    .user-card { padding: 20px; }
    .user-card-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; }
    .user-card-label { min-width: auto; font-size: 0.8em; }
    .user-card-value { font-size: 0.95em; }
    .dashboard h1 { font-size: 1.5em; margin-bottom: 20px; }
    .dashboard-actions { flex-direction: column; }
    .dashboard-actions .btn { width: 100%; }
    .keys-page h1 { font-size: 1.5em; }
    .inline-form { flex-direction: column; }
    .inline-form input { width: 100%; }
    .key-item { flex-direction: column; align-items: stretch; gap: 12px; }
    .key-item .btn-danger { width: 100%; }
    .settings-page h1 { font-size: 1.5em; }
    .stormwall-header { flex-direction: column; }
    .stormwall-header h1 { font-size: 1.5em; }
    .stormwall-status { align-self: flex-start; }
    .stormwall-layout { grid-template-columns: 1fr; gap: 16px; }
    .stormwall-col-side { position: static; }
    .stormwall-metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
    .metric-card { padding: 16px; gap: 12px; }
    .metric-value { font-size: 1.2em; }
    .metric-label { font-size: 0.7em; }
    .metric-sub { font-size: 0.7em; }
    .stormwall-add-card, .stormwall-info-card { padding: 24px 20px; }
    .stormwall-add-card-header { flex-direction: column; gap: 12px; }
    .stormwall-page .field-row { grid-template-columns: 1fr; }
    .device-card { flex-direction: column; align-items: stretch; text-align: center; }
    .device-card-icon { align-self: center; }
    .device-card .btn-copy { width: 100%; }
    .traffic-grid { grid-template-columns: 1fr; }
    .speedtest-grid { grid-template-columns: 1fr; gap: 12px; }
    .speedtest-item { padding: 20px 14px; }
    .speedtest-value { font-size: 1.8em; }
    .clients-list .client-item { flex-wrap: wrap; }
    .client-traffic { margin-left: auto; }
    .current-wifi { flex-wrap: wrap; }
    .current-wifi-right { width: 100%; justify-content: flex-start; margin-top: 8px; }
    .wifi-item { flex-wrap: wrap; }
    .wifi-item .btn-copy { width: 100%; }
    .faq-section { margin: 40px auto 0; padding: 0 16px; }
    .section-title { font-size: 1.5em; margin-bottom: 24px; }
    .faq-question { padding: 16px 18px; font-size: 0.95em; }
    .faq-answer { padding: 0 18px; }
    .faq-item.open .faq-answer { padding: 0 18px 16px; }
    .pricing-page .section-title { font-size: 1.5em; }
    .page-subtitle { font-size: 0.95em; margin-bottom: 30px; }
    .pricing-card { padding: 24px 20px; }
    .price { font-size: 2em; }
    .how-step { padding: 24px 20px; }
    .how-diagram { flex-direction: column; gap: 12px; padding: 24px 16px; }
    .diagram-arrow { transform: rotate(90deg); }
    .benefit-card { padding: 18px 16px; }
    .docs-card { padding: 22px 18px; }
    .site-footer { padding: 20px 0; font-size: 0.8em; }
    .status-grid { grid-template-columns: 1fr; }
    .toast-container { left: 16px; right: 16px; top: 16px; max-width: none; }
    .modal { padding: 24px; }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .btn { width: 100%; }
}
@media (max-width: 600px) {
    .checkbox-label input[type="checkbox"]:checked::after {
        width: 4px;
        height: 8px;
        border-width: 0 2px 2px 0;
        transform: translate(-50%, -55%) rotate(45deg);
    }
}
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .stormwall-metrics { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.7em; }
    .hero-tagline { font-size: 0.95em; }
    .badge { padding: 6px 12px; font-size: 0.8em; }
    .btn { font-size: 0.9em; padding: 11px 18px; }
}

/* === ФИНАЛЬНЫЕ ФИКСЫ === */
.stormwall-page > .stormwall-metrics { margin-bottom: 0; }
.stormwall-page > .connect-card { margin-bottom: 0; }
.stormwall-page > .connect-actions { margin-top: 0; }
.connect-card { margin-bottom: 0; width: 100%; }

/* ============================================================
   ГЛАВНАЯ — новые секции
   ============================================================ */

/* CTA-кнопки под hero */
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.hero-cta .btn {
    padding: 14px 28px;
    font-size: 1em;
}
.hero-cta .btn-secondary {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
}

/* Секция с общим заголовком */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header .section-title {
    margin-bottom: 16px;
}
.section-header .section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05em;
    max-width: 640px;
    margin: 0 auto;
}

/* Плитки «Как это работает» (3 шт) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.step-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.step-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.3s;
    animation: gradShift 3s ease infinite;
}
.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.step-card:hover::before { opacity: 1; }
.step-card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.15em;
    margin-bottom: 18px;
    box-shadow: 0 0 24px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}
.step-card h3 {
    color: var(--text-primary);
    font-size: 1.15em;
    margin-bottom: 10px;
    font-weight: 700;
}
.step-card p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.6;
}
.step-card code {
    background: var(--bg-base);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', monospace;
    font-size: 0.85em;
    color: var(--accent-hover);
}

/* Секция «Возможности» — 6 карточек */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}
.feature-card:hover .feature-icon { transform: scale(1.08) rotate(-5deg); }
.feature-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.feature-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.feature-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.feature-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);  border: 1px solid rgba(6, 182, 212, 0.3); }
.feature-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.feature-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--c-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.feature-icon.blue   { background: rgba(59, 130, 246, 0.15); color: var(--c-blue); border: 1px solid rgba(59, 130, 246, 0.3); }
.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.05em;
    margin-bottom: 8px;
    font-weight: 700;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.6;
}

/* Секция тарифов на главной — компактная */
.pricing-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.pricing-mini {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.pricing-mini:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.pricing-mini-featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-soft);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, var(--bg-surface) 100%);
}
.pricing-mini-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.pricing-mini h3 {
    font-size: 1.1em;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    font-weight: 800;
}
.pricing-mini .price {
    font-size: 2.2em;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 3s ease infinite;
    display: block;
    margin-bottom: 6px;
}
.pricing-mini .period {
    color: var(--text-dim);
    font-size: 0.85em;
    display: block;
    margin-bottom: 20px;
}
.pricing-mini ul {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    text-align: left;
}
.pricing-mini ul li {
    color: var(--text-secondary);
    font-size: 0.9em;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pricing-mini ul li:last-child { border-bottom: none; }
.pricing-mini ul li svg { flex-shrink: 0; }

/* Ссылка «все тарифы» */
.section-more {
    text-align: center;
    margin-top: 40px;
}
.section-more a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-hover);
    font-weight: 700;
    font-size: 0.95em;
    transition: all 0.2s;
}
.section-more a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

/* Финальный CTA-блок */
.cta-block {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 60px 40px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.05));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.cta-block h2 {
    font-size: clamp(1.6em, 3vw, 2.2em);
    margin-bottom: 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.cta-block p {
    color: var(--text-secondary);
    font-size: 1.05em;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-block .btn {
    padding: 16px 36px;
    font-size: 1.05em;
}

/* Адаптив для новых секций */
@media (max-width: 900px) {
    .steps-grid,
    .features-grid,
    .pricing-mini-grid {
        grid-template-columns: 1fr;
    }
    .section { padding: 40px 20px; }
    .cta-block { padding: 40px 24px; margin: 40px auto 0; }
}

/* Мягкое «дыхание» заголовков */
.hero-title,
.section-title,
.stormwall-header h1,
.dashboard h1,
.connect-page h1,
.keys-page h1,
.settings-page h1 {
    animation: gradShift 4s ease infinite, titleBreathe 6s ease-in-out infinite;
}

@keyframes titleBreathe {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(99, 102, 241, 0)); }
    50%      { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4)); }
}

/* Каскадное появление карточек */
.steps-grid .step-card,
.features-grid .feature-card,
.pricing-mini,
.pricing-card,
.benefit-card,
.how-step,
.docs-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.steps-grid .step-card:nth-child(1),
.features-grid .feature-card:nth-child(1),
.pricing-mini:nth-child(1),
.pricing-card:nth-child(1),
.benefit-card:nth-child(1),
.how-step:nth-child(1),
.docs-card:nth-child(1)   { animation-delay: 0.05s; }

.steps-grid .step-card:nth-child(2),
.features-grid .feature-card:nth-child(2),
.pricing-mini:nth-child(2),
.pricing-card:nth-child(2),
.benefit-card:nth-child(2),
.how-step:nth-child(2),
.docs-card:nth-child(2)   { animation-delay: 0.15s; }

.steps-grid .step-card:nth-child(3),
.features-grid .feature-card:nth-child(3),
.pricing-mini:nth-child(3),
.pricing-card:nth-child(3),
.benefit-card:nth-child(3),
.how-step:nth-child(3),
.docs-card:nth-child(3)   { animation-delay: 0.25s; }

.features-grid .feature-card:nth-child(4),
.benefit-card:nth-child(4),
.docs-card:nth-child(4)   { animation-delay: 0.35s; }

.features-grid .feature-card:nth-child(5),
.docs-card:nth-child(5)   { animation-delay: 0.45s; }

.features-grid .feature-card:nth-child(6),
.docs-card:nth-child(6)   { animation-delay: 0.55s; }

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Пружинка для иконок */
.feature-card:hover .feature-icon,
.step-card:hover .step-card-num,
.metric-card:hover .metric-icon,
.device-card:hover .device-card-icon,
.info-row:hover .info-row-icon {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature-card:hover .feature-icon { transform: scale(1.15) rotate(-8deg); }
.step-card:hover .step-card-num   { transform: scale(1.15) rotate(-8deg); }

/* ============================================================
   HOW IT WORKS — секции
   ============================================================ */

/* Flow-схема как в прототипе */
.hiw-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 44px 32px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 40px auto 60px;
    max-width: 1100px;
    position: relative;
    overflow: hidden;
}
.hiw-flow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.hiw-flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.hiw-flow-node:hover { transform: translateY(-4px); }
.hiw-flow-icon {
    width: 68px; height: 68px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hiw-flow-icon svg { width: 34px; height: 34px; stroke-width: 2; display: block; }
.hiw-flow-icon.client   { background: rgba(59, 130, 246, 0.15); color: var(--c-blue);   border: 1px solid rgba(59, 130, 246, 0.4); }
.hiw-flow-icon.doh      { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.4); }
.hiw-flow-icon.iBase{ background: rgba(99, 102, 241, 0.2);  color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.5); box-shadow: 0 0 28px var(--accent-glow); }
.hiw-flow-icon.vpn      { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.4); }
.hiw-flow-icon.internet { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.4); }
.hiw-flow-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}
.hiw-flow-arrow {
    flex: 1;
    min-width: 60px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: var(--accent);
}
.hiw-flow-arrow svg { width: 100%; height: 24px; display: block; }

/* 3 больших шага */
.hiw-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto 60px;
}
.hiw-step {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 24px;
    padding: 32px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.hiw-step::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.3s;
    animation: gradShift 3s ease infinite;
}
.hiw-step:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.hiw-step:hover::before { opacity: 1; }
.hiw-step-num {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.6em;
    box-shadow: 0 0 32px var(--accent-glow);
    animation: gradShift 3s ease infinite;
    flex-shrink: 0;
}
.hiw-step-body h3 {
    color: var(--text-primary);
    font-size: 1.25em;
    margin-bottom: 10px;
    font-weight: 700;
}
.hiw-step-body p {
    color: var(--text-secondary);
    font-size: 0.98em;
    line-height: 1.7;
    margin-bottom: 12px;
}
.hiw-step-body p:last-child { margin-bottom: 0; }
.hiw-step-body code {
    background: var(--bg-base);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--accent-hover);
    border: 1px solid var(--border);
}
.hiw-step-body pre {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85em;
    color: var(--text-primary);
    overflow-x: auto;
    margin-top: 12px;
    line-height: 1.5;
}
.hiw-step-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
}

/* Таблица сравнения */
.hiw-compare {
    max-width: 1000px;
    margin: 0 auto 60px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.hiw-compare table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.hiw-compare th,
.hiw-compare td {
    padding: 18px 22px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.hiw-compare th {
    background: rgba(99, 102, 241, 0.06);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.hiw-compare th:first-child { color: var(--text-dim); }
.hiw-compare th.hl { color: var(--accent-hover); }
.hiw-compare td:first-child {
    color: var(--text-muted);
    font-weight: 600;
    width: 30%;
}
.hiw-compare td.hl {
    color: var(--accent-hover);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.04);
}
.hiw-compare tr:last-child td { border-bottom: none; }
.hiw-compare tr:hover td { background: rgba(99, 102, 241, 0.03); }
.hiw-compare tr:hover td.hl { background: rgba(99, 102, 241, 0.07); }

/* Плюсы */
.hiw-pros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 60px;
}
.hiw-pro {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    transition: all 0.3s ease;
}
.hiw-pro:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.hiw-pro-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.hiw-pro-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.hiw-pro-icon svg { width: 22px; height: 22px; stroke-width: 2; display: block; position: relative; z-index: 1; }
.hiw-pro-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.3); }
.hiw-pro-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.hiw-pro-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.3); }
.hiw-pro-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.hiw-pro-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--c-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.hiw-pro-icon.blue   { background: rgba(59, 130, 246, 0.15); color: var(--c-blue);   border: 1px solid rgba(59, 130, 246, 0.3); }
.hiw-pro h3 {
    color: var(--text-primary);
    font-size: 1.05em;
    margin-bottom: 8px;
    font-weight: 700;
}
.hiw-pro p {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.6;
}

/* Минусы / ограничения */
.hiw-cons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto 60px;
}
.hiw-con {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius-md);
    padding: 24px 26px;
    transition: all 0.3s ease;
}
.hiw-con:hover {
    border-color: var(--border-hover);
    border-left-color: var(--warning);
    transform: translateY(-3px);
    box-shadow: var(--shadow), 0 0 40px rgba(245, 158, 11, 0.15);
}
.hiw-con h3 {
    color: var(--warning);
    font-size: 1.05em;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hiw-con h3 svg { flex-shrink: 0; }
.hiw-con p {
    color: var(--text-secondary);
    font-size: 0.92em;
    line-height: 1.65;
}

/* StyleCCS блок */
.hiw-styleccs {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 36px 40px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(6, 182, 212, 0.04));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.hiw-styleccs::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.hiw-styleccs-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.hiw-styleccs-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
    box-shadow: 0 0 24px var(--accent-glow);
}
.hiw-styleccs-icon svg { width: 28px; height: 28px; stroke-width: 2; }
.hiw-styleccs-header h2 {
    font-size: 1.4em;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.hiw-styleccs p {
    color: var(--text-secondary);
    font-size: 0.98em;
    line-height: 1.75;
    margin-bottom: 14px;
}
.hiw-styleccs p:last-child { margin-bottom: 0; }
.hiw-styleccs code {
    background: var(--bg-base);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--accent-hover);
    border: 1px solid var(--border);
}

/* Адаптив */
@media (max-width: 1024px) {
    .hiw-pros { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hiw-flow { flex-direction: column; padding: 32px 20px; gap: 16px; }
    .hiw-flow-arrow { transform: rotate(90deg); min-width: auto; width: 60px; height: 40px; }
    .hiw-step { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
    .hiw-step-num { width: 56px; height: 56px; font-size: 1.3em; }
    .hiw-pros { grid-template-columns: 1fr; }
    .hiw-cons { grid-template-columns: 1fr; }
    .hiw-compare { overflow-x: auto; }
    .hiw-compare table { min-width: 600px; }
    .hiw-styleccs { padding: 28px 24px; }
    .hiw-styleccs-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   МОБИЛЬНАЯ ОПТИМИЗАЦИЯ — отключаем тяжёлое
   ============================================================ */

@media (max-width: 768px) {
    /* Aurora — блобы с blur(120px) — самые тяжёлые. Отключаем. */
    .aurora { display: none; }

    /* Nebula — blur(140px) + mix-blend-mode. Тоже тяжёлые. Отключаем. */
    .nebula { display: none; }

    /* Spotlight — mix-blend-mode на большом блоке. Отключаем. */
    .spotlight { display: none; }

    /* Сетка — оставляем, она лёгкая, но замедлим анимацию */
    .bg-grid { animation-duration: 120s; }

    /* Spotlight-эффект у контента — упрощаем */
    .hero-title,
    .section-title {
        animation: gradShift 4s ease infinite;
    }
}

/* Отключаем все тяжёлые анимации при «уменьшенной анимации» */
@media (prefers-reduced-motion: reduce) {
    .aurora,
    .nebula,
    .spotlight { display: none; }

    #starCanvas,
    #particleCanvas { display: none; }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ============================================================
   PRICING — тарифы (полный набор стилей)
   ============================================================ */

/* --- HERO --- */
.pricing-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 20px 0;
}
.pricing-hero h1 {
    font-size: clamp(2em, 4vw, 3em);
    font-weight: 800;
    margin-bottom: 14px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.pricing-hero p {
    color: var(--text-secondary);
    font-size: 1.1em;
    line-height: 1.6;
}

/* --- ПЕРЕКЛЮЧАТЕЛЬ ПЕРИОДОВ --- */
.billing-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.billing-toggle {
    position: relative;
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 100px;
    flex-wrap: nowrap;
    justify-content: center;
    isolation: isolate;
}

/* Скользящий пилюль — переезжает между кнопками */
.billing-toggle-slider {
    position: absolute;
    top: 5px;
    left: 0;
    height: calc(100% - 10px);
    width: 0;
    background: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%);
    background-size: 200% auto;
    border-radius: 100px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
    animation: gradShift 3s ease infinite;
    transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
                width 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
    z-index: 0;
    pointer-events: none;
    will-change: transform, width;
}

.billing-toggle button {
    position: relative;
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88em;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    transition: color 0.35s ease, transform 0.35s ease;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.billing-toggle button:hover:not(.active) {
    color: var(--text-primary);
}

.billing-toggle button.active {
    color: #FFFFFF;
    transform: scale(1.03);
}

.billing-toggle .save-badge {
    display: inline-block;
    padding: 2px 7px;
    font-size: 0.72em;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-teal);
    border-radius: 100px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    line-height: 1;
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.billing-toggle button.active .save-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
}

/* --- КАРТОЧКА ТАРИФА --- */
.plan-card {
    display: flex;
    flex-direction: column;
    padding: 32px 26px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.plan-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow), 0 0 60px var(--accent-soft);
}
.plan-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.3s;
    animation: gradShift 3s ease infinite;
}
.plan-card:hover::before { opacity: 1; }

.plan-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-soft);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-surface) 100%);
    transform: scale(1.02);
}
.plan-card-featured::before {
    opacity: 1;
    height: 3px;
}
.plan-card-featured:hover {
    transform: scale(1.02) translateY(-6px);
}

.plan-badge-top {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    font-size: 0.68em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 12px;
    border-radius: 100px;
    box-shadow: 0 0 20px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}

/* --- ИКОНКА ТАРИФА --- */
.plan-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.plan-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.plan-icon svg {
    width: 26px; height: 26px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.plan-icon.free       { background: rgba(156, 163, 175, 0.15); color: #A8A8B3; border: 1px solid rgba(156, 163, 175, 0.3); }
.plan-icon.pro        { background: rgba(99, 102, 241, 0.2);  color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.5); box-shadow: 0 0 20px var(--accent-glow); }
.plan-icon.business   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.3); }
.plan-icon.enterprise { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); border: 1px solid rgba(168, 85, 247, 0.3); }

/* --- НАЗВАНИЕ И ОПИСАНИЕ --- */
.plan-name {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.plan-desc {
    font-size: 0.85em;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.5;
    min-height: 2.6em;
}

/* --- ЦЕНА --- */
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}
.plan-price .amount {
    font-size: 2.6em;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 3s ease infinite;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    will-change: transform, filter;
    transition: color 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
.plan-price .currency {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-secondary);
}
.plan-price .period {
    font-size: 0.85em;
    color: var(--text-dim);
    margin-left: 4px;
}
.plan-price-note {
    font-size: 0.75em;
    color: var(--text-dim);
    margin-bottom: 24px;
    min-height: 1.2em;
    transition: color 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}
.plan-price-note.sale {
    color: var(--accent-teal);
    font-weight: 700;
}

/* --- КНОПКА CTA В КАРТОЧКЕ --- */
.plan-cta { margin-bottom: 24px; }
.plan-cta .btn { width: 100%; }

/* --- СПИСОК ФИЧ --- */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.88em;
    color: var(--text-secondary);
    line-height: 1.5;
}
.plan-features li svg {
    flex-shrink: 0;
    margin-top: 3px;
}
.plan-features li.off {
    color: var(--text-dim);
    opacity: 0.6;
}
.plan-features li.off svg { color: var(--text-dim); }

/* --- ТАБЛИЦА СРАВНЕНИЯ --- */
.compare-section {
    max-width: 1000px;
    margin: 0 auto 70px;
}
.compare-table {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.compare-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}
.compare-table th,
.compare-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.compare-table th {
    background: rgba(99, 102, 241, 0.06);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    width: 34%;
}
.compare-table th.hl { color: var(--accent-hover); background: rgba(99, 102, 241, 0.1); }
.compare-table td.hl { color: var(--accent-hover); font-weight: 600; background: rgba(99, 102, 241, 0.04); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(99, 102, 241, 0.03); }
.compare-table tr:hover td.hl { background: rgba(99, 102, 241, 0.08); }
.compare-table td svg { vertical-align: middle; }

/* --- FAQ НА СТРАНИЦЕ ТАРИФОВ --- */
.pricing-faq {
    max-width: 900px;
    margin: 0 auto 70px;
}

/* --- АНИМАЦИЯ СМЕНЫ ЦЕНЫ --- */
.plan-price .amount.is-leaving {
    transform: translateY(-8px) scale(0.92);
    filter: blur(2px);
    opacity: 0;
    transition: transform 0.22s ease-in, opacity 0.22s ease-in, filter 0.22s ease-in;
}
.plan-price .amount.is-entering {
    transform: translateY(8px) scale(0.92);
    filter: blur(2px);
    opacity: 0;
}
.plan-price .amount.is-entered {
    transform: translateY(0) scale(1);
    filter: blur(0);
    opacity: 1;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease-out,
                filter 0.35s ease-out;
}
.plan-price .amount.flash {
    animation: priceFlash 0.9s ease-out;
}
@keyframes priceFlash {
    0%   { text-shadow: 0 0 0 rgba(99, 102, 241, 0); }
    40%  { text-shadow: 0 0 24px rgba(99, 102, 241, 0.85); }
    100% { text-shadow: 0 0 0 rgba(99, 102, 241, 0); }
}

.plan-card.price-updating {
    animation: cardPulse 0.7s ease-out;
}
@keyframes cardPulse {
    0%   { box-shadow: var(--shadow), 0 0 0 rgba(99, 102, 241, 0); }
    50%  { box-shadow: var(--shadow), 0 0 40px rgba(99, 102, 241, 0.35); }
    100% { box-shadow: var(--shadow), 0 0 0 rgba(99, 102, 241, 0); }
}

.plan-price-note.is-changing {
    opacity: 0;
    transform: translateY(-4px);
}
.plan-price-note.is-changed {
    opacity: 1;
    transform: translateY(0);
    transition: color 0.4s ease,
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

/* --- АДАПТИВ ДЛЯ ТАРИФОВ --- */
@media (max-width: 1200px) {
    .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .pricing-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 70px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
    .plan-card-featured { transform: none; }
    .plan-card-featured:hover { transform: translateY(-6px); }
    .compare-table { overflow-x: auto; }
    .compare-table table { min-width: 640px; }
}
@media (max-width: 600px) {
    .billing-toggle button {
        padding: 9px 12px;
        font-size: 0.8em;
    }
    .billing-toggle .save-badge { display: none; }
    .plan-price .amount { font-size: 2.2em; }
}

/* ============================================================
   WIRESPECTR — страница протокола
   ============================================================ */

/* Hero протокола */
.ws-hero {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 48px 56px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.ws-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.ws-hero-icon {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}
.ws-hero-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.ws-hero-body { flex: 1; min-width: 0; }
.ws-hero-body h1 {
    font-size: clamp(1.8em, 3.5vw, 2.6em);
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.ws-hero-body p {
    color: var(--text-secondary);
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 20px;
}
.ws-hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ws-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 0.78em;
    font-weight: 700;
    color: var(--accent-hover);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ws-badge.ok {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-teal);
}

/* Секции */
.ws-section {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.ws-section h2 {
    font-size: 1.8em;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.ws-section > p {
    color: var(--text-secondary);
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* Архитектурная схема (слои) */
.ws-layers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

@media (max-width: 900px) {
    .ws-layers {
        grid-template-columns: 1fr;
    }
}

.ws-layer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border-left: 3px solid;
    transition: all 0.3s;
}
.ws-layer:hover { transform: translateX(4px); }
.ws-layer-name {
    font-weight: 700;
    min-width: 130px;
    font-size: 0.9em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.ws-layer-desc {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
}
.ws-layer.l0 { border-left-color: #A855F7; background: rgba(168, 85, 247, 0.06); }
.ws-layer.l0 .ws-layer-name { color: #A855F7; }
.ws-layer.l1 { border-left-color: #6366F1; background: rgba(99, 102, 241, 0.06); }
.ws-layer.l1 .ws-layer-name { color: #6366F1; }
.ws-layer.l2 { border-left-color: #06B6D4; background: rgba(6, 182, 212, 0.06); }
.ws-layer.l2 .ws-layer-name { color: #06B6D4; }
.ws-layer.l3 { border-left-color: #10B981; background: rgba(16, 185, 129, 0.06); }
.ws-layer.l3 .ws-layer-name { color: #10B981; }

/* Сетка фич протокола */
.ws-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* На широких экранах — 4 колонки */
@media (min-width: 1400px) {
    .ws-features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ws-feature {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    transition: all 0.3s ease;
}
.ws-feature:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px var(--accent-soft);
}
.ws-feature-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.ws-feature-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.ws-feature-icon svg { width: 22px; height: 22px; stroke-width: 2; display: block; position: relative; z-index: 1; }
.ws-feature-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.ws-feature-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.3); }
.ws-feature-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.3); }
.ws-feature-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.ws-feature-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--c-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.ws-feature-icon.blue   { background: rgba(59, 130, 246, 0.15); color: var(--c-blue);   border: 1px solid rgba(59, 130, 246, 0.3); }
.ws-feature h3 {
    color: var(--text-primary);
    font-size: 1.05em;
    font-weight: 700;
    margin-bottom: 8px;
}
.ws-feature p {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.6;
}

/* Таблица версий */
.ws-versions {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.ws-versions th,
.ws-versions td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.ws-versions th {
    background: rgba(99, 102, 241, 0.06);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ws-versions td:first-child {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 700;
    color: var(--accent-hover);
}
.ws-versions tr:last-child td { border-bottom: none; }
.ws-versions tr:hover td { background: rgba(99, 102, 241, 0.03); }

/* Блок кода */
.ws-code {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85em;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: auto;
    margin-bottom: 20px;
}
.ws-code .cmt { color: var(--text-dim); }
.ws-code .key { color: var(--accent-hover); }
.ws-code .val { color: var(--c-cyan); }

/* CTA */
.ws-cta {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 60px 40px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.05));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ws-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.ws-cta h2 {
    font-size: 2em;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.ws-cta p {
    color: var(--text-secondary);
    font-size: 1.05em;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.ws-cta .btn { padding: 16px 36px; font-size: 1.05em; }

/* Адаптив */
@media (max-width: 900px) {
    .ws-hero { flex-direction: column; text-align: center; padding: 32px 24px; }
    .ws-hero-icon { width: 90px; height: 90px; }
    .ws-hero-meta { justify-content: center; }
    .ws-features { grid-template-columns: 1fr; }
    .ws-versions { font-size: 0.85em; }
    .ws-versions th, .ws-versions td { padding: 12px 14px; }
}
@media (max-width: 600px) {
    .ws-layer { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ws-layer-name { min-width: auto; }
}

.ws-hero-bg {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    z-index: 0;
}
.ws-hero-bg-1 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
    top: -100px; left: -100px;
}
.ws-hero-bg-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 70%);
    bottom: -150px; right: -150px;
}
.ws-hero > *:not(.ws-hero-bg) {
    position: relative;
    z-index: 1;
}

.ws-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(34, 211, 238, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   DOCS — страницы документации
   ============================================================ */

/* Сетка docs */
.docs-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero документации */
.docs-hero {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 20px 0;
}
.docs-hero h1 {
    font-size: clamp(2em, 4vw, 3em);
    font-weight: 800;
    margin-bottom: 14px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.docs-hero p {
    color: var(--text-secondary);
    font-size: 1.1em;
    line-height: 1.6;
}

/* Контент документации */
.docs-content {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1.02em;
}
.docs-content h2 {
    font-size: 1.6em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 48px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.docs-content h3 {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 12px;
}
.docs-content p {
    margin-bottom: 18px;
}
.docs-content a {
    color: var(--accent-hover);
    font-weight: 600;
}
.docs-content a:hover {
    color: var(--accent);
}
.docs-content ul,
.docs-content ol {
    margin: 0 0 20px 24px;
}
.docs-content ul li,
.docs-content ol li {
    margin-bottom: 10px;
    padding-left: 6px;
}
.docs-content ul li::marker {
    color: var(--accent);
}
.docs-content code {
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--accent-hover);
    border: 1px solid var(--border);
}
.docs-content pre {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--text-primary);
    overflow-x: auto;
    margin-bottom: 24px;
    line-height: 1.6;
}
.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 1em;
}

/* Информационные блоки */
.docs-info,
.docs-warn,
.docs-success {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    font-size: 0.95em;
    line-height: 1.6;
}
.docs-info {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--text-secondary);
}
.docs-info strong { color: var(--accent-hover); }
.docs-warn {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--text-secondary);
}
.docs-warn strong { color: var(--warning); }
.docs-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--text-secondary);
}
.docs-success strong { color: var(--accent-teal); }



/* Оглавление */
.docs-toc {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 40px;
    max-width: 100%;
    width: 100%;
}
.docs-toc-title {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: 14px;
}
.docs-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 32px;
}
.docs-toc li {
    margin-bottom: 8px;
    break-inside: avoid;
}
.docs-toc a {
    color: var(--text-secondary);
    font-size: 0.95em;
    transition: color 0.2s;
}
.docs-toc a:hover { color: var(--accent-hover); }

/* Навигация между страницами */
.docs-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.docs-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    color: var(--text-secondary);
}
.docs-nav a:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow), 0 0 30px var(--accent-soft);
}
.docs-nav a.next { text-align: right; }
.docs-nav-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-weight: 800;
}
.docs-nav-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05em;
}

@media (max-width: 900px) {
    .docs-toc ul { columns: 1; }
    .docs-nav { grid-template-columns: 1fr; }
    .docs-nav a.next { text-align: left; }
    .docs-content h2 { font-size: 1.4em; margin-top: 36px; }
}

/* ============================================================
   DOCS-STEPS — финальный фикс, единственный в файле
   ============================================================ */

.docs-steps {
    counter-reset: step;
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}
.docs-steps li {
    counter-increment: step;
    position: relative;
    padding: 24px 28px 24px 108px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    transition: all 0.3s;
    min-height: 88px;
    box-sizing: border-box;
    width: 100%;
}
.docs-steps li:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}
.docs-steps li::before {
    content: counter(step);
    position: absolute;
    left: 28px;
    top: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%);
    background-size: 200% auto;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.15em;
    line-height: 1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: gradShift 3s ease infinite;
    box-sizing: border-box;
}
.docs-steps li strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px 0;
}
.docs-steps li strong:last-child {
    margin-bottom: 0;
}
.docs-steps li p,
.docs-steps li span,
.docs-steps li a,
.docs-steps li code {
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 600px) {
    .docs-steps li {
        padding: 20px 20px 20px 88px;
    }
    .docs-steps li::before {
        left: 20px;
        top: 20px;
        width: 44px;
        height: 44px;
        font-size: 1em;
    }
}

/* ============================================================
   DOCS-FAQ — красивые вопросы-карточки
   ============================================================ */

/* Категории */
.docs-faq-category {
    margin-bottom: 50px;
}
.docs-faq-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    min-height: 60px;
}

.docs-faq-category-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    line-height: 0;
}
.docs-faq-category-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-faq-category-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-faq-category-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.docs-faq-category-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.3); }
.docs-faq-category-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.3); }
.docs-faq-category-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.docs-faq-category-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--c-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.docs-faq-category-icon.pink   { background: rgba(236, 72, 153, 0.15); color: var(--c-pink);   border: 1px solid rgba(236, 72, 153, 0.3); }
.docs-faq-category-title {
    font-size: 1.6em;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

/* Карточки вопросов */
.docs-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.docs-faq-item {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.docs-faq-item:hover {
    border-color: var(--border-hover);
}
.docs-faq-item.open {
    border-color: var(--accent);
    box-shadow: 0 4px 30px var(--accent-soft);
}
.docs-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.02em;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
    line-height: 1.4;
}
.docs-faq-question:hover {
    color: var(--accent-hover);
}
.docs-faq-item.open .docs-faq-question {
    color: var(--accent-hover);
}
.docs-faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-hover);
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}
.docs-faq-item.open .docs-faq-icon {
    transform: rotate(180deg);
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    animation: gradShift 3s ease infinite;
}
.docs-faq-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}
.docs-faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 24px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
}
.docs-faq-item.open .docs-faq-answer {
    max-height: 800px;
    opacity: 1;
    padding: 0 24px 24px;
}
.docs-faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px;
}
.docs-faq-answer p:last-child {
    margin-bottom: 0;
}
.docs-faq-answer ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}
.docs-faq-answer ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.docs-faq-answer ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.docs-faq-answer a {
    color: var(--accent-hover);
    font-weight: 600;
}

@media (max-width: 600px) {
    .docs-faq-category-title { font-size: 1.2em; }
    .docs-faq-question { padding: 16px 18px; font-size: 0.95em; }
    .docs-faq-answer { padding: 0 18px; }
    .docs-faq-item.open .docs-faq-answer { padding: 0 18px 18px; }
}

/* ============================================================
   DOCS-QUICKSTART — красивая страница быстрого старта
   ============================================================ */

/* Заголовок раздела с номером */
.docs-h2-numbered {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 56px 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.docs-h2-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%);
    background-size: 200% auto;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.25em;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.4);
    animation: gradShift 3s ease infinite;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px; /* оптическое центрирование цифры */
    box-sizing: border-box;
}
.docs-h2-text {
    font-size: 1.7em;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.1;
    display: flex;
    align-items: center;
    min-height: 48px;
}

/* Красивые карточки-ссылки внутри контента */
.docs-link-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}
.docs-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    color: var(--text-secondary);
    text-decoration: none;
}
.docs-link-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow), 0 0 30px var(--accent-soft);
}
.docs-link-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.docs-link-card-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-link-card-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    position: relative;
    z-index: 1;
    display: block;
}
.docs-link-card-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.docs-link-card-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.3); }
.docs-link-card-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.3); }
.docs-link-card-body {
    flex: 1;
    min-width: 0;
}
.docs-link-card-title {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.docs-link-card-desc {
    font-size: 0.85em;
    color: var(--text-dim);
}
.docs-link-card-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform 0.3s;
}
.docs-link-card:hover .docs-link-card-arrow {
    transform: translateX(4px);
    color: var(--accent-hover);
}

/* Красивая таблица «значения из кабинета» */
.docs-values {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 20px 0;
}
.docs-value-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s;
}
.docs-value-row:hover {
    border-color: var(--border-hover);
}
.docs-value-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-hover);
    flex-shrink: 0;
}
.docs-value-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    display: block;
}
.docs-value-info { flex: 1; min-width: 0; }
.docs-value-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: 4px;
}
.docs-value-text {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
    word-break: break-all;
}

/* Красивые ссылки «что дальше» */
.docs-next-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0 0;
}
.docs-next-card {
    display: block;
    padding: 18px 22px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    text-decoration: none;
}
.docs-next-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-soft);
}
.docs-next-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: 6px;
}
.docs-next-title {
    color: var(--accent-hover);
    font-size: 1em;
    font-weight: 700;
}
.docs-next-title::after {
    content: ' →';
    transition: transform 0.3s;
    display: inline-block;
}

/* Мобильная адаптация */
@media (max-width: 700px) {
    .docs-link-cards,
    .docs-next-grid {
        grid-template-columns: 1fr;
    }
    .docs-h2-text {
        font-size: 1.35em;
    }
    .docs-h2-number {
        width: 38px;
        height: 38px;
        font-size: 1em;
    }
}

/* ============================================================
   DOCS-CLIENTS — красивая страница клиентов
   ============================================================ */

/* Карточка платформы (Windows, macOS, Linux...) */
.docs-platform {
    margin-bottom: 40px;
    padding: 32px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.docs-platform::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--platform-color, var(--gradient-primary));
    opacity: 0.7;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.docs-platform:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow), 0 0 60px var(--accent-soft);
}

.docs-platform.windows  { --platform-color: linear-gradient(90deg, #00A4EF, #0078D4); }
.docs-platform.macos    { --platform-color: linear-gradient(90deg, #A8A8B3, #E5E7EB); }
.docs-platform.linux    { --platform-color: linear-gradient(90deg, #F59E0B, #FBBF24); }
.docs-platform.android  { --platform-color: linear-gradient(90deg, #3DDC84, #10B981); }
.docs-platform.ios      { --platform-color: linear-gradient(90deg, #007AFF, #5AC8FA); }

/* Заголовок платформы */
.docs-platform-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.docs-platform-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.docs-platform-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-platform-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-platform.windows .docs-platform-icon { background: rgba(0, 164, 239, 0.12); color: #00A4EF; border-color: rgba(0, 164, 239, 0.3); }
.docs-platform.macos .docs-platform-icon   { background: rgba(200, 200, 210, 0.10); color: #D4D4D8; border-color: rgba(200, 200, 210, 0.3); }
.docs-platform.linux .docs-platform-icon   { background: rgba(245, 158, 11, 0.12); color: var(--c-yellow); border-color: rgba(245, 158, 11, 0.3); }
.docs-platform.android .docs-platform-icon { background: rgba(61, 220, 132, 0.12); color: #3DDC84; border-color: rgba(61, 220, 132, 0.3); }
.docs-platform.ios .docs-platform-icon     { background: rgba(0, 122, 255, 0.12); color: #007AFF; border-color: rgba(0, 122, 255, 0.3); }

.docs-platform-title {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.docs-platform-desc {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* Подзаголовок «Вариант 1 / Вариант 2» */
.docs-subhead {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 16px;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-primary);
}
.docs-subhead::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    border-radius: 2px;
    animation: gradShift 3s ease infinite;
}

/* Мобильная адаптация */
@media (max-width: 700px) {
    .docs-platform {
        padding: 24px 20px;
    }
    .docs-platform-title {
        font-size: 1.25em;
    }
    .docs-platform-icon {
        width: 48px;
        height: 48px;
    }
    .docs-platform-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ============================================================
   DOCS-BROWSERS — красивая страница браузеров
   ============================================================ */

/* Карточка браузера */
.docs-browser {
    margin-bottom: 32px;
    padding: 32px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.docs-browser::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--browser-color, var(--gradient-primary));
    opacity: 0.75;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.docs-browser:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow), 0 0 60px var(--accent-soft);
}

.docs-browser.chrome  .docs-browser-icon { background: rgba(66, 133, 244, 0.10); border-color: rgba(66, 133, 244, 0.25); }
.docs-browser.firefox .docs-browser-icon { background: rgba(255, 113, 57, 0.10); border-color: rgba(255, 113, 57, 0.25); }
.docs-browser.edge    .docs-browser-icon { background: rgba(0, 120, 212, 0.10); border-color: rgba(0, 120, 212, 0.25); }
.docs-browser.opera   .docs-browser-icon { background: rgba(255, 27, 45, 0.10); border-color: rgba(255, 27, 45, 0.25); }
.docs-browser.safari  .docs-browser-icon { background: rgba(0, 108, 255, 0.10); border-color: rgba(0, 108, 255, 0.25); }

/* Заголовок браузера */
.docs-browser-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.docs-browser-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.docs-browser-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-browser-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-browser.chrome  .docs-browser-icon { background: rgba(66, 133, 244, 0.12); border-color: rgba(66, 133, 244, 0.3); }
.docs-browser.firefox .docs-browser-icon { background: rgba(255, 113, 57, 0.12); border-color: rgba(255, 113, 57, 0.3); }
.docs-browser.edge    .docs-browser-icon { background: rgba(0, 120, 212, 0.12); border-color: rgba(0, 120, 212, 0.3); }
.docs-browser.opera   .docs-browser-icon { background: rgba(255, 27, 45, 0.12); border-color: rgba(255, 27, 45, 0.3); }
.docs-browser.safari  .docs-browser-icon { background: rgba(0, 108, 255, 0.12); border-color: rgba(0, 108, 255, 0.3); }

.docs-browser-title {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.docs-browser-desc {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* Блок «Проверка» — отдельная карточка success */
.docs-check-card {
    margin-top: 40px;
    padding: 36px 32px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.docs-check-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10B981, #34D399, #10B981);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.docs-check-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}
.docs-check-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-teal);
    border: 1px solid rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}
.docs-check-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-check-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-check-title {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.docs-check-desc {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin: 6px 0 0;
}

/* Мобильная адаптация */
@media (max-width: 700px) {
    .docs-browser {
        padding: 24px 20px;
    }
    .docs-browser-title {
        font-size: 1.25em;
    }
    .docs-browser-icon {
        width: 48px;
        height: 48px;
    }
    .docs-browser-icon svg {
        width: 26px;
        height: 26px;
    }
    .docs-check-card {
        padding: 28px 20px;
    }
    .docs-check-title {
        font-size: 1.25em;
    }
}

/* ============================================================
   DOCS-SELF-HOST — красивая страница self-host
   ============================================================ */

/* Карточка «Зачем свой сервер» */
.docs-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}
.docs-benefit {
    display: flex;
    gap: 16px;
    padding: 20px 22px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}
.docs-benefit:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-soft);
}
.docs-benefit-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}
.docs-benefit-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-benefit-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-benefit-icon.green  { background: rgba(16, 185, 129, 0.12); color: var(--c-green);  border-color: rgba(16, 185, 129, 0.3); }
.docs-benefit-icon.cyan   { background: rgba(6, 182, 212, 0.12);  color: var(--c-cyan);   border-color: rgba(6, 182, 212, 0.3); }
.docs-benefit-icon.purple { background: rgba(168, 85, 247, 0.12); color: var(--c-purple); border-color: rgba(168, 85, 247, 0.3); }
.docs-benefit-body { flex: 1; min-width: 0; }
.docs-benefit-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.docs-benefit-desc {
    font-size: 0.88em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Карточка «Требования» */
.docs-requirements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
    padding: 24px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.docs-requirement {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    border: 1px solid var(--border);
}
.docs-requirement-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-hover);
    flex-shrink: 0;
}
.docs-requirement-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    display: block;
}
.docs-requirement-body { flex: 1; min-width: 0; }
.docs-requirement-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: 4px;
}
.docs-requirement-value {
    font-size: 0.9em;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}
.docs-requirement-value code {
    font-size: 0.85em;
}

/* Стек — карточки компонентов */
.docs-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
}
.docs-stack-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s, transform 0.3s;
}
.docs-stack-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}
.docs-stack-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.docs-stack-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    display: block;
}
.docs-stack-body { flex: 1; min-width: 0; }
.docs-stack-title {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.docs-stack-desc {
    font-size: 0.82em;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Статус — карточки готовности */
.docs-status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
}
.docs-status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s;
}
.docs-status-item:hover {
    border-color: var(--border-hover);
}
.docs-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 1.1em;
    line-height: 1;
}
.docs-status-badge.done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--c-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.docs-status-badge.progress {
    background: rgba(245, 158, 11, 0.15);
    color: var(--c-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.docs-status-badge.todo {
    background: rgba(156, 163, 175, 0.12);
    color: var(--text-dim);
    border: 1px solid rgba(156, 163, 175, 0.25);
}
.docs-status-body { flex: 1; min-width: 0; }
.docs-status-name {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.docs-status-desc {
    font-size: 0.82em;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Архитектурная схема */
.docs-arch {
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: auto;
    margin: 20px 0;
}
.docs-arch-line {
    display: flex;
    gap: 12px;
}
.docs-arch-label {
    color: var(--text-dim);
    min-width: 80px;
}
.docs-arch-value {
    color: var(--accent-hover);
}

/* Мобильная адаптация */
@media (max-width: 700px) {
    .docs-benefits,
    .docs-requirements,
    .docs-stack {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   DOCS-PROTOCOL — красивая страница протокола
   ============================================================ */

/* Стек протокола — вертикальные слои */
.docs-layers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.docs-layer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border-left: 3px solid;
    transition: transform 0.3s;
}
.docs-layer:hover {
    transform: translateX(4px);
}
.docs-layer-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.docs-layer-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-layer-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-layer-body { flex: 1; min-width: 0; }
.docs-layer-name {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    margin-bottom: 4px;
}
.docs-layer-desc {
    font-size: 0.95em;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}
.docs-layer.l0 { border-left-color: #A855F7; background: rgba(168, 85, 247, 0.06); }
.docs-layer.l0 .docs-layer-name { color: #A855F7; }
.docs-layer.l0 .docs-layer-icon { background: rgba(168, 85, 247, 0.15); color: #A855F7; border: 1px solid rgba(168, 85, 247, 0.3); }
.docs-layer.l1 { border-left-color: #6366F1; background: rgba(99, 102, 241, 0.06); }
.docs-layer.l1 .docs-layer-name { color: #6366F1; }
.docs-layer.l1 .docs-layer-icon { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.docs-layer.l2 { border-left-color: #06B6D4; background: rgba(6, 182, 212, 0.06); }
.docs-layer.l2 .docs-layer-name { color: #06B6D4; }
.docs-layer.l2 .docs-layer-icon { background: rgba(6, 182, 212, 0.15); color: var(--c-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.docs-layer.l3 { border-left-color: #10B981; background: rgba(16, 185, 129, 0.06); }
.docs-layer.l3 .docs-layer-name { color: #10B981; }
.docs-layer.l3 .docs-layer-icon { background: rgba(16, 185, 129, 0.15); color: var(--c-green); border: 1px solid rgba(16, 185, 129, 0.3); }

/* Flow-схема (Клиент → DoH → iBase → VPN → Интернет) */
.docs-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 32px 24px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 28px 0;
    position: relative;
    overflow: hidden;
}
.docs-flow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.docs-flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 0 90px;              /* фиксированная ширина — все узлы одинаковые */
    width: 90px;
    transition: transform 0.3s;
}
.docs-flow-node:hover { transform: translateY(-4px); }

.docs-flow-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.docs-flow-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
    display: block;
}
.docs-flow-icon.client    { background: rgba(59, 130, 246, 0.15); color: var(--c-blue);   border: 1px solid rgba(59, 130, 246, 0.4); }
.docs-flow-icon.doh       { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.4); }
.docs-flow-icon.iBase { background: rgba(99, 102, 241, 0.2);  color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.5); box-shadow: 0 0 24px var(--accent-glow); }
.docs-flow-icon.vpn       { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.4); }
.docs-flow-icon.internet  { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.4); }

.docs-flow-label {
    font-size: 0.78em;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.docs-flow-arrow {
    flex: 1 1 auto;              /* стрелка тянется на свободное место */
    min-width: 40px;
    max-width: 80px;             /* но не больше — чтобы не была «длинной» */
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: var(--accent);
}
.docs-flow-arrow svg {
    width: 100%;
    height: 20px;
    display: block;
}

/* Мобильный */
@media (max-width: 700px) {
    .docs-flow { flex-direction: column; gap: 12px; padding: 24px 16px; }
    .docs-flow-node { flex: none; width: auto; }
    .docs-flow-arrow { transform: rotate(90deg); flex: none; width: 50px; height: 30px; min-width: auto; max-width: none; }
}

/* Таблица сравнения — обновлённая */
.docs-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 24px 0;
}
.docs-compare th,
.docs-compare td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.docs-compare th {
    background: rgba(99, 102, 241, 0.06);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.docs-compare td:first-child {
    color: var(--text-muted);
    font-weight: 600;
    width: 30%;
}
.docs-compare th.hl,
.docs-compare td.hl {
    color: var(--accent-hover);
    background: rgba(99, 102, 241, 0.05);
    font-weight: 600;
}
.docs-compare tr:last-child td { border-bottom: none; }
.docs-compare tr:hover td { background: rgba(99, 102, 241, 0.03); }
.docs-compare tr:hover td.hl { background: rgba(99, 102, 241, 0.08); }
.docs-compare td svg { vertical-align: middle; }

/* Блок «Безопасность» — плитки */
.docs-security-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}
.docs-security-item {
    display: flex;
    gap: 16px;
    padding: 20px 22px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}
.docs-security-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-soft);
}
.docs-security-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.12);
    color: var(--c-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}
.docs-security-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.docs-security-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.docs-security-icon.indigo { background: rgba(99, 102, 241, 0.12); color: var(--accent-hover); border-color: rgba(99, 102, 241, 0.3); }
.docs-security-icon.cyan   { background: rgba(6, 182, 212, 0.12);  color: var(--c-cyan);   border-color: rgba(6, 182, 212, 0.3); }
.docs-security-icon.purple { background: rgba(168, 85, 247, 0.12); color: var(--c-purple); border-color: rgba(168, 85, 247, 0.3); }
.docs-security-body { flex: 1; min-width: 0; }
.docs-security-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.docs-security-desc {
    font-size: 0.88em;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Мобильная адаптация */
@media (max-width: 700px) {
    .docs-flow { flex-direction: column; gap: 16px; padding: 24px 16px; }
    .docs-flow-arrow { transform: rotate(90deg); min-width: auto; width: 50px; height: 30px; }
    .docs-security-grid { grid-template-columns: 1fr; }
    .docs-compare { font-size: 0.82em; }
    .docs-compare th, .docs-compare td { padding: 10px 12px; }
    .docs-layer { padding: 14px 16px; }
}

/* ============================================================
   МОБИЛЬНАЯ ОПТИМИЗАЦИЯ — отключаем тяжёлое
   ============================================================ */

@media (max-width: 768px) {
    /* Aurora — blur(120px) — самое тяжёлое */
    .aurora,
    .nebula,
    .spotlight,
    .bg-grid { 
        display: none !important; 
    }

    /* Canvas — тоже скрываем, чтобы JS не рисовал */
    #starCanvas,
    #particleCanvas {
        display: none !important;
    }

    /* Оставляем только простой тёмный фон */
    body {
        background: var(--bg-base) !important;
    }
}

/* ============================================================
   SCROLL REVEAL — плавное появление элементов при скролле
   ============================================================ */

/* Элементы, которые будут появляться */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Варианты */
[data-reveal="fade"]       { transform: none; }
[data-reveal="fade-up"]    { transform: translateY(30px); }
[data-reveal="fade-down"]  { transform: translateY(-30px); }
[data-reveal="fade-left"]  { transform: translateX(-30px); }
[data-reveal="fade-right"] { transform: translateX(30px); }
[data-reveal="zoom"]       { transform: scale(0.94); }

[data-reveal].is-visible {
    transform: translateY(0) translateX(0) scale(1);
}

/* Каскадное появление — если у родителя data-reveal-stagger */
[data-reveal-stagger] > [data-reveal]:nth-child(1) { transition-delay: 0s; }
[data-reveal-stagger] > [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
[data-reveal-stagger] > [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
[data-reveal-stagger] > [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
[data-reveal-stagger] > [data-reveal]:nth-child(5) { transition-delay: 0.32s; }
[data-reveal-stagger] > [data-reveal]:nth-child(6) { transition-delay: 0.40s; }
[data-reveal-stagger] > [data-reveal]:nth-child(7) { transition-delay: 0.48s; }
[data-reveal-stagger] > [data-reveal]:nth-child(8) { transition-delay: 0.56s; }

/* Уважаем reduce-motion */
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
/* ============================================================
   DOCS-STEPS — финальная версия (flex, без grid)
   ============================================================ */

.docs-steps {
    counter-reset: step;
    list-style: none !important;
    margin: 0 0 32px !important;
    padding: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

.docs-steps li {
    counter-increment: step;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 20px 22px !important;
    margin: 0 0 12px 0 !important;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-height: 84px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
}

.docs-steps li:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.docs-steps li::before {
    content: counter(step);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    flex: 0 0 56px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%);
    background-size: 200% auto;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.15em;
    line-height: 1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: gradShift 3s ease infinite;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    float: none !important;
}

/* Обёртка текста — если её нет, работает напрямую */
.docs-steps li > * {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    float: none !important;
    overflow-wrap: break-word;
    word-break: break-word;
}

.docs-steps li strong {
    display: block !important;
    color: var(--text-primary);
    font-size: 1.02em;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
}

.docs-steps li strong:last-child {
    margin-bottom: 0 !important;
}

.docs-steps li p,
.docs-steps li span,
.docs-steps li a,
.docs-steps li code {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.docs-steps li code {
    display: inline-block;
    max-width: 100%;
    padding: 2px 8px !important;
    background: var(--bg-elevated);
    border-radius: 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85em;
    color: var(--accent-hover);
    border: 1px solid var(--border);
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Мобильный */
@media (max-width: 600px) {
    .docs-steps li {
        gap: 12px !important;
        padding: 16px 16px !important;
        min-height: 72px;
    }
    .docs-steps li::before {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        flex: 0 0 44px !important;
        font-size: 1em;
    }
    .docs-steps li strong { font-size: 0.95em; }
    .docs-steps li p,
    .docs-steps li span,
    .docs-steps li a,
    .docs-steps li code { font-size: 0.9em; }
}

/* ============================================================
   МОБИЛЬНЫЕ ФИКСЫ — zoom + overscroll + iOS scroll
   ============================================================ */

/* 1. Убираем авто-zoom на input */
@media (max-width: 768px) {
    input,
    textarea,
    select,
    .form-group input,
    .field input,
    .inline-form input,
    .value-row input,
    .settings-page .field input,
    .stormwall-page input,
    .stormwall-page select,
    .input-with-icon input {
        font-size: 16px !important;
    }
}

/* 2. Убираем «отскок» страницы */
html, body {
    overscroll-behavior-y: none;
}

/* 3. iOS: плавный скролл внутри блоков */
.docs-compare,
.compare-table,
.hiw-compare,
.docs-content pre,
.modal,
.dropdown-menu {
    -webkit-overflow-scrolling: touch;
}

/* 4. Плавный скролл для якорей (уже должно быть) */
html {
    scroll-behavior: smooth;
}

/* ============================================================
   ФИНАЛЬНЫЙ ФИКС ДЛЯ PRICING — сетка, карточки, слайдер
   ============================================================ */

/* Сетка тарифов — 4 колонки */
.pricing-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin: 0 auto 70px !important;
    max-width: 1400px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

@media (max-width: 1200px) {
    .pricing-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 900px) {
    .pricing-grid-4 {
        grid-template-columns: 1fr !important;
        max-width: 480px !important;
    }
}

/* Карточка тарифа */
.plan-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 32px 26px !important;
    background: var(--glass) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    background-image: var(--grad-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.plan-card-featured {
    border-color: var(--accent) !important;
    box-shadow: 0 0 40px var(--accent-soft) !important;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-surface) 100%) !important;
}

/* Обёртка переключателя */
.billing-toggle-wrap {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 40px !important;
    width: 100% !important;
}

/* Сам переключатель */
.billing-toggle {
    position: relative !important;
    display: inline-flex !important;
    gap: 4px !important;
    padding: 5px !important;
    background: var(--glass) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--border) !important;
    border-radius: 100px !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    isolation: isolate !important;
    max-width: 100% !important;
}

/* Скользящий пилюль */
.billing-toggle-slider {
    position: absolute !important;
    top: 5px !important;
    left: 0 !important;
    height: calc(100% - 10px) !important;
    width: 0;
    background: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%) !important;
    background-size: 200% auto !important;
    border-radius: 100px !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5) !important;
    animation: gradShift 3s ease infinite !important;
    transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
                width 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
    z-index: 0 !important;
    pointer-events: none !important;
    will-change: transform, width !important;
}

.billing-toggle button {
    position: relative !important;
    padding: 10px 18px !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-family: inherit !important;
    font-size: 0.88em !important;
    font-weight: 700 !important;
    border-radius: 100px !important;
    cursor: pointer !important;
    transition: color 0.35s ease, transform 0.35s ease !important;
    z-index: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

.billing-toggle button.active {
    color: #FFFFFF !important;
    transform: scale(1.03) !important;
}

.billing-toggle .save-badge {
    display: inline-block !important;
    padding: 2px 7px !important;
    font-size: 0.72em !important;
    font-weight: 800 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--accent-teal) !important;
    border-radius: 100px !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    line-height: 1 !important;
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}

.billing-toggle button.active .save-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

@media (max-width: 600px) {
    .billing-toggle button {
        padding: 9px 12px !important;
        font-size: 0.8em !important;
    }
    .billing-toggle .save-badge { display: none !important; }
}

/* ============================================================
   PRICING — «Что входит во все тарифы»
   ============================================================ */

.pricing-common {
    max-width: 1100px;
    margin: 0 auto 50px;
    padding: 32px 36px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.pricing-common::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}

.pricing-common-header {
    text-align: center;
    margin-bottom: 28px;
}
.pricing-common-title {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}
.pricing-common-subtitle {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.pricing-common-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pricing-common-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-elevated);
    background-image: var(--grad-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}
.pricing-common-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-soft);
}

.pricing-common-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.pricing-common-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.pricing-common-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}
.pricing-common-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--c-green);  border: 1px solid rgba(16, 185, 129, 0.3); }
.pricing-common-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-hover); border: 1px solid rgba(99, 102, 241, 0.3); }
.pricing-common-icon.cyan   { background: rgba(6, 182, 212, 0.15);  color: var(--c-cyan);   border: 1px solid rgba(6, 182, 212, 0.3); }
.pricing-common-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--c-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.pricing-common-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--c-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.pricing-common-icon.blue   { background: rgba(59, 130, 246, 0.15); color: var(--c-blue);   border: 1px solid rgba(59, 130, 246, 0.3); }

.pricing-common-text {
    flex: 1;
    min-width: 0;
}
.pricing-common-name {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.pricing-common-desc {
    font-size: 0.82em;
    color: var(--text-dim);
    line-height: 1.4;
}

/* ============================================================
   PRICING — Партнёры / Платёжные системы
   ============================================================ */

.pricing-partners {
    max-width: 1100px;
    margin: 0 auto 70px;
    padding: 40px 32px;
    text-align: center;
}

.pricing-partners-title {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: 24px;
}

.pricing-partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.pricing-partner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.3s;
    min-width: 120px;
}
.pricing-partner:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-soft);
}

.pricing-partner svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
}

/* Мобильный */
@media (max-width: 900px) {
    .pricing-common-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .pricing-common { padding: 24px 20px; }
    .pricing-common-grid { grid-template-columns: 1fr; }
    .pricing-common-title { font-size: 1.2em; }
    .pricing-partners { padding: 28px 20px; }
    .pricing-partners-logos { gap: 12px; }
    .pricing-partner { padding: 10px 14px; font-size: 0.82em; min-width: 100px; }
}

/* ============================================================
   LEGAL — юридические страницы (обновлённые)
   ============================================================ */

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 80px;
}

/* --- HERO с иконкой --- */
.legal-hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.legal-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    background-size: 200% auto;
    box-shadow: 0 0 32px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25);
    margin-bottom: 20px;
    animation: gradShift 3s ease infinite;
    position: relative;
    overflow: hidden;
}
.legal-hero-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.legal-hero-icon svg {
    width: 36px;
    height: 36px;
    stroke: #FFFFFF;
    fill: none;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}

.legal-hero h1 {
    font-size: clamp(2em, 4vw, 2.8em);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s ease infinite;
}

.legal-hero p {
    color: var(--text-secondary);
    font-size: 1.05em;
    max-width: 640px;
    margin: 0 auto;
}

/* --- Мета (дата обновления) --- */
.legal-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.82em;
    color: var(--text-dim);
    margin: 0 auto 40px;
}
.legal-meta-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}
.legal-meta strong {
    color: var(--text-secondary);
    font-weight: 700;
}
.legal-meta svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent);
    flex-shrink: 0;
}

/* --- Оглавление --- */
.legal-toc {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}
.legal-toc::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 4s ease infinite;
}
.legal-toc-title {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    font-weight: 800;
    margin-bottom: 16px;
}
.legal-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: legal-toc;
    columns: 2;
    column-gap: 32px;
}
.legal-toc li {
    counter-increment: legal-toc;
    margin-bottom: 10px;
    break-inside: avoid;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.legal-toc li::before {
    content: counter(legal-toc, decimal-leading-zero);
    color: var(--accent-hover);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
    padding-top: 2px;
}
.legal-toc a {
    color: var(--text-secondary);
    font-size: 0.95em;
    transition: color 0.2s;
    line-height: 1.5;
}
.legal-toc a:hover {
    color: var(--accent-hover);
}

/* --- Контент --- */
.legal-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.02em;
}

.legal-content h2 {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 56px 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
    scroll-margin-top: 100px;
}
.legal-content h2:first-of-type {
    margin-top: 0;
}
.legal-content h2 .h2-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 0.65em;
    font-weight: 800;
    flex-shrink: 0;
    font-family: 'SF Mono', 'Consolas', monospace;
    border: 1px solid rgba(99, 102, 241, 0.3);
    line-height: 1;
}

.legal-content h3 {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.legal-content h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    border-radius: 2px;
    flex-shrink: 0;
    animation: gradShift 3s ease infinite;
}

.legal-content p {
    margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.legal-content ul li,
.legal-content ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.7;
}
.legal-content ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}
.legal-content ol {
    counter-reset: legal-list;
}
.legal-content ol li {
    counter-increment: legal-list;
}
.legal-content ol li::before {
    content: counter(legal-list) '.';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-hover);
    font-weight: 700;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9em;
}

.legal-content a {
    color: var(--accent-hover);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, 0.4);
    text-underline-offset: 3px;
    transition: all 0.2s;
}
.legal-content a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.legal-content code {
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--accent-hover);
    border: 1px solid var(--border);
}

/* --- Инфо-блоки --- */
.legal-info,
.legal-warn,
.legal-success {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    font-size: 0.95em;
    line-height: 1.65;
    position: relative;
    overflow: hidden;
}
.legal-info::before,
.legal-warn::before,
.legal-success::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
}
.legal-info {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.22);
}
.legal-info::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.legal-info strong { color: var(--accent-hover); }

.legal-warn {
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.22);
}
.legal-warn::before { background: var(--warning); box-shadow: 0 0 12px var(--warning); }
.legal-warn strong { color: var(--warning); }

.legal-success {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.22);
}
.legal-success::before { background: var(--accent-teal); box-shadow: 0 0 12px var(--accent-teal); }
.legal-success strong { color: var(--accent-teal); }

/* --- Блок 152-ФЗ --- */
.legal-152 {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(6, 182, 212, 0.04));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}
.legal-152::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}
.legal-152-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.legal-152-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.legal-152-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    display: block;
}
.legal-152 h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.15em;
    display: block;
}
.legal-152 h3::before { display: none; }
.legal-152 ul {
    margin-bottom: 0;
}
.legal-152 ul li::before {
    background: var(--accent-teal);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* --- Финальный блок контактов --- */
.legal-contact {
    margin-top: 60px;
    padding: 44px 36px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.legal-contact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% auto;
    animation: gradShift 3s ease infinite;
}

.legal-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #FFFFFF;
    box-shadow: 0 0 32px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25);
    margin-bottom: 24px;
    animation: gradShift 3s ease infinite;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.legal-contact-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}
.legal-contact-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 2;
    display: block;
    position: relative;
    z-index: 1;
}

/* Заголовок — форсим центрирование, убираем flex-наследственность */
.legal-contact h3,
.legal-contact .legal-contact-title {
    display: block !important;
    width: 100%;
    text-align: center;
    color: var(--text-primary);
    font-size: 1.4em;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}
.legal-contact h3::before,
.legal-contact .legal-contact-title::before {
    display: none !important;
}

/* Подзаголовок */
.legal-contact p,
.legal-contact .legal-contact-desc {
    display: block !important;
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.98em;
    line-height: 1.6;
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    max-width: 480px;
}

/* Кнопка email */
.legal-contact a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--accent-hover);
    font-weight: 700;
    font-size: 1.05em;
    padding: 14px 28px;
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    z-index: 0;
}

/* Градиент-подложка при hover */
.legal-contact a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.3s;
    animation: gradShift 3s ease infinite;
    z-index: -1;   /* ← ВАЖНО: под текстом */
}

.legal-contact a:hover {
    color: #FFFFFF;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.legal-contact a:hover::before {
    opacity: 1;
}

/* Текст и иконка — поверх градиента */
.legal-contact a span,
.legal-contact a svg,
.legal-contact a > * {
    position: relative;
    z-index: 2;
}

.legal-contact a svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .legal-contact { padding: 32px 22px; }
    .legal-contact-icon { width: 60px; height: 60px; margin-bottom: 20px; }
    .legal-contact-icon svg { width: 26px; height: 26px; }
    .legal-contact h3 { font-size: 1.2em; }
    .legal-contact p { font-size: 0.92em; margin-bottom: 22px !important; }
    .legal-contact a { font-size: 0.92em; padding: 12px 20px; word-break: break-all; }
}

/* --- Кнопка «Наверх» --- */
.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    color: var(--text-dim);
    font-size: 0.9em;
    font-weight: 600;
    transition: color 0.2s;
}
.legal-back:hover {
    color: var(--accent-hover);
}
.legal-back svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* --- Мобильный --- */
@media (max-width: 700px) {
    .legal-page { padding: 10px 0 60px; }
    .legal-hero { margin-bottom: 30px; }
    .legal-hero-icon { width: 60px; height: 60px; }
    .legal-hero-icon svg { width: 30px; height: 30px; }
    .legal-hero h1 { font-size: 1.75em; }
    .legal-hero p { font-size: 0.95em; }
    .legal-toc { padding: 20px 22px; }
    .legal-toc ol { columns: 1; }
    .legal-content h2 { font-size: 1.25em; margin: 40px 0 16px; padding-bottom: 12px; }
    .legal-content h2 .h2-num { width: 32px; height: 32px; font-size: 0.6em; }
    .legal-content h3 { font-size: 1.05em; }
    .legal-info, .legal-warn, .legal-success { padding: 16px 18px; font-size: 0.9em; }
    .legal-152 { padding: 24px 22px; }
    .legal-contact { padding: 24px 20px; }
}

/* ============================================================
   SMALL CAPS — типографика заголовков и меток
   ============================================================ */

/* Заголовки разделов в legal — small caps */
.legal-content h2,
.legal-content h2 .h2-num,
.legal-hero h1,
.legal-contact h3,
.legal-152 h3 {
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    letter-spacing: 0.02em;
}

/* Метки в мета-блоке */
.legal-meta,
.legal-toc-title,
.legal-toc li::before {
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    letter-spacing: 0.08em;
}

/* Подзаголовки h3 в legal — small caps с полоской */
.legal-content h3 {
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    letter-spacing: 0.03em;
}

/* Заголовки в остальных местах — по желанию */
.section-title,
.docs-hero h1,
.docs-h2-text,
.docs-faq-category-title,
.docs-platform-title,
.docs-browser-title,
.docs-check-title,
.ws-hero-body h1,
.ws-section h2,
.ws-cta h2,
.pricing-hero h1,
.plan-name,
.pricing-common-title,
.pricing-partners-title {
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    letter-spacing: 0.02em;
}

/* Кнопки — оставить как есть, чтобы не ломать читаемость */
.btn, .btn-secondary, .btn-danger, .btn-copy {
    font-variant-caps: normal;
    font-feature-settings: normal;
}

/* Навигация — small caps для веса */
.site-nav a,
.dropdown-menu a,
.docs-nav-title {
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    letter-spacing: 0.04em;
}

/* Метрики и подписи */
.metric-label,
.info-row-label,
.device-card-label,
.current-wifi-label,
.connections-list-title,
.plan-features li,
.legal-content strong {
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    letter-spacing: 0.05em;
}

/* ============================================================
   FORM CHECKBOX — согласие на обработку ПДн (фикс)
   ============================================================ */

.form-checkbox {
    margin: 20px 0;
}

.checkbox-label {
    display: grid !important;
    grid-template-columns: 22px 1fr !important;
    align-items: start !important;
    gap: 12px !important;
    cursor: pointer;
    font-size: 0.88em;
    line-height: 1.55;
    color: var(--text-secondary);
    user-select: none;
    padding: 14px 16px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-image: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}
.checkbox-label:hover {
    border-color: var(--border-hover);
    background: var(--accent-soft);
}
.checkbox-label:has(input:checked) {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
}

/* Кастомный чекбокс */
.checkbox-label input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 7px;
    border: 2px solid var(--border-hover);
    background: var(--bg-base);
    cursor: pointer;
    position: relative;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    box-sizing: border-box;
    display: block !important;
}
.checkbox-label input[type="checkbox"]:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.checkbox-label input[type="checkbox"]:checked {
    background: var(--gradient-primary);
    background-size: 200% auto;
    border-color: transparent;
    box-shadow: 0 0 16px var(--accent-glow);
    animation: gradShift 3s ease infinite;
}
.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 9px;
    border: solid #FFFFFF;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -55%) rotate(45deg);
    display: block;
}
.checkbox-label input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Текст согласия */
.checkbox-label > span {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-secondary);
    line-height: 1.6;
    display: block !important;
    min-width: 0 !important;
}

.checkbox-label a {
    color: var(--accent-hover);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, 0.4);
    text-underline-offset: 2px;
    transition: all 0.2s;
}
.checkbox-label a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* Мобильный */
@media (max-width: 600px) {
    .checkbox-label {
        font-size: 0.82em;
        padding: 12px 14px;
        gap: 10px !important;
        grid-template-columns: 20px 1fr !important;
    }
    .checkbox-label input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
    }
    .checkbox-label input[type="checkbox"]:checked::after {
        left: 6px;
        top: 1px;
        width: 5px;
        height: 10px;
    }
}