/* ============================================
   DevFolio 1.1 — Webasyst Theme
   Dark + Light, indigo-accented
   ============================================ */

/* ===== БАЗОВЫЕ ТОКЕНЫ (общие для тем) ===== */
:root {
    --accent: #6366f1;
    --accent-glow: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --accent-strong: rgba(99, 102, 241, 0.35);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-full: 9999px;

    --header-h: 72px;

    --container: 1200px;
    --container-narrow: 760px;

    --t-fast: 0.15s;
    --t-base: 0.25s;
    --t-slow: 0.5s;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== ТЁМНАЯ ТЕМА (по умолчанию) ===== */
:root,
[data-theme="dark"] {
    --bg: #0a0b14;
    --bg-soft: #0f1020;
    --surface: #131524;
    --surface-elevated: #181a2c;
    --surface-hover: #1d1f33;
    --border: rgba(99, 102, 241, 0.12);
    --border-strong: rgba(99, 102, 241, 0.28);

    --text: #e8e9f3;
    --text-muted: #a4a8c0;
    --text-dim: #6b6f88;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);

    --grid-color: rgba(99, 102, 241, 0.04);
    --aurora-opacity: 0.4;
    --header-bg: rgba(10, 11, 20, 0.7);
    --header-bg-scrolled: rgba(10, 11, 20, 0.92);
    --mobile-menu-bg: rgba(10, 11, 20, 0.98);
}

/* ===== СВЕТЛАЯ ТЕМА ===== */
[data-theme="light"] {
    --bg: #fafafe;
    --bg-soft: #f4f5fb;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --surface-hover: #f4f5fb;
    --border: rgba(99, 102, 241, 0.14);
    --border-strong: rgba(99, 102, 241, 0.30);

    --text: #1a1c2e;
    --text-muted: #5a5d77;
    --text-dim: #8e92ad;

    --shadow-sm: 0 1px 2px rgba(20, 25, 50, 0.05);
    --shadow-md: 0 4px 16px rgba(20, 25, 50, 0.08);
    --shadow-lg: 0 16px 48px rgba(20, 25, 50, 0.10);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.20);

    --grid-color: rgba(99, 102, 241, 0.07);
    --aurora-opacity: 0.18;
    --header-bg: rgba(250, 250, 254, 0.7);
    --header-bg-scrolled: rgba(250, 250, 254, 0.92);
    --mobile-menu-bg: rgba(250, 250, 254, 0.98);
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

.site-main { flex: 1; }

/* Декоративная сетка на фоне */
body.grid-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: -1px -1px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Световые ауры на фоне */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: var(--aurora-opacity);
}

.aurora-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation: float 20s ease-in-out infinite;
}

.aurora-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: float 24s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.1); }
}

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

.site-header, .site-main, .site-footer, .mobile-menu, .skip-link {
    position: relative;
    z-index: 1;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-glow));
    z-index: 100;
    transition: width 0.05s linear;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1rem; color: var(--text-muted); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}

[data-theme="dark"] a { color: var(--accent-glow); }

a:hover { color: var(--text); }

code, pre, .mono {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow { max-width: var(--container-narrow); }
.container--text   { max-width: 900px; }

.section { padding: 96px 0; position: relative; }

.section-header {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-header--left { margin-left: 0; text-align: left; }

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

[data-theme="dark"] .section-eyebrow { color: var(--accent-glow); }

.section-title { margin-bottom: 16px; }
.section-desc { color: var(--text-muted); font-size: 1.05rem; }
.section-cta { text-align: center; margin-top: 48px; }
.text-center { text-align: center; }

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--r-md);
    z-index: 100;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    transition: all var(--t-base) var(--ease);
}

.site-header.scrolled { background: var(--header-bg-scrolled); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.logo-mark { display: inline-flex; }
.logo-img { height: 32px; width: auto; max-width: 180px; display: block; }

/* Логотипы для разных тем */
.logo-img--dark { display: none; }
.logo-img--light { display: none; }
[data-theme="dark"] .logo-img--dark { display: block; }
[data-theme="light"] .logo-img--light { display: block; }

.logo-text { color: var(--text); }

.main-nav { display: none; }

.main-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.main-nav a {
    display: inline-block;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--r-md);
    transition: all var(--t-fast) var(--ease);
}

.main-nav a:hover, .main-nav a.is-active {
    color: var(--text);
    background: var(--surface);
}

/* Dropdown в шапке */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    background: none;
    border: none;
    border-radius: var(--r-md);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--t-fast) var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
    color: var(--text);
    background: var(--surface);
}

.nav-dropdown-chevron {
    transition: transform var(--t-fast) var(--ease);
    flex-shrink: 0;
}

.nav-dropdown.is-open .nav-dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    display: flex;
    flex-direction: column;
    width: max-content;
    min-width: 200px;
    max-width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 4px;
    list-style: none;
    margin: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
    z-index: 200;
}

.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li a {
    display: block;
    padding: 9px 14px;
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: var(--r-md);
    transition: all var(--t-fast) var(--ease);
}

.nav-dropdown-menu li a:hover {
    color: var(--text);
    background: var(--surface);
}

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

/* ===== USER DROPDOWN ===== */
.user-dropdown { position: relative; }

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 6px 12px 6px 6px;
    cursor: pointer;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--t-fast) var(--ease);
}

.user-dropdown-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown-chevron {
    color: var(--text-muted);
    transition: transform var(--t-fast) var(--ease);
    flex-shrink: 0;
}

.user-dropdown-toggle[aria-expanded="true"] .user-dropdown-chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--t-fast) var(--ease);
    z-index: 200;
}

.user-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-dropdown-fullname {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
}

.user-dropdown-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background var(--t-fast) var(--ease);
}

.user-dropdown-item:hover { background: var(--surface-hover); color: var(--text); }
.user-dropdown-item svg { color: var(--text-muted); flex-shrink: 0; }
.user-dropdown-item--danger { color: var(--danger); }
.user-dropdown-item--danger svg { color: var(--danger); }
.user-dropdown-item--danger:hover { background: rgba(239,68,68,0.08); color: var(--danger); }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    padding: 0;
    color: var(--text-muted);
    transition: all var(--t-fast) var(--ease);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.theme-toggle svg {
    position: absolute;
    transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}

[data-theme="dark"] .theme-toggle .icon-sun {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}
[data-theme="dark"] .theme-toggle .icon-moon {
    transform: rotate(-90deg) scale(0);
    opacity: 0;
}
[data-theme="light"] .theme-toggle .icon-sun {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}
[data-theme="light"] .theme-toggle .icon-moon {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

/* ===== BURGER ===== */
.burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    padding: 0;
    gap: 4px;
    align-items: center;
}

.burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--t-base) var(--ease);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== MOBILE MENU ===== */
.mobile-menu {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 49;
    padding: 24px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
    overflow-y: auto;
}

.mobile-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu ul { list-style: none; margin: 0 0 24px; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--border); }

.mobile-menu a {
    display: block;
    padding: 18px 8px;
    color: var(--text);
    font-size: 1.1rem;
    font-family: var(--font-display);
    font-weight: 600;
}

.mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 8px 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--t-base) var(--ease);
    white-space: nowrap;
    user-select: none;
}

.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: var(--accent-glow);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--text);
}

/* ===== HERO ===== */
.hero { padding: 120px 0 80px; position: relative; }

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-soft);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: var(--r-full);
    margin-bottom: 24px;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.hero-badge--busy .dot {
    background: var(--warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.hero-badge--closed .dot {
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.meta-item { display: flex; flex-direction: column; gap: 4px; }

.meta-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-glow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Hero visual: code card */
.code-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
}

.code-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--accent) 0%, transparent 50%, var(--accent-glow) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-elevated);
}

.code-header .dots { display: inline-flex; gap: 6px; }
.code-header .dots i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface-hover);
}
.code-header .filename {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.code-body {
    margin: 0;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
    overflow-x: auto;
    white-space: pre;
}

[data-theme="dark"] .c-comment { color: var(--text-dim); font-style: italic; }
[data-theme="dark"] .c-keyword { color: #c084fc; }
[data-theme="dark"] .c-class { color: var(--accent-glow); }
[data-theme="dark"] .c-fn { color: #fbbf24; }
[data-theme="dark"] .c-string { color: #4ade80; }

[data-theme="light"] .code-card {
    background: #1a1d2e;
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 16px 48px rgba(20,25,50,0.18), 0 0 40px rgba(99,102,241,0.25);
}
[data-theme="light"] .code-header {
    background: #13151f;
    border-bottom-color: rgba(255,255,255,0.07);
}
[data-theme="light"] .code-header .dots i { background: rgba(255,255,255,0.15); }
[data-theme="light"] .code-header .filename { color: rgba(255,255,255,0.45); }
[data-theme="light"] .code-body { color: #c9d1e0; }
[data-theme="light"] .c-comment { color: #6272a4; font-style: italic; }
[data-theme="light"] .c-keyword { color: #bd93f9; }
[data-theme="light"] .c-class { color: #8be9fd; }
[data-theme="light"] .c-fn { color: #ffb86c; }
[data-theme="light"] .c-string { color: #50fa7b; }

/* ===== PRODUCTS / FILTERS ===== */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
}

.filter {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
}

.filter:hover { color: var(--text); border-color: var(--border-strong); }

.filter.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all var(--t-base) var(--ease);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}

.product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.product-image {
    position: relative;
    aspect-ratio: 20 / 11;
    background: linear-gradient(135deg, var(--surface-elevated), var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img { width: 100%; height: 100%; object-fit: contain; }

.product-placeholder {
    color: var(--accent-soft);
    transition: color var(--t-base) var(--ease);
}

.product-card:hover .product-placeholder { color: var(--accent); }

.product-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 11, 20, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--accent-glow);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-strong);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[data-theme="light"] .product-type {
    background: rgba(255, 255, 255, 0.85);
    color: var(--accent);
}

.product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); }
.product-desc { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 16px; flex: 1; }

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.product-price { font-family: var(--font-mono); font-weight: 600; color: var(--text); }
.product-cta { color: var(--accent); font-size: 0.9rem; font-weight: 500; }
[data-theme="dark"] .product-cta { color: var(--accent-glow); }

.product-card.is-hidden { display: none; }

/* Карточка «В разработке» */
.product-card--wip { opacity: 0.8; }
.product-card--wip:hover { transform: translateY(-4px); }

.product-wip-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--warning, #f59e0b);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--r-full);
}

.product-cta--wip { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 64px;
}

.service-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
    transition: all var(--t-base) var(--ease);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.service-card--featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--surface) 0%, var(--accent-soft) 100%);
}

.service-card--featured:hover {
    box-shadow: var(--shadow-md), 0 0 32px rgba(99, 102, 241, 0.2);
}

.service-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 4px 8px;
    border-radius: var(--r-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--r-md);
    margin-bottom: 20px;
}

[data-theme="dark"] .service-icon { color: var(--accent-glow); }
.service-icon svg { width: 24px; height: 24px; }

.service-card h3 { margin-bottom: 12px; }
.service-card p { margin-bottom: 20px; font-size: 0.95rem; }

.service-price {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
}

[data-theme="dark"] .service-price { color: var(--accent-glow); }

/* Contact CTA */
.contact-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    background: linear-gradient(135deg, var(--surface-elevated), var(--surface));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    pointer-events: none;
}

.contact-cta-text { position: relative; z-index: 1; flex: 1 1 300px; }
.contact-cta-text h3 { margin-bottom: 8px; font-size: 1.4rem; }
.contact-cta-text p { margin: 0; color: var(--text-muted); }

.contact-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ===== REVIEWS ===== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.review-card {
    margin: 0;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-stars { display: flex; gap: 2px; color: var(--warning); }

.review-card p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.review-author small { display: block; color: var(--text-muted); font-size: 0.82rem; }
.review-author strong { display: block; font-size: 0.95rem; color: var(--text); }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar--img { padding: 0; }
.avatar--img img { width: 100%; height: 100%; object-fit: cover; }

/* ===== BLOG ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: all var(--t-base) var(--ease);
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.blog-card a { display: block; padding: 28px; color: inherit; height: 100%; text-decoration: none; }

.blog-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    margin-bottom: 12px;
}

[data-theme="dark"] .blog-date { color: var(--accent-glow); }

.blog-title { font-size: 1.2rem; margin-bottom: 12px; color: var(--text); }
.blog-excerpt { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 16px; }
.blog-more { color: var(--accent); font-weight: 500; font-size: 0.92rem; }
[data-theme="dark"] .blog-more { color: var(--accent-glow); }

/* ===== PRODUCT PAGE ===== */
.breadcrumbs {
    padding: 24px 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--text-dim); }
.breadcrumbs [aria-current] { color: var(--text); }

.product-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 0 64px;
    align-items: center;
}

.product-hero-text { display: flex; flex-direction: column; gap: 16px; }

.badge {
    display: inline-block;
    width: fit-content;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: var(--r-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--border-strong);
}

[data-theme="dark"] .badge { color: var(--accent-glow); }

.product-lead { font-size: 1.15rem; color: var(--text-muted); margin: 0; }

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.product-features {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    font-size: 0.95rem;
}

.product-features svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

[data-theme="dark"] .product-features svg { color: var(--accent-glow); }

.product-cover-wrap {
    width: 100%;
    aspect-ratio: 20 / 11;
    background: linear-gradient(135deg, var(--surface-elevated), var(--surface));
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-cover {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--r-lg);
}

.product-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-soft);
}

/* ===== PRODUCT SIDEBAR LAYOUT ===== */
.product-body-wrap {
    margin-top: 0;
    padding-bottom: 80px;
}

.product-body-wrap--sidebar {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 8px;
    padding-bottom: 80px;
    min-width: 0;
}

.product-main { min-width: 0; }

.product-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.product-sidebar-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.product-sidebar-title {
    padding: 14px 18px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
}

.product-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.product-sidebar-link {
    display: block;
    padding: 9px 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.product-sidebar-link:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.product-sidebar-link.is-active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 500;
}

[data-theme="dark"] .product-sidebar-link.is-active { color: var(--accent-glow); }

.product-main { min-width: 0; }

.product-content { margin: 48px 0; max-width: 760px; }
.product-gallery { margin: 64px 0; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--t-base) var(--ease);
}

.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* FAQ */
.product-faq { margin: 64px 0; max-width: 760px; }

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color var(--t-fast) var(--ease);
}

.faq-item:hover { border-color: var(--border-strong); }

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a4a8c0' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-size: contain;
    flex-shrink: 0;
    transition: transform var(--t-base) var(--ease);
}

.faq-item[open] summary::after { transform: rotate(180deg); }

.faq-answer { padding: 0 24px 20px; color: var(--text-muted); }

/* ===== RELATED PRODUCTS ===== */
.product-related { margin: 56px 0; }

.product-related-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.related-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
    align-items: flex-start;
}
.related-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.related-card-img {
    width: 48px;
    height: 48px;
    border-radius: var(--r-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.related-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.related-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.related-card-body strong { font-size: 0.9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-card-body span { font-size: 0.8rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-body em { font-size: 0.78rem; color: var(--accent); font-style: normal; font-weight: 600; font-family: var(--font-mono); }
[data-theme="dark"] .related-card-body em { color: var(--accent-glow); }

/* Демо-карточка блога */
.blog-card--demo { opacity: 0.6; }

.product-bottom-cta {
    margin: 64px 0 32px;
    padding: 48px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    text-align: center;
}

/* ===== CONTENT PAGE / PROSE ===== */
.content-page { padding-bottom: 64px; }
.page-header { padding: 24px 0 32px; }

.prose { color: var(--text); line-height: 1.7; overflow-wrap: break-word; word-break: break-word; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; color: var(--text-muted); }
.prose h2 { margin: 2em 0 0.6em; font-size: 1.6rem; }
.prose h3 { margin: 1.6em 0 0.5em; }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
[data-theme="dark"] .prose a { color: var(--accent-glow); }
.prose a:hover { border-color: var(--accent); }
.prose code { background: var(--surface); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); padding: 16px; border-radius: var(--r-md); overflow-x: auto; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 20px; margin: 1.5em 0; color: var(--text); font-style: italic; }
.prose img { max-width: 100%; border-radius: var(--r-md); }

/* Таблицы в prose */
.table-scroll-wrap,
.prose .table-wrap,
.prose .feature-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin: 0 0 2em;
}
.table-scroll-wrap table,
.prose .table-wrap table,
.prose .feature-table-wrap table {
    border-collapse: collapse;
    font-size: 0.95rem;
    border: none;
    border-radius: 0;
    margin: 0;
    width: max-content;
    min-width: 100%;
}
.prose table { border-collapse: collapse; font-size: 0.95rem; }
.prose thead tr { background: var(--surface); }
.prose thead th { color: var(--text); font-weight: 600; padding: 13px 18px; text-align: left; border-bottom: 2px solid var(--border); font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.prose tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t-fast); }
.prose tbody tr:last-child { border-bottom: none; }
.prose tbody tr:nth-child(even) { background: rgba(99,102,241,0.03); }
[data-theme="light"] .prose tbody tr:nth-child(even) { background: rgba(99,102,241,0.04); }
.prose tbody tr:hover { background: var(--surface); }
.prose tbody td { padding: 13px 18px; color: var(--text-muted); vertical-align: top; line-height: 1.55; }
.prose tbody td:first-child { color: var(--text); font-weight: 600; }

/* Продающий лид */
.prose .p-lead { font-size: 1.15rem; color: var(--text); line-height: 1.65; margin-bottom: 2em; padding: 24px 28px; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; }

/* Карточки возможностей */
.prose .feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 0 0 2em; }
.prose .feat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px 22px; transition: border-color var(--t-fast), transform var(--t-fast); }
.prose .feat-card:hover { border-color: var(--accent-soft); transform: translateY(-2px); }
.prose .feat-card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.prose .feat-card strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 0.95rem; }
.prose .feat-card span { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

/* Callout */
.prose .callout { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-radius: var(--r-md); margin: 0 0 1.8em; }
.prose .callout--info { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2); }
.prose .callout--warn { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); }
.prose .callout-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.prose .callout p { margin: 0; color: var(--text); font-size: 0.95rem; }

/* Сравнительная таблица с иконками */
.prose .compare-table tbody td:nth-child(2),
.prose .compare-table tbody td:nth-child(3) { text-align: center; font-size: 1.1rem; }

/* ===== WIP PAGE ===== */
.wip-page { position: relative; min-height: 100vh; overflow: hidden; }

.wip-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    gap: 0;
}

.wip-col {
    flex: 1 1 25%;
    margin: 0;
    padding: 32px 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-all;
    background: none;
    border: none;
    border-right: 1px solid rgba(99,102,241,0.06);
    overflow: hidden;
    opacity: 0.38;
    box-sizing: border-box;
    height: 100%;
}

[data-theme="light"] .wip-col {
    opacity: 0.55;
    border-right-color: rgba(99,102,241,0.1);
}
[data-theme="light"] .wip-col .cc { color: #9ca3af; }
[data-theme="light"] .wip-col .ck { color: #7c3aed; }
[data-theme="light"] .wip-col .cs { color: #059669; }
[data-theme="light"] .wip-col .cf { color: #2563eb; }
[data-theme="light"] .wip-col .cn { color: #db2777; }
[data-theme="light"] .wip-col .cm { color: #d97706; }

.wip-col .cc { color: #6b7280; }
.wip-col .ck { color: #818cf8; }
.wip-col .cs { color: #34d399; }
.wip-col .cf { color: #60a5fa; }
.wip-col .cn { color: #f472b6; }
.wip-col .cm { color: #fbbf24; }

/* курсор после последнего символа */
.wip-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: #818cf8;
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: wip-blink 1s step-end infinite;
}
@keyframes wip-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes wip-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.wip-container {
    position: relative;
    z-index: 1;
    padding-top: 48px;
    padding-bottom: 80px;
}

.wip-hero {
    max-width: 680px;
    margin: 48px auto 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.wip-cover {
    width: 100%;
    max-width: 480px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(99,102,241,0.2);
}

.wip-badge-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.wip-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: var(--r-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f59e0b;
}

.wip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: wip-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes wip-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}

.wip-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.wip-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    max-width: 520px;
}

.wip-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.wip-content {
    margin-top: 16px;
    text-align: left;
    width: 100%;
    max-width: 680px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px 36px;
}

@media (max-width: 767px) {
    .wip-content { padding: 20px; }
    .wip-hero { gap: 16px; }
}

/* ===== POST PAGE ===== */
.blog-post { padding: 0 0 80px; }
.post-header { padding: 16px 0 32px; }

.post-meta {
    display: flex;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.post-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.post-comments {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comment {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px;
    margin-bottom: 12px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-nav { margin-top: 48px; }

.post-nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.post-nav-link:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.post-nav-link--next { text-align: right; }

.post-nav-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
[data-theme="dark"] .post-nav-label { color: var(--accent-glow); }

.post-nav-title { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.post-nav-all { white-space: nowrap; justify-self: center; }

@media (max-width: 600px) {
    .post-nav-inner { grid-template-columns: 1fr; }
    .post-nav-all { order: -1; }
    .post-nav-link--next { text-align: left; }
}

/* ===== AUTH ===== */
.auth-section { padding: 80px 0; }

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 70%);
    pointer-events: none;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.auth-logo {
    display: inline-flex;
    margin-bottom: 16px;
}

.auth-form-wrap {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 24px;
}

/* Блок с кнопками OAuth (authAdapters) */
.auth-wid-wrap {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Убираем маркеры списка который рендерит authAdapters() */
.auth-wid-wrap ul,
.auth-wid-wrap ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-wid-wrap li { list-style: none; margin: 0; padding: 0; }

/* Стандартная кнопка Webasyst ID которую рендерит authAdapters() */
.auth-wid-wrap a,
.auth-wid-wrap button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: #fff !important;
    border: none;
    border-radius: var(--r-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--t-base) var(--ease);
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

/* Стили кнопок authAdapters() */
.auth-wid-wrap a:hover,
.auth-wid-wrap button:hover {
    opacity: 0.85;
}

.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--bg-soft);
    border-radius: var(--r-md);
    margin-bottom: 24px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text);
}

.auth-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.92rem;
}

.auth-footer p { margin: 4px 0; }

/* Стили для стандартных форм Webasyst */
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"],
.search-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--t-fast) var(--ease);
}

.auth-card input:focus,
.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-card label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-card .field,
.auth-card .form-row { margin-bottom: 16px; }

.auth-card button[type="submit"],
.auth-card input[type="submit"] {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--t-base) var(--ease);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.auth-card button[type="submit"]:hover,
.auth-card input[type="submit"]:hover {
    background: var(--accent-glow);
    transform: translateY(-1px);
}

/* ===== SEARCH ===== */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.search-form .search-input { flex: 1; }

.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result {
    display: block;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--t-fast) var(--ease);
}

.search-result:hover { border-color: var(--border-strong); }
.search-result h3 { font-size: 1.05rem; margin-bottom: 4px; color: var(--text); }
.search-result p { margin: 0; font-size: 0.9rem; }

.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
}

/* ===== ERROR ===== */
.error-page { padding: 120px 0; }

.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 24px;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-glyph svg { color: var(--accent); }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all var(--t-base) var(--ease);
    z-index: 40;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: auto;
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent 0%, var(--bg-soft) 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand { grid-column: span 1; }
.footer-text { color: var(--text-muted); font-size: 0.92rem; margin-top: 12px; }

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-weight: 500;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a { color: var(--text-muted); font-size: 0.92rem; transition: color var(--t-fast) var(--ease); }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-bottom p { margin: 4px 0; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    .main-nav { display: block; }
    .burger { display: none; }
    .user-name { display: inline; }
    .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
    .product-hero { grid-template-columns: 1.1fr 0.9fr; padding: 48px 0 80px; }
}

@media (min-width: 1024px) {
    .section { padding: 120px 0; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (max-width: 767px) {
    .container { padding: 0 16px; }
    .hero { padding: 64px 0 48px; }
    .hero-meta { gap: 24px; }
    .meta-num { font-size: 1.5rem; }
    .section { padding: 64px 0; }
    .section-header { margin-bottom: 32px; }
    .code-card { display: none; }
    .contact-cta { padding: 28px; }
    .product-bottom-cta { padding: 32px 24px; }
    .auth-card { padding: 28px 20px; }
    .header-actions .user-name,
    .header-actions .logout-label { display: none; }
    /* На мобильном прячем все auth-кнопки из шапки — они есть в мобильном меню */
    .header-actions .btn-ghost,
    .header-actions .btn-primary { display: none; }
    /* Имя бренда рядом с логотипом скрываем на узких экранах */
    .logo .logo-text { display: none; }
    .footer-grid { gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .back-to-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }

    /* Предотвращаем горизонтальное переполнение страниц продуктов */
    .product-page, .content-page, .product-main, .product-content {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    /* pre — горизонтальный скролл */
    .prose pre { max-width: 100%; overflow-x: auto; }
    .prose img { max-width: 100%; height: auto; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-item img { max-width: 100%; height: auto; }
    .related-grid { grid-template-columns: 1fr; }
    .product-toc { display: none; }

    /* Сайдбар на мобильных — горизонтальный скролл */
    .product-body-wrap--sidebar {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .product-sidebar {
        position: static;
        margin-bottom: 32px;
    }
    .product-sidebar-inner {
        border-radius: var(--r-md);
    }
    .product-sidebar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px;
        gap: 4px;
    }
    .product-sidebar-nav::-webkit-scrollbar { display: none; }
    .product-sidebar-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: var(--r-sm);
        padding: 7px 12px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    .product-sidebar-link.is-active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .product-actions { flex-direction: column; align-items: stretch; }
    .product-actions .btn { width: 100%; }
    /* Прячем текст в кнопке регистрации, оставляя только иконку */
    .header-actions .btn-primary .visually-hidden-mobile { display: none; }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

button:focus-visible, a:focus-visible { outline-offset: 4px; }

/* ===== LIGHTBOX ===== */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease);
}
#lightbox.is-open { opacity: 1; pointer-events: auto; }

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.lb-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lb-img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
    display: block;
}

.lb-counter {
    color: rgba(255,255,255,0.6);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.lb-close, .lb-prev, .lb-next {
    position: fixed;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast) var(--ease);
    z-index: 2;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.2); }

.lb-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; }
.lb-prev  { left: 20px;  top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.2rem; }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.2rem; }

@media (max-width: 767px) {
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

/* ===== TABLE OF CONTENTS ===== */
.product-toc {
    margin-bottom: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.product-toc.is-hidden { display: none; }

.product-toc-title {
    padding: 12px 18px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
}

#toc-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.toc-link {
    display: block;
    padding: 7px 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
    line-height: 1.4;
}
.toc-link:hover { color: var(--text); background: var(--surface-hover); }
.toc-link.is-active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
[data-theme="dark"] .toc-link.is-active { color: var(--accent-glow); }
.toc-h3 { padding-left: 32px; font-size: 0.83rem; }

/* ===== SEARCH HIGHLIGHT ===== */
mark.search-highlight {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 600;
}
[data-theme="dark"] mark.search-highlight { color: var(--accent-glow); }

/* ===== ANIMATIONS ON LOAD ===== */
.hero-content > * { animation: fadeUp 0.8s var(--ease) backwards; }
.hero-badge { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }
.hero-meta { animation-delay: 0.5s; }
.hero-visual { animation: fadeUp 1s var(--ease) 0.6s backwards; }

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

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== HELPDESK THEME ===== */
.hd-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    max-width: var(--container);
    margin: 40px auto;
    padding: 0 24px 80px;
    align-items: start;
}

@media (max-width: 767px) {
    .hd-layout { grid-template-columns: 1fr; }
}

/* Sidebar nav */
.hd-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.hd-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.hd-nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hd-nav-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    display: block;
}

.hd-nav-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.hd-nav-list {
    list-style: none;
    margin: 0;
    padding: 8px;
}

.hd-nav-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--t-fast) var(--ease);
}

.hd-nav-list li a:hover,
.hd-nav-list li.active a {
    background: var(--accent-soft);
    color: var(--accent);
}

.hd-nav-list li a svg { flex-shrink: 0; }

.hd-nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
}

.hd-nav-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

/* Main area */
.hd-main { min-width: 0; }

.hd-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.hd-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.hd-page-title svg { color: var(--accent); }

.hd-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color var(--t-fast) var(--ease);
}
.hd-back:hover { color: var(--accent); }

/* Request list */
.hd-request-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hd-request-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    transition: all var(--t-fast) var(--ease);
}

.hd-request-item:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    transform: translateX(4px);
}

.hd-request-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hd-request-body { flex: 1; min-width: 0; }

.hd-request-subject {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-request-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Status badges */
.hd-request-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--r-full);
    flex-shrink: 0;
}

.hd-status--new, [class*="hd-status--new"] { background: rgba(99,102,241,0.15); color: var(--accent-glow); }
.hd-status--open, [class*="hd-status--open"] { background: rgba(16,185,129,0.15); color: var(--success); }
.hd-status--closed, [class*="hd-status--closed"] { background: var(--surface-elevated); color: var(--text-muted); }
.hd-status--deleted { background: rgba(239,68,68,0.1); color: var(--danger); }

/* Thread */
.hd-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.hd-message {
    display: flex;
    gap: 14px;
}

.hd-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hd-message--operator .hd-message-avatar {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent-soft);
}

.hd-message-body {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 18px;
}

.hd-message--operator .hd-message-body {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
}

.hd-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hd-message-author {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

.hd-message-time {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Forms */
.hd-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
}

.hd-field {
    margin-bottom: 20px;
}

.hd-field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.hd-input, .hd-textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--t-fast) var(--ease);
    box-sizing: border-box;
}

.hd-input:focus, .hd-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.hd-input--error, .hd-input--error:focus,
.hd-textarea--error, .hd-textarea--error:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248,113,113,0.15);
}

.hd-textarea { resize: vertical; min-height: 120px; }

.hd-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) { .hd-fields-row { grid-template-columns: 1fr; } }

.hd-reply-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
}

.hd-reply-form h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--text);
}

.hd-reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.hd-closed-notice {
    text-align: center;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Alerts */
.hd-alert {
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.hd-alert--error { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.hd-alert--success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }

/* Empty state */
.hd-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hd-empty svg { opacity: 0.3; }
.hd-empty p { font-size: 1rem; margin: 0; }

/* Home page */
.hd-home { padding: 40px 0; }

.hd-hero {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto 48px;
}

.hd-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

.hd-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

.hd-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hd-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.hd-category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    text-decoration: none;
    transition: all var(--t-base) var(--ease);
}

.hd-category-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hd-category-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px;
}

.hd-category-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Усиленные стили кнопок — перекрывают системные стили Webasyst */
.hd-layout .btn-primary,
.hd-empty .btn-primary,
.hd-page-header .btn-primary,
.hd-reply-actions .btn-primary,
.hd-nav-footer .btn-primary,
.hero-actions .btn-primary,
.contact-cta-actions .btn-primary,
.section-cta .btn-primary {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
    opacity: 1 !important;
}

.hd-layout .btn-outline,
.hd-reply-actions .btn-outline,
.hero-actions .btn-outline,
.contact-cta-actions .btn-outline,
.section-cta .btn-outline {
    background: transparent !important;
    color: var(--text) !important;
    border-color: var(--border-strong) !important;
    opacity: 1 !important;
}

/* Текст кнопок всегда читаем */
.btn-primary,
.btn-primary * {
    color: #ffffff !important;
    text-shadow: none;
}

.btn-outline,
.btn-outline * {
    color: var(--text) !important;
}

/* Чекбокс согласия с политикой */
.hd-field--checkbox {
    margin-bottom: 16px;
}

.hd-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.hd-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--accent);
    cursor: pointer;
}

.hd-checkbox-label a {
    color: var(--accent);
    text-decoration: underline;
}

/* Уведомление о политике персональных данных в футере */
.footer-privacy {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-bottom: 0;
}

.footer-privacy a {
    color: var(--accent);
    text-decoration: underline;
}

/* ============ RESELLER ============ */
.reseller-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.reseller-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, var(--accent) 0%, transparent 55%);
    opacity: .05;
    pointer-events: none;
}
.reseller-badge { display: none; }
.reseller-title {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}
.reseller-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 1.25rem;
}
.reseller-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.reseller-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.reseller-benefits li svg { flex-shrink: 0; margin-top: 2px; }
.reseller-example {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 10px;
    padding: 0.65rem 0.875rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.reseller-example svg { flex-shrink: 0; margin-top: 1px; }
.reseller-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }

.reseller-visual {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    position: sticky;
    top: 2rem;
}
.reseller-card {
    background: var(--bg);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(99,102,241,.1);
}
.reseller-card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 0.5rem;
}
.reseller-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.reseller-card-bonus {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
    background: rgba(99,102,241,.12);
    border-radius: 20px;
    padding: 0.35rem 0.875rem;
}
.reseller-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.75rem 0 0.25rem;
    text-align: center;
}
.reseller-logo-brand {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.5;
    letter-spacing: .03em;
}
.reseller-logo-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    opacity: .5;
}

.reseller-products {
    margin-top: 2.5rem;
}
.reseller-products-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.reseller-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.rp-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.rp-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 0.65rem;
    flex-shrink: 0;
}
.rp-card:hover {
    border-color: var(--accent);
}
.rp-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.rp-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.3rem;
}
.rp-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.rp-card--free { opacity: 0.7; }
.rp-price--free {
    color: var(--success, #10b981) !important;
    font-size: 0.875rem !important;
}
.reseller-products-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    text-align: center;
}
.reseller-products-note a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reseller-legal {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 1.25rem 0 0;
    line-height: 1.6;
}
.reseller-legal a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 900px) {
    .reseller-inner {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    .reseller-visual {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .reseller-card { flex: 1; min-width: 200px; }
    .reseller-logo { display: none; }
}
@media (max-width: 500px) {
    .reseller-visual { display: none; }
}

/* ============ PRIVACY CHECKBOX ============ */
.privacy-checkbox-wrap {
    margin: 16px 0 0;
}

.privacy-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.privacy-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--accent);
    cursor: pointer;
}

.privacy-checkbox-label a {
    color: var(--accent);
    text-decoration: underline;
}

.privacy-checkbox-label a:hover {
    text-decoration: none;
}

.profile-privacy-note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--text-subtle, var(--text-muted));
}

.profile-privacy-note a {
    color: var(--accent);
    text-decoration: underline;
}

/* ============ COOKIE BANNER ============ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 16px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-banner__link {
    color: var(--accent);
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-banner__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .cookie-banner__inner { flex-direction: column; align-items: flex-start; }
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .btn { flex: 1; text-align: center; justify-content: center; }
}
