        :root {
            --bg-primary: #fafaf7;
            --bg-secondary: #ffffff;
            --bg-card: #ffffff;
            --bg-input: #f5f5f0;
            --border-color: #e5e5e0;
            --border: #e5e5e0;
            --border-focus: #d97757;
            --text-primary: #1a1a1a;
            --text-secondary: #555555;
            --text-muted: #888888;
            --accent: #d97757;
            --accent-hover: #c4623f;
            --accent-glow: rgba(217, 119, 87, 0.12);
            --success: #2d8a56;
            --warning: #d97706;
            --error: #c53030;
            --gradient-1: linear-gradient(135deg, #d97757 0%, #c4623f 100%);
            --gradient-2: linear-gradient(135deg, #ffffff 0%, #fafaf7 100%);
            --surface-soft: rgba(255, 255, 255, 0.8);
            --surface-mid: rgba(255, 255, 255, 0.9);
            --surface-strong: #ffffff;
            --shadow-soft: rgba(0, 0, 0, 0.04);
            --shadow-strong: rgba(0, 0, 0, 0.08);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            line-height: 1.7;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        .container {
            max-width: 1240px;
            margin: 0 auto;
            padding: 40px 24px;
            position: relative;
            z-index: 1;
        }

        /* Header */
        .header {
            text-align: left;
            margin-bottom: 40px;
            padding: 32px 0;
            border: none;
            border-radius: 0;
            background: transparent;
            border-bottom: 1px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }

        .header::after {
            display: none;
        }

        .header > :not(.header-telegram-bg) {
            position: relative;
            z-index: 2;
        }

        .lang-toggle {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background: var(--bg-primary);
        }

        .lang-toggle-btn {
            border: 1px solid transparent;
            border-radius: 8px;
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 4px 8px;
            font-size: 0.74rem;
            line-height: 1.2;
            font-weight: 700;
            letter-spacing: 0.03em;
            transition: all 0.2s ease;
        }

        .lang-toggle-btn:hover {
            color: var(--text-primary);
            border-color: rgba(191, 219, 254, 0.95);
            background: rgba(240, 247, 255, 0.92);
        }

        .lang-toggle-btn.active {
            color: #fff;
            background: var(--text-primary);
            border-color: var(--text-primary);
        }

        .lang-toggle-btn.active:hover {
            background: #333;
            border-color: #333;
        }

        .header-telegram-bg {
            position: absolute;
            right: -118px;
            top: 54%;
            width: clamp(260px, 34vw, 450px);
            aspect-ratio: 1 / 1;
            transform: translateY(-50%);
            pointer-events: none;
            z-index: 1;
            opacity: 0.66;
            filter: drop-shadow(0 20px 40px rgba(56, 189, 248, 0.18));
        }

        .header-telegram-bg svg {
            width: 100%;
            height: 100%;
            display: block;
        }

        .header-telegram-bg .tg-ring {
            fill: none;
            stroke: rgba(125, 211, 252, 0.2);
        }

        .header-telegram-bg .tg-ring--outer {
            stroke-width: 1.8;
            stroke-dasharray: 12 16;
        }

        .header-telegram-bg .tg-ring--inner {
            stroke-width: 1.4;
            stroke-dasharray: 8 12;
            opacity: 0.72;
        }

        .header-telegram-bg .tg-logo-circle {
            fill: url(#telegramHeroCircle);
        }

        .header-telegram-bg .tg-logo-circle-outline {
            fill: none;
            stroke: rgba(255, 255, 255, 0.22);
            stroke-width: 2;
        }

        .header-telegram-bg .tg-plane-exact {
            fill: rgba(244, 250, 255, 0.88);
        }

        .header-telegram-bg .tg-crosshair-ring {
            fill: none;
            stroke: rgba(191, 219, 254, 0.58);
            stroke-width: 2.2;
        }

        .header-telegram-bg .tg-crosshair-ring--inner {
            stroke: rgba(186, 230, 253, 0.46);
            stroke-dasharray: 6 9;
        }

        .header-telegram-bg .tg-crosshair-line {
            stroke: rgba(147, 197, 253, 0.82);
            stroke-width: 2.35;
            stroke-linecap: round;
        }

        .header-telegram-bg .tg-crosshair-dot {
            fill: rgba(191, 219, 254, 0.92);
        }

        .header-telegram-bg .tg-bullet-mark {
            opacity: 0.95;
        }

        .header-telegram-bg .tg-bullet-halo {
            fill: url(#tgBulletHalo);
        }

        .header-telegram-bg .tg-bullet-rim {
            fill: none;
            stroke: rgba(241, 245, 249, 0.86);
            stroke-width: 2.2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .header-telegram-bg .tg-bullet-rim-spark {
            fill: none;
            stroke: rgba(248, 250, 252, 0.54);
            stroke-width: 1.3;
            stroke-linecap: round;
        }

        .header-telegram-bg .tg-bullet-core {
            fill: rgba(226, 232, 240, 0.92);
        }

        .header-telegram-bg .tg-bullet-core-inner {
            fill: rgba(30, 41, 59, 0.95);
        }

        .header-telegram-bg .tg-bullet-spall {
            fill: rgba(248, 250, 252, 0.3);
        }

        .header-telegram-bg .tg-bullet-crack {
            fill: none;
            stroke: rgba(241, 245, 249, 0.78);
            stroke-width: 1.35;
            stroke-linecap: round;
        }

        .header-telegram-bg .tg-bullet-speck {
            fill: rgba(248, 250, 252, 0.72);
        }

        .header-kicker {
            display: block;
            width: max-content;
            margin-left: auto;
            margin-bottom: 10px;
            padding: 0;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-family: 'Manrope', sans-serif;
            font-size: 0.66rem;
            font-weight: 600;
            letter-spacing: 0.03em;
            text-transform: none;
        }

        .header h1 {
            font-size: clamp(2rem, 5vw, 3rem);
            font-weight: 800;
            color: var(--text-primary);
            margin-bottom: 12px;
            letter-spacing: -0.03em;
            max-width: 760px;
        }

        .hero-telegram-word {
            display: inline-block;
            margin: 0 0.02em;
            padding: 0.08em 0.26em 0.12em;
            border-radius: 0.24em;
            background: #0088cc;
            color: #f8fcff;
            line-height: 0.95;
            box-shadow: 0 8px 20px rgba(0, 136, 204, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .header p {
            color: var(--text-secondary);
            font-size: 1.1rem;
            max-width: 720px;
        }

        .header-metrics {
            margin-top: 18px;
            display: grid;
            gap: 8px;
            width: max-content;
            max-width: 100%;
        }

        .header-metric {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 4px 0 4px 10px;
            border-left: 2px solid rgba(34, 197, 94, 0.45);
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0) 92%);
            color: var(--text-secondary);
            font-size: 0.82rem;
            font-weight: 500;
            font-family: 'JetBrains Mono', monospace;
            line-height: 1.35;
        }

        .hero-subtitle {
            margin-top: 2px;
            margin-bottom: 18px;
        }

        .hero-cta-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 32px;
            margin-bottom: 10px;
        }

        .hero-cta,
        .hero-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            padding: 10px 16px;
            text-decoration: none;
            font-weight: 700;
            font-size: 0.9rem;
            transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
        }

        .hero-cta {
            color: #052e16;
            background: #86efac;
            border: 1px solid #86efac;
        }

        .hero-cta:hover {
            transform: translateY(-1px);
            background: #4ade80;
            border-color: #4ade80;
        }

        .hero-secondary {
            color: var(--text-secondary);
            background: var(--surface-soft);
            border: 1px solid rgba(191, 219, 254, 0.9);
        }

        .hero-secondary:hover {
            color: var(--text-primary);
            border-color: rgba(34, 197, 94, 0.55);
            background: rgba(220, 252, 231, 0.72);
            transform: translateY(-1px);
        }

        .hero-proof {
            color: var(--text-muted);
            font-size: 0.82rem;
        }

        /* Hero stats strip */
        .hero-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin: 20px 0 4px;
        }
        .hero-stat {
            background: rgba(255, 255, 255, 0.78);
            border: 1px solid rgba(34, 197, 94, 0.18);
            border-radius: 12px;
            padding: 14px 16px;
            text-align: center;
        }
        .hero-stat-value {
            font-size: 1.5rem;
            font-weight: 800;
            background: var(--gradient-1);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
        }
        .hero-stat-label {
            font-size: 0.78rem;
            color: var(--text-muted);
            margin-top: 2px;
        }
        @media (max-width: 520px) {
            .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
            .hero-stat { padding: 10px 8px; }
            .hero-stat-value { font-size: 1.2rem; }
            .hero-stat-label { font-size: 0.7rem; }
        }

        /* Pipeline steps (always visible for cold users) */
        .hero-pipeline {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0;
            margin: 16px 0 0;
            position: relative;
        }
        .hero-pipeline::before {
            content: '';
            position: absolute;
            top: 22px;
            left: 10%;
            right: 10%;
            height: 2px;
            background: linear-gradient(90deg, var(--accent), rgba(34,197,94,0.2));
            z-index: 0;
        }
        .pipeline-step {
            text-align: center;
            position: relative;
            z-index: 1;
        }
        .pipeline-step-icon {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 2px solid var(--accent);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            margin-bottom: 6px;
        }
        .pipeline-step-title {
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.3;
        }
        .pipeline-step-sub {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 2px;
            padding-bottom: 4px;
        }
        @media (max-width: 600px) {
            .hero-pipeline {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px;
            }

            .hero-pipeline::before {
                display: none;
            }

            .pipeline-step {
                display: grid;
                grid-template-columns: 36px minmax(0, 1fr);
                gap: 4px 10px;
                align-items: center;
                padding: 10px 12px;
                border: 1px solid rgba(191, 219, 254, 0.78);
                border-radius: 12px;
                background: var(--surface-mid);
                text-align: left;
            }

            .pipeline-step-icon {
                grid-row: 1 / span 2;
                width: 36px;
                height: 36px;
                font-size: 0.9rem;
                margin-bottom: 0;
            }

            .pipeline-step-title {
                font-size: 0.72rem;
                line-height: 1.2;
            }

            .pipeline-step-sub {
                font-size: 0.64rem;
                line-height: 1.25;
                margin-top: 0;
                padding-bottom: 0;
            }
        }

        @media (max-width: 980px) {
            .header-telegram-bg {
                right: -150px;
                width: clamp(240px, 38vw, 360px);
                opacity: 0.56;
            }
        }

        @media (max-width: 760px) {
            .header-telegram-bg {
                right: -178px;
                top: 56%;
                width: clamp(210px, 48vw, 300px);
                opacity: 0.44;
                filter: drop-shadow(0 12px 24px rgba(2, 132, 199, 0.16));
            }
        }

        @media (max-width: 520px) {
            .header-telegram-bg {
                right: -160px;
                top: 64%;
                width: clamp(185px, 44vw, 240px);
                opacity: 0.32;
            }
        }

        .seo-hub {
            margin-top: 14px;
            margin-bottom: 24px;
            display: grid;
            gap: 12px;
        }

        .seo-hub-title {
            font-size: 1.02rem;
            color: var(--text-secondary);
            margin: 0;
        }

        .seo-hub-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 10px;
        }

        .seo-hub-link {
            display: block;
            border: 1px solid rgba(191, 219, 254, 0.9);
            border-radius: 10px;
            padding: 12px;
            text-decoration: none;
            color: var(--text-secondary);
            background: var(--surface-soft);
            transition: border-color 0.2s ease, transform 0.2s ease;
        }

        .seo-hub-link strong {
            color: var(--text-primary);
            display: block;
            margin-bottom: 4px;
            font-size: 0.95rem;
        }

        .seo-hub-link:hover {
            border-color: rgba(34, 197, 94, 0.6);
            transform: translateY(-1px);
        }

        .landing-section {
            margin-bottom: 24px;
        }

        .top-accordion {
            margin-top: 12px;
            margin-bottom: 16px;
            display: none;
        }

        .top-accordion-btn {
            width: 100%;
            border: 1px dashed rgba(191, 219, 254, 0.95);
            background: var(--surface-mid);
            color: var(--text-secondary);
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 0.9rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s ease;
        }

        .top-accordion-btn:hover {
            color: var(--text-primary);
            border-color: rgba(34, 197, 94, 0.6);
            background: rgba(220, 252, 231, 0.72);
        }

        .top-collapsible.is-collapsed-top {
            display: none;
        }

        .landing-title {
            font-size: 1.28rem;
            font-weight: 800;
            line-height: 1.3;
            letter-spacing: -0.01em;
            margin-bottom: 8px;
        }

        .landing-subtitle {
            color: var(--text-secondary);
            font-size: 0.98rem;
            margin-bottom: 18px;
            max-width: 860px;
        }

        .landing-highlight {
            margin-top: 8px;
            margin-bottom: 18px;
            padding: 11px 14px;
            border: 1px solid rgba(34, 197, 94, 0.55);
            border-left: 4px solid rgba(74, 222, 128, 0.95);
            border-radius: 10px;
            background: linear-gradient(90deg, rgba(220, 252, 231, 0.92), rgba(236, 245, 255, 0.82));
            color: #166534;
            font-size: 0.96rem;
            font-weight: 600;
            max-width: 900px;
        }

        .how-it-works {
            position: relative;
            overflow: hidden;
        }

        .how-it-works::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 16% 14%, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0) 52%);
            pointer-events: none;
        }

        .how-it-works > * {
            position: relative;
            z-index: 1;
        }

        .how-it-works-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 12px;
        }

        .how-it-works-step {
            border: 1px solid rgba(191, 219, 254, 0.88);
            border-radius: 12px;
            padding: 14px;
            background: var(--surface-mid);
            display: grid;
            gap: 8px;
        }

        .how-it-works-step-index {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(34, 197, 94, 0.18);
            border: 1px solid rgba(74, 222, 128, 0.48);
            color: #15803d;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .how-it-works-step-title {
            color: var(--text-primary);
            font-size: 1rem;
            font-weight: 800;
            line-height: 1.3;
        }

        .how-it-works-step-text {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.45;
        }

        @media (max-width: 980px) {
            .how-it-works-grid {
                grid-template-columns: 1fr;
            }
        }

        .salary-impact {
            position: relative;
            overflow: hidden;
        }

        .salary-impact::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 80% 30%, rgba(14, 165, 233, 0.14) 0%, rgba(14, 165, 233, 0) 55%);
            pointer-events: none;
        }

        .salary-impact > * {
            position: relative;
            z-index: 1;
        }

        .salary-impact-grid {
            display: grid;
            grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
            gap: 16px;
            align-items: stretch;
        }

        .salary-impact-controls {
            display: grid;
            gap: 12px;
            align-content: start;
        }

        .salary-impact-label {
            margin-bottom: 6px;
            color: var(--text-secondary);
            font-size: 0.86rem;
            font-weight: 600;
        }

        .salary-impact-input-wrap {
            display: grid;
        }

        .salary-impact-input {
            min-height: 44px;
        }

        .salary-impact-auto {
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 0.8rem;
            line-height: 1.45;
        }

        .salary-impact-result {
            border: 1px solid rgba(56, 189, 248, 0.45);
            border-radius: 14px;
            padding: 16px;
            background: linear-gradient(140deg, rgba(186, 230, 253, 0.72), rgba(255, 255, 255, 0.94));
            display: grid;
            gap: 12px;
            align-content: start;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
        }

        .salary-impact-caption {
            color: #0369a1;
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .salary-impact-amount {
            font-size: clamp(1.8rem, 4vw, 2.4rem);
            font-weight: 900;
            line-height: 1.05;
            letter-spacing: -0.03em;
            color: var(--text-primary);
            text-shadow: 0 10px 26px rgba(186, 230, 253, 0.72);
        }

        .salary-impact-details {
            display: grid;
            gap: 7px;
        }

        .salary-impact-details-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            font-size: 0.88rem;
            color: var(--text-secondary);
        }

        .salary-impact-details-row strong {
            color: var(--text-primary);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.84rem;
            font-weight: 700;
        }

        .salary-impact-note {
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 0.8rem;
            line-height: 1.4;
        }

        @media (max-width: 900px) {
            .salary-impact-grid {
                grid-template-columns: 1fr;
            }
        }

        .compare-wrap {
            border: 1px solid rgba(191, 219, 254, 0.75);
            border-radius: 12px;
            overflow: hidden;
            background: var(--surface-soft);
        }

        .compare-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 640px;
        }

        .compare-table th,
        .compare-table td {
            padding: 12px;
            border-bottom: 1px solid rgba(191, 219, 254, 0.7);
            text-align: left;
            font-size: 0.88rem;
        }

        .compare-table th {
            color: var(--text-primary);
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background: rgba(237, 245, 255, 0.94);
        }

        .compare-table td {
            color: var(--text-secondary);
        }

        .compare-table td strong {
            color: #166534;
        }

        /* Main layout */
        .main-grid {
            display: grid;
            grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
            gap: 32px;
            align-items: start;
        }

        #step1,
        #periodSection,
        #step2,
        #step3 {
            scroll-margin-top: 18px;
        }

        @media (max-width: 900px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Card styling */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 28px;
            transition: border-color 0.2s ease;
        }

        .card:hover {
            border-color: #ccc;
        }

        .card-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .card-title::before {
            content: '';
            width: 4px;
            height: 16px;
            background: var(--gradient-1);
            border-radius: 2px;
        }

        /* Form elements */
        .form-group {
            margin-bottom: 24px;
        }

        .form-group:last-of-type {
            margin-bottom: 28px;
        }

        label {
            display: block;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 10px;
        }

        input, select {
            width: 100%;
            padding: 14px 16px;
            font-family: inherit;
            font-size: 1rem;
            color: var(--text-primary);
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            transition: all 0.2s ease;
            appearance: none;
        }

        input:focus, select:focus {
            outline: none;
            border-color: var(--border-focus);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        input::placeholder {
            color: var(--text-muted);
        }

        select {
            cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239898a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 44px;
        }

        select option {
            background: var(--bg-secondary);
            color: var(--text-primary);
            padding: 12px;
        }

        /* Button */
        .btn-generate {
            width: 100%;
            padding: 14px 24px;
            font-family: inherit;
            font-size: 1rem;
            font-weight: 600;
            color: white;
            background: var(--text-primary);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .btn-generate:hover {
            background: var(--accent);
        }

        .btn-generate:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        /* Result area */
        .result-card {
            animation-delay: 0.1s;
        }

        .result-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .result-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .btn-copy {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-copy:hover {
            color: var(--text-primary);
            border-color: var(--accent);
            background: rgba(34, 197, 94, 0.12);
        }

        .btn-copy.copied {
            color: var(--success);
            border-color: var(--success);
            background: rgba(34, 197, 94, 0.1);
        }

        .btn-send {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 500;
            color: white;
            background: #0088cc;
            border: 1px solid #0088cc;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-send:hover {
            background: #0077b5;
            border-color: #0077b5;
        }

        .btn-send:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .btn-send.sent {
            background: var(--success);
            border-color: var(--success);
        }

        .btn-send.error {
            background: var(--error);
            border-color: var(--error);
        }

        .btn-send svg {
            width: 16px;
            height: 16px;
        }

        .btn-send .send-spinner {
            display: none;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255,255,255,0.4);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .btn-send.loading .send-spinner {
            display: inline-block;
        }

        .btn-send.loading .send-icon {
            display: none;
        }

        .btn-copy svg {
            width: 16px;
            height: 16px;
        }

        .btn-tracker {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: transparent;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-tracker:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
        .btn-tracker:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .btn-tracker.added {
            border-color: var(--success);
            color: var(--success);
        }

        .next-steps-panel {
            display: none;
            margin-top: 14px;
            padding: 14px 16px;
            border-radius: 12px;
            border: 1px solid rgba(34, 197, 94, 0.28);
            background: linear-gradient(135deg, rgba(220, 252, 231, 0.88), rgba(236, 245, 255, 0.96));
        }

        .next-steps-title {
            font-size: 0.96rem;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .next-steps-lead {
            color: var(--text-secondary);
            font-size: 0.88rem;
            margin-bottom: 12px;
        }

        .next-steps-list {
            display: grid;
            gap: 8px;
            margin-bottom: 12px;
        }

        .next-steps-item {
            display: flex;
            gap: 10px;
            align-items: flex-start;
            color: var(--text-secondary);
            font-size: 0.86rem;
        }

        .next-step-index {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            border-radius: 999px;
            background: rgba(134, 239, 172, 0.16);
            color: #15803d;
            font-size: 0.74rem;
            font-weight: 700;
        }

        .next-steps-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .message-output {
            min-height: 400px;
            padding: 20px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.9rem;
            line-height: 1.7;
            color: var(--text-primary);
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            white-space: pre-wrap;
            word-wrap: break-word;
            resize: vertical;
            width: 100%;
            box-sizing: border-box;
            transition: all 0.3s ease;
        }

        .message-output::placeholder {
            color: var(--text-muted);
            font-family: 'Manrope', sans-serif;
            font-style: italic;
        }

        .message-output:disabled {
            cursor: not-allowed;
            opacity: 0.8;
        }

        /* Vacancy type buttons */
        .type-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 24px;
        }

        .type-btn {
            padding: 14px 12px;
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-secondary);
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        .type-btn:hover {
            color: var(--text-primary);
            border-color: #bbb;
        }

        .type-btn.active {
            color: white;
            background: var(--accent);
            border-color: var(--accent);
        }

        .type-btn .icon {
            display: block;
            font-size: 1.4rem;
            margin-bottom: 6px;
        }

        /* Source selector: template vs AI */
        .source-selector {
            display: flex;
            gap: 0;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            overflow: hidden;
        }
        .source-option {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 16px;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            background: transparent;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
        }
        .source-option:first-child {
            border-right: 1px solid var(--border-color);
        }
        .source-option:hover {
            color: var(--text-primary);
            background: var(--bg-input);
        }
        .source-option.active {
            color: white;
            background: var(--text-primary);
        }

        /* Кастомные типы пользователя */
        .type-btn.custom-type {
            border-style: dashed;
            background: rgba(34, 197, 94, 0.05);
        }

        .type-btn.custom-type.active {
            border-style: solid;
        }

        /* Character count */
        .char-count {
            display: flex;
            justify-content: flex-end;
            margin-top: 12px;
            font-size: 0.8rem;
            color: var(--text-muted);
            font-family: 'JetBrains Mono', monospace;
        }

        /* ── Resume section ── */
        .resume-section {
            margin-top: 16px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            overflow: hidden;
            background: var(--bg-card);
        }
        .resume-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            cursor: pointer;
            user-select: none;
            transition: background 0.15s;
        }
        .resume-header:hover {
            background: var(--bg-input);
        }
        .resume-header-icon { font-size: 1.1rem; }
        .resume-header-title {
            flex: 1;
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .resume-header-badge {
            background: var(--accent);
            color: #fff;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 10px;
            min-width: 20px;
            text-align: center;
        }
        .resume-header-arrow {
            color: var(--text-muted);
            font-size: 0.9rem;
            transition: transform 0.2s;
        }
        .resume-header-arrow.open {
            transform: rotate(90deg);
        }
        .resume-body {
            padding: 0 16px 16px;
        }
        .resume-upload-area {
            border: 2px dashed var(--border-color);
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
            margin-bottom: 12px;
        }
        .resume-upload-area:hover,
        .resume-upload-area.drag-over {
            border-color: var(--accent);
            background: var(--accent-glow);
        }
        .resume-upload-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
            font-size: 0.88rem;
        }
        .resume-upload-content svg { color: var(--text-muted); }
        .resume-upload-progress {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        .resume-manual-header {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-bottom: 8px;
            text-align: center;
        }
        .resume-entry-form {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 12px;
        }
        .resume-form-row {
            display: flex;
            gap: 8px;
        }
        .resume-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.88rem;
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
        }
        .resume-input:focus {
            outline: none;
            border-color: var(--border-focus);
        }
        .resume-input-sm { min-width: 0; }
        .resume-textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.88rem;
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
            resize: vertical;
        }
        .resume-textarea:focus {
            outline: none;
            border-color: var(--border-focus);
        }
        .resume-textarea-wrap {
            position: relative;
            width: 100%;
        }
        .resume-textarea-wrap .resume-textarea {
            padding-right: 44px;
        }
        .resume-voice-btn {
            position: absolute;
            right: 8px;
            top: 8px;
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 50%;
            background: var(--bg-card);
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s, color 0.15s;
        }
        .resume-voice-btn:hover {
            background: var(--accent-glow);
            color: var(--accent);
        }
        .resume-voice-btn.recording {
            background: var(--error-bg);
            color: var(--error);
            animation: voice-pulse 1s ease-in-out infinite;
        }
        @keyframes voice-pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.15); }
        }
        .resume-add-btn {
            align-self: flex-start;
            padding: 6px 16px;
            border: 1px solid var(--accent);
            border-radius: 8px;
            background: transparent;
            color: var(--accent);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }
        .resume-add-btn:hover {
            background: var(--accent);
            color: #fff;
        }
        .resume-entries {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .resume-entry-card {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            background: var(--bg-input);
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }
        .resume-entry-info {
            flex: 1;
            min-width: 0;
        }
        .resume-entry-company {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        .resume-entry-position {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .resume-entry-period {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .resume-entry-desc {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 4px;
            white-space: pre-line;
            max-height: 60px;
            overflow: hidden;
        }
        .resume-entry-delete {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 1rem;
            padding: 4px;
            line-height: 1;
            transition: color 0.15s;
        }
        .resume-entry-delete:hover {
            color: var(--error);
        }
        .resume-attach-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 12px;
            padding: 12px 14px;
            background: var(--bg-input);
            border: 2px solid var(--border-color);
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            transition: all 0.2s;
        }
        .resume-attach-toggle:has(input:checked) {
            border-color: var(--accent);
            background: rgba(217, 119, 87, 0.08);
            color: var(--text-primary);
        }
        .resume-attach-toggle input[type="checkbox"] {
            appearance: none;
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid var(--border-color);
            border-radius: 5px;
            background: var(--bg-card);
            cursor: pointer;
            position: relative;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        .resume-attach-toggle input[type="checkbox"]:checked {
            background: var(--accent);
            border-color: var(--accent);
        }
        .resume-attach-toggle input[type="checkbox"]:checked::after {
            content: '✓';
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            font-weight: 700;
        }
        .form-card .resume-form-row { flex-direction: column; }
        @media (min-width: 901px) {
            .form-card .resume-form-row { flex-direction: column; }
        }
        @media (max-width: 900px) {
            .resume-form-row { flex-direction: row; }
        }
        @media (max-width: 480px) {
            .resume-form-row { flex-direction: column; }
        }

        /* ── Demo section ── */
        .demo-card {
            position: relative;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
        }
        .demo-label {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 16px;
        }
        .demo-message {
            background: var(--bg-input);
            border-radius: 8px;
            padding: 20px 24px;
            font-size: 0.95rem;
            line-height: 1.8;
            color: var(--text-primary);
            white-space: pre-line;
            margin-bottom: 24px;
            border: 1px solid var(--border-color);
        }
        .demo-message .demo-highlight {
            background: rgba(217, 119, 87, 0.12);
            color: var(--accent);
            padding: 1px 5px;
            border-radius: 3px;
        }
        .demo-cta {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 28px;
            border: none;
            border-radius: 8px;
            background: var(--text-primary);
            color: #fff;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
            font-family: inherit;
        }
        .demo-cta:hover {
            background: var(--accent);
        }

        .battle-launcher {
            margin-top: 16px;
            padding: 14px;
            border-radius: 10px;
            border: 1px solid rgba(34, 197, 94, 0.32);
            background: var(--surface-mid);
            display: none;
            gap: 12px;
            flex-direction: column;
        }

        .battle-launcher.visible {
            display: flex;
        }

        .battle-head {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .battle-head-title {
            font-weight: 700;
            font-size: 0.95rem;
            color: #166534;
        }

        .battle-head-subtitle {
            color: var(--text-muted);
            font-size: 0.82rem;
        }

        .battle-goal {
            width: 100%;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background: var(--bg-input);
            color: var(--text-primary);
            padding: 10px 12px;
            font-size: 0.9rem;
        }

        .battle-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
            gap: 8px;
        }

        .battle-option {
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .battle-option textarea {
            min-height: 120px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background: var(--bg-input);
            color: var(--text-primary);
            padding: 10px;
            resize: vertical;
            line-height: 1.45;
            font-size: 0.86rem;
        }

        .battle-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .battle-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            border: 1px solid rgba(34, 197, 94, 0.65);
            background: rgba(34, 197, 94, 0.2);
            color: #166534;
            padding: 10px 14px;
            font-size: 0.84rem;
            font-weight: 700;
            cursor: pointer;
            text-decoration: none;
            transition: transform 0.15s ease, background 0.15s ease;
        }

        .battle-btn:hover:not(:disabled) {
            background: rgba(34, 197, 94, 0.32);
            transform: translateY(-1px);
        }

        .battle-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .battle-btn.secondary {
            border-color: var(--border-color);
            background: var(--surface-strong);
            color: var(--text-secondary);
            font-weight: 600;
        }

        .battle-link-wrap {
            border: 1px solid rgba(34, 197, 94, 0.34);
            border-radius: 8px;
            background: rgba(220, 252, 231, 0.72);
            padding: 10px 12px;
            display: none;
            flex-direction: column;
            gap: 8px;
        }

        .battle-link-wrap.visible {
            display: flex;
        }

        .battle-link {
            color: #15803d;
            word-break: break-all;
            font-size: 0.84rem;
            line-height: 1.35;
        }

        .battle-results-mini {
            display: grid;
            gap: 6px;
            font-size: 0.82rem;
            color: var(--text-secondary);
        }

        .battle-result-mini-item {
            display: flex;
            justify-content: space-between;
            gap: 10px;
        }

        /* Error message */
        .error-message {
            padding: 12px 16px;
            margin-bottom: 16px;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 8px;
            color: var(--error);
            font-size: 0.9rem;
            display: none;
        }

        .error-message.success {
            display: block;
            color: var(--success);
            border-color: var(--success);
            background: rgba(34, 197, 94, 0.1);
        }
        .error-message.visible {
            display: block;
            animation: shake 0.4s ease;
        }

        /* Animations */
        @keyframes fadeInUp {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-6px); }
            40%, 80% { transform: translateX(6px); }
        }

        /* Markdown styles */
        .markdown-content h1,
        .markdown-content h2,
        .markdown-content h3,
        .markdown-content h4,
        .markdown-content h5,
        .markdown-content h6 {
            color: var(--text-primary);
            margin: 12px 0 8px 0;
            font-weight: 600;
            line-height: 1.4;
        }

        .markdown-content h1 { font-size: 1.4em; }
        .markdown-content h2 { font-size: 1.3em; }
        .markdown-content h3 { font-size: 1.2em; }
        .markdown-content h4 { font-size: 1.1em; }
        .markdown-content h5 { font-size: 1.05em; }
        .markdown-content h6 { font-size: 1em; }

        .markdown-content p {
            margin: 8px 0;
            line-height: 1.6;
        }

        .markdown-content ul,
        .markdown-content ol {
            margin: 8px 0;
            padding-left: 24px;
        }

        .markdown-content li {
            margin: 4px 0;
            line-height: 1.5;
        }

        .markdown-content strong,
        .markdown-content b {
            color: var(--text-primary);
            font-weight: 600;
        }

        .markdown-content em,
        .markdown-content i {
            font-style: italic;
        }

        .markdown-content a {
            color: var(--accent);
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: all 0.2s;
        }

        .markdown-content a:hover {
            color: var(--accent-hover);
            border-bottom-color: var(--accent-hover);
        }

        .markdown-content code {
            background: var(--bg-input);
            color: var(--accent);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.9em;
        }

        .markdown-content pre {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px;
            overflow-x: auto;
            margin: 12px 0;
        }

        .markdown-content pre code {
            background: transparent;
            padding: 0;
            color: var(--text-secondary);
        }

        .markdown-content blockquote {
            border-left: 3px solid var(--accent);
            padding-left: 16px;
            margin: 12px 0;
            color: var(--text-muted);
            font-style: italic;
        }

        .markdown-content hr {
            border: none;
            border-top: 1px solid var(--border-color);
            margin: 16px 0;
        }

        .markdown-content table {
            width: 100%;
            border-collapse: collapse;
            margin: 12px 0;
        }

        .markdown-content th,
        .markdown-content td {
            border: 1px solid var(--border-color);
            padding: 8px;
            text-align: left;
        }

        .markdown-content th {
            background: var(--bg-input);
            color: var(--text-primary);
            font-weight: 600;
        }

        /* Responsive adjustments */
        @media (max-width: 1024px) {
            .container {
                padding: 28px 18px;
            }

            .main-grid {
                grid-template-columns: 1fr;
                gap: 24px;
            }

            .type-buttons {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .result-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .result-actions {
                width: 100%;
                justify-content: flex-start;
            }

        }

        @media (max-width: 760px) {
            .top-bar {
                justify-content: flex-start;
                margin-bottom: 14px;
            }

            .user-info {
                width: 100%;
                gap: 10px;
                padding: 10px;
            }

            .user-profile {
                width: 100%;
                padding-right: 0;
                padding-bottom: 8px;
                border-right: none;
                border-bottom: 1px solid rgba(191, 219, 254, 0.75);
            }

            .user-name {
                font-size: 0.9rem;
                max-width: 100%;
            }

            .user-actions {
                width: 100%;
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                margin-left: 0;
            }

            .user-actions .lang-toggle {
                justify-content: center;
            }

            .user-actions .btn-auth {
                padding: 8px 12px;
                font-size: 0.8rem;
                justify-content: center;
                flex: 1 1 auto;
                min-width: 0;
            }

            .user-actions .btn-auth svg {
                width: 15px;
                height: 15px;
                flex-shrink: 0;
            }

            .header {
                padding: 20px;
                margin-bottom: 24px;
            }

            .header h1 {
                font-size: clamp(1.7rem, 7vw, 2.3rem);
            }

            .header p {
                font-size: 1rem;
            }

            .card {
                padding: 20px;
            }

            .message-output {
                min-height: 320px;
            }

            .compare-wrap {
                overflow: visible;
                border-radius: 10px;
            }

            .compare-table {
                min-width: 0;
                border-collapse: separate;
                border-spacing: 0;
            }

            .compare-table thead {
                display: none;
            }

            .compare-table tbody {
                display: grid;
                gap: 10px;
                padding: 10px;
            }

            .compare-table tr {
                display: block;
                border: 1px solid rgba(191, 219, 254, 0.72);
                border-radius: 10px;
                background: var(--surface-mid);
                overflow: hidden;
            }

            .compare-table td {
                display: block;
                border: none;
                padding: 8px 10px;
                font-size: 0.84rem;
            }

            .compare-table td + td {
                border-top: 1px solid rgba(71, 85, 105, 0.42);
            }

            .compare-table td::before {
                content: attr(data-label);
                display: block;
                margin-bottom: 4px;
                color: var(--text-muted);
                font-size: 0.69rem;
                text-transform: uppercase;
                letter-spacing: 0.05em;
            }

            .compare-table td:first-child {
                color: var(--text-primary);
                font-weight: 700;
                background: rgba(30, 41, 59, 0.82);
            }

            .compare-table td:first-child::before {
                display: none;
            }
        }

        @media (max-width: 600px) {
            .container {
                padding: 22px 14px;
            }

            .header-metrics {
                gap: 8px;
            }

            .header-metric {
                font-size: 0.74rem;
                padding: 3px 0 3px 8px;
            }

            .type-buttons {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
                margin-bottom: 16px;
            }

            .type-btn {
                padding: 10px 8px;
                font-size: 0.78rem;
                border-radius: 9px;
                line-height: 1.2;
            }

            .type-btn .icon {
                font-size: 1.15rem;
                margin-bottom: 4px;
            }

            .type-btn.add-type-btn {
                gap: 4px !important;
            }

            .source-selector {
                flex-direction: column;
            }

            .source-option:first-child {
                border-right: none;
                border-bottom: 1px solid var(--border-color);
            }

            .result-actions {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                width: 100%;
            }

            .user-actions .btn-auth {
                font-size: 0.75rem;
                padding: 7px 8px;
            }

            .btn-copy,
            .btn-send {
                width: 100%;
                justify-content: center;
                padding: 10px 8px;
            }

            .message-output {
                min-height: 280px;
            }

            .hero-cta-row {
                flex-direction: column;
                align-items: stretch;
            }

            .hero-cta,
            .hero-secondary {
                width: 100%;
            }

            .salary-impact-result {
                padding: 14px;
            }

            .landing-title {
                font-size: 1.15rem;
            }

            .landing-subtitle {
                font-size: 0.92rem;
            }

            .compare-wrap {
                overflow: visible;
            }
        }

        @media (max-width: 390px) {
            .container {
                padding: 16px 12px;
            }

            .header {
                padding: 16px;
                border-radius: 14px;
            }

            .header-kicker {
                margin-bottom: 8px;
                font-size: 0.6rem;
                letter-spacing: 0.02em;
            }

            .header h1 {
                font-size: clamp(1.55rem, 8.2vw, 1.9rem);
            }

            .card {
                padding: 14px;
                border-radius: 14px;
            }

            .type-buttons {
                gap: 6px;
            }

            .type-btn {
                padding: 8px 6px;
                font-size: 0.72rem;
                border-radius: 8px;
            }

            .type-btn .icon {
                font-size: 1rem;
                margin-bottom: 3px;
            }

            .result-actions {
                grid-template-columns: 1fr;
            }

            .btn-auth {
                padding: 7px 10px;
                font-size: 0.78rem;
            }

            .user-actions .btn-auth {
                font-size: 0.72rem;
                padding: 6px 6px;
            }

            .user-actions .btn-auth svg {
                display: none;
            }

            input, select {
                padding: 12px 14px;
                font-size: 0.95rem;
            }

            .btn-generate {
                padding: 14px 16px;
            }

            .vacancies-list {
                max-height: 340px;
            }
        }

        /* Hover effects for interactivity */
        .form-group:hover label {
            color: var(--text-primary);
        }

        /* Loading spinner */
        .spinner {
            display: none;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .btn-generate.loading .spinner {
            display: inline-block;
            margin-right: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Top bar with auth */
        .top-bar {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 18px;
            animation: fadeInUp 0.4s ease-out;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            justify-content: flex-start;
            width: 100%;
            max-width: 100%;
            padding: 10px 12px;
            border: 1px solid rgba(191, 219, 254, 0.85);
            border-radius: 14px;
            background: var(--surface-mid);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-right: 10px;
            border-right: 1px solid rgba(191, 219, 254, 0.75);
            min-width: 0;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--gradient-1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            color: white;
            overflow: hidden;
        }

        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .user-name {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 220px;
        }

        .user-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-left: auto;
            justify-content: flex-end;
        }

        .user-actions .lang-toggle {
            background: rgba(255, 255, 255, 0.82);
            border-color: rgba(191, 219, 254, 0.9);
        }

        .top-bar-lang-host {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
        }

        .btn-auth {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 18px;
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .user-actions .btn-auth {
            padding: 8px 12px;
            font-size: 0.84rem;
            font-weight: 600;
            background: rgba(255, 255, 255, 0.82);
            border-color: rgba(191, 219, 254, 0.9);
            border-radius: 10px;
            color: var(--text-secondary);
        }

        .user-actions .btn-auth:hover {
            color: var(--text-primary);
            border-color: rgba(34, 197, 94, 0.58);
            background: rgba(220, 252, 231, 0.76);
            transform: translateY(-1px);
        }

        .btn-auth:hover {
            color: var(--text-primary);
            border-color: var(--accent);
            background: rgba(34, 197, 94, 0.12);
        }

        .btn-auth.telegram {
            background: #0088cc;
            border-color: #0088cc;
            color: white;
        }

        .btn-auth.telegram:hover {
            background: #0077b5;
            border-color: #0077b5;
        }

        .telegram-widget-inline {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 42px;
        }

        .telegram-widget-inline iframe {
            border: 0;
        }

        #generateAuthNotice .telegram-widget-inline {
            margin-left: auto;
        }

        .auth-jump-btn {
            margin-left: auto;
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid rgba(34, 197, 94, 0.55);
            background: rgba(34, 197, 94, 0.18);
            color: #dcfce7;
            font-weight: 600;
            font-size: 0.84rem;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
        }

        .auth-jump-btn:hover {
            background: rgba(34, 197, 94, 0.28);
            border-color: rgba(34, 197, 94, 0.75);
            transform: translateY(-1px);
        }

        .btn-auth svg {
            width: 18px;
            height: 18px;
        }

        .form-hint {
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        .form-hint a {
            text-decoration: none;
            transition: opacity 0.2s;
        }

        .form-hint a:hover {
            opacity: 0.8;
        }

        /* Input with prefix (@) */
        .input-with-prefix {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-prefix {
            position: absolute;
            left: 16px;
            color: var(--text-muted);
            font-size: 1rem;
            pointer-events: none;
            z-index: 1;
        }

        .input-with-prefix input {
            padding-left: 32px;
        }

        /* Name hint below input */
        .name-hint {
            display: block;
            font-size: 0.75rem;
            margin-top: 6px;
            height: 1rem;
            color: var(--text-muted);
            opacity: 0;
            transition: opacity 0.2s;
        }

        .name-hint.visible {
            opacity: 1;
        }

        .name-hint.success {
            color: var(--success);
        }

        .name-hint.warning {
            color: var(--warning);
        }

        .name-hint.loading {
            color: var(--accent);
        }

        /* Vacancies list */
        .vacancies-list {
            max-height: 520px;
            overflow-y: auto;
            padding-right: 4px;
        }

        .vacancies-list::-webkit-scrollbar {
            width: 8px;
        }

        .vacancies-list::-webkit-scrollbar-thumb {
            background: rgba(34, 197, 94, 0.35);
            border-radius: 999px;
        }

        .vacancy-item {
            position: relative;
            padding: 14px;
            margin-bottom: 12px;
            border: 1px solid rgba(191, 219, 254, 0.9);
            border-radius: 12px;
            background: var(--surface-soft);
            cursor: pointer;
            box-shadow: 0 10px 28px rgba(148, 163, 184, 0.18);
            transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
        }

        .vacancy-item:last-child {
            margin-bottom: 0;
        }

        .vacancy-item:hover {
            background: rgba(220, 252, 231, 0.74);
            border-color: rgba(34, 197, 94, 0.45);
            transform: translateY(-1px);
            box-shadow: 0 12px 32px rgba(148, 163, 184, 0.22);
        }

        .vacancy-item.selected {
            border-color: rgba(34, 197, 94, 0.55);
            background: rgba(34, 197, 94, 0.14);
            box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.24), 0 0 0 1px rgba(34, 197, 94, 0.16);
        }

        .vacancy-select-indicator {
            display: inline-flex;
            align-items: center;
            align-self: flex-start;
            justify-content: center;
            gap: 8px;
            margin-left: auto;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid rgba(74, 222, 128, 0.45);
            background: rgba(22, 163, 74, 0.16);
            color: #bbf7d0;
            font-size: 0.75rem;
            font-weight: 700;
            line-height: 1;
            letter-spacing: 0.01em;
            white-space: nowrap;
        }

        .vacancy-select-indicator .selected-state {
            display: none;
        }

        .vacancy-select-arrow {
            font-size: 0.8rem;
            opacity: 0.9;
        }

        .vacancy-item.selected .vacancy-select-indicator {
            border-color: rgba(34, 197, 94, 0.6);
            background: rgba(34, 197, 94, 0.22);
            color: #dcfce7;
        }

        .vacancy-item.selected .vacancy-select-indicator .default-state,
        .vacancy-item.selected .vacancy-select-arrow {
            display: none;
        }

        .vacancy-item.selected .vacancy-select-indicator .selected-state {
            display: inline;
        }

        .vacancy-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 10px;
        }

        .vacancy-head-main {
            min-width: 0;
            flex: 1;
        }

        .vacancy-title {
            font-size: 1.06rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.4;
            margin-bottom: 8px;
        }

        .vacancy-position-at-company {
            font-size: 0.88rem;
            color: var(--text-muted);
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .vacancy-position-at-company strong {
            color: var(--text-primary);
            font-weight: 600;
        }

        .vacancy-subtitle {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 10px;
        }

        .vacancy-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 5px 12px;
            border-radius: 999px;
            font-size: 0.8rem;
            font-weight: 600;
            line-height: 1.3;
            letter-spacing: 0.005em;
            border: 1px solid rgba(191, 219, 254, 0.62);
            background: rgba(240, 247, 255, 0.86);
            color: var(--text-secondary);
        }

        .vacancy-chip.role {
            background: rgba(240, 247, 255, 0.92);
            border-color: rgba(191, 219, 254, 0.62);
        }

        .vacancy-chip.type {
            background: rgba(220, 252, 231, 0.56);
            border-color: rgba(187, 247, 208, 0.76);
        }

        .vacancy-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
        }

        .vacancy-tag {
            padding: 4px 10px;
            border-radius: 8px;
            border: 1px solid rgba(191, 219, 254, 0.58);
            background: rgba(255, 255, 255, 0.82);
            color: var(--text-muted);
            font-size: 0.78rem;
            font-family: 'JetBrains Mono', monospace;
        }

        .vacancy-text-wrap {
            margin-bottom: 12px;
            padding: 12px 14px;
            border: 1px solid rgba(191, 219, 254, 0.48);
            border-radius: 10px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 255, 0.86));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
        }

        .vacancy-text {
            color: var(--text-secondary);
            font-size: 0.92rem;
            margin-bottom: 0;
            word-wrap: break-word;
            line-height: 1.62;
        }

        .vacancy-text-preview > *:first-child,
        .vacancy-text-full > *:first-child {
            margin-top: 0;
        }

        .vacancy-text-preview > *:last-child,
        .vacancy-text-full > *:last-child {
            margin-bottom: 0;
        }

        .vacancy-text-full {
            display: none;
        }

        .vacancy-toggle-text {
            font-size: 0.85rem;
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.88);
            border: 1px solid rgba(34, 197, 94, 0.35);
            padding: 8px 13px;
            border-radius: 10px;
            margin-bottom: 10px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
            transition: border-color 0.2s, background 0.2s, color 0.2s;
        }

        .vacancy-toggle-text:hover {
            color: #166534;
            background: rgba(220, 252, 231, 0.86);
            border-color: rgba(34, 197, 94, 0.6);
        }

        .vacancy-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 8px;
            padding-top: 9px;
            border-top: 1px solid rgba(100, 116, 139, 0.24);
        }

        .vacancy-entities {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            min-width: 0;
        }

        .vacancy-entity {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 5px 9px;
            border-radius: 8px;
            font-size: 0.78rem;
            color: var(--text-secondary);
            background: rgba(255, 255, 255, 0.82);
            border: 1px solid rgba(191, 219, 254, 0.48);
            max-width: 100%;
        }

        .vacancy-entity strong {
            font-weight: 700;
            color: var(--text-primary);
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .vacancy-entity.channel strong {
            color: #93c5fd;
        }

        .vacancy-entity.recruiter strong,
        .vacancy-entity.author strong {
            color: var(--text-secondary);
        }

        .vacancy-footer-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .vacancy-forum-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: rgba(0, 136, 204, 0.15);
            border: 1px solid rgba(0, 136, 204, 0.3);
            color: #38bdf8;
            transition: all 0.2s ease;
        }

        .vacancy-forum-link:hover {
            background: rgba(0, 136, 204, 0.3);
            border-color: rgba(0, 136, 204, 0.6);
            color: #7dd3fc;
            transform: translateY(-1px);
        }

        .vacancy-forum-link svg,
        .vacancy-publish-btn svg {
            width: 14px;
            height: 14px;
        }


        .vacancy-date {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.77rem;
            color: #f8d27a;
            white-space: nowrap;
            opacity: 0.9;
        }

        .vacancy-channel-name,
        .vacancy-person-name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 240px;
        }

        .vacancies-empty {
            padding: 40px;
            text-align: center;
            color: var(--text-muted);
        }

        .vacancies-empty p + p {
            margin-top: 8px;
            font-size: 0.9rem;
        }

        .vacancy-link-search {
            margin-bottom: 12px;
        }

        .vacancy-link-search-row {
            display: flex;
            gap: 8px;
        }

        .vacancy-link-search-row input {
            flex: 1;
            padding: 8px 12px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.82rem;
            background: var(--bg-input, rgba(255, 255, 255, 0.88));
            border: 1px solid rgba(191, 219, 254, 0.5);
            border-radius: 8px;
            color: var(--text-primary);
            outline: none;
            transition: border-color 0.2s;
        }

        .vacancy-link-search-row input:focus {
            border-color: rgba(0, 136, 204, 0.6);
        }

        .vacancy-link-search-row button {
            padding: 8px 16px;
            font-family: inherit;
            font-size: 0.84rem;
            font-weight: 600;
            background: rgba(0, 136, 204, 0.18);
            border: 1px solid rgba(0, 136, 204, 0.4);
            border-radius: 8px;
            color: #7dd3fc;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s;
        }

        .vacancy-link-search-row button:hover {
            background: rgba(0, 136, 204, 0.3);
            border-color: rgba(0, 136, 204, 0.7);
        }

        .vacancy-link-result {
            margin-top: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.84rem;
            line-height: 1.4;
        }

        .vacancy-link-result.error {
            background: rgba(239, 68, 68, 0.12);
            border: 1px solid rgba(239, 68, 68, 0.35);
            color: #fca5a5;
        }

        .vacancy-link-result.success {
            background: rgba(34, 197, 94, 0.12);
            border: 1px solid rgba(34, 197, 94, 0.35);
            color: #bbf7d0;
            cursor: pointer;
            transition: background 0.2s;
        }

        .vacancy-link-result.success:hover {
            background: rgba(34, 197, 94, 0.2);
        }

        .vacancy-selection-hint {
            margin-top: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px dashed rgba(34, 197, 94, 0.45);
            background: rgba(22, 163, 74, 0.12);
            color: #bbf7d0;
            font-size: 0.88rem;
            line-height: 1.45;
        }

        .vacancy-selection-hint.warning {
            border-style: solid;
            border-color: rgba(245, 158, 11, 0.65);
            background: rgba(245, 158, 11, 0.14);
            color: #fde68a;
        }

        @media (max-width: 600px) {
            .container {
                padding: 22px 14px;
            }

            .header {
                padding: 20px;
                margin-bottom: 24px;
            }

            .header h1 {
                max-width: 100%;
            }

            .hero-stats {
                gap: 8px;
            }

            .hero-stat {
                padding: 12px 10px;
                border-radius: 14px;
            }

            .hero-stat-value {
                font-size: 1.25rem;
            }

            .hero-stat-label {
                font-size: 0.68rem;
                line-height: 1.25;
            }

            .header-metrics {
                gap: 8px;
            }

            .header-metric {
                font-size: 0.74rem;
                padding: 3px 0 3px 8px;
            }

            .source-selector {
                flex-direction: column;
            }

            .source-option:first-child {
                border-right: none;
                border-bottom: 1px solid var(--border-color);
            }

            .result-actions {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                width: 100%;
            }

            .result-header {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
            }

            .btn-copy,
            .btn-send {
                width: 100%;
                justify-content: center;
                padding: 10px 8px;
            }

            .message-output {
                min-height: 280px;
            }

            .vacancies-list {
                max-height: 420px;
            }

            .vacancy-item {
                padding: 12px;
            }

            .vacancy-head {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }

            .vacancy-select-indicator {
                margin-left: 0;
                align-self: flex-start;
                min-height: 32px;
                padding: 0 10px;
                font-size: 0.72rem;
            }

            .vacancy-title {
                font-size: 0.98rem;
            }

            .vacancy-footer {
                gap: 8px;
            }

            .vacancy-footer-right {
                width: 100%;
                justify-content: space-between;
            }

            .vacancy-date {
                width: 100%;
            }

            .vacancy-channel-name,
            .vacancy-person-name {
                max-width: 190px;
            }
        }

        @media (max-width: 430px) {
            body {
                padding-bottom: calc(112px + env(safe-area-inset-bottom));
            }

            .container {
                padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
            }

            .main-grid {
                gap: 16px;
            }

            .card {
                padding: 16px;
                border-radius: 14px;
            }

            input,
            select,
            textarea {
                font-size: 16px;
            }

            .btn-generate {
                min-height: 48px;
                position: sticky;
                bottom: calc(10px + env(safe-area-inset-bottom));
                z-index: 20;
            }

            .btn-copy,
            .btn-send,
            .battle-btn,
            .btn-auth {
                min-height: 44px;
            }

            .result-actions {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
            }

            .period-buttons {
                display: grid !important;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                width: 100%;
            }

            .period-btn {
                width: 100%;
                padding-inline: 10px !important;
            }

            .vacancy-link-search-row {
                flex-direction: column;
            }

            .vacancy-link-search-row button {
                width: 100%;
                min-height: 42px;
            }

            .vacancy-text-wrap {
                padding: 10px 12px;
            }

            .vacancy-text {
                font-size: 0.88rem;
                line-height: 1.56;
            }

            .battle-grid,
            .battle-actions {
                grid-template-columns: 1fr;
            }

            .battle-actions {
                display: grid;
            }

            .vacancies-list {
                max-height: 42vh;
            }
        }

        @media (max-width: 390px) {
            .container {
                padding: 16px 12px;
            }

            .header {
                padding: 16px;
                border-radius: 14px;
            }

            .header-kicker {
                margin-bottom: 8px;
                font-size: 0.6rem;
                letter-spacing: 0.02em;
            }

            .header h1 {
                font-size: clamp(1.55rem, 8.2vw, 1.9rem);
            }

            .hero-pipeline {
                grid-template-columns: 1fr;
            }

            .card {
                padding: 14px;
                border-radius: 14px;
            }

            .result-actions {
                grid-template-columns: 1fr;
            }

            .btn-auth {
                padding: 7px 10px;
                font-size: 0.78rem;
            }

            input, select {
                padding: 12px 14px;
                font-size: 0.95rem;
            }

            .btn-generate {
                padding: 14px 16px;
            }

            .vacancies-list {
                max-height: 340px;
            }
        }
